summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-02-02 19:14:32 -0800
committerDavid S. Miller <davem@davemloft.net>2017-02-07 10:05:11 -0500
commit473153291b8a131c86787fd9b076a529573e2c19 (patch)
treed2a534fa853babdc3d941994efab13a9e0de988c /include
parent152bff377653047c2a69c226435e2c3fd316b592 (diff)
virtio_net: wrap rtnl_lock in test for calling with lock already held
For XDP use case and to allow ethtool reset tests it is useful to be able to use reset paths from contexts where rtnl lock is already held. This requries updating virtnet_set_queues and free_receive_bufs the two places where rtnl_lock is taken in virtio_net. To do this we use the following pattern, _foo(...) { do stuff } foo(...) { rtnl_lock(); _foo(...); rtnl_unlock()}; this allows us to use freeze()/restore() flow from both contexts. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions