diff options
Diffstat (limited to 'include/linux/if_macvlan.h')
| -rw-r--r-- | include/linux/if_macvlan.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index 84dde1dd1da4..ddd33fd5904d 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <net/netlink.h> | 8 | #include <net/netlink.h> |
| 9 | #include <linux/u64_stats_sync.h> | 9 | #include <linux/u64_stats_sync.h> |
| 10 | 10 | ||
| 11 | #if defined(CONFIG_MACVTAP) || defined(CONFIG_MACVTAP_MODULE) | 11 | #if IS_ENABLED(CONFIG_MACVTAP) |
| 12 | struct socket *macvtap_get_socket(struct file *); | 12 | struct socket *macvtap_get_socket(struct file *); |
| 13 | #else | 13 | #else |
| 14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
| @@ -50,7 +50,7 @@ struct macvlan_pcpu_stats { | |||
| 50 | * Maximum times a macvtap device can be opened. This can be used to | 50 | * Maximum times a macvtap device can be opened. This can be used to |
| 51 | * configure the number of receive queue, e.g. for multiqueue virtio. | 51 | * configure the number of receive queue, e.g. for multiqueue virtio. |
| 52 | */ | 52 | */ |
| 53 | #define MAX_MACVTAP_QUEUES (NR_CPUS < 16 ? NR_CPUS : 16) | 53 | #define MAX_MACVTAP_QUEUES 16 |
| 54 | 54 | ||
| 55 | #define MACVLAN_MC_FILTER_BITS 8 | 55 | #define MACVLAN_MC_FILTER_BITS 8 |
| 56 | #define MACVLAN_MC_FILTER_SZ (1 << MACVLAN_MC_FILTER_BITS) | 56 | #define MACVLAN_MC_FILTER_SZ (1 << MACVLAN_MC_FILTER_BITS) |
| @@ -65,12 +65,18 @@ struct macvlan_dev { | |||
| 65 | 65 | ||
| 66 | DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); | 66 | DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); |
| 67 | 67 | ||
| 68 | netdev_features_t set_features; | ||
| 68 | enum macvlan_mode mode; | 69 | enum macvlan_mode mode; |
| 69 | u16 flags; | 70 | u16 flags; |
| 70 | int (*receive)(struct sk_buff *skb); | 71 | int (*receive)(struct sk_buff *skb); |
| 71 | int (*forward)(struct net_device *dev, struct sk_buff *skb); | 72 | int (*forward)(struct net_device *dev, struct sk_buff *skb); |
| 72 | struct macvtap_queue *taps[MAX_MACVTAP_QUEUES]; | 73 | /* This array tracks active taps. */ |
| 74 | struct macvtap_queue __rcu *taps[MAX_MACVTAP_QUEUES]; | ||
| 75 | /* This list tracks all taps (both enabled and disabled) */ | ||
| 76 | struct list_head queue_list; | ||
| 73 | int numvtaps; | 77 | int numvtaps; |
| 78 | int numqueues; | ||
| 79 | netdev_features_t tap_features; | ||
| 74 | int minor; | 80 | int minor; |
| 75 | }; | 81 | }; |
| 76 | 82 | ||
