diff options
| author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2015-04-02 11:07:00 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-04-02 14:04:59 -0400 |
| commit | a54acb3a6f853e8394c4cb7b6a4d93c88f13eefd (patch) | |
| tree | b1e887d2bc8c205d4fe3b331e40fddba5de6ee01 /include | |
| parent | 033f46b3c13d4072d8ee6b26dd1e90fdd06895d0 (diff) | |
dev: introduce dev_get_iflink()
The goal of this patch is to prepare the removal of the iflink field. It
introduces a new ndo function, which will be implemented by virtual interfaces.
There is no functional change into this patch. All readers of iflink field
now call dev_get_iflink().
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/netdevice.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 967bb4c8caf1..788eb7a622ad 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -1030,6 +1030,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev, | |||
| 1030 | * int queue_index, u32 maxrate); | 1030 | * int queue_index, u32 maxrate); |
| 1031 | * Called when a user wants to set a max-rate limitation of specific | 1031 | * Called when a user wants to set a max-rate limitation of specific |
| 1032 | * TX queue. | 1032 | * TX queue. |
| 1033 | * int (*ndo_get_iflink)(const struct net_device *dev); | ||
| 1034 | * Called to get the iflink value of this device. | ||
| 1033 | */ | 1035 | */ |
| 1034 | struct net_device_ops { | 1036 | struct net_device_ops { |
| 1035 | int (*ndo_init)(struct net_device *dev); | 1037 | int (*ndo_init)(struct net_device *dev); |
| @@ -1191,6 +1193,7 @@ struct net_device_ops { | |||
| 1191 | int (*ndo_set_tx_maxrate)(struct net_device *dev, | 1193 | int (*ndo_set_tx_maxrate)(struct net_device *dev, |
| 1192 | int queue_index, | 1194 | int queue_index, |
| 1193 | u32 maxrate); | 1195 | u32 maxrate); |
| 1196 | int (*ndo_get_iflink)(const struct net_device *dev); | ||
| 1194 | }; | 1197 | }; |
| 1195 | 1198 | ||
| 1196 | /** | 1199 | /** |
| @@ -2149,6 +2152,7 @@ void __dev_remove_pack(struct packet_type *pt); | |||
| 2149 | void dev_add_offload(struct packet_offload *po); | 2152 | void dev_add_offload(struct packet_offload *po); |
| 2150 | void dev_remove_offload(struct packet_offload *po); | 2153 | void dev_remove_offload(struct packet_offload *po); |
| 2151 | 2154 | ||
| 2155 | int dev_get_iflink(const struct net_device *dev); | ||
| 2152 | struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags, | 2156 | struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags, |
| 2153 | unsigned short mask); | 2157 | unsigned short mask); |
| 2154 | struct net_device *dev_get_by_name(struct net *net, const char *name); | 2158 | struct net_device *dev_get_by_name(struct net *net, const char *name); |
