X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Finterface.h;h=30dcf2763933f510beb45d72d772b904da1df88e;hb=refs%2Fchanges%2F75%2F1075%2F6;hp=1ddd259a0b4df6cb662d9b092b7577f7aa39a2cf;hpb=40341752cc15bd50e15c4f05db59c033ae36e9d0;p=vpp.git diff --git a/vnet/vnet/interface.h b/vnet/vnet/interface.h index 1ddd259a0b4..30dcf276393 100644 --- a/vnet/vnet/interface.h +++ b/vnet/vnet/interface.h @@ -163,6 +163,32 @@ static void __vnet_add_device_class_registration_##x (void) \ } \ __VA_ARGS__ vnet_device_class_t x +#define VLIB_DEVICE_TX_FUNCTION_CLONE_TEMPLATE(arch, fn, tgt) \ + uword \ + __attribute__ ((flatten)) \ + __attribute__ ((target (tgt))) \ + CLIB_CPU_OPTIMIZED \ + fn ## _ ## arch ( vlib_main_t * vm, \ + vlib_node_runtime_t * node, \ + vlib_frame_t * frame) \ + { return fn (vm, node, frame); } + +#define VLIB_DEVICE_TX_FUNCTION_MULTIARCH_CLONE(fn) \ + foreach_march_variant(VLIB_DEVICE_TX_FUNCTION_CLONE_TEMPLATE, fn) + +#if CLIB_DEBUG > 0 +#define VLIB_MULTIARCH_CLONE_AND_SELECT_FN(fn,...) +#define VLIB_DEVICE_TX_FUNCTION_MULTIARCH(dev, fn) +#else +#define VLIB_DEVICE_TX_FUNCTION_MULTIARCH(dev, fn) \ + VLIB_DEVICE_TX_FUNCTION_MULTIARCH_CLONE(fn) \ + CLIB_MULTIARCH_SELECT_FN(fn, static inline) \ + static void __attribute__((__constructor__)) \ + __vlib_device_tx_function_multiarch_select_##dev (void) \ + { dev.tx_function = fn ## _multiarch_select(); } +#endif + + /* Layer-2 (e.g. Ethernet) interface class. */ typedef struct _vnet_hw_interface_class { /* Index into main vector. */ @@ -292,6 +318,12 @@ typedef struct vnet_hw_interface_t { /* Maximum transmit rate for this interface in bits/sec. */ f64 max_rate_bits_per_sec; + /* Smallest packet size supported by this interface. */ + u32 min_supported_packet_bytes; + + /* Largest packet size supported by this interface. */ + u32 max_supported_packet_bytes; + /* Smallest packet size for this interface. */ u32 min_packet_bytes; @@ -311,6 +343,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 +405,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;