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; From patchwork Wed May 31 13:41:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artemii Morozov X-Patchwork-Id: 127804 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 9932642BF4; Wed, 31 May 2023 15:41:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A36742D0B; Wed, 31 May 2023 15:41:31 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id AB2F1410D0 for ; Wed, 31 May 2023 15:41:27 +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 B4EDCE1283; Wed, 31 May 2023 17:41:26 +0400 (+04) From: Artemii Morozov To: dev@dpdk.org Cc: Ivan Malov , Viacheslav Galaktionov , Andrew Rybchenko , Andy Moreton Subject: [PATCH 2/3] common/sfc_efx/base: add support to enable VLAN stripping Date: Wed, 31 May 2023 17:41:21 +0400 Message-Id: <20230531134122.119508-3-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 To enable VLAN stripping, two conditions must be met: the corresponding flag must be set and the appropriate RX prefix should be requested. VLAN stripping is supported for ef100 datapath only. Signed-off-by: Artemii Morozov Reviewed-by: Ivan Malov Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/ef10_filter.c | 21 +++++++++++++++++++++ drivers/common/sfc_efx/base/ef10_impl.h | 1 + drivers/common/sfc_efx/base/efx.h | 9 +++++++++ drivers/common/sfc_efx/base/efx_filter.c | 3 ++- drivers/common/sfc_efx/base/efx_impl.h | 1 + drivers/common/sfc_efx/base/efx_rx.c | 17 +++++++++++++++++ drivers/common/sfc_efx/base/rhead_rx.c | 3 +++ 7 files changed, 54 insertions(+), 1 deletion(-) diff --git a/drivers/common/sfc_efx/base/ef10_filter.c b/drivers/common/sfc_efx/base/ef10_filter.c index d6940011c0..7371451098 100644 --- a/drivers/common/sfc_efx/base/ef10_filter.c +++ b/drivers/common/sfc_efx/base/ef10_filter.c @@ -338,6 +338,11 @@ efx_mcdi_filter_op_add( FILTER_OP_V3_IN_MATCH_SET_FLAG, 1); } + if (spec->efs_flags & EFX_FILTER_FLAG_VLAN_STRIP) { + MCDI_IN_SET_DWORD_FIELD(req, FILTER_OP_V3_IN_MATCH_ACTION_FLAGS, + FILTER_OP_V3_IN_MATCH_STRIP_VLAN, 1); + } + efx_mcdi_execute(enp, &req); if (req.emr_rc != 0) { @@ -852,6 +857,16 @@ ef10_filter_add_internal( hash = ef10_filter_hash(spec); + /* + * VLAN stripping is offload at the device level, and it should be + * applied to all filters if it has been applied at least once before. + * Knowledge of device level vlan strip offload being enabled comes from + * the default RxQ flags, albeit the flag may be set on any queue. + * But only default RxQ affects this 'eft_strip_vlan' decision. + */ + if (eftp->eft_strip_vlan) + spec->efs_flags |= EFX_FILTER_FLAG_VLAN_STRIP; + /* * FIXME: Add support for inserting filters of different priorities * and removing lower priority multicast filters (bug 42378) @@ -2010,6 +2025,9 @@ ef10_filter_reconfigure( else filter_flags = 0; + if (table->eft_strip_vlan) + filter_flags |= EFX_FILTER_FLAG_VLAN_STRIP; + /* Mark old filters which may need to be removed */ ef10_filter_mark_old_filters(enp); @@ -2142,6 +2160,8 @@ ef10_filter_default_rxq_set( EFSYS_ASSERT(using_rss == B_FALSE); table->eft_using_rss = B_FALSE; #endif + if (erp->er_flags & EFX_RXQ_FLAG_VLAN_STRIP) + table->eft_strip_vlan = B_TRUE; table->eft_default_rxq = erp; } @@ -2153,6 +2173,7 @@ ef10_filter_default_rxq_clear( table->eft_default_rxq = NULL; table->eft_using_rss = B_FALSE; + table->eft_strip_vlan = B_FALSE; } diff --git a/drivers/common/sfc_efx/base/ef10_impl.h b/drivers/common/sfc_efx/base/ef10_impl.h index 342a9a2006..2aae208f27 100644 --- a/drivers/common/sfc_efx/base/ef10_impl.h +++ b/drivers/common/sfc_efx/base/ef10_impl.h @@ -1286,6 +1286,7 @@ typedef struct ef10_filter_table_s { ef10_filter_entry_t eft_entry[EFX_EF10_FILTER_TBL_ROWS]; efx_rxq_t *eft_default_rxq; boolean_t eft_using_rss; + boolean_t eft_strip_vlan; uint32_t eft_unicst_filter_indexes[ EFX_EF10_FILTER_UNICAST_FILTERS_MAX]; uint32_t eft_unicst_filter_count; diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index 58a0e95bf9..3f67212810 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -3115,6 +3115,10 @@ typedef enum efx_rxq_type_e { * Request user flag field in the Rx prefix of a queue. */ #define EFX_RXQ_FLAG_USER_FLAG 0x20 +/* + * Request vlan tci field in the Rx prefix of a queue. + */ +#define EFX_RXQ_FLAG_VLAN_STRIP 0x40 LIBEFX_API extern __checkReturn efx_rc_t @@ -3469,6 +3473,11 @@ efx_tx_qdestroy( #define EFX_FILTER_FLAG_ACTION_FLAG 0x20 /* Set match mark on the received packet */ #define EFX_FILTER_FLAG_ACTION_MARK 0x40 +/* + * Request that the first tag in the outer L2 header be stripped + * and TCI be indicated in Rx prefix. + */ +#define EFX_FILTER_FLAG_VLAN_STRIP 0x80 typedef uint8_t efx_filter_flags_t; diff --git a/drivers/common/sfc_efx/base/efx_filter.c b/drivers/common/sfc_efx/base/efx_filter.c index 83c37ff859..778ed0c370 100644 --- a/drivers/common/sfc_efx/base/efx_filter.c +++ b/drivers/common/sfc_efx/base/efx_filter.c @@ -322,7 +322,8 @@ efx_filter_spec_init_rx( EFSYS_ASSERT3P(spec, !=, NULL); EFSYS_ASSERT3P(erp, !=, NULL); EFSYS_ASSERT((flags & ~(EFX_FILTER_FLAG_RX_RSS | - EFX_FILTER_FLAG_RX_SCATTER)) == 0); + EFX_FILTER_FLAG_RX_SCATTER | + EFX_FILTER_FLAG_VLAN_STRIP)) == 0); memset(spec, 0, sizeof (*spec)); spec->efs_priority = priority; diff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h index fb9b9e1a20..a48d4f6e04 100644 --- a/drivers/common/sfc_efx/base/efx_impl.h +++ b/drivers/common/sfc_efx/base/efx_impl.h @@ -1046,6 +1046,7 @@ struct efx_rxq_s { efsys_mem_t *er_esmp; efx_evq_rxq_state_t *er_ev_qstate; efx_rx_prefix_layout_t er_prefix_layout; + uint16_t er_flags; }; #define EFX_RXQ_MAGIC 0x15022005 diff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c index 61726a9f0b..55ffa82033 100644 --- a/drivers/common/sfc_efx/base/efx_rx.c +++ b/drivers/common/sfc_efx/base/efx_rx.c @@ -925,6 +925,7 @@ efx_rx_qcreate_internal( erp->er_index = index; erp->er_mask = ndescs - 1; erp->er_esmp = esmp; + erp->er_flags = 0; if ((rc = erxop->erxo_qcreate(enp, index, label, type, type_data, esmp, ndescs, id, flags, eep, erp)) != 0) @@ -943,11 +944,27 @@ efx_rx_qcreate_internal( } } + if (flags & EFX_RXQ_FLAG_VLAN_STRIP) { + const efx_rx_prefix_layout_t *erplp = &erp->er_prefix_layout; + const efx_rx_prefix_field_info_t *vlan_tci_field; + + vlan_tci_field = + &erplp->erpl_fields[EFX_RX_PREFIX_FIELD_VLAN_STRIP_TCI]; + if (vlan_tci_field->erpfi_width_bits == 0) { + rc = ENOTSUP; + goto fail6; + } + + erp->er_flags |= EFX_RXQ_FLAG_VLAN_STRIP; + } + enp->en_rx_qcount++; *erpp = erp; return (0); +fail6: + EFSYS_PROBE(fail6); fail5: EFSYS_PROBE(fail5); diff --git a/drivers/common/sfc_efx/base/rhead_rx.c b/drivers/common/sfc_efx/base/rhead_rx.c index d0ac5c02f8..3453227388 100644 --- a/drivers/common/sfc_efx/base/rhead_rx.c +++ b/drivers/common/sfc_efx/base/rhead_rx.c @@ -640,6 +640,9 @@ rhead_rx_qcreate( if (flags & EFX_RXQ_FLAG_USER_FLAG) fields_mask |= 1U << EFX_RX_PREFIX_FIELD_USER_FLAG; + if (flags & EFX_RXQ_FLAG_VLAN_STRIP) + fields_mask |= 1U << EFX_RX_PREFIX_FIELD_VLAN_STRIP_TCI; + /* * LENGTH is required in EF100 host interface, as receive events * do not include the packet length. From patchwork Wed May 31 13:41:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artemii Morozov X-Patchwork-Id: 127805 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 A8F5B42BF4; Wed, 31 May 2023 15:41:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41C2642D32; Wed, 31 May 2023 15:41:32 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id 6B504410EA for ; Wed, 31 May 2023 15:41:28 +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 A1E37E12C3; Wed, 31 May 2023 17:41:27 +0400 (+04) From: Artemii Morozov To: dev@dpdk.org Cc: Ivan Malov , Viacheslav Galaktionov , Andrew Rybchenko , Andy Moreton Subject: [PATCH 3/3] net/sfc: support VLAN stripping offload Date: Wed, 31 May 2023 17:41:22 +0400 Message-Id: <20230531134122.119508-4-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 Extract vlan tci provided by the HW in the prefix and put it to mbuf. VLAN stripping is supported for ef100 datapath only. Signed-off-by: Artemii Morozov Reviewed-by: Viacheslav Galaktionov Reviewed-by: Ivan Malov Reviewed-by: Andy Moreton --- doc/guides/nics/sfc_efx.rst | 4 ++-- drivers/net/sfc/sfc_ef100_rx.c | 21 ++++++++++++++++++++- drivers/net/sfc/sfc_rx.c | 19 +++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst index 88d0fdf3c1..98702465f7 100644 --- a/doc/guides/nics/sfc_efx.rst +++ b/doc/guides/nics/sfc_efx.rst @@ -80,6 +80,8 @@ SFC EFX PMD has support for: - Port representors (see :ref: switch_representation) +- VLAN stripping (if running firmware variant supports it) + Non-supported Features ---------------------- @@ -92,8 +94,6 @@ The features not yet supported include: - VLAN filtering -- VLAN stripping - - LRO diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c index 16cd8524d3..b7e3397f77 100644 --- a/drivers/net/sfc/sfc_ef100_rx.c +++ b/drivers/net/sfc/sfc_ef100_rx.c @@ -68,6 +68,7 @@ struct sfc_ef100_rxq { #define SFC_EF100_RXQ_INGRESS_MPORT 0x80 #define SFC_EF100_RXQ_USER_FLAG 0x100 #define SFC_EF100_RXQ_NIC_DMA_MAP 0x200 +#define SFC_EF100_RXQ_VLAN_STRIP 0x400 unsigned int ptr_mask; unsigned int evq_phase_bit_shift; unsigned int ready_pkts; @@ -392,6 +393,7 @@ static const efx_rx_prefix_layout_t sfc_ef100_rx_prefix_layout = { SFC_EF100_RX_PREFIX_FIELD(RSS_HASH, B_FALSE), SFC_EF100_RX_PREFIX_FIELD(USER_FLAG, B_FALSE), SFC_EF100_RX_PREFIX_FIELD(USER_MARK, B_FALSE), + SFC_EF100_RX_PREFIX_FIELD(VLAN_STRIP_TCI, B_FALSE), #undef SFC_EF100_RX_PREFIX_FIELD } @@ -472,6 +474,17 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq, ESF_GZ_RX_PREFIX_INGRESS_MPORT); } + if (rxq->flags & SFC_EF100_RXQ_VLAN_STRIP) { + uint32_t vlan_stripped; + vlan_stripped = EFX_XWORD_FIELD(rx_prefix[0], ESF_GZ_RX_PREFIX_VLAN_STRIPPED); + + if (vlan_stripped != 0) { + ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED; + m->vlan_tci = EFX_XWORD_FIELD(rx_prefix[0], + ESF_GZ_RX_PREFIX_VLAN_STRIP_TCI); + } + } + m->ol_flags = ol_flags; return true; } @@ -882,6 +895,12 @@ sfc_ef100_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr, else rxq->flags &= ~SFC_EF100_RXQ_INGRESS_MPORT; + if ((unsup_rx_prefix_fields & + (1U << EFX_RX_PREFIX_FIELD_VLAN_STRIP_TCI)) == 0) + rxq->flags |= SFC_EF100_RXQ_VLAN_STRIP; + else + rxq->flags &= ~SFC_EF100_RXQ_VLAN_STRIP; + rxq->prefix_size = pinfo->erpl_length; rxq->rearm_data = sfc_ef100_mk_mbuf_rearm_data(rxq->dp.dpq.port_id, rxq->prefix_size); @@ -994,7 +1013,7 @@ struct sfc_dp_rx sfc_ef100_rx = { SFC_DP_RX_FEAT_FLOW_MARK | SFC_DP_RX_FEAT_INTR | SFC_DP_RX_FEAT_STATS, - .dev_offload_capa = 0, + .dev_offload_capa = RTE_ETH_RX_OFFLOAD_VLAN_STRIP, .queue_offload_capa = RTE_ETH_RX_OFFLOAD_CHECKSUM | RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM | diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index 921d9d9ca0..aae815a653 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -942,6 +942,9 @@ sfc_rx_get_offload_mask(struct sfc_adapter *sa) if (encp->enc_rx_include_fcs_supported == 0) no_caps |= RTE_ETH_RX_OFFLOAD_KEEP_CRC; + if (encp->enc_rx_vlan_stripping == 0) + no_caps |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP; + return ~no_caps; } @@ -1190,6 +1193,16 @@ sfc_rx_qinit(struct sfc_adapter *sa, sfc_sw_index_t sw_index, if (offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH) rxq_info->type_flags |= EFX_RXQ_FLAG_RSS_HASH; + + if (sa->eth_dev->data->dev_conf.rxmode.offloads & + RTE_ETH_RX_OFFLOAD_VLAN_STRIP) { + rxq_info->type_flags |= EFX_RXQ_FLAG_VLAN_STRIP; + } else if (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) { + sfc_err(sa, "VLAN stripping must be configured during device configure"); + rc = EINVAL; + goto fail_bad_conf; + } + if ((sa->negotiated_rx_metadata & RTE_ETH_RX_METADATA_USER_FLAG) != 0) rxq_info->type_flags |= EFX_RXQ_FLAG_USER_FLAG; @@ -1692,6 +1705,12 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode) rxmode->offloads |= RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM; } + if ((rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) && + (~offloads_supported & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)) { + sfc_err(sa, "VLAN stripping offload is requested but not supported"); + rc = ENOTSUP; + } + return rc; }