From patchwork Thu Feb 17 22:25:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Malov X-Patchwork-Id: 107773 X-Patchwork-Delegate: ferruh.yigit@amd.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 43E3FA00C4; Thu, 17 Feb 2022 23:25:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 067DE40395; Thu, 17 Feb 2022 23:25:14 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 22C4340150; Thu, 17 Feb 2022 23:25:12 +0100 (CET) Received: from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id 6F21B44; Fri, 18 Feb 2022 01:25:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 6F21B44 Authentication-Results: shelob.oktetlabs.ru/6F21B44; dkim=none; dkim-atps=neutral From: Ivan Malov To: dev@dpdk.org Cc: stable@dpdk.org, Andy Moreton , Andrew Rybchenko , Ray Kinsella Subject: [PATCH 1/3] common/sfc_efx/base: fix recirculation ID set in outer rules Date: Fri, 18 Feb 2022 01:25:07 +0300 Message-Id: <20220217222509.667611-1-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 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 Recirculation ID field of MAE outer rule insert MCDI is part of the lookup control structure and it has non-zero bit offset relative to the byte offset of the structure. Fixes: 5cf153e79c6c ("common/sfc_efx/base: support recirculation ID in outer rules") Cc: stable@dpdk.org Signed-off-by: Ivan Malov Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/efx_mae.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index 7b24e3fee4..7d48b5787e 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -2242,7 +2242,8 @@ efx_mae_outer_rule_insert( memcpy(payload + offset, spec->emms_mask_value_pairs.outer, MAE_ENC_FIELD_PAIRS_LEN); - MCDI_IN_SET_BYTE(req, MAE_OUTER_RULE_INSERT_IN_RECIRC_ID, + MCDI_IN_SET_DWORD_FIELD(req, MAE_OUTER_RULE_INSERT_IN_LOOKUP_CONTROL, + MAE_OUTER_RULE_INSERT_IN_RECIRC_ID, spec->emms_outer_rule_recirc_id); efx_mcdi_execute(enp, &req); From patchwork Thu Feb 17 22:25:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Malov X-Patchwork-Id: 107774 X-Patchwork-Delegate: ferruh.yigit@amd.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 75E69A00C4; Thu, 17 Feb 2022 23:25:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 023E741153; Thu, 17 Feb 2022 23:25:15 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 28CC440395; Thu, 17 Feb 2022 23:25:12 +0100 (CET) Received: from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id 9F3314A; Fri, 18 Feb 2022 01:25:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 9F3314A Authentication-Results: shelob.oktetlabs.ru/9F3314A; dkim=none; dkim-atps=neutral From: Ivan Malov To: dev@dpdk.org Cc: stable@dpdk.org, Andrew Rybchenko , Andy Moreton Subject: [PATCH 2/3] common/sfc_efx/base: add missing handler for 1-byte fields Date: Fri, 18 Feb 2022 01:25:08 +0300 Message-Id: <20220217222509.667611-2-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220217222509.667611-1-ivan.malov@oktetlabs.ru> References: <20220217222509.667611-1-ivan.malov@oktetlabs.ru> 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 One may set RECIRC_ID in a MAE action rule specification. This field is not a network one, and its handling goes to the code snippet which does not recognise field sizes other than 4 bytes. Add the missing handler. Fixes: 3a73dcfdb255 ("common/sfc_efx/base: match on recirc ID in action rules") Cc: stable@dpdk.org Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/efx_mae.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index 7d48b5787e..31f51b5548 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -1027,6 +1027,10 @@ efx_mae_match_spec_field_set( memcpy(mvp + descp->emmd_value_offset, &dword, sizeof (dword)); break; + case 1: + memcpy(mvp + descp->emmd_value_offset, + value, 1); + break; default: EFSYS_ASSERT(B_FALSE); } @@ -1039,6 +1043,10 @@ efx_mae_match_spec_field_set( memcpy(mvp + descp->emmd_mask_offset, &dword, sizeof (dword)); break; + case 1: + memcpy(mvp + descp->emmd_mask_offset, + mask, 1); + break; default: EFSYS_ASSERT(B_FALSE); } From patchwork Thu Feb 17 22:25:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Malov X-Patchwork-Id: 107775 X-Patchwork-Delegate: ferruh.yigit@amd.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 7A866A00C4; Thu, 17 Feb 2022 23:25:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFE474115B; Thu, 17 Feb 2022 23:25:15 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 4BE3340DDD; Thu, 17 Feb 2022 23:25:12 +0100 (CET) Received: from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id D76724C; Fri, 18 Feb 2022 01:25:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru D76724C Authentication-Results: shelob.oktetlabs.ru/D76724C; dkim=none; dkim-atps=neutral From: Ivan Malov To: dev@dpdk.org Cc: stable@dpdk.org, Andrew Rybchenko , Andy Moreton , Viacheslav Galaktionov Subject: [PATCH 3/3] net/sfc: fix flow tunnel support detection Date: Fri, 18 Feb 2022 01:25:09 +0300 Message-Id: <20220217222509.667611-3-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220217222509.667611-1-ivan.malov@oktetlabs.ru> References: <20220217222509.667611-1-ivan.malov@oktetlabs.ru> 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 The condition for that must use the new MAE admin status. Fixes: 2f577f0ea1a3 ("net/sfc: allow ports without MAE privilege") Cc: stable@dpdk.org Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/net/sfc/sfc_flow_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_flow_tunnel.c b/drivers/net/sfc/sfc_flow_tunnel.c index 463b01c596..e9eca90012 100644 --- a/drivers/net/sfc/sfc_flow_tunnel.c +++ b/drivers/net/sfc/sfc_flow_tunnel.c @@ -21,7 +21,7 @@ sfc_flow_tunnel_is_supported(struct sfc_adapter *sa) SFC_ASSERT(sfc_adapter_is_locked(sa)); return ((sa->priv.dp_rx->features & SFC_DP_RX_FEAT_FLOW_MARK) != 0 && - sa->mae.status == SFC_MAE_STATUS_SUPPORTED); + sa->mae.status == SFC_MAE_STATUS_ADMIN); } bool