Skip to content

Commit

Permalink
net/iavf: remove outer UDP checksum offload for X710 VF
Browse files Browse the repository at this point in the history
According to the X710 datasheet, X710 devices do not support outer
checksum offload.

"""
8.4.4.2 Transmit L3 and L4 Integrity Offload

Tunneling UDP headers and GRE header are not offloaded while the
X710/XXV710/XL710 leaves their checksum field as is.
If a checksum is required, software should provide it as well as the inner
checksum value(s) that are required for the outer checksum.
"""

Fix Tx offload capabilities depending on the VF type.

Bugzilla ID: 1406
Fixes: f7c8c36 ("net/iavf: enable inner and outer Tx checksum offload")
Cc: [email protected]

Signed-off-by: David Marchand <[email protected]>
Tested-by: Ali Alnubani <[email protected]>
  • Loading branch information
david-marchand committed Jun 25, 2024
1 parent 6bc05a0 commit 73146b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/guides/nics/features/iavf.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ L3 checksum offload = Y
L4 checksum offload = Y
Timestamp offload = Y
Inner L3 checksum = Y
Inner L4 checksum = Y
Inner L4 checksum = P
Packet type parsing = Y
Rx descriptor status = Y
Tx descriptor status = Y
Expand Down
5 changes: 4 additions & 1 deletion drivers/net/iavf/iavf_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
RTE_ETH_TX_OFFLOAD_TCP_TSO |
RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
Expand All @@ -1172,6 +1171,10 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;

/* X710 does not support outer udp checksum */
if (adapter->hw.mac.type != IAVF_MAC_XL710)
dev_info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;

if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_CRC)
dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_KEEP_CRC;

Expand Down

0 comments on commit 73146b0

Please sign in to comment.