[PATCH v4] lpc32xx: Added ethernet driver

Eric Dumazet eric.dumazet at gmail.com
Mon Mar 5 19:49:18 EST 2012


On Mon, 2012-03-05 at 22:45 +0000, Ben Hutchings wrote:
> On Mon, 2012-03-05 at 22:40 +0100, Roland Stigge wrote:
> [...]

...

> > +				/* Copy packet from buffer */
> > +				memcpy(prdbuf,
> > +					pldat->rx_buff_v[rxconsidx], len);
> > +
> > +				/* Pass to upper layer */
> > +				skb->protocol = eth_type_trans(skb, ndev);
> > +				netif_rx(skb);
> > +				ndev->last_rx = jiffies;
> 
> Drivers don't need to set last_rx any more.

Also, a NAPI driver should call netif_receive_skb() instead of
netif_rx()

netif_rx() is more expensive because of additional queue, while
netif_receive_skb() directly calls the upper stacks.






More information about the linux-arm-kernel mailing list