]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: Init NAPI dev_list on napi_del
authorPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Fri, 26 Dec 2008 09:35:35 +0000 (01:35 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Dec 2008 09:35:35 +0000 (01:35 -0800)
commitd7b06636be162d3f74c9ce5d6d0d9ea4e5d362c8
tree95d9b7b0825f145ba080cb9671bed3b3b189fd16
parent26bc19ecf6c077c926827c25631340fd2e8fb16e
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>
net/core/dev.c