Skip to content

Commit

Permalink
net: Init NAPI dev_list on napi_del
Browse files Browse the repository at this point in the history
The recent GRO patches introduced the NAPI removal of devices in
free_netdev.  For drivers that can change the number of queues during
driver operation, the NAPI infrastructure doesn't allow the freeing and
re-addition of NAPI entities without reloading the driver.

This change reinitializes the dev_list in each NAPI struct on delete,
instead of just deleting it (and assigning the list pointers to POISON).
Drivers that wish to remove/re-add NAPI will need to re-initialize the
netdev napi_list after removing all NAPI instances, before re-adding NAPI
devices again.

Signed-off-by: Peter P Waskiewicz Jr <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ppwaskie authored and davem330 committed Dec 26, 2008
1 parent 26bc19e commit d7b0663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,7 @@ void netif_napi_del(struct napi_struct *napi)
{
struct sk_buff *skb, *next;

list_del(&napi->dev_list);
list_del_init(&napi->dev_list);

for (skb = napi->gro_list; skb; skb = next) {
next = skb->next;
Expand Down

0 comments on commit d7b0663

Please sign in to comment.