|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
29 #define foreach_vmxnet3_input_error \
30 _(BUFFER_ALLOC, "buffer alloc error") \
31 _(RX_PACKET_NO_SOP, "Rx packet error - no SOP") \
32 _(RX_PACKET, "Rx packet error") \
33 _(RX_PACKET_EOP, "Rx packet error found on EOP") \
34 _(NO_BUFFER, "Rx no buffer error")
38 #define _(f,s) VMXNET3_INPUT_ERROR_##f,
56 rid = rx_comp->index & (0xffffffff >> 6);
93 hb->
flags |= VNET_BUFFER_F_L2_HDR_OFFSET_VALID |
94 VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
95 VNET_BUFFER_F_L4_HDR_OFFSET_VALID | VNET_BUFFER_F_IS_IP4;
102 oflags |= VNET_BUFFER_OFFLOAD_F_IP_CKSUM;
112 oflags |= VNET_BUFFER_OFFLOAD_F_TCP_CKSUM;
120 oflags |= VNET_BUFFER_OFFLOAD_F_UDP_CKSUM;
138 l4_hdr_sz =
sizeof (*udp);
142 hb->
flags |= VNET_BUFFER_F_GSO;
151 hb->
flags |= VNET_BUFFER_F_L2_HDR_OFFSET_VALID |
152 VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
153 VNET_BUFFER_F_L4_HDR_OFFSET_VALID | VNET_BUFFER_F_IS_IP6;
165 oflags |= VNET_BUFFER_OFFLOAD_F_TCP_CKSUM;
173 oflags |= VNET_BUFFER_OFFLOAD_F_UDP_CKSUM;
191 l4_hdr_sz =
sizeof (*udp);
195 hb->
flags |= VNET_BUFFER_F_GSO;
209 u32 n_rx_packets = 0, n_rx_bytes = 0;
210 vmxnet3_rx_comp *rx_comp;
221 u8 known_next = 0, got_packet = 0;
222 vmxnet3_rx_desc *rxd;
247 VMXNET3_INPUT_ERROR_NO_BUFFER, 1);
259 rxd = &rxq->
rx_desc[rid][desc_idx];
261 bi0 = ring->
bufs[desc_idx];
262 ring->
bufs[desc_idx] = ~0;
281 VMXNET3_INPUT_ERROR_RX_PACKET_EOP, 1);
298 vmxnet3_rx_comp_ext *lro = (vmxnet3_rx_comp_ext *) rx_comp;
307 hb->
flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
326 prev_b0->
flags |= VLIB_BUFFER_NEXT_PRESENT;
328 hb->total_length_not_including_first_buffer +=
342 VMXNET3_INPUT_ERROR_RX_PACKET_NO_SOP, 1);
356 prev_b0->
flags |= VLIB_BUFFER_NEXT_PRESENT;
364 VMXNET3_INPUT_ERROR_RX_PACKET, 1);
457 VMXNET3_INPUT_ERROR_BUFFER_ALLOC, 1);
463 VMXNET3_INPUT_ERROR_BUFFER_ALLOC, 1);
482 if ((vd->
flags & VMXNET3_DEVICE_F_ADMIN_UP) == 0)
489 #ifndef CLIB_MARCH_VARIANT
492 .name =
"vmxnet3-input",
493 .sibling_of =
"device-input",
497 .state = VLIB_NODE_STATE_DISABLED,
vmxnet3_main_t vmxnet3_main
u32 next_buffer
Next buffer for this linked-list of buffers.
static int tcp_header_bytes(tcp_header_t *t)
static_always_inline clib_error_t * vmxnet3_rxq_refill_ring1(vlib_main_t *vm, vmxnet3_device_t *vd, vmxnet3_rxq_t *rxq)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static_always_inline clib_error_t * vmxnet3_rxq_refill_ring0(vlib_main_t *vm, vmxnet3_device_t *vd, vmxnet3_rxq_t *rxq)
nat44_ei_hairpin_src_next_t next_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static_always_inline int ethernet_frame_is_tagged(u16 type)
struct _tcp_header tcp_header_t
vlib_main_t vlib_node_runtime_t * node
static_always_inline void vnet_buffer_offload_flags_set(vlib_buffer_t *b, vnet_buffer_oflags_t oflags)
static_always_inline int vnet_device_input_have_features(u32 sw_if_index)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static u32 vlib_get_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt)
vlib_buffer_enqueue_to_next(vm, node, from,(u16 *) nexts, frame->n_vectors)
@ VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FN(node)
#define VMXNET3_RXC_INDEX
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vnet_main_t * vnet_get_main(void)
#define VMXNET3_RXCL_LEN_MASK
static u32 vlib_get_buffer_index(vlib_main_t *vm, void *p)
Translate buffer pointer into buffer index.
#define static_always_inline
if(node->flags &VLIB_NODE_FLAG_TRACE) vnet_interface_output_trace(vm
vmxnet3_rx_comp_ring rx_comp_ring
#define VLIB_NODE_FLAG_TRACE_SUPPORTED
@ VNET_INTERFACE_COUNTER_RX
#define VMXNET3_RXECF_MSS_MASK
static void vlib_set_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt, u32 count)
struct _vlib_node_registration vlib_node_registration_t
vlib_combined_counter_main_t * combined_sw_if_counters
u16 current_length
Nbytes between current data and the end of this buffer.
vmxnet3_rx_comp * rx_comp
u32 current_config_index
Used by feature subgraph arcs to visit enabled feature nodes.
u32 per_interface_next_index
format_function_t format_vmxnet3_input_trace
#define vec_foreach(var, vec)
Vector iterator.
vmxnet3_rx_ring rx_ring[VMXNET3_RX_RING_SIZE]
static_always_inline vnet_hw_if_rxq_poll_vector_t * vnet_hw_if_get_rxq_poll_vector(vlib_main_t *vm, vlib_node_runtime_t *node)
#define VMXNET3_RXCOMP_TYPE_LRO
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static_always_inline void vnet_feature_start_device_input_x1(u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
#define VMXNET3_RXCL_ERROR
u16 nexts[VLIB_FRAME_SIZE]
static int ip4_header_bytes(const ip4_header_t *i)
static void vlib_buffer_free_one(vlib_main_t *vm, u32 buffer_index)
Free one buffer Shorthand to free a single buffer chain.
static __clib_warn_unused_result int vlib_trace_buffer(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, vlib_buffer_t *b, int follow_chain)
u32 total_length_not_including_first_buffer
Only valid for first buffer in chain.
vmxnet3_device_t * devices
vnet_interface_main_t interface_main
vlib_increment_combined_counter(ccm, ti, sw_if_index, n_buffers, n_bytes)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
#define VMXNET3_RXF_BTYPE
VLIB buffer representation.
vmxnet3_rx_desc * rx_desc[VMXNET3_RX_RING_SIZE]
#define VLIB_REGISTER_NODE(x,...)