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 F10EA42CF7; Mon, 19 Jun 2023 12:36:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 820D440E0F; Mon, 19 Jun 2023 12:36:59 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 1D42440DF8 for ; Mon, 19 Jun 2023 12:36:58 +0200 (CEST) Received: from [192.168.1.40] (unknown [188.170.81.161]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id E7EE650; Mon, 19 Jun 2023 13:36:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru E7EE650 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1687171017; bh=aOEhIU5qo1zvJ9KQhXM7ox/8T7IMYK2L7AGwZzhl92w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=MFozAaw1VqksQ6IGmlx3TxMFsYGo9F6MT60K0cyl3JcGW8HisKzdb0nYCaXE2n1NK ggd9OsnWrJclS+wi2pRxgbgp+74IzUHL1OR7kzjx8cgDuUOvYGNtBYf4+xZJeSBSVs BGe1IQKdVJepiIhFuddvbVR3uf3bn25Y12n+p1X0= Message-ID: <3e6b615f-47ef-261b-052e-cfaec087caac@oktetlabs.ru> Date: Mon, 19 Jun 2023 13:36:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v5 3/3] net/sfc: support VLAN stripping offload Content-Language: en-US To: Artemii Morozov , dev@dpdk.org Cc: Ivan Malov , Viacheslav Galaktionov , Andy Moreton References: <20230531134122.119508-1-artemii.morozov@arknetworks.am> <20230613151238.59112-1-artemii.morozov@arknetworks.am> <20230613151238.59112-4-artemii.morozov@arknetworks.am> From: Andrew Rybchenko In-Reply-To: <20230613151238.59112-4-artemii.morozov@arknetworks.am> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 6/13/23 18:12, Artemii Morozov wrote: > Extract VLAN TCI provided by the HW in the prefix and put it to mbuf. > VLAN stripping is supported for ef100 datapath only. This is device > level offload. > > Signed-off-by: Artemii Morozov > Reviewed-by: Viacheslav Galaktionov > Reviewed-by: Ivan Malov > Reviewed-by: Andy Moreton Overall LGMT Acked-by: Andrew Rybchenko > @@ -892,6 +902,12 @@ sfc_ef100_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr, > (rxq->flags & SFC_EF100_RXQ_INGRESS_MPORT)) > return ENOTSUP; > > + if ((unsup_rx_prefix_fields & > + (1U << EFX_RX_PREFIX_FIELD_VLAN_STRIP_TCI)) == 0) > + rxq->flags |= SFC_EF100_RXQ_VLAN_STRIPPED_TCI; > + else > + rxq->flags &= ~SFC_EF100_RXQ_VLAN_STRIPPED_TCI; Availability of the stripped VLAN in Rx prefix could be too broad criteria to check Rx prefix. IMHO, it is better to stick to the offload enabling. It would allow to avoid extra Rx checks checks on more common case when VLAN stripping offload is disabled. > + > rxq->prefix_size = pinfo->erpl_length; > rxq->rearm_data = sfc_ef100_mk_mbuf_rearm_data(rxq->dp.dpq.port_id, > rxq->prefix_size); [snip]