[PATCH v5 3/3] net/sfc: support VLAN stripping offload

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Mon Jun 19 12:36:56 CEST 2023


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 <artemii.morozov at arknetworks.am>
> Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov at arknetworks.am>
> Reviewed-by: Ivan Malov <ivan.malov at arknetworks.am>
> Reviewed-by: Andy Moreton <amoreton at xilinx.com>

Overall LGMT

Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>

> @@ -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]



More information about the dev mailing list