Skip to content

RFC crc-offload: Split RX CRC offload from csum offload

Tom Herbert netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10skbuff: Rename csum_not_inet to csum_is_crc32include/linux/skbuff.h net/core/dev.c net/sched/act_csum.c +2 more+13 -131 reply
2/10skbuff: Add csum_valid_crc32 flaginclude/linux/skbuff.h+37 -30 replies
3/10sctp: Call skb_csum_crc32_unnecessarynet/sctp/input.c+2 -40 replies
4/10fcoe: Call skb_csum_crc32_unnecessarydrivers/scsi/fcoe/fcoe.c+4 -20 replies
5/10cavium_thunder: Call skb_set_csum_crc32_unnecessarydrivers/net/ethernet/cavium/thunder/nicvf_main.c+4 -10 replies
6/10gve: Call skb_set_csum_crc32_unnecessarydrivers/net/ethernet/google/gve/gve_rx_dqo.c+3 -10 replies
7/10hisilicon: Call skb_set_csum_crc32_unnecessarydrivers/net/ethernet/hisilicon/hns/hns_enet.c drivers/net/ethernet/hisilicon/hns3/hns3_enet.c+17 -60 replies
8/10idpf: Call skb_set_csum_crc32_unnecessarydrivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c drivers/net/ethernet/intel/idpf/idpf_txrx.c+4 -20 replies
9/10ixgbe: Call skb_set_csum_crc32_unnecessarydrivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c+1 -10 replies
10/10wangxun: Call skb_set_csum_crc32_unnecessarydrivers/net/ethernet/wangxun/libwx/wx_lib.c+4 -10 replies

Reviews trailers per patch

1 of 10 patches has a Reviewed-by or Acked-by.

PatchMina Almasry
1/10R-b
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

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

Read the v1 thread

Cover letter [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(-)
Signature · 1 line
2.34.1