diff options
author | Chris Wright <chrisw@sous-sol.org> | 2010-05-16 04:05:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-16 04:05:45 -0400 |
commit | c02db8c6290bb992442fec1407643c94cc414375 (patch) | |
tree | 05ec7bdd7efc005cd9e3905e0d6f6469bf08668b /include | |
parent | 55fa0cfd7c3ac2ae34cac7dca2e3fbcfe661e6c3 (diff) |
rtnetlink: make SR-IOV VF interface symmetric
Now we have a set of nested attributes:
IFLA_VFINFO_LIST (NESTED)
IFLA_VF_INFO (NESTED)
IFLA_VF_MAC
IFLA_VF_VLAN
IFLA_VF_TX_RATE
This allows a single set to operate on multiple attributes if desired.
Among other things, it means a dump can be replayed to set state.
The current interface has yet to be released, so this seems like
something to consider for 2.6.34.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_link.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c9bf92cd7653..d94963b379d9 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -79,10 +79,7 @@ enum { | |||
79 | IFLA_NET_NS_PID, | 79 | IFLA_NET_NS_PID, |
80 | IFLA_IFALIAS, | 80 | IFLA_IFALIAS, |
81 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ | 81 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ |
82 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | 82 | IFLA_VFINFO_LIST, |
83 | IFLA_VF_VLAN, | ||
84 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | ||
85 | IFLA_VFINFO, | ||
86 | __IFLA_MAX | 83 | __IFLA_MAX |
87 | }; | 84 | }; |
88 | 85 | ||
@@ -203,6 +200,24 @@ enum macvlan_mode { | |||
203 | 200 | ||
204 | /* SR-IOV virtual function managment section */ | 201 | /* SR-IOV virtual function managment section */ |
205 | 202 | ||
203 | enum { | ||
204 | IFLA_VF_INFO_UNSPEC, | ||
205 | IFLA_VF_INFO, | ||
206 | __IFLA_VF_INFO_MAX, | ||
207 | }; | ||
208 | |||
209 | #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1) | ||
210 | |||
211 | enum { | ||
212 | IFLA_VF_UNSPEC, | ||
213 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | ||
214 | IFLA_VF_VLAN, | ||
215 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | ||
216 | __IFLA_VF_MAX, | ||
217 | }; | ||
218 | |||
219 | #define IFLA_VF_MAX (__IFLA_VF_MAX - 1) | ||
220 | |||
206 | struct ifla_vf_mac { | 221 | struct ifla_vf_mac { |
207 | __u32 vf; | 222 | __u32 vf; |
208 | __u8 mac[32]; /* MAX_ADDR_LEN */ | 223 | __u8 mac[32]; /* MAX_ADDR_LEN */ |