Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
L2 BD: introduce a BD interface on which to send UU packets
[vpp.git]
/
src
/
vnet
/
l2
/
l2_input.h
diff --git
a/src/vnet/l2/l2_input.h
b/src/vnet/l2/l2_input.h
index
e8a6c77
..
4d6f1a3
100644
(file)
--- a/
src/vnet/l2/l2_input.h
+++ b/
src/vnet/l2/l2_input.h
@@
-35,6
+35,12
@@
typedef struct
u32 output_sw_if_index; /* for xconnect */
};
u32 output_sw_if_index; /* for xconnect */
};
+ /* config for which input features are configured on this interface */
+ u32 feature_bitmap;
+
+ /* split horizon group */
+ u8 shg;
+
/* Interface mode. If both are 0, this interface is in L3 mode */
u8 xconnect;
u8 bridge;
/* Interface mode. If both are 0, this interface is in L3 mode */
u8 xconnect;
u8 bridge;
@@
-42,17
+48,6
@@
typedef struct
/* this is the bvi interface for the bridge-domain */
u8 bvi;
/* this is the bvi interface for the bridge-domain */
u8 bvi;
- /* config for which input features are configured on this interface */
- u32 feature_bitmap;
-
- /* some of these flags are also in the feature bitmap */
- u8 learn_enable;
- u8 fwd_enable;
- u8 flood_enable;
-
- /* split horizon group */
- u8 shg;
-
} l2_input_config_t;
} l2_input_config_t;
@@
-109,10
+104,16
@@
l2input_bd_config (u32 bd_index)
_(FLOOD, "l2-flood") \
_(ARP_TERM, "arp-term-l2bd") \
_(UU_FLOOD, "l2-flood") \
_(FLOOD, "l2-flood") \
_(ARP_TERM, "arp-term-l2bd") \
_(UU_FLOOD, "l2-flood") \
+ _(UU_FWD, "l2-uu-fwd") \
+ _(GBP_FWD, "gbp-fwd") \
_(FWD, "l2-fwd") \
_(RW, "l2-rw") \
_(LEARN, "l2-learn") \
_(FWD, "l2-fwd") \
_(RW, "l2-rw") \
_(LEARN, "l2-learn") \
+ _(L2_EMULATION, "l2-emulation") \
+ _(GBP_NULL_CLASSIFY, "gbp-null-classify") \
+ _(GBP_SRC_CLASSIFY, "gbp-src-classify") \
_(VTR, "l2-input-vtr") \
_(VTR, "l2-input-vtr") \
+ _(L2_IP_QOS_RECORD, "l2-ip-qos-record") \
_(VPATH, "vpath-input-l2") \
_(ACL, "l2-input-acl") \
_(POLICER_CLAS, "l2-policer-classify") \
_(VPATH, "vpath-input-l2") \
_(ACL, "l2-input-acl") \
_(POLICER_CLAS, "l2-policer-classify") \
@@
-197,6
+198,9
@@
u32 l2input_intf_bitmap_enable (u32 sw_if_index,
/* Sets modifies flags from a bridge domain */
u32 l2input_set_bridge_features (u32 bd_index, u32 feat_mask, u32 feat_value);
/* Sets modifies flags from a bridge domain */
u32 l2input_set_bridge_features (u32 bd_index, u32 feat_mask, u32 feat_value);
+void l2input_interface_mac_change (u32 sw_if_index,
+ const u8 * old_address,
+ const u8 * new_address);
#define MODE_L3 0
#define MODE_L2_BRIDGE 1
#define MODE_L3 0
#define MODE_L2_BRIDGE 1
@@
-210,7
+214,8
@@
u32 set_int_l2_mode (vlib_main_t * vm,
vnet_main_t * vnet_main,
u32 mode,
u32 sw_if_index,
vnet_main_t * vnet_main,
u32 mode,
u32 sw_if_index,
- u32 bd_index, u32 bvi, u32 shg, u32 xc_sw_if_index);
+ u32 bd_index, l2_bd_port_type_t port_type,
+ u32 shg, u32 xc_sw_if_index);
static inline void
vnet_update_l2_len (vlib_buffer_t * b)
static inline void
vnet_update_l2_len (vlib_buffer_t * b)
@@
-219,7
+224,7
@@
vnet_update_l2_len (vlib_buffer_t * b)
u16 ethertype;
u8 vlan_count = 0;
u16 ethertype;
u8 vlan_count = 0;
- /* point at curr
r
ent l2 hdr */
+ /* point at current l2 hdr */
eth = vlib_buffer_get_current (b);
/*
eth = vlib_buffer_get_current (b);
/*
@@
-250,7
+255,7
@@
vnet_update_l2_len (vlib_buffer_t * b)
* Compute flow hash of an ethernet packet, use 5-tuple hash if L3 packet
* is ip4 or ip6. Otherwise hash on smac/dmac/etype.
* The vlib buffer current pointer is expected to be at ethernet header
* Compute flow hash of an ethernet packet, use 5-tuple hash if L3 packet
* is ip4 or ip6. Otherwise hash on smac/dmac/etype.
* The vlib buffer current pointer is expected to be at ethernet header
- * and vnet l2.l2_len is exp
p
ected to be setup already.
+ * and vnet l2.l2_len is expected to be setup already.
*/
static inline u32
vnet_l2_compute_flow_hash (vlib_buffer_t * b)
*/
static inline u32
vnet_l2_compute_flow_hash (vlib_buffer_t * b)