From: Christian Lamparter <[email protected]>
Date: Tue, 6 Nov 2018 23:27:49 +0100
> @@ -1435,6 +1436,22 @@ static inline netdev_tx_t emac_xmit_finish(struct
> emac_instance *dev, int len)
> return NETDEV_TX_OK;
> }
>
> +static inline u16 emac_tx_vlan(struct emac_instance *dev, struct sk_buff
> *skb)
> +{
> + /* Handle VLAN TPID and TCI insert if this is a VLAN skb */
> + if (emac_has_feature(dev, EMAC_FTR_HAS_VLAN_CTAG_TX) &&
> + skb_vlan_tag_present(skb)) {
> + struct emac_regs __iomem *p = dev->emacp;
> +
> + /* update the VLAN TCI */
> + out_be32(&p->vtci, (u32)skb_vlan_tag_get(skb));
Hmmm, how does this vtci register work?
How can you have a global piece of register state controlling the VLAN
tag that will be used for the TX frame?
What happens if you queue up several TX SKBs, each one with a different
VLAN tci?
Normally the TCI state is implemented on a per-tx-descriptor basis.