net/octeontx2: support fast free for inline IPsec
authorTejasree Kondoj <ktejasree@marvell.com>
Wed, 12 May 2021 10:11:43 +0000 (15:41 +0530)
committerJerin Jacob <jerinj@marvell.com>
Wed, 30 Jun 2021 01:51:33 +0000 (03:51 +0200)
Add support for DEV_TX_OFFLOAD_MBUF_FAST_FREE for inline IPsec path

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/octeontx2/otx2_ethdev_sec_tx.h

index c8eae3d..623a2a8 100644 (file)
@@ -59,8 +59,7 @@ otx2_sec_event_tx(uint64_t base, struct rte_event *ev, struct rte_mbuf *m,
        sa = &sess->out_sa;
 
        RTE_ASSERT(sess->cpt_lmtline != NULL);
-       RTE_ASSERT(!(offload_flags & (NIX_TX_OFFLOAD_MBUF_NOFF_F |
-                                     NIX_TX_OFFLOAD_VLAN_QINQ_F)));
+       RTE_ASSERT(!(offload_flags & NIX_TX_OFFLOAD_VLAN_QINQ_F));
 
        dlen = rte_pktmbuf_pkt_len(m) + sizeof(*hdr) - RTE_ETHER_HDR_LEN;
        rlen = otx2_ipsec_fp_out_rlen_get(sess, dlen - sizeof(*hdr));
@@ -135,6 +134,8 @@ otx2_sec_event_tx(uint64_t base, struct rte_event *ev, struct rte_mbuf *m,
        sd->nix_hdr.w0.sizem1 = 1;
        sd->nix_hdr.w0.total = rte_pktmbuf_data_len(m);
        sd->nix_hdr.w0.aura = npa_lf_aura_handle_to_aura(m->pool->pool_id);
+       if (offload_flags & NIX_TX_OFFLOAD_MBUF_NOFF_F)
+               sd->nix_hdr.w0.df = otx2_nix_prefree_seg(m);
 
        sd->nix_sg.u = 0;
        sd->nix_sg.subdc = NIX_SUBDC_SG;