Skip to content

Commit

Permalink
net/ice: fix tunnel packet Tx descriptor
Browse files Browse the repository at this point in the history
[ upstream commit c261e7de45d38ddc3b4b8909c35b448c5e1b0fcf ]

The TX descriptor of tunnel packet filled incorrectly due to the MACLEN
is not set.

This patch fixes this issue by setting MACLEN to correctly fill the
TX descriptor.

Fixes: bd70c45 ("net/ice: support Tx checksum offload for tunnel")

Signed-off-by: Shiyang He <shiyangx.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
heshiyax authored and kevintraynor committed Jul 12, 2023
1 parent 820df28 commit 48faf86
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/net/ice/ice_rxtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2560,10 +2560,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
union ice_tx_offload tx_offload)
{
/* Set MACLEN */
if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
*td_offset |= (tx_offload.outer_l2_len >> 1)
<< ICE_TX_DESC_LEN_MACLEN_S;
else
if (!(ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK))
*td_offset |= (tx_offload.l2_len >> 1)
<< ICE_TX_DESC_LEN_MACLEN_S;

Expand Down Expand Up @@ -2824,9 +2821,12 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)

/* Fill in tunneling parameters if necessary */
cd_tunneling_params = 0;
if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
td_offset |= (tx_offload.outer_l2_len >> 1)
<< ICE_TX_DESC_LEN_MACLEN_S;
ice_parse_tunneling_params(ol_flags, tx_offload,
&cd_tunneling_params);
}

/* Enable checksum offloading */
if (ol_flags & ICE_TX_CKSUM_OFFLOAD_MASK)
Expand Down

0 comments on commit 48faf86

Please sign in to comment.