[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240703224850.1226697-1-tom@herbertland.com>
Date: Wed, 3 Jul 2024 15:48:40 -0700
From: Tom Herbert <tom@...bertland.com>
To: davem@...emloft.net,
kuba@...nel.org,
jesse.brandeburg@...el.com,
anthony.l.nguyen@...el.com,
cai.huoqing@...ux.dev,
netdev@...r.kernel.org,
felipe@...anda.io
Cc: Tom Herbert <tom@...bertland.com>
Subject: [RFC net-next 00/10] crc-offload: Split RX CRC offload from csum offload
In this patch set we create csum_valid_crc32 flag in the skbuff.
This is used by drivers to report a valid offloaded CRC, in lieu
of setting CHECKSUM_UNNECESSARY. The benefits of this are:
1) It's compatible with checksum-complete. We can do checksum-
complete with a validate CRC at the same time
2) Checksum-unnecessary conversion may erase the indication of
the offloaded CRC. For instance in a SCTP/UDP packet where the
driver reports both the non-zero UDP checksum and the CRC
have been validate (i.e. csum_level is set to 1), then checksum-
complete conversion erases the indication and the host has to compute
the CRC again
3) It just seems awkward in general to be mixing fundamentally different
verifications, and wouldn't be surprising if there are more bugs
lurking in this area
Additionally, some helper functions are added:
- skb_csum_crc32_unnecessary
- skb_reset_csum_crc32_unnecessary
- skb_set_csum_crc32_unnecessary
Changed FCOE and SCTP input to call skb_csum_crc32_unnecessary and
skb_reset_csum_crc32_unnecessary
Call the helper function skb_set_csum_crc32_unnecessary from drivers
instead of setting CHECKSUM_UNNECESSARY. This includes cavium thunder,
gve, hisilicon, hns3, idpf, ixgbe, wangxun. If I missed any please let
me know. The change was fairly simple, just need to identify that the
SCTP or FCOE CRC was validated and call the function.
Tom Herbert (10):
skbuff: Rename csum_not_inet to csum_is_crc32
skbuff: Add csum_valid_crc32 flag
sctp: Call skb_csum_crc32_unnecessary
fcoe: Call skb_csum_crc32_unnecessary
cavium_thunder: Call skb_set_csum_crc32_unnecessary
gve: Call skb_set_csum_crc32_unnecessary
hisilicon: Call skb_set_csum_crc32_unnecessary
idpf: Call skb_set_csum_crc32_unnecessary
ixgbe: Call skb_set_csum_crc32_unnecessary
wangxun: Call skb_set_csum_crc32_unnecessary
.../net/ethernet/cavium/thunder/nicvf_main.c | 5 +-
drivers/net/ethernet/google/gve/gve_rx_dqo.c | 4 +-
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 5 +-
.../net/ethernet/hisilicon/hns3/hns3_enet.c | 18 ++++--
.../ethernet/intel/idpf/idpf_singleq_txrx.c | 4 +-
drivers/net/ethernet/intel/idpf/idpf_txrx.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 2 +-
drivers/net/ethernet/wangxun/libwx/wx_lib.c | 5 +-
drivers/scsi/fcoe/fcoe.c | 6 +-
include/linux/skbuff.h | 58 +++++++++++++++----
net/core/dev.c | 2 +-
net/sched/act_csum.c | 2 +-
net/sctp/input.c | 6 +-
net/sctp/offload.c | 2 +-
net/sctp/output.c | 2 +-
15 files changed, 89 insertions(+), 34 deletions(-)
--
2.34.1
Powered by blists - more mailing lists