Skip to content

Commit f0a9d56

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: update TX path comments to not mention skb_mac_header()
Once commit 6d1ccff ("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>
1 parent b5653b1 commit f0a9d56

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

net/dsa/tag.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static inline void *dsa_etype_header_pos_rx(struct sk_buff *skb)
229229
return skb->data - 2;
230230
}
231231

232-
/* On TX, skb->data points to skb_mac_header(skb), which means that EtherType
232+
/* On TX, skb->data points to the MAC header, which means that EtherType
233233
* header taggers start exactly where the EtherType is (the EtherType is
234234
* treated as part of the DSA header).
235235
*/

net/dsa/tag_8021q.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ EXPORT_SYMBOL_GPL(dsa_tag_8021q_unregister);
461461
struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
462462
u16 tpid, u16 tci)
463463
{
464-
/* skb->data points at skb_mac_header, which
465-
* is fine for vlan_insert_tag.
464+
/* skb->data points at the MAC header, which is fine
465+
* for vlan_insert_tag().
466466
*/
467467
return vlan_insert_tag(skb, htons(tpid), tci);
468468
}

0 commit comments

Comments
 (0)