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>
This commit is contained in:

committed by
David S. Miller

parent
033f46b3c1
commit
a54acb3a6f
@@ -1030,6 +1030,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
|
||||
* int queue_index, u32 maxrate);
|
||||
* Called when a user wants to set a max-rate limitation of specific
|
||||
* TX queue.
|
||||
* int (*ndo_get_iflink)(const struct net_device *dev);
|
||||
* Called to get the iflink value of this device.
|
||||
*/
|
||||
struct net_device_ops {
|
||||
int (*ndo_init)(struct net_device *dev);
|
||||
@@ -1191,6 +1193,7 @@ struct net_device_ops {
|
||||
int (*ndo_set_tx_maxrate)(struct net_device *dev,
|
||||
int queue_index,
|
||||
u32 maxrate);
|
||||
int (*ndo_get_iflink)(const struct net_device *dev);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2149,6 +2152,7 @@ void __dev_remove_pack(struct packet_type *pt);
|
||||
void dev_add_offload(struct packet_offload *po);
|
||||
void dev_remove_offload(struct packet_offload *po);
|
||||
|
||||
int dev_get_iflink(const struct net_device *dev);
|
||||
struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,
|
||||
unsigned short mask);
|
||||
struct net_device *dev_get_by_name(struct net *net, const char *name);
|
||||
|
Reference in New Issue
Block a user