diff options
| author | Rony Efraim <ronye@mellanox.com> | 2013-06-13 06:19:10 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-06-13 20:51:04 -0400 |
| commit | 1d8faf48c74b8329a0322dc4b2a2030ae5003c86 (patch) | |
| tree | 63471c7ee9379f70e30b27b82cf6f155683b4468 /include/uapi/linux | |
| parent | 3dc6475c0c9e55ac7f053ad6b8b398e779954545 (diff) | |
net/core: Add VF link state control
Add netlink directives and ndo entry to allow for controling
VF link, which can be in one of three states:
Auto - VF link state reflects the PF link state (default)
Up - VF link state is up, traffic from VF to VF works even if
the actual PF link is down
Down - VF link state is down, no traffic from/to this VF, can be of
use while configuring the VF
Signed-off-by: Rony Efraim <ronye@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/if_link.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index da05a2698cb5..03f6170ab337 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
| @@ -338,6 +338,7 @@ enum { | |||
| 338 | IFLA_VF_VLAN, | 338 | IFLA_VF_VLAN, |
| 339 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | 339 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ |
| 340 | IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ | 340 | IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ |
| 341 | IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */ | ||
| 341 | __IFLA_VF_MAX, | 342 | __IFLA_VF_MAX, |
| 342 | }; | 343 | }; |
| 343 | 344 | ||
| @@ -364,6 +365,18 @@ struct ifla_vf_spoofchk { | |||
| 364 | __u32 setting; | 365 | __u32 setting; |
| 365 | }; | 366 | }; |
| 366 | 367 | ||
| 368 | enum { | ||
| 369 | IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ | ||
| 370 | IFLA_VF_LINK_STATE_ENABLE, /* link always up */ | ||
| 371 | IFLA_VF_LINK_STATE_DISABLE, /* link always down */ | ||
| 372 | __IFLA_VF_LINK_STATE_MAX, | ||
| 373 | }; | ||
| 374 | |||
| 375 | struct ifla_vf_link_state { | ||
| 376 | __u32 vf; | ||
| 377 | __u32 link_state; | ||
| 378 | }; | ||
| 379 | |||
| 367 | /* VF ports management section | 380 | /* VF ports management section |
| 368 | * | 381 | * |
| 369 | * Nested layout of set/get msg is: | 382 | * Nested layout of set/get msg is: |
