Skip to content

drivers: Fix drivers doing TX csum offload with EH

Tom Herbert netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 6 repliesIn review
  2. v17 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ipv6: Add ipv6_skip_exthdr_no_rthdrinclude/net/ipv6.h net/ipv6/exthdrs_core.c+33 -90 replies
2/7i40e: Don't do TX csum offload with routing header presentdrivers/net/ethernet/intel/i40e/i40e_txrx.c+9 -130 replies
3/7iavf: Don't do TX csum offload with routing header presentdrivers/net/ethernet/intel/iavf/iavf_txrx.c+10 -100 replies
4/7ice: Don't do TX csum offload with routing header presentdrivers/net/ethernet/intel/ice/ice_txrx.c+9 -130 replies
5/7idpf: Don't do TX csum offload with routing header presentdrivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c+14 -140 replies
6/7hinic: Don't do TX csum offload with routing header presentdrivers/net/ethernet/huawei/hinic/hinic_tx.c+17 -60 replies
7/7fm10k: Don't do TX csum offload with routing header presentdrivers/net/ethernet/intel/fm10k/fm10k_main.c+6 -30 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPrzemek Kitszel
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/7] drivers: Fix drivers doing TX csum offload with EH

Several NICs would seem to support protocol specific TX checksum offload and allow for cases where an IPv6 packet contains extension headers. When deciding whether to offload a packet, ipv6_skip_exthdr is called to skip extension headers. The problem is that if a packet contains an IPv6 Routing Header then protocol specific checksum offload can't work, the destination IP address in the IPv6 header is not the same one that is used in the pseudo header for TCP or UDP. The correct address is derived from the last segment in the routing list (which itself might be obfuscated so that a device could even read it).

This patch set adds a new function ipv6_skip_exthdr_no_rthdr to be called in lieu of ipv6_skip_exthdr. If a routing header is present in a packet then ipv6_skip_exthdr_no_rthdr returns a value less than zero, this is an indication to the driver that TX checksum offload is not viable and it should call skb_checksum_help instead of offloading the checksum.

The i40e, iavf, ice, idpf, hinic, and fm10k are updated accordingly to call ipv6_skip_exthdr_no_rthdr.

Testing: The code compiles, but is otherwise untested due to lack of NIC hardware. It would be appreciated if someone with access to the hardware could test.

v2: Fixed uninitialized variable in exthdrs_core.c

Tom Herbert (7):
ipv6: Add ipv6_skip_exthdr_no_rthdr
i40e: Don't do TX csum offload with routing header present
iavf: Don't do TX csum offload with routing header present
ice: Don't do TX csum offload with routing header present
idpf: Don't do TX csum offload with routing header present
hinic: Don't do TX csum offload with routing header present
fm10k: Don't do TX csum offload with routing header present

 drivers/net/ethernet/huawei/hinic/hinic_tx.c  | 23 +++++++++++----
 drivers/net/ethernet/intel/fm10k/fm10k_main.c |  9 ++++--
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 22 ++++++---------
 drivers/net/ethernet/intel/iavf/iavf_txrx.c   | 20 ++++++-------
 drivers/net/ethernet/intel/ice/ice_txrx.c     | 22 ++++++---------
 .../ethernet/intel/idpf/idpf_singleq_txrx.c   | 28 +++++++++----------
 include/net/ipv6.h                            | 17 +++++++++--
 net/ipv6/exthdrs_core.c                       | 25 ++++++++++++-----
 8 files changed, 98 insertions(+), 68 deletions(-)
Signature · 1 line
2.34.1