summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/interface.h
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-04-05 15:47:43 -0400
committerGerrit Code Review <gerrit@fd.io>2016-04-07 14:33:05 +0000
commitbcebbb988da4fcbb6158c05050f96ae87cc50156 (patch)
tree9542744dbc6315e15b41e361369bb8da983207c5 /vnet/vnet/interface.h
parent2fa6beff5726ecb7c863d0027395ed63dc4831ca (diff)
Enhance CLI/API Support for Bonded Interface
For interfaces which are slave links to a bounded interface, do not allow sub-interface creation nor interface state to be changed. Change "show interface" to display interface state as "bond-slave" for slave links to a bonded interface. Change "show hardware" to support a "bond" keyword and display slave links to a bonded interface. Change-Id: I4db3cae6985bcb1489ab16a07c72c5ee9b2f2dd3 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'vnet/vnet/interface.h')
-rw-r--r--vnet/vnet/interface.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/vnet/vnet/interface.h b/vnet/vnet/interface.h
index 1ddd259a0b4..fdf23a6bd74 100644
--- a/vnet/vnet/interface.h
+++ b/vnet/vnet/interface.h
@@ -311,6 +311,15 @@ typedef struct vnet_hw_interface_t {
/* Count of number of L2 subinterfaces */
u32 l2_if_count;
+
+ /* Bonded interface info -
+ 0 - not a bonded interface nor a slave
+ ~0 - slave to a bonded interface
+ others - A bonded interface with a pointer to bitmap for all slaves */
+ uword *bond_info;
+#define VNET_HW_INTERFACE_BOND_INFO_NONE ((uword *) 0)
+#define VNET_HW_INTERFACE_BOND_INFO_SLAVE ((uword *) ~0)
+
} vnet_hw_interface_t;
typedef enum {
@@ -364,6 +373,8 @@ typedef struct {
#define VNET_SW_INTERFACE_FLAG_UNNUMBERED (1 << 3)
+#define VNET_SW_INTERFACE_FLAG_BOND_SLAVE (1 << 4)
+
/* Index for this interface. */
u32 sw_if_index;