summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRosen Xu <rosen.xu@intel.com>2018-07-31 20:52:40 +0800
committerThomas Monjalon <thomas@monjalon.net>2018-08-05 22:16:45 +0200
commit9a93446a0e8c7e95504ff0bfd26d139a8c1ef320 (patch)
tree6cc7250b995502b6368f22149599bd727c8d4428 /examples
parent3504db92b50414b10c4aa41d9020146eeb25078c (diff)
downloaddpdk-9a93446a0e8c7e95504ff0bfd26d139a8c1ef320.zip
dpdk-9a93446a0e8c7e95504ff0bfd26d139a8c1ef320.tar.gz
dpdk-9a93446a0e8c7e95504ff0bfd26d139a8c1ef320.tar.xz
examples/flow_filtering: add flow director config for i40e
Rte_fdir_conf of rte_eth_conf should be initialized before port initialization. It is a workaround solution when working with Intel I40e. Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API") Cc: stable@dpdk.org Signed-off-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Ori Kam <orika@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/flow_filtering/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index f595034..ce91e8a 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -132,6 +132,22 @@ init_port(void)
DEV_TX_OFFLOAD_SCTP_CKSUM |
DEV_TX_OFFLOAD_TCP_TSO,
},
+ /*
+ * Initialize fdir_conf of rte_eth_conf.
+ * Fdir is used in flow filtering for I40e,
+ * so rte_flow rules involve some fdir
+ * configurations. In long term it's better
+ * that drivers don't require any fdir
+ * configuration for rte_flow, but we need to
+ * get this workaround so that sample app can
+ * run on I40e.
+ */
+ .fdir_conf = {
+ .mode = RTE_FDIR_MODE_PERFECT,
+ .pballoc = RTE_FDIR_PBALLOC_64K,
+ .status = RTE_FDIR_REPORT_STATUS,
+ .drop_queue = 127,
+ },
};
struct rte_eth_txconf txq_conf;
struct rte_eth_rxconf rxq_conf;