From bd81bdf226c1dc03baaf05f17cf68fbb17bc5dd7 Mon Sep 17 00:00:00 2001 From: Eyal Bari Date: Wed, 16 May 2018 11:30:23 +0300 Subject: dpdk:enable flow director perfect mode when flows are enabled on the device Change-Id: I971764988d5a9e7078468f627205b3fa60736263 Signed-off-by: Eyal Bari --- src/plugins/dpdk/device/common.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/plugins/dpdk/device/common.c') diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c index 1b043496256..e42395f2133 100644 --- a/src/plugins/dpdk/device/common.c +++ b/src/plugins/dpdk/device/common.c @@ -59,6 +59,15 @@ dpdk_device_setup (dpdk_device_t * xd) dpdk_device_stop (xd); } + /* Enable flow director when flows exist */ + if (xd->pmd == VNET_DPDK_PMD_I40E) + { + if ((xd->flags & DPDK_DEVICE_FLAG_RX_FLOW_OFFLOAD) != 0) + xd->port_conf.fdir_conf.mode = RTE_FDIR_MODE_PERFECT; + else + xd->port_conf.fdir_conf.mode = RTE_FDIR_MODE_NONE; + } + rv = rte_eth_dev_configure (xd->device_index, xd->rx_q_used, xd->tx_q_used, &xd->port_conf); -- cgit 1.2.3-korg