net/iavf: fix segmentation offload condition

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

Fixes: 1e728b01120c ("net/iavf: rework Tx path")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
Radu Nicolau 2021-11-22 15:30:00 +00:00 committed by Qi Zhang
parent 58d212e3bc
commit ff8b8bcd2e

View File

@ -2428,10 +2428,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