]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: dsa: update TX path comments to not mention skb_mac_header()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 20 Apr 2023 22:56:00 +0000 (01:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Apr 2023 13:16:45 +0000 (14:16 +0100)
Once commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()")
will be reverted, it will no longer be true that skb->data points at
skb_mac_header(skb) - since the skb->mac_header will not be set - so
stop saying that, and just say that it points to the MAC header.

I've reviewed vlan_insert_tag() and it does not *actually* depend on
skb_mac_header(), so reword that to avoid the confusion.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/tag.h
net/dsa/tag_8021q.c

index 7cfbca824f1c787756eefc6cf5aeca831a81a9c6..32d12f4a9d732ca6df8097e2e11edecd7063a2fd 100644 (file)
@@ -229,7 +229,7 @@ static inline void *dsa_etype_header_pos_rx(struct sk_buff *skb)
        return skb->data - 2;
 }
 
-/* On TX, skb->data points to skb_mac_header(skb), which means that EtherType
+/* On TX, skb->data points to the MAC header, which means that EtherType
  * header taggers start exactly where the EtherType is (the EtherType is
  * treated as part of the DSA header).
  */
index 5ee9ef00954efb9f9daf8e76761c8285f519a8ef..cbdfc392f7e0d94983dc2144e34d2cd29de60204 100644 (file)
@@ -461,8 +461,8 @@ EXPORT_SYMBOL_GPL(dsa_tag_8021q_unregister);
 struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
                               u16 tpid, u16 tci)
 {
-       /* skb->data points at skb_mac_header, which
-        * is fine for vlan_insert_tag.
+       /* skb->data points at the MAC header, which is fine
+        * for vlan_insert_tag().
         */
        return vlan_insert_tag(skb, htons(tpid), tci);
 }