summaryrefslogtreecommitdiff
path: root/examples/eventdev_pipeline
diff options
context:
space:
mode:
authorFerruh Yigit <ferruh.yigit@intel.com>2018-07-04 21:02:21 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-07-05 15:46:48 +0200
commit4f5701f28bd41cbe582a03af4d82d1fa6c1cab91 (patch)
treea1193884f6c8657678b2305135bd0eeae571ecd2 /examples/eventdev_pipeline
parent69bce062132bd2b4a943fafbb710215a7999d198 (diff)
downloaddpdk-4f5701f28bd41cbe582a03af4d82d1fa6c1cab91.zip
dpdk-4f5701f28bd41cbe582a03af4d82d1fa6c1cab91.tar.gz
dpdk-4f5701f28bd41cbe582a03af4d82d1fa6c1cab91.tar.xz
examples: fix RSS hash function configuration
ethdev layer introduced checks for application requested RSS hash functions and returns error for ones unsupported by hardware This check breaks some sample applications which blindly configures RSS hash functions without checking underlying hardware support. Updated examples to mask out unsupported RSS has functions during device configuration. Prints a log if configuration values updated by this check. Fixes: aa1a6d87f15d ("ethdev: force RSS offload rules again") Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Tested-by: Meijuan Zhao <meijuanx.zhao@intel.com> Tested-by: Yingya Han <yingyax.han@intel.com> Acked-by: David Hunt <david.hunt@intel.com>
Diffstat (limited to 'examples/eventdev_pipeline')
-rw-r--r--examples/eventdev_pipeline/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 7bc2949..700bc69 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -292,6 +292,17 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
port_conf.txmode.offloads |=
DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+ port_conf.rx_adv_conf.rss_conf.rss_hf &=
+ dev_info.flow_type_rss_offloads;
+ if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+ port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+ printf("Port %u modified RSS hash function based on hardware support,"
+ "requested:%#"PRIx64" configured:%#"PRIx64"\n",
+ port,
+ port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+ port_conf.rx_adv_conf.rss_conf.rss_hf);
+ }
+
/* Configure the Ethernet device. */
retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
if (retval != 0)