X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvmdq_dcb%2Fmain.c;h=646368395e451151c62df2c3d3201db7a33b3e62;hb=d7316eae1a8ab1d8dfb7ac7f2c8804f1a98f2144;hp=5a0463c58a657b6d07cbe7001b66520f59dbc779;hpb=ab3ce1e0c19329c8a2d21480b0db55be259bc168;p=dpdk.git diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c index 5a0463c58a..646368395e 100644 --- a/examples/vmdq_dcb/main.c +++ b/examples/vmdq_dcb/main.c @@ -196,6 +196,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) uint16_t queues_per_pool; uint32_t max_nb_pools; struct rte_eth_txconf txq_conf; + uint64_t rss_hf_tmp; /* * The max pool number from dev_info will be used to validate the pool @@ -256,6 +257,18 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) port_conf.txmode.offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE; + + rss_hf_tmp = port_conf.rx_adv_conf.rss_conf.rss_hf; + 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 != rss_hf_tmp) { + printf("Port %u modified RSS hash function based on hardware support," + "requested:%#"PRIx64" configured:%#"PRIx64"\n", + port, + rss_hf_tmp, + port_conf.rx_adv_conf.rss_conf.rss_hf); + } + /* * Though in this example, all queues including pf queues are setup. * This is because VMDQ queues doesn't always start from zero, and the