X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd-event%2Fl2fwd_common.c;h=ab341e55b299785bdde7a5f12b46d1d40138f026;hb=4ce384793f842de07ffedb0df80127cee546af3a;hp=181301fe6b3ba7422749b5b882f7135c7e47e910;hpb=66cb1916f654a8ffe09130d1e09f16c97268d0c3;p=dpdk.git diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c index 181301fe6b..ab341e55b2 100644 --- a/examples/l2fwd-event/l2fwd_common.c +++ b/examples/l2fwd-event/l2fwd_common.c @@ -50,6 +50,17 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc) if (ret != 0) rte_panic("Error during getting device (port %u) info: %s\n", port_id, strerror(-ret)); + local_port_conf.rx_adv_conf.rss_conf.rss_hf &= + dev_info.flow_type_rss_offloads; + if (local_port_conf.rx_adv_conf.rss_conf.rss_hf != + port_conf.rx_adv_conf.rss_conf.rss_hf) { + printf("Port %u modified RSS hash function based on hardware support," + "requested:%#"PRIx64" configured:%#"PRIx64"", + port_id, + port_conf.rx_adv_conf.rss_conf.rss_hf, + local_port_conf.rx_adv_conf.rss_conf.rss_hf); + } + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) local_port_conf.txmode.offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;