From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <cristian.dumitrescu@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 3231A235
 for <dev@dpdk.org>; Tue, 31 Jul 2018 16:49:35 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 31 Jul 2018 07:49:34 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.51,427,1526367600"; d="scan'208";a="77517317"
Received: from silpixa00382658.ir.intel.com ([10.237.223.29])
 by orsmga001.jf.intel.com with ESMTP; 31 Jul 2018 07:49:33 -0700
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Date: Tue, 31 Jul 2018 15:49:25 +0100
Message-Id: <1533048565-216267-1-git-send-email-cristian.dumitrescu@intel.com>
X-Mailer: git-send-email 2.7.4
Subject: [dpdk-dev] [PATCH] examples/ip_pipeline: fix RSS
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Jul 2018 14:49:36 -0000

Fix for RSS issue triggered by latest changes in ethdev layer.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 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