diff options
Diffstat (limited to 'include/linux/if_macvlan.h')
-rw-r--r-- | include/linux/if_macvlan.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index 35280b302290..8a2fd66a8b5f 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
@@ -40,6 +40,12 @@ struct macvlan_rx_stats { | |||
40 | unsigned long rx_errors; | 40 | unsigned long rx_errors; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | /* | ||
44 | * Maximum times a macvtap device can be opened. This can be used to | ||
45 | * configure the number of receive queue, e.g. for multiqueue virtio. | ||
46 | */ | ||
47 | #define MAX_MACVTAP_QUEUES (NR_CPUS < 16 ? NR_CPUS : 16) | ||
48 | |||
43 | struct macvlan_dev { | 49 | struct macvlan_dev { |
44 | struct net_device *dev; | 50 | struct net_device *dev; |
45 | struct list_head list; | 51 | struct list_head list; |
@@ -50,7 +56,8 @@ struct macvlan_dev { | |||
50 | enum macvlan_mode mode; | 56 | enum macvlan_mode mode; |
51 | int (*receive)(struct sk_buff *skb); | 57 | int (*receive)(struct sk_buff *skb); |
52 | int (*forward)(struct net_device *dev, struct sk_buff *skb); | 58 | int (*forward)(struct net_device *dev, struct sk_buff *skb); |
53 | struct macvtap_queue *tap; | 59 | struct macvtap_queue *taps[MAX_MACVTAP_QUEUES]; |
60 | int numvtaps; | ||
54 | }; | 61 | }; |
55 | 62 | ||
56 | static inline void macvlan_count_rx(const struct macvlan_dev *vlan, | 63 | static inline void macvlan_count_rx(const struct macvlan_dev *vlan, |