Skip to content

Commit a2fd181

Browse files
vladimirolteangregkh
authored andcommitted
net: dsa: tag_gswip: let DSA core deal with TX reallocation
[ Upstream commit 9b9826a ] Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. This one is interesting, the DSA tag is 8 bytes on RX and 4 bytes on TX. Because DSA is unaware of asymmetrical tag lengths, the overhead/needed headroom is declared as 8 bytes and therefore 4 bytes larger than it needs to be. If this becomes a problem, and the GSWIP driver can't be converted to a uniform header length, we might need to make DSA aware of separate RX/TX overhead values. Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9bb1bec commit a2fd181

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎net/dsa/tag_gswip.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,8 @@ static struct sk_buff *gswip_tag_xmit(struct sk_buff *skb,
6060
struct net_device *dev)
6161
{
6262
struct dsa_port *dp = dsa_slave_to_port(dev);
63-
int err;
6463
u8 *gswip_tag;
6564

66-
err = skb_cow_head(skb, GSWIP_TX_HEADER_LEN);
67-
if (err)
68-
return NULL;
69-
7065
skb_push(skb, GSWIP_TX_HEADER_LEN);
7166

7267
gswip_tag = skb->data;

0 commit comments

Comments
 (0)