netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] net: dsa: tag_qca: QCA tag and headroom size?
@ 2020-02-12  9:57 Per Förlin
  2020-02-12 20:23 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Per Förlin @ 2020-02-12  9:57 UTC (permalink / raw)
  To: netdev@vger.kernel.org, john@phrozen.org
  Cc: andrew@lunn.ch, f.fainelli@gmail.com

Hi,

---
 net/dsa/tag_qca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index c8a128c9e5e0..70db7c909f74 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -33,7 +33,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
 	struct dsa_port *dp = dsa_slave_to_port(dev);
 	u16 *phdr, hdr;
 
-	if (skb_cow_head(skb, 0) < 0)
>  Is it really safe to assume there is enough headroom for the QCA tag?

+	if (skb_cow_head(skb, QCA_HDR_LEN) < 0)
> My proposal. Specify QCA tag size to make sure there is headroom.

 		return NULL;
 
 	skb_push(skb, QCA_HDR_LEN);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-13 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-12  9:57 [Question] net: dsa: tag_qca: QCA tag and headroom size? Per Förlin
2020-02-12 20:23 ` Andrew Lunn
2020-02-13  5:23   ` Per Förlin
2020-02-13 12:53     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).