summaryrefslogtreecommitdiff
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2013-06-05 23:54:38 +0000
committerDavid S. Miller <davem@davemloft.net>2013-06-07 23:49:09 -0700
commit376b1aabe1f53aad80615d05ddb8c43670be6a5c (patch)
tree95c266af703da4637da900c972c841f68948b0de /drivers/net/macvlan.c
parentf0afce01aa639e5164cf73f063b81a8b95619c3a (diff)
downloadlwn-376b1aabe1f53aad80615d05ddb8c43670be6a5c.tar.gz
lwn-376b1aabe1f53aad80615d05ddb8c43670be6a5c.zip
macvtap: eliminate linear search
Linear search were used in both get_slot() and macvtap_get_queue(), this is because: - macvtap didn't reshuffle the array of taps when create or destroy a queue, so when adding a new queue, macvtap must do linear search to find a location for the new queue. This will also complicate the TUNSETQUEUE implementation for multiqueue API. - the queue itself didn't track the queue index, so the we must do a linear search in the array to find the location of a existed queue. The solution is straightforward: reshuffle the array and introduce a queue_index to macvtap_queue. Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
0 files changed, 0 insertions, 0 deletions