netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: dsa: input correct header length for skb_cow_head()
@ 2020-03-16  1:04 xiaofeis
  2020-03-16  9:07 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: xiaofeis @ 2020-03-16  1:04 UTC (permalink / raw)
  To: davem
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha, xiaofeis

We need to ensure there is enough headroom to push QCA header,
so input the QCA header length instead of 0.

Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
---
 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 c958852..72c1629 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -36,7 +36,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
 	dev->stats.tx_packets++;
 	dev->stats.tx_bytes += skb->len;
 
-	if (skb_cow_head(skb, 0) < 0)
+	if (skb_cow_head(skb, QCA_HDR_LEN) < 0)
 		return NULL;
 
 	skb_push(skb, QCA_HDR_LEN);
-- 
2.7.4


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

* Re: [PATCH] net: dsa: input correct header length for skb_cow_head()
  2020-03-16  1:04 [PATCH] net: dsa: input correct header length for skb_cow_head() xiaofeis
@ 2020-03-16  9:07 ` David Miller
  2020-03-16  9:35   ` xiaofeis
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2020-03-16  9:07 UTC (permalink / raw)
  To: xiaofeis
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

From: xiaofeis <xiaofeis@codeaurora.org>
Date: Mon, 16 Mar 2020 09:04:05 +0800

> We need to ensure there is enough headroom to push QCA header,
> so input the QCA header length instead of 0.
> 
> Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>

This was already fixed by:

commit 04fb91243a853dbde216d829c79d9632e52aa8d9
Author: Per Forlin <per.forlin@axis.com>
Date:   Thu Feb 13 15:37:09 2020 +0100

    net: dsa: tag_qca: Make sure there is headroom for tag

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

* Re: [PATCH] net: dsa: input correct header length for skb_cow_head()
  2020-03-16  9:07 ` David Miller
@ 2020-03-16  9:35   ` xiaofeis
  0 siblings, 0 replies; 3+ messages in thread
From: xiaofeis @ 2020-03-16  9:35 UTC (permalink / raw)
  To: David Miller
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

在 2020-03-16 17:07,David Miller 写道:
> From: xiaofeis <xiaofeis@codeaurora.org>
> Date: Mon, 16 Mar 2020 09:04:05 +0800
> 
>> We need to ensure there is enough headroom to push QCA header,
>> so input the QCA header length instead of 0.
>> 
>> Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
> 
> This was already fixed by:
> 
> commit 04fb91243a853dbde216d829c79d9632e52aa8d9
> Author: Per Forlin <per.forlin@axis.com>
> Date:   Thu Feb 13 15:37:09 2020 +0100
> 
>     net: dsa: tag_qca: Make sure there is headroom for tag
Ok, got it.

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

end of thread, other threads:[~2020-03-16  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-16  1:04 [PATCH] net: dsa: input correct header length for skb_cow_head() xiaofeis
2020-03-16  9:07 ` David Miller
2020-03-16  9:35   ` xiaofeis

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).