From patchwork Tue Sep 26 06:04:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenjun Wu X-Patchwork-Id: 131919 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 60D8A4263D; Tue, 26 Sep 2023 07:58:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEA46402A9; Tue, 26 Sep 2023 07:58:54 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id D4AED40271 for ; Tue, 26 Sep 2023 07:58:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695707933; x=1727243933; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=om4cPwPq5JbIMHP4ymepcB9WO0PxJG/JYxlge7YR4Tc=; b=E82fg8q7LSGrBcpLYqm/LTfcR2UoBWMlrCtPrZoSs9vIUcTejyXxhPg9 ZAJSmjWCBfYmAlfRikfqiw8p1xfohI7GcJnlX/QztxkyCAyq+AY9sPOeS rGdHu7MFtJhuV9I3yLKFLH0jgdeuao6d4c58/Igiz6u/GkdruY6LXkYbY kV7Fg7wvtJf57C5kWaNLDtOPnsII+aFzxwsYhXdbqZa5LCoY9s7Qt4Dqz ZcnHwUi2HVJR86lhGbsF6/tvarYutykMayOGkQgpxvF8UFgy939HXGoE5 s1l52oclEqhx5ZFN1YMUscWzNHJmgo9SwCF/pioqE5vijMLur/8e/vGe+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="447989345" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="447989345" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 22:58:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="892073754" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="892073754" Received: from dpdk-wuwenjun-icelake-ii.sh.intel.com ([10.67.110.152]) by fmsmga001.fm.intel.com with ESMTP; 25 Sep 2023 22:57:45 -0700 From: Wenjun Wu To: dev@dpdk.org, yuying.zhang@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com Cc: Wenjun Wu Subject: [PATCH v3] net/cpfl: fix datapath function configuration Date: Tue, 26 Sep 2023 14:04:55 +0800 Message-Id: <20230926060455.18614-1-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230919083237.171374-1-wenjun1.wu@intel.com> References: <20230919083237.171374-1-wenjun1.wu@intel.com> 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 Vector datapath does not support any advanced features for now, so disable vector path if TX checksum offload or RX scatter is enabled. Fixes: 2f39845891e6 ("net/cpfl: add AVX512 data path for single queue model") Signed-off-by: Wenjun Wu Acked-by: Beilei Xing --- v3: fix log typo. v2: disable vector path for scatter cases. --- drivers/net/cpfl/cpfl_rxtx_vec_common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/cpfl/cpfl_rxtx_vec_common.h b/drivers/net/cpfl/cpfl_rxtx_vec_common.h index d8e9191196..479e1ddcb9 100644 --- a/drivers/net/cpfl/cpfl_rxtx_vec_common.h +++ b/drivers/net/cpfl/cpfl_rxtx_vec_common.h @@ -25,7 +25,11 @@ RTE_ETH_RX_OFFLOAD_TIMESTAMP) #define CPFL_TX_NO_VECTOR_FLAGS ( \ RTE_ETH_TX_OFFLOAD_TCP_TSO | \ - RTE_ETH_TX_OFFLOAD_MULTI_SEGS) + RTE_ETH_TX_OFFLOAD_MULTI_SEGS | \ + RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | \ + RTE_ETH_TX_OFFLOAD_SCTP_CKSUM | \ + RTE_ETH_TX_OFFLOAD_UDP_CKSUM | \ + RTE_ETH_TX_OFFLOAD_TCP_CKSUM) static inline int cpfl_rx_vec_queue_default(struct idpf_rx_queue *rxq) @@ -81,6 +85,9 @@ cpfl_rx_vec_dev_check_default(struct rte_eth_dev *dev) struct cpfl_rx_queue *cpfl_rxq; int i, default_ret, splitq_ret, ret = CPFL_SCALAR_PATH; + if (dev->data->scattered_rx) + return CPFL_SCALAR_PATH; + for (i = 0; i < dev->data->nb_rx_queues; i++) { cpfl_rxq = dev->data->rx_queues[i]; default_ret = cpfl_rx_vec_queue_default(&cpfl_rxq->base);