Thread (5 messages) flat view 5 messages, 3 authors, 2012-04-04

Re: [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb

From: Roland Stigge <hidden>
Date: 2012-04-03 22:54:29

Hi Eric,

On 04/04/12 00:02, Eric Dumazet wrote:
Probably a leftover from ancient code...
...
quoted hunk ↗ jump to hunk
--- a/drivers/net/ethernet/nxp/lpc_eth.c
+++ b/drivers/net/ethernet/nxp/lpc_eth.c
@@ -990,10 +990,10 @@ static int __lpc_handle_recv(struct net_device *ndev, int budget)
 			ndev->stats.rx_errors++;
 		} else {
 			/* Packet is good */
-			skb = dev_alloc_skb(len + 8);
-			if (!skb)
+			skb = dev_alloc_skb(len);
I remember this issue from the discussion, a note from Ben Hutchings
actually, where there was a further "skb_reserve(skb, 8);" in the "else"
case below. Looks like I only removed the skb_reserve().

Can't find this review from you - I hope there are no other issues left?
(Was I on CC?)
+			if (!skb) {
 				ndev->stats.rx_dropped++;
-			else {
+			} else {
Why add curly braces around a single statement?

Thanks,

Roland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help