Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ethernet: configure system default ethernet MTU
[vpp.git]
/
src
/
vnet
/
ethernet
/
ethernet.h
diff --git
a/src/vnet/ethernet/ethernet.h
b/src/vnet/ethernet/ethernet.h
index
94322a7
..
2f544bb
100644
(file)
--- a/
src/vnet/ethernet/ethernet.h
+++ b/
src/vnet/ethernet/ethernet.h
@@
-154,6
+154,9
@@
typedef struct ethernet_interface
/* Ethernet (MAC) address for this interface. */
u8 address[6];
/* Ethernet (MAC) address for this interface. */
u8 address[6];
+
+ /* Secondary MAC addresses for this interface */
+ mac_address_t *secondary_addrs;
} ethernet_interface_t;
extern vnet_hw_interface_class_t ethernet_hw_interface_class;
} ethernet_interface_t;
extern vnet_hw_interface_class_t ethernet_hw_interface_class;
@@
-254,7
+257,18
@@
typedef struct
u32 input_next_mpls;
} next_by_ethertype_t;
u32 input_next_mpls;
} next_by_ethertype_t;
+struct ethernet_main_t_;
+
+typedef void (ethernet_address_change_function_t)
+ (struct ethernet_main_t_ * im, u32 sw_if_index, uword opaque);
+
typedef struct
typedef struct
+{
+ ethernet_address_change_function_t *function;
+ uword function_opaque;
+} ethernet_address_change_ctx_t;
+
+typedef struct ethernet_main_t_
{
vlib_main_t *vlib_main;
{
vlib_main_t *vlib_main;
@@
-297,6
+311,13
@@
typedef struct
/* Allocated loopback instances */
uword *bm_loopback_instances;
/* Allocated loopback instances */
uword *bm_loopback_instances;
+
+ /** Functions to call when interface hw address changes. */
+ ethernet_address_change_ctx_t *address_change_callbacks;
+
+ /** Default interface MTU */
+ u32 default_mtu;
+
} ethernet_main_t;
extern ethernet_main_t ethernet_main;
} ethernet_main_t;
extern ethernet_main_t ethernet_main;
@@
-310,6
+331,10
@@
ethernet_get_type_info (ethernet_main_t * em, ethernet_type_t type)
ethernet_interface_t *ethernet_get_interface (ethernet_main_t * em,
u32 hw_if_index);
ethernet_interface_t *ethernet_get_interface (ethernet_main_t * em,
u32 hw_if_index);
+mac_address_t *ethernet_interface_add_del_address (ethernet_main_t * em,
+ u32 hw_if_index,
+ const u8 * address,
+ u8 is_add);
clib_error_t *ethernet_register_interface (vnet_main_t * vnm,
u32 dev_class_index,
clib_error_t *ethernet_register_interface (vnet_main_t * vnm,
u32 dev_class_index,
@@
-438,6
+463,9
@@
clib_error_t *next_by_ethertype_register (next_by_ethertype_t * l3_next,
int vnet_create_loopback_interface (u32 * sw_if_indexp, u8 * mac_address,
u8 is_specified, u32 user_instance);
int vnet_delete_loopback_interface (u32 sw_if_index);
int vnet_create_loopback_interface (u32 * sw_if_indexp, u8 * mac_address,
u8 is_specified, u32 user_instance);
int vnet_delete_loopback_interface (u32 sw_if_index);
+int vnet_create_sub_interface (u32 sw_if_index, u32 id,
+ u32 flags, u16 inner_vlan_id,
+ u16 outer_vlan_id, u32 * sub_sw_if_index);
int vnet_delete_sub_interface (u32 sw_if_index);
// Perform ethernet subinterface classification table lookups given
int vnet_delete_sub_interface (u32 sw_if_index);
// Perform ethernet subinterface classification table lookups given
@@
-542,8
+570,7
@@
void ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai);
u8 *ethernet_build_rewrite (vnet_main_t * vnm,
u32 sw_if_index,
vnet_link_t link_type, const void *dst_address);
u8 *ethernet_build_rewrite (vnet_main_t * vnm,
u32 sw_if_index,
vnet_link_t link_type, const void *dst_address);
-const u8 *ethernet_ip4_mcast_dst_addr (void);
-const u8 *ethernet_ip6_mcast_dst_addr (void);
+void ethernet_input_init (vlib_main_t * vm, ethernet_main_t * em);
extern vlib_node_registration_t ethernet_input_node;
extern vlib_node_registration_t ethernet_input_node;