From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 5E39D239; Tue, 24 Jul 2018 13:39:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 04:39:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,397,1526367600"; d="scan'208";a="69793664" Received: from dpdk-xiaoyun3.sh.intel.com ([10.67.119.41]) by fmsmga002.fm.intel.com with ESMTP; 24 Jul 2018 04:39:07 -0700 From: Xiaoyun Li To: wenzhuo.lu@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org, Xiaoyun Li , stable@dpdk.org Date: Tue, 24 Jul 2018 19:32:34 +0800 Message-Id: <1532431954-123708-1-git-send-email-xiaoyun.li@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] app/testpmd: fix dcb config failure 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: Tue, 24 Jul 2018 11:39:11 -0000 After adding RSS hash offload check, default rss_hf will fail on devices that do not support all bits. This will lead to dcb config failure. The patch fixes this issue by taking rss_hf as a suggested value and only setting bits that the device supports based on rte_eth_dev_get_info. Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check") Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class") Cc: stable@dpdk.org Signed-off-by: Xiaoyun Li --- app/test-pmd/testpmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index f504ca3..d221469 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2575,6 +2575,9 @@ init_port_dcb_config(portid_t pid, if (retval < 0) return retval; port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_VLAN_FILTER; + rte_eth_dev_info_get(pid, &rte_port->dev_info); + port_conf.rx_adv_conf.rss_conf.rss_hf &= + rte_port->dev_info.flow_type_rss_offloads; /* re-configure the device . */ rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf); -- 2.7.4