diff options
author | Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> | 2008-12-26 04:35:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-26 04:35:35 -0500 |
commit | d7b06636be162d3f74c9ce5d6d0d9ea4e5d362c8 (patch) | |
tree | 95d9b7b0825f145ba080cb9671bed3b3b189fd16 /net | |
parent | 26bc19ecf6c077c926827c25631340fd2e8fb16e (diff) |
net: Init NAPI dev_list on napi_del
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 <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index daca72e6b37b..536a8ac189c8 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2548,7 +2548,7 @@ void netif_napi_del(struct napi_struct *napi) | |||
2548 | { | 2548 | { |
2549 | struct sk_buff *skb, *next; | 2549 | struct sk_buff *skb, *next; |
2550 | 2550 | ||
2551 | list_del(&napi->dev_list); | 2551 | list_del_init(&napi->dev_list); |
2552 | 2552 | ||
2553 | for (skb = napi->gro_list; skb; skb = next) { | 2553 | for (skb = napi->gro_list; skb; skb = next) { |
2554 | next = skb->next; | 2554 | next = skb->next; |