From patchwork Tue May 11 08:45:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvin Zhang X-Patchwork-Id: 93149 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 60213A0C41; Tue, 11 May 2021 10:45:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50D6B4069F; Tue, 11 May 2021 10:45:42 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 16A5E4003E; Tue, 11 May 2021 10:45:40 +0200 (CEST) IronPort-SDR: N/yUJOtsuSV/LTMd+6rMnhfNUoOxCCNWZVQ5NpSYnpongSbd7xdEyYbOfNg2caBTY80JJH7kFa Lq3XvI8+l4mA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="284877151" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="284877151" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 01:45:37 -0700 IronPort-SDR: zFv9B92e6bUd5GFqMMCFniQHlLOINMHBRn4n3Wd/QuT5MULDakRPe7IG0P2YV2eNbdLPXBjHqQ c/P6G6OX/Vbw== X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="454922752" Received: from shwdenpg235.ccr.corp.intel.com ([10.240.182.60]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 01:45:35 -0700 From: Alvin Zhang To: beilei.xing@intel.com, leyi.rong@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Date: Tue, 11 May 2021 16:45:31 +0800 Message-Id: <20210511084531.34044-1-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210511023926.27296-1-alvinx.zhang@intel.com> References: <20210511023926.27296-1-alvinx.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3] net/i40e: fix offload flag checking in simple Tx datapath 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 Sender: "dev" Tx offload flags 'PKT_TX_IPV6, PKT_TX_IPV4, PKT_TX_OUTER_IPV6, PKT_TX_OUTER_IPV4' are supported in simple datapath. This patch removes these offload flags from packet checking in simple Tx datapath and defines 2 macro I40E_TX_OFFLOAD_SIMPLE_SUP_MASK and I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK. Fixes: 146ffa81d05e ("net/i40e: add Tx preparation for simple Tx datapath") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang Acked-by: Leyi Rong --- v3: Update codes according to comments --- drivers/net/i40e/i40e_rxtx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 02cf5e7..337916b 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -72,6 +72,15 @@ #define I40E_TX_OFFLOAD_NOTSUP_MASK \ (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK) +#define I40E_TX_OFFLOAD_SIMPLE_SUP_MASK ( \ + PKT_TX_IPV4 | \ + PKT_TX_IPV6 | \ + PKT_TX_OUTER_IPV4 | \ + PKT_TX_OUTER_IPV6) + +#define I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK \ + (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_SIMPLE_SUP_MASK) + int i40e_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc) { @@ -1501,7 +1510,7 @@ return i; } - if (ol_flags & PKT_TX_OFFLOAD_MASK) { + if (ol_flags & I40E_TX_OFFLOAD_SIMPLE_NOTSUP_MASK) { rte_errno = ENOTSUP; return i; }