RE: [net-next, v2, 3/7] net: dsa: free skb->cb usage in core driver

From
Y.b. Lu <yangbo.lu@nxp.com>
Date
2021-04-27 04:26:25
Also in
linux-doc, lkml
Reply to
Richard Cochran, 2021-04-26
-----Original Message-----
From: Richard Cochran <richardcochran@gmail.com>
Sent: 2021年4月26日 21:39
To: Y.b. Lu <yangbo.lu@nxp.com>
Cc: <redacted>; Vladimir Oltean <vladimir.oltean@nxp.com>;
David S . Miller [off-list ref]; Jakub Kicinski [off-list ref];
Jonathan Corbet [off-list ref]; Kurt Kanzenbach [off-list ref];
Andrew Lunn [off-list ref]; Vivien Didelot [off-list ref];
Florian Fainelli [off-list ref]; Claudiu Manoil
[off-list ref]; Alexandre Belloni
[off-list ref]; UNGLinuxDriver@microchip.com;
linux-doc@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [net-next, v2, 3/7] net: dsa: free skb->cb usage in core driver

On Mon, Apr 26, 2021 at 05:37:58PM +0800, Yangbo Lu wrote:
quoted
@@ -624,7 +623,7 @@ static netdev_tx_t dsa_slave_xmit(struct sk_buff
*skb, struct net_device *dev)
quoted

 	dev_sw_netstats_tx_add(dev, 1, skb->len);

-	DSA_SKB_CB(skb)->clone = NULL;
+	memset(skb->cb, 0, 48);
Replace hard coded 48 with sizeof() please.
Fixed in v3.
Thank you!
Thanks,
Richard
Thread (21 messages) 21 messages, 6 authors, last reply 2021-05-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help