From patchwork Wed May 31 13:41:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artemii Morozov X-Patchwork-Id: 127803 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 E26AA42BF4; Wed, 31 May 2023 15:41:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10415427E9; Wed, 31 May 2023 15:41:30 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id 94BD340A82 for ; Wed, 31 May 2023 15:41:26 +0200 (CEST) Received: from angrod.. (unknown [37.252.88.70]) (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 C7FBFE123E; Wed, 31 May 2023 17:41:25 +0400 (+04) From: Artemii Morozov To: dev@dpdk.org Cc: Ivan Malov , Viacheslav Galaktionov , Andrew Rybchenko , Andy Moreton Subject: [PATCH 1/3] common/sfc_efx/base: report VLAN stripping capability Date: Wed, 31 May 2023 17:41:20 +0400 Message-Id: <20230531134122.119508-2-artemii.morozov@arknetworks.am> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230531134122.119508-1-artemii.morozov@arknetworks.am> References: <20230531134122.119508-1-artemii.morozov@arknetworks.am> 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 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 --- 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 d5b19af8e8..51f7b3fe65 100644 --- a/drivers/common/sfc_efx/base/ef10_nic.c +++ b/drivers/common/sfc_efx/base/ef10_nic.c @@ -1316,6 +1316,12 @@ ef10_get_datapath_caps( else encp->enc_init_evq_extended_width_supported = B_FALSE; + /* Check if firmware supports VLAN stripping. */ + if (CAP_FLAGS1(req, RX_VLAN_STRIPPING)) + encp->enc_rx_vlan_stripping = B_TRUE; + else + encp->enc_rx_vlan_stripping = B_FALSE; + /* * Check if the NO_CONT_EV mode for RX events is supported. */ diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index da14941b31..58a0e95bf9 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -1650,6 +1650,7 @@ typedef struct efx_nic_cfg_s { boolean_t enc_pm_and_rxdp_counters; boolean_t enc_mac_stats_40g_tx_size_bins; uint32_t enc_tunnel_encapsulations_supported; + boolean_t enc_rx_vlan_stripping; /* * NIC global maximum for unique UDP tunnel ports shared by all * functions. diff --git a/drivers/common/sfc_efx/base/siena_nic.c b/drivers/common/sfc_efx/base/siena_nic.c index c0316676eb..682d2f75c9 100644 --- a/drivers/common/sfc_efx/base/siena_nic.c +++ b/drivers/common/sfc_efx/base/siena_nic.c @@ -190,6 +190,7 @@ siena_board_cfg( encp->enc_rx_include_fcs_supported = B_FALSE; encp->enc_rx_es_super_buffer_supported = B_FALSE; encp->enc_fw_subvariant_no_tx_csum_supported = B_FALSE; + encp->enc_rx_vlan_stripping = B_FALSE; /* Siena supports two 10G ports, and 8 lanes of PCIe Gen2 */ encp->enc_required_pcie_bandwidth_mbps = 2 * 10000;