summaryrefslogtreecommitdiff
path: root/examples/flow_filtering
diff options
context:
space:
mode:
authorOri Kam <orika@mellanox.com>2018-11-05 09:35:27 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-11-06 02:35:34 +0100
commitc82f2f8b4b3a32e7a3fe586419ff4fb628ac9f7d (patch)
treea2cdc3d7603d0a8a7734263ab80fc455ed04ea7a /examples/flow_filtering
parenta38eafedda1de14c9fd7219e769e89e4aec92a45 (diff)
downloaddpdk-c82f2f8b4b3a32e7a3fe586419ff4fb628ac9f7d.zip
dpdk-c82f2f8b4b3a32e7a3fe586419ff4fb628ac9f7d.tar.gz
dpdk-c82f2f8b4b3a32e7a3fe586419ff4fb628ac9f7d.tar.xz
examples/flow_filtering: filter out unsupported offloads
Some of the requested offloads are not supported by all devices. This patch fixes this issue by setting only the supported offloads. Fixes: feca6c428a5e ("examples/flow_filtering: add Tx queues setup process") Cc: stable@dpdk.org Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Wei Zhao <wei.zhao1@intel.com>
Diffstat (limited to 'examples/flow_filtering')
-rw-r--r--examples/flow_filtering/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index a73d120..27e287a 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -136,6 +136,8 @@ init_port(void)
struct rte_eth_rxconf rxq_conf;
struct rte_eth_dev_info dev_info;
+ rte_eth_dev_info_get(port_id, &dev_info);
+ port_conf.txmode.offloads &= dev_info.rx_offload_capa;
printf(":: initializing port: %d\n", port_id);
ret = rte_eth_dev_configure(port_id,
nr_queues, nr_queues, &port_conf);
@@ -145,7 +147,6 @@ init_port(void)
ret, port_id);
}
- rte_eth_dev_info_get(port_id, &dev_info);
rxq_conf = dev_info.default_rxconf;
rxq_conf.offloads = port_conf.rxmode.offloads;
/* only set Rx queues: something we care only so far */