diff options
| author | Williams, Mitch A <mitch.a.williams@intel.com> | 2010-02-09 20:43:46 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-02-12 19:56:08 -0500 |
| commit | 95c26df829ba4a25f40595cadb4c9433883cbe28 (patch) | |
| tree | aa67243806f3012ee82fa182990251952973ffe8 | |
| parent | b280da8d54b8d82b52f368a8703b7ada6c1744d5 (diff) | |
net: Add netdev ops for SR-IOV configuration
Add netdev ops for configuring SR-IOV VF devices through the PF driver.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | include/linux/netdevice.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1412dde16d00..682d02521bbc 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/if.h> | 28 | #include <linux/if.h> |
| 29 | #include <linux/if_ether.h> | 29 | #include <linux/if_ether.h> |
| 30 | #include <linux/if_packet.h> | 30 | #include <linux/if_packet.h> |
| 31 | #include <linux/if_link.h> | ||
| 31 | 32 | ||
| 32 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
| 33 | #include <linux/timer.h> | 34 | #include <linux/timer.h> |
| @@ -621,6 +622,13 @@ struct netdev_queue { | |||
| 621 | * this function is called when a VLAN id is unregistered. | 622 | * this function is called when a VLAN id is unregistered. |
| 622 | * | 623 | * |
| 623 | * void (*ndo_poll_controller)(struct net_device *dev); | 624 | * void (*ndo_poll_controller)(struct net_device *dev); |
| 625 | * | ||
| 626 | * SR-IOV management functions. | ||
| 627 | * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac); | ||
| 628 | * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos); | ||
| 629 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); | ||
| 630 | * int (*ndo_get_vf_config)(struct net_device *dev, | ||
| 631 | * int vf, struct ifla_vf_info *ivf); | ||
| 624 | */ | 632 | */ |
| 625 | #define HAVE_NET_DEVICE_OPS | 633 | #define HAVE_NET_DEVICE_OPS |
| 626 | struct net_device_ops { | 634 | struct net_device_ops { |
| @@ -660,6 +668,15 @@ struct net_device_ops { | |||
| 660 | #ifdef CONFIG_NET_POLL_CONTROLLER | 668 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 661 | void (*ndo_poll_controller)(struct net_device *dev); | 669 | void (*ndo_poll_controller)(struct net_device *dev); |
| 662 | #endif | 670 | #endif |
| 671 | int (*ndo_set_vf_mac)(struct net_device *dev, | ||
| 672 | int queue, u8 *mac); | ||
| 673 | int (*ndo_set_vf_vlan)(struct net_device *dev, | ||
| 674 | int queue, u16 vlan, u8 qos); | ||
| 675 | int (*ndo_set_vf_tx_rate)(struct net_device *dev, | ||
| 676 | int vf, int rate); | ||
| 677 | int (*ndo_get_vf_config)(struct net_device *dev, | ||
| 678 | int vf, | ||
| 679 | struct ifla_vf_info *ivf); | ||
| 663 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 680 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) |
| 664 | int (*ndo_fcoe_enable)(struct net_device *dev); | 681 | int (*ndo_fcoe_enable)(struct net_device *dev); |
| 665 | int (*ndo_fcoe_disable)(struct net_device *dev); | 682 | int (*ndo_fcoe_disable)(struct net_device *dev); |
