mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
macvtap: add TUNSETQUEUE ioctl
This patch adds TUNSETQUEUE ioctl to let userspace can temporarily disable or enable a queue of macvtap. This is used to be compatible at API layer of tuntap to simplify the userspace to manage the queues. This is done through introducing a linked list to track all taps while using vlan->taps array to only track active taps. 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>
This commit is contained in:
parent
376b1aabe1
commit
815f236d62
2 changed files with 120 additions and 19 deletions
|
@ -69,8 +69,12 @@ struct macvlan_dev {
|
|||
u16 flags;
|
||||
int (*receive)(struct sk_buff *skb);
|
||||
int (*forward)(struct net_device *dev, struct sk_buff *skb);
|
||||
/* This array tracks active taps. */
|
||||
struct macvtap_queue *taps[MAX_MACVTAP_QUEUES];
|
||||
/* This list tracks all taps (both enabled and disabled) */
|
||||
struct list_head queue_list;
|
||||
int numvtaps;
|
||||
int numqueues;
|
||||
int minor;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue