mbox series

[net-next,v2,0/2] net: enetc: add support for software TSO

Message ID 20211007153043.2675008-1-ioana.ciornei@nxp.com (mailing list archive)
Headers show
Series net: enetc: add support for software TSO | expand

Message

Ioana Ciornei Oct. 7, 2021, 3:30 p.m. UTC
This series adds support for driver level TSO in the enetc driver.

Ever since the ENETC MDIO erratum workaround is in place, the Tx path is
incurring a penalty (enetc_lock_mdio/enetc_unlock_mdio) for each skb to
be sent out. On top of this, ENETC does not support Tx checksum
offloading. This means that software TSO would help performance just by
the fact that one single mdio lock/unlock sequence would cover multiple
packets sent. On the other hand, checksum needs to be computed in
software since the controller cannot handle it.

This is why, 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.

Even with that, the performance improvement of a TCP flow running on a
single A72@1.3GHz of the LS1028A SoC (2.5Gbit/s port) is the following:

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

Changes in v2:
 - declare NETIF_F_HW_CSUM instead of NETIF_F_IP_CSUM in 1/2
 - add support for TSO over IPv6 (NETIF_F_TSO6 and csum compute) in 2/2

Ioana Ciornei (2):
  net: enetc: declare NETIF_F_HW_CSUM and do it in software
  net: enetc: add support for software TSO

 drivers/net/ethernet/freescale/enetc/enetc.c  | 317 +++++++++++++++++-
 drivers/net/ethernet/freescale/enetc/enetc.h  |   4 +
 .../net/ethernet/freescale/enetc/enetc_pf.c   |   8 +-
 .../net/ethernet/freescale/enetc/enetc_vf.c   |   8 +-
 4 files changed, 317 insertions(+), 20 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 8, 2021, 4:30 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu,  7 Oct 2021 18:30:41 +0300 you wrote:
> This series adds support for driver level TSO in the enetc driver.
> 
> Ever since the ENETC MDIO erratum workaround is in place, the Tx path is
> incurring a penalty (enetc_lock_mdio/enetc_unlock_mdio) for each skb to
> be sent out. On top of this, ENETC does not support Tx checksum
> offloading. This means that software TSO would help performance just by
> the fact that one single mdio lock/unlock sequence would cover multiple
> packets sent. On the other hand, checksum needs to be computed in
> software since the controller cannot handle it.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/2] net: enetc: declare NETIF_F_HW_CSUM and do it in software
    https://git.kernel.org/netdev/net-next/c/acede3c5dad5
  - [net-next,v2,2/2] net: enetc: add support for software TSO
    https://git.kernel.org/netdev/net-next/c/fb8629e2cbfc

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html