app/eventdev: enable fast free offload
authorHarman Kalra <hkalra@marvell.com>
Thu, 8 Oct 2020 18:48:46 +0000 (00:18 +0530)
committerJerin Jacob <jerinj@marvell.com>
Thu, 15 Oct 2020 21:03:49 +0000 (23:03 +0200)
Since we are not holding the mbufs or creating any references
in the app, hence mbuf fast free offload can be enabled.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
app/test-eventdev/test_pipeline_common.c

index 17088b1..f0c0ffe 100644 (file)
@@ -219,6 +219,11 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
                        return ret;
                }
 
+               /* Enable mbuf fast free if PMD has the capability. */
+               if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+                       local_port_conf.txmode.offloads |=
+                               DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
                rx_conf = dev_info.default_rxconf;
                rx_conf.offloads = port_conf.rxmode.offloads;