* [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb
@ 2012-04-03 22:02 Eric Dumazet
2012-04-03 22:54 ` Roland Stigge
2012-04-04 22:09 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Eric Dumazet @ 2012-04-03 22:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Roland Stigge
Probably a leftover from ancient code...
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Roland Stigge <stigge@antcom.de>
---
This was mentioned in one of my review but ignored/lost.
drivers/net/ethernet/nxp/lpc_eth.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c
index 6dfc26d..d3469d8 100644
--- 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);
+ if (!skb) {
ndev->stats.rx_dropped++;
- else {
+ } else {
prdbuf = skb_put(skb, len);
/* Copy packet from buffer */
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb
2012-04-03 22:02 [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb Eric Dumazet
@ 2012-04-03 22:54 ` Roland Stigge
2012-04-03 22:58 ` David Miller
2012-04-04 22:09 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Roland Stigge @ 2012-04-03 22:54 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, David Miller
Hi Eric,
On 04/04/12 00:02, Eric Dumazet wrote:
> Probably a leftover from ancient code...
...
> --- 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb
2012-04-03 22:02 [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb Eric Dumazet
2012-04-03 22:54 ` Roland Stigge
@ 2012-04-04 22:09 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2012-04-04 22:09 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, stigge
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 04 Apr 2012 00:02:11 +0200
> Probably a leftover from ancient code...
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Roland Stigge <stigge@antcom.de>
Applied to net-next, thanks Eric.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-04 22:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03 22:02 [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb Eric Dumazet
2012-04-03 22:54 ` Roland Stigge
2012-04-03 22:58 ` David Miller
2012-04-03 23:42 ` Roland Stigge
2012-04-04 22:09 ` David Miller
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).