Skip to content

Commit

Permalink
net/iavf: fix segmentation offload condition
Browse files Browse the repository at this point in the history
[ upstream commit ff8b8bc ]

Apply segmentation offload when requested for non tunneled
packets e.g. IPsec transport mode.

Fixes: 1e728b0 ("net/iavf: rework Tx path")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
rnicolau authored and kevintraynor committed Feb 28, 2022
1 parent d75be6c commit dbb1c53
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/iavf/iavf_rxtx.c
Expand Up @@ -2464,10 +2464,9 @@ iavf_fill_data_desc(volatile struct iavf_tx_desc *desc,
desc->buffer_addr = rte_mbuf_data_iova(m);

/* calculate data buffer size less set header lengths */
if ((m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) &&
(m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG |
RTE_MBUF_F_TX_UDP_SEG))) {
hdrlen += m->outer_l3_len;
if (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) {
if (m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
hdrlen += m->outer_l3_len;
if (m->ol_flags & RTE_MBUF_F_TX_L4_MASK)
hdrlen += m->l3_len + m->l4_len;
else
Expand Down

0 comments on commit dbb1c53

Please sign in to comment.