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 2/5] if_link: Add SR-IOV configur

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [xen/stable-2.6.32.x PATCH 2/5] if_link: Add SR-IOV configuration methods
From: "Rose, Gregory V" <gregory.v.rose@xxxxxxxxx>
Date: Wed, 14 Jul 2010 13:59:42 -0700
Accept-language: en-US
Acceptlanguage: en-US
Delivery-date: Wed, 14 Jul 2010 14:07:07 -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: Acsjl3s69samoxC5TI+tv2lPpOEyZw==
Thread-topic: [xen/stable-2.6.32.x PATCH 2/5] if_link: Add SR-IOV configuration methods
Add SR-IOV VF management methods to IFLA_LINKINFO. This allows userspace to
use rtnetlink to configure VF network devices.

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

diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 176c518..e77f2b4 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -81,6 +81,11 @@ enum
 #define IFLA_LINKINFO IFLA_LINKINFO
        IFLA_NET_NS_PID,
        IFLA_IFALIAS,
+       IFLA_NUM_VF,            /* Number of VFs if device is SR-IOV PF */
+       IFLA_VF_MAC,            /* Hardware queue specific attributes */
+       IFLA_VF_VLAN,
+       IFLA_VF_TX_RATE,        /* TX Bandwidth Allocation */
+       IFLA_VFINFO,
        __IFLA_MAX
 };
 
@@ -190,4 +195,29 @@ struct ifla_vlan_qos_mapping
        __u32 to;
 };
 
+/* SR-IOV virtual function managment section */
+
+struct ifla_vf_mac {
+       __u32 vf;
+       __u8 mac[32]; /* MAX_ADDR_LEN */
+};
+
+struct ifla_vf_vlan {
+       __u32 vf;
+       __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */
+       __u32 qos;
+};
+
+struct ifla_vf_tx_rate {
+       __u32 vf;
+       __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
+};
+
+struct ifla_vf_info {
+       __u32 vf;
+       __u8 mac[32];
+       __u32 vlan;
+       __u32 qos;
+       __u32 tx_rate;
+};
 #endif /* _LINUX_IF_LINK_H */


_______________________________________________
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 2/5] if_link: Add SR-IOV configuration methods, Rose, Gregory V <=