From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B93A41B1EC for ; Mon, 6 Aug 2018 17:24:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2018 08:24:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,452,1526367600"; d="scan'208";a="77919437" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by fmsmga004.fm.intel.com with ESMTP; 06 Aug 2018 08:24:24 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: thomas@monjalon.net Date: Mon, 6 Aug 2018 16:24:16 +0100 Message-Id: <1533569056-90492-1-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH v2] examples/ip_pipeline: fix RSS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 15:24:27 -0000 After adding RSS hash offload checks, flags that are not supported by the current device result in RSS configuration failing as opposed to unsupported flags being silently discarded. This fix is making sure that only device supported flags are passed to RSS configuration. Fixes: aa1a6d87f15d ("ethdev: force RSS offload rules again") Signed-off-by: Cristian Dumitrescu Acked-by: Fan Zhang Acked-by: Konstantin Ananyev Tested-by: Peng, Yuan --- examples/ip_pipeline/link.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c index 2ccfea4..392a890 100644 --- a/examples/ip_pipeline/link.c +++ b/examples/ip_pipeline/link.c @@ -158,12 +158,9 @@ link_create(const char *name, struct link_params *params) memcpy(&port_conf, &port_conf_default, sizeof(port_conf)); if (rss) { port_conf.rxmode.mq_mode = ETH_MQ_RX_RSS; - if (port_info.flow_type_rss_offloads & ETH_RSS_IPV4) - port_conf.rx_adv_conf.rss_conf.rss_hf |= - ETH_RSS_IPV4; - if (port_info.flow_type_rss_offloads & ETH_RSS_IPV6) - port_conf.rx_adv_conf.rss_conf.rss_hf |= - ETH_RSS_IPV6; + port_conf.rx_adv_conf.rss_conf.rss_hf = + (ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP) & + port_info.flow_type_rss_offloads; } cpu_id = (uint32_t) rte_eth_dev_socket_id(port_id); -- 2.7.4