[PATCH v6 4/4] net/sfc: support VLAN stripping offload
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Thu Jun 22 14:07:03 CEST 2023
On 6/22/23 14:31, 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>
One, but important question below:
> diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
> index 37b754fa33..07381df5cf 100644
> --- a/drivers/net/sfc/sfc_ef100_rx.c
> +++ b/drivers/net/sfc/sfc_ef100_rx.c
[snip]
> @@ -892,6 +905,15 @@ sfc_ef100_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr,
> (rxq->flags & SFC_EF100_RXQ_INGRESS_MPORT))
> return ENOTSUP;
>
> + /*
> + * Exclude the SFC_EF100_RXQ_VLAN_STRIPPED_TCI if offload was not requested
> + * or the prefix does not contain the corresponding field.
> + */
> + if (!((rxq->flags & SFC_EF100_RXQ_VLAN_STRIPPED_TCI) &&
Sorry, it is complicated to understand the condition. Please, avoid
leading not.
> + ((unsup_rx_prefix_fields &
> + (1U << EFX_RX_PREFIX_FIELD_VLAN_STRIP_TCI)) == 0)))
> + rxq->flags &= ~SFC_EF100_RXQ_VLAN_STRIPPED_TCI;
> +
I don't understand why do we need to check Rx prefix field presence
here. We should not allow to enable VLAN stripping if Rx prefix field
is not available.
> 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