From patchwork Fri Jun 16 12:00:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 128766 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2E3942CD3; Fri, 16 Jun 2023 05:42:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C26DA40DDB; Fri, 16 Jun 2023 05:42:27 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id E16E540DDB for ; Fri, 16 Jun 2023 05:42:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686886946; x=1718422946; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=uCW5WxnSunRJ1gNwYHfcTUtZUsixVbNj6V/EM2fSQFI=; b=akJdeaIRpPY0emabmWiGilj+e8mj5a3gImKMWMa5gu/y+4zQZRUfs8cW ufH36DHvSGv/naFieQPRvkmUk6nJi25MKrbrd1kkvpKw4vLhIMQpFM5Ke CutWwPo3SiroEnPWxHYBejr5AmgHHx0c2hYfTX2hRWRbNXTOWg1RTtz+V rl6fFNG/5qBcOBhCDnZ5YiLfu2teqz0Io/VQHQqDHBagRZSk3IIxTy++z gPOutStqtdCwBMQWQer/HOkpr47/yu1kkFFso1/QALQNAYHv1QKWsyIsj pP9qLhHeZtTEGyNfQi3jadvw076vM8qoW7wo/2AR+kwSZJNMED9+uztUH w==; X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="387745863" X-IronPort-AV: E=Sophos;i="6.00,246,1681196400"; d="scan'208";a="387745863" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2023 20:42:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="742496894" X-IronPort-AV: E=Sophos;i="6.00,246,1681196400"; d="scan'208";a="742496894" Received: from dpdk-beileix-icelake.sh.intel.com ([10.67.117.45]) by orsmga008.jf.intel.com with ESMTP; 15 Jun 2023 20:42:15 -0700 From: beilei.xing@intel.com To: jingjing.wu@intel.com, yuying.zhang@intel.com Cc: dev@dpdk.org, Beilei Xing Subject: [PATCH] net/cpfl: fix fail to re-configure RSS Date: Fri, 16 Jun 2023 12:00:03 +0000 Message-Id: <20230616120003.41187-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Beilei Xing Currently, if launch testpmd with multiple queues and re-configure rxq with 'port config all rxq 1', Rx queue 0 may not receive packets. that's because RSS lookup tale is not re-configured when Rxq number is 1. Although Rxq number is 1 and multi queue mode is RTE_ETH_MQ_RX_NONE, cpfl PMD should init RSS to allow RSS re-configuration. Fixes: cfbc66551a14 ("net/cpfl: support RSS") Signed-off-by: Beilei Xing Acked-by: Jingjing Wu --- drivers/net/cpfl/cpfl_ethdev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c index e96bf0a82e..9755ffe508 100644 --- a/drivers/net/cpfl/cpfl_ethdev.c +++ b/drivers/net/cpfl/cpfl_ethdev.c @@ -712,17 +712,15 @@ cpfl_dev_configure(struct rte_eth_dev *dev) return -EINVAL; } - if (base->caps.rss_caps != 0 && dev->data->nb_rx_queues != 0 && - conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) { + if (base->caps.rss_caps != 0 && dev->data->nb_rx_queues != 0) { ret = cpfl_init_rss(vport); if (ret != 0) { PMD_INIT_LOG(ERR, "Failed to init rss"); return ret; } - } else { + } else if (conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) { PMD_INIT_LOG(ERR, "RSS is not supported."); - if (conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) - return -ENOTSUP; + return -ENOTSUP; } vport->max_pkt_len =