OSDN Git Service

net: enetc: add support for software TSO
authorIoana Ciornei <ioana.ciornei@nxp.com>
Thu, 7 Oct 2021 15:30:43 +0000 (18:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Oct 2021 15:59:08 +0000 (16:59 +0100)
commitfb8629e2cbfce2b695521d6d33d029117ceda007
treed197863fbece408e5e2142111e33fc19044c157d
parentacede3c5dad5b83c75c624514bd57171062b4c46
net: enetc: add support for software TSO

This patch adds support for driver level TSO in the enetc driver using
the TSO API.

Beside using the usual tso_build_hdr(), tso_build_data() this specific
implementation also has to compute the checksum, both IP and L4, for
each resulted segment. This is because the ENETC controller does not
support Tx checksum offload which is needed in order to take advantage
of TSO.

With the workaround for the ENETC MDIO erratum in place the Tx path of
the driver is forced to lock/unlock for each skb sent. This is why, even
though we are computing the checksum by hand we see the following
improvement in TCP termination on the LS1028A SoC, on a single A72 core
running at 1.3GHz:

before: 1.63 Gbits/sec
after:  2.34 Gbits/sec

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc.h
drivers/net/ethernet/freescale/enetc/enetc_pf.c
drivers/net/ethernet/freescale/enetc/enetc_vf.c