Skip to content

Commit

Permalink
[NET]: Do not grab device reference when scheduling a NAPI poll.
Browse files Browse the repository at this point in the history
It is pointless, because everything that can make a device go away
will do a napi_disable() first.

The main impetus behind this is that now we can legally do a NAPI
completion in generic code like net_rx_action() which a following
changeset needs to do.  net_rx_action() can only perform actions
in NAPI centric ways, because there may be a one to many mapping
between NAPI contexts and network devices (SKY2 is one example).

We also want to get rid of this because it's an extra atomic in the
NAPI paths, and also because it is one of the last instances where the
NAPI interfaces care about net devices.

The one remaining netdev detail the NAPI stuff cares about is the
netif_running() check which will be killed off in a subsequent
changeset.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 9, 2008
1 parent d987160 commit bdb95b1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,6 @@ static inline int netif_rx_schedule_prep(struct net_device *dev,
static inline void __netif_rx_schedule(struct net_device *dev,
struct napi_struct *napi)
{
dev_hold(dev);
__napi_schedule(napi);
}

Expand Down Expand Up @@ -1308,7 +1307,6 @@ static inline void __netif_rx_complete(struct net_device *dev,
struct napi_struct *napi)
{
__napi_complete(napi);
dev_put(dev);
}

/* Remove interface from poll list: it must be in the poll list
Expand Down

0 comments on commit bdb95b1

Please sign in to comment.