[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181106.150954.2230387672447683694.davem@davemloft.net>
Date: Tue, 06 Nov 2018 15:09:54 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: chunkeey@...il.com
Cc: netdev@...r.kernel.org, ivan@...ibm.com, f.fainelli@...il.com
Subject: Re: [PATCH v4 1/3] net: emac: implement 802.1Q VLAN TX tagging
support
From: Christian Lamparter <chunkeey@...il.com>
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.
Powered by blists - more mailing lists