mbox series

[v2,0/3] bugfix about KEEP CRC offload

Message ID 20240718114806.577298-1-haijie1@huawei.com (mailing list archive)
Headers
Series bugfix about KEEP CRC offload |

Message

Jie Hai July 18, 2024, 11:48 a.m. UTC
From: Dengdui Huang <huangdengdui@huawei.com>

For hns3 NIC, when KEEP_CRC offload is enabled, the CRC data is still be stripped in rare scenarios.
Some users of hns3 are already using this feature. So driver has to recaculate packet CRC.

In addition, in the mbuf, the data that exceeds the length specified by pkt_len is invalid.
Therefore, if the packet contains CRC data, pkt_len should contain the CRC data length.
However, almost of drivers supported KEEP CRC feature didn't add the CRC data length to pkt_len.
This patch adds description for KEEP CRC offload.

Dengdui Huang (3):
  ethdev: add description for KEEP CRC offload
  net/hns3: fix packet length do not contain CRC data length
  net/hns3: fix Rx packet without CRC data

 drivers/net/hns3/hns3_ethdev.c        |   5 +
 drivers/net/hns3/hns3_ethdev.h        |  23 +++++
 drivers/net/hns3/hns3_rxtx.c          | 134 ++++++++++++++++----------
 drivers/net/hns3/hns3_rxtx.h          |   3 +
 drivers/net/hns3/hns3_rxtx_vec.c      |   3 +-
 drivers/net/hns3/hns3_rxtx_vec_neon.h |  19 ----
 drivers/net/hns3/hns3_rxtx_vec_sve.c  |   3 +-
 lib/ethdev/rte_ethdev.h               |   6 ++
 8 files changed, 124 insertions(+), 72 deletions(-)