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.moro...@arknetworks.am>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktio...@arknetworks.am>
Reviewed-by: Ivan Malov <ivan.ma...@arknetworks.am>
Reviewed-by: Andy Moreton <amore...@xilinx.com>

Overall LGMT

Acked-by: Andrew Rybchenko <andrew.rybche...@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]

Reply via email to