WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [xen/stable-2.6.32.x PATCH 3/5] net: Add netdev ops for SR-I

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [xen/stable-2.6.32.x PATCH 3/5] net: Add netdev ops for SR-IOV configuration
From: "Rose, Gregory V" <gregory.v.rose@xxxxxxxxx>
Date: Wed, 14 Jul 2010 13:59:47 -0700
Accept-language: en-US
Acceptlanguage: en-US
Delivery-date: Wed, 14 Jul 2010 14:11:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acsjl35G9/sDFuMBRYqJa6qww0JTZA==
Thread-topic: [xen/stable-2.6.32.x PATCH 3/5] net: Add netdev ops for SR-IOV configuration
Add netdev ops for configuring SR-IOV VF devices through the PF driver.

Signed-off-by: Greg Rose <gregory.v.rose@xxxxxxxxx>    
CC: Mitch Williams <mitch.a.williams@xxxxxxxxx>

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 812a5f3..0b7d4ec 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -28,6 +28,7 @@
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
+#include <linux/if_link.h>
 
 #ifdef __KERNEL__
 #include <linux/timer.h>
@@ -577,6 +578,13 @@ struct netdev_queue {
  *     this function is called when a VLAN id is unregistered.
  *
  * void (*ndo_poll_controller)(struct net_device *dev);
+ *
+ *     SR-IOV management functions.
+ * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
+ * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos);
+ * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate);
+ * int (*ndo_get_vf_config)(struct net_device *dev,
+ *                         int vf, struct ifla_vf_info *ivf);
  */
 #define HAVE_NET_DEVICE_OPS
 struct net_device_ops {
@@ -626,6 +634,15 @@ struct net_device_ops {
 #define HAVE_NETDEV_POLL
        void                    (*ndo_poll_controller)(struct net_device *dev);
 #endif
+       int                     (*ndo_set_vf_mac)(struct net_device *dev,
+                                                 int queue, u8 *mac);
+       int                     (*ndo_set_vf_vlan)(struct net_device *dev,
+                                                  int queue, u16 vlan, u8 qos);
+       int                     (*ndo_set_vf_tx_rate)(struct net_device *dev,
+                                                     int vf, int rate);
+       int                     (*ndo_get_vf_config)(struct net_device *dev,
+                                                    int vf,
+                                                    struct ifla_vf_info *ivf);
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
        int                     (*ndo_fcoe_enable)(struct net_device *dev);
        int                     (*ndo_fcoe_disable)(struct net_device *dev);



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [xen/stable-2.6.32.x PATCH 3/5] net: Add netdev ops for SR-IOV configuration, Rose, Gregory V <=