From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A998942D2C; Fri, 23 Jun 2023 07:48:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1626D42C4D; Fri, 23 Jun 2023 07:48:08 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id F23D8400EF for ; Fri, 23 Jun 2023 07:48:04 +0200 (CEST) Received: from localhost.localdomain (unknown [37.252.88.53]) (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 agw.arknetworks.am (Postfix) with ESMTPSA id 52E68E1278; Fri, 23 Jun 2023 09:48:04 +0400 (+04) From: Artemii Morozov To: dev@dpdk.org Cc: Ivan Malov , Viacheslav Galaktionov , Andrew Rybchenko , Andy Moreton Subject: [PATCH v8 1/4] common/sfc_efx/base: report VLAN stripping capability Date: Fri, 23 Jun 2023 09:47:53 +0400 Message-Id: <20230623054756.8896-2-artemii.morozov@arknetworks.am> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230623054756.8896-1-artemii.morozov@arknetworks.am> References: <20230531134122.119508-1-artemii.morozov@arknetworks.am> <20230623054756.8896-1-artemii.morozov@arknetworks.am> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 These changes are necessary in order to add support for stripping VLAN tags in the future. Signed-off-by: Artemii Morozov Reviewed-by: Ivan Malov Reviewed-by: Andy Moreton Acked-by: Andrew Rybchenko --- drivers/common/sfc_efx/base/ef10_nic.c | 6 ++++++ drivers/common/sfc_efx/base/efx.h | 1 + drivers/common/sfc_efx/base/siena_nic.c | 1 + 3 files changed, 8 insertions(+) diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c index bf9cb9d309..79d596b5ef 100644 --- a/drivers/common/sfc_efx/base/ef10_nic.c +++ b/drivers/common/sfc_efx/base/ef10_nic.c @@ -1223,6 +1223,12 @@ ef10_get_datapath_caps( else encp->enc_hw_tx_insert_vlan_enabled = B_FALSE; + /* Check if firmware supports VLAN stripping. */ + if (CAP_FLAGS1(req, RX_VLAN_STRIPPING)) + encp->enc_rx_vlan_stripping_supported = B_TRUE; + else + encp->enc_rx_vlan_stripping_supported = B_FALSE; + /* Check if the firmware supports RX event batching */ if (CAP_FLAGS1(req, RX_BATCHING)) encp->enc_rx_batching_enabled = B_TRUE; diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index ef626cc55a..7fcf48f5e1 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -1627,6 +1627,7 @@ typedef struct efx_nic_cfg_s { /* Number of TSO contexts on the NIC (FATSOv2) */ uint32_t enc_fw_assisted_tso_v2_n_contexts; boolean_t enc_hw_tx_insert_vlan_enabled; + boolean_t enc_rx_vlan_stripping_supported; /* Number of PFs on the NIC */ uint32_t enc_hw_pf_count; /* Datapath firmware vadapter/vport/vswitch support */ diff --git a/drivers/common/sfc_efx/base/siena_nic.c b/drivers/common/sfc_efx/base/siena_nic.c index ca38eefa7e..e334f01b03 100644 --- a/drivers/common/sfc_efx/base/siena_nic.c +++ b/drivers/common/sfc_efx/base/siena_nic.c @@ -179,6 +179,7 @@ siena_board_cfg( (encp->enc_rxq_limit * EFX_RXQ_DC_NDESCS(EFX_RXQ_DC_SIZE)); encp->enc_hw_tx_insert_vlan_enabled = B_FALSE; + encp->enc_rx_vlan_stripping_supported = B_FALSE; encp->enc_fw_assisted_tso_enabled = B_FALSE; encp->enc_fw_assisted_tso_v2_enabled = B_FALSE; encp->enc_fw_assisted_tso_v2_n_contexts = 0; -- 2.34.1