From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] examples: fix RSS hash function configuration Date: Thu, 21 Jun 2018 18:16:58 +0100 Message-ID: References: <20180620150122.45945-1-ferruh.yigit@intel.com> <20180621165403.GA32459@ltp-pvn> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Pavan Nikhilesh , Liang Ma , Xueming Li , jerin.jacob@caviumnetworks.com Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id AD8571BAD7 for ; Thu, 21 Jun 2018 19:17:01 +0200 (CEST) In-Reply-To: <20180621165403.GA32459@ltp-pvn> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/21/2018 5:54 PM, Pavan Nikhilesh wrote: > Hi Ferruh, > > On Wed, Jun 20, 2018 at 04:01:22PM +0100, Ferruh Yigit wrote: >> 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 >> --- >> Return error added in this release, so no need to backport the fix to >> previous versions. >> >> Cc: David Hunt >> Cc: Liang Ma >> Cc: Xueming Li >> --- >> examples/bond/main.c | 12 ++++++++++ >> examples/distributor/main.c | 11 ++++++++++ >> examples/eventdev_pipeline/main.c | 11 ++++++++++ >> examples/ip_pipeline/link.c | 8 +++++-- >> examples/ip_reassembly/main.c | 12 ++++++++++ >> examples/ipsec-secgw/ipsec-secgw.c | 12 ++++++++++ >> examples/l3fwd-acl/main.c | 12 ++++++++++ >> examples/l3fwd-power/main.c | 14 ++++++++++-- >> examples/l3fwd-vf/main.c | 12 ++++++++++ >> examples/l3fwd/main.c | 12 ++++++++++ >> examples/load_balancer/init.c | 12 ++++++++++ >> examples/multi_process/symmetric_mp/main.c | 12 ++++++++++ >> .../performance-thread/l3fwd-thread/main.c | 12 ++++++++++ >> examples/qos_meter/main.c | 22 +++++++++++++++++++ >> examples/vmdq_dcb/main.c | 13 +++++++++++ >> 15 files changed, 183 insertions(+), 4 deletions(-) >> > > As we are fixing it for examples can we include fix for app/test-eventdev too? Yes we should, thanks for reminding, I will update the patch to include below. > > diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c > index d00f91802..79d755b6f 100644 > --- a/app/test-eventdev/test_perf_common.c > +++ b/app/test-eventdev/test_perf_common.c > @@ -706,6 +706,12 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) > } > > RTE_ETH_FOREACH_DEV(i) { > + struct rte_eth_dev_info dev_info; > + > + memset(&dev_info, 0, sizeof(struct rte_eth_dev_info)); > + rte_eth_dev_info_get(i, &dev_info); > + port_conf.rx_adv_conf.rss_conf.rss_hf &= > + dev_info.flow_type_rss_offloads; > > if (rte_eth_dev_configure(i, 1, 1, > &port_conf) > diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c > index 719518ff3..386ba14d1 100644 > --- a/app/test-eventdev/test_pipeline_common.c > +++ b/app/test-eventdev/test_pipeline_common.c > @@ -249,6 +249,9 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) > rx_conf = dev_info.default_rxconf; > rx_conf.offloads = port_conf.rxmode.offloads; > > + port_conf.rx_adv_conf.rss_conf.rss_hf &= > + dev_info.flow_type_rss_offloads; > + > if (rte_eth_dev_configure(i, nb_queues, nb_queues, > &port_conf) > < 0) { > > > Thanks, > Pavan >