Commit f0a9d563 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: dsa: update TX path comments to not mention skb_mac_header()

Once commit 6d1ccff6 ("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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b5653b15
...@@ -229,7 +229,7 @@ static inline void *dsa_etype_header_pos_rx(struct sk_buff *skb) ...@@ -229,7 +229,7 @@ static inline void *dsa_etype_header_pos_rx(struct sk_buff *skb)
return skb->data - 2; 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 * header taggers start exactly where the EtherType is (the EtherType is
* treated as part of the DSA header). * treated as part of the DSA header).
*/ */
......
...@@ -461,8 +461,8 @@ EXPORT_SYMBOL_GPL(dsa_tag_8021q_unregister); ...@@ -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, struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
u16 tpid, u16 tci) u16 tpid, u16 tci)
{ {
/* skb->data points at skb_mac_header, which /* skb->data points at the MAC header, which is fine
* is fine for vlan_insert_tag. * for vlan_insert_tag().
*/ */
return vlan_insert_tag(skb, htons(tpid), tci); return vlan_insert_tag(skb, htons(tpid), tci);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment