FD.io VPP  v19.04.2-12-g66b1689
Vector Packet Processing
input.c
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2018 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17 
18 #include <vlib/vlib.h>
19 #include <vlib/unix/unix.h>
20 #include <vlib/pci/pci.h>
21 #include <vnet/ethernet/ethernet.h>
22 #include <vnet/devices/devices.h>
23 #include <vnet/ip/ip6_packet.h>
24 #include <vnet/ip/ip4_packet.h>
25 #include <vnet/udp/udp_packet.h>
26 
27 #include <vmxnet3/vmxnet3.h>
28 
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")
35 
36 typedef enum
37 {
38 #define _(f,s) VMXNET3_INPUT_ERROR_##f,
40 #undef _
43 
44 static __clib_unused char *vmxnet3_input_error_strings[] = {
45 #define _(n,s) s,
47 #undef _
48 };
49 
51 vmxnet3_find_rid (vmxnet3_device_t * vd, vmxnet3_rx_comp * rx_comp)
52 {
53  u32 rid;
54 
55  // rid is bits 16-25 (10 bits number)
56  rid = rx_comp->index & (0xffffffff >> 6);
57  rid >>= 16;
58  if ((rid >= vd->num_rx_queues) && (rid < (vd->num_rx_queues << 1)))
59  return 1;
60  else
61  return 0;
62 }
63 
66 {
67  vmxnet3_rx_comp_ring *comp_ring = &rxq->rx_comp_ring;
68 
69  comp_ring->next++;
70  if (PREDICT_FALSE (comp_ring->next == rxq->size))
71  {
72  comp_ring->next = 0;
73  comp_ring->gen ^= VMXNET3_RXCF_GEN;
74  }
75 }
76 
78 vmxnet3_handle_offload (vmxnet3_rx_comp * rx_comp, vlib_buffer_t * hb,
79  u16 * next, u16 gso_size)
80 {
81  u8 l4_hdr_sz = 0;
82 
83  if (gso_size)
84  {
85  if (rx_comp->flags & VMXNET3_RXCF_TCP)
86  {
87  tcp_header_t *tcp =
88  (tcp_header_t *) (hb->data + vnet_buffer (hb)->l4_hdr_offset);
89  l4_hdr_sz = tcp_header_bytes (tcp);
90  }
91  else if (rx_comp->flags & VMXNET3_RXCF_UDP)
92  {
93  udp_header_t *udp =
94  (udp_header_t *) (hb->data + vnet_buffer (hb)->l4_hdr_offset);
95  l4_hdr_sz = sizeof (*udp);
96  }
97  }
98 
99  if (rx_comp->flags & VMXNET3_RXCF_IP4)
100  {
101  ip4_header_t *ip4 = (ip4_header_t *) (hb->data +
102  sizeof (ethernet_header_t));
103 
104  vnet_buffer (hb)->l2_hdr_offset = 0;
105  vnet_buffer (hb)->l3_hdr_offset = sizeof (ethernet_header_t);
106  vnet_buffer (hb)->l4_hdr_offset = sizeof (ethernet_header_t) +
107  ip4_header_bytes (ip4);
108  hb->flags |= VNET_BUFFER_F_L2_HDR_OFFSET_VALID |
109  VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
110  VNET_BUFFER_F_L4_HDR_OFFSET_VALID | VNET_BUFFER_F_IS_IP4;
112 
113  /* checksum offload */
114  if (!(rx_comp->index & VMXNET3_RXCI_CNC))
115  {
116  if (!(rx_comp->flags & VMXNET3_RXCF_IPC))
117  {
118  hb->flags |= VNET_BUFFER_F_OFFLOAD_IP_CKSUM;
119  ip4->checksum = 0;
120  }
121  if (!(rx_comp->flags & VMXNET3_RXCF_TUC))
122  {
123  if (rx_comp->flags & VMXNET3_RXCF_TCP)
124  {
125  tcp_header_t *tcp =
126  (tcp_header_t *) (hb->data +
127  vnet_buffer (hb)->l4_hdr_offset);
128  hb->flags |= VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;
129  tcp->checksum = 0;
130  }
131  else if (rx_comp->flags & VMXNET3_RXCF_UDP)
132  {
133  udp_header_t *udp =
134  (udp_header_t *) (hb->data +
135  vnet_buffer (hb)->l4_hdr_offset);
136  hb->flags |= VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
137  udp->checksum = 0;
138  }
139  }
140  }
141 
142  if (gso_size)
143  {
144  vnet_buffer2 (hb)->gso_size = gso_size;
145  vnet_buffer2 (hb)->gso_l4_hdr_sz = l4_hdr_sz;
146  hb->flags |= VNET_BUFFER_F_GSO;
147  }
149  }
150  else if (rx_comp->flags & VMXNET3_RXCF_IP6)
151  {
152  vnet_buffer (hb)->l2_hdr_offset = 0;
153  vnet_buffer (hb)->l3_hdr_offset = sizeof (ethernet_header_t);
154  vnet_buffer (hb)->l4_hdr_offset = sizeof (ethernet_header_t) +
155  sizeof (ip6_header_t);
156  hb->flags |= VNET_BUFFER_F_L2_HDR_OFFSET_VALID |
157  VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
158  VNET_BUFFER_F_L4_HDR_OFFSET_VALID | VNET_BUFFER_F_IS_IP6;
160 
161  /* checksum offload */
162  if (!(rx_comp->index & VMXNET3_RXCI_CNC))
163  {
164  if (!(rx_comp->flags & VMXNET3_RXCF_TUC))
165  {
166  if (rx_comp->flags & VMXNET3_RXCF_TCP)
167  {
168  tcp_header_t *tcp =
169  (tcp_header_t *) (hb->data +
170  vnet_buffer (hb)->l4_hdr_offset);
171  hb->flags |= VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;
172  tcp->checksum = 0;
173  }
174  else if (rx_comp->flags & VMXNET3_RXCF_UDP)
175  {
176  udp_header_t *udp =
177  (udp_header_t *) (hb->data +
178  vnet_buffer (hb)->l4_hdr_offset);
179  hb->flags |= VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
180  udp->checksum = 0;
181  }
182  }
183  }
184 
185  if (gso_size)
186  {
187  vnet_buffer2 (hb)->gso_size = gso_size;
188  vnet_buffer2 (hb)->gso_l4_hdr_sz = l4_hdr_sz;
189  hb->flags |= VNET_BUFFER_F_GSO;
190  }
192  }
193  else
195 }
196 
199  vlib_frame_t * frame, vmxnet3_device_t * vd,
200  u16 qid)
201 {
202  vnet_main_t *vnm = vnet_get_main ();
203  uword n_trace = vlib_get_trace_count (vm, node);
204  u32 n_rx_packets = 0, n_rx_bytes = 0;
205  vmxnet3_rx_comp *rx_comp;
206  u32 desc_idx;
207  vmxnet3_rxq_t *rxq;
208  u32 thread_index = vm->thread_index;
209  u32 buffer_indices[VLIB_FRAME_SIZE], *bi;
210  u16 nexts[VLIB_FRAME_SIZE], *next;
211  vmxnet3_rx_ring *ring;
212  vmxnet3_rx_comp_ring *comp_ring;
213  u16 rid;
214  vlib_buffer_t *prev_b0 = 0, *hb = 0;
216  u8 known_next = 0, got_packet = 0;
217  vmxnet3_rx_desc *rxd;
218  clib_error_t *error;
219  u16 gso_size = 0;
220 
221  rxq = vec_elt_at_index (vd->rxqs, qid);
222  comp_ring = &rxq->rx_comp_ring;
223  bi = buffer_indices;
224  next = nexts;
225  rx_comp = &rxq->rx_comp[comp_ring->next];
226 
227  while (PREDICT_TRUE ((n_rx_packets < VLIB_FRAME_SIZE) &&
228  (comp_ring->gen ==
229  (rx_comp->flags & VMXNET3_RXCF_GEN))))
230  {
231  vlib_buffer_t *b0;
232  u32 bi0;
233 
234  rid = vmxnet3_find_rid (vd, rx_comp);
235  ring = &rxq->rx_ring[rid];
236 
237  if (PREDICT_TRUE (ring->fill >= 1))
238  ring->fill--;
239  else
240  {
241  vlib_error_count (vm, node->node_index,
242  VMXNET3_INPUT_ERROR_NO_BUFFER, 1);
243  if (hb)
244  {
246  hb = 0;
247  }
248  prev_b0 = 0;
249  break;
250  }
251 
252  desc_idx = rx_comp->index & VMXNET3_RXC_INDEX;
253  ring->consume = desc_idx;
254  rxd = &rxq->rx_desc[rid][desc_idx];
255 
256  bi0 = ring->bufs[desc_idx];
257  ring->bufs[desc_idx] = ~0;
258 
259  b0 = vlib_get_buffer (vm, bi0);
260  vnet_buffer (b0)->sw_if_index[VLIB_RX] = vd->sw_if_index;
261  vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;
262  vnet_buffer (b0)->feature_arc_index = 0;
263  b0->current_length = rx_comp->len & VMXNET3_RXCL_LEN_MASK;
264  b0->current_data = 0;
266  b0->next_buffer = 0;
267  b0->flags = 0;
268  b0->error = 0;
269  b0->current_config_index = 0;
270  ASSERT (b0->current_length != 0);
271 
272  if (PREDICT_FALSE ((rx_comp->index & VMXNET3_RXCI_EOP) &&
273  (rx_comp->len & VMXNET3_RXCL_ERROR)))
274  {
275  vlib_buffer_free_one (vm, bi0);
276  vlib_error_count (vm, node->node_index,
277  VMXNET3_INPUT_ERROR_RX_PACKET_EOP, 1);
278  if (hb && vlib_get_buffer_index (vm, hb) != bi0)
279  {
281  hb = 0;
282  }
283  prev_b0 = 0;
284  goto next;
285  }
286 
287  if (rx_comp->index & VMXNET3_RXCI_SOP)
288  {
289  ASSERT (!(rxd->flags & VMXNET3_RXF_BTYPE));
290  /* start segment */
291  if ((vd->lro_enable) &&
292  (rx_comp->flags & VMXNET3_RXCF_CT) == VMXNET3_RXCOMP_TYPE_LRO)
293  {
294  vmxnet3_rx_comp_ext *lro = (vmxnet3_rx_comp_ext *) rx_comp;
295 
296  gso_size = lro->flags & VMXNET3_RXECF_MSS_MASK;
297  }
298 
299  hb = b0;
300  bi[0] = bi0;
301  if (!(rx_comp->index & VMXNET3_RXCI_EOP))
302  {
303  hb->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
304  prev_b0 = b0;
305  }
306  else
307  {
308  /*
309  * Both start and end of packet is set. It is a complete packet
310  */
311  prev_b0 = 0;
312  got_packet = 1;
313  }
314  }
315  else if (rx_comp->index & VMXNET3_RXCI_EOP)
316  {
317  /* end of segment */
318  if (prev_b0)
319  {
320  prev_b0->flags |= VLIB_BUFFER_NEXT_PRESENT;
321  prev_b0->next_buffer = bi0;
322  hb->total_length_not_including_first_buffer +=
323  b0->current_length;
324  prev_b0 = 0;
325  got_packet = 1;
326  }
327  else
328  {
329  /* EOP without SOP, error */
330  vlib_error_count (vm, node->node_index,
331  VMXNET3_INPUT_ERROR_RX_PACKET_NO_SOP, 1);
332  vlib_buffer_free_one (vm, bi0);
333  if (hb && vlib_get_buffer_index (vm, hb) != bi0)
334  {
336  hb = 0;
337  }
338  goto next;
339  }
340  }
341  else if (prev_b0) // !sop && !eop
342  {
343  /* mid chain */
344  ASSERT (rxd->flags & VMXNET3_RXF_BTYPE);
345  prev_b0->flags |= VLIB_BUFFER_NEXT_PRESENT;
346  prev_b0->next_buffer = bi0;
347  prev_b0 = b0;
349  }
350  else
351  {
352  vlib_error_count (vm, node->node_index,
353  VMXNET3_INPUT_ERROR_RX_PACKET, 1);
354  vlib_buffer_free_one (vm, bi0);
355  if (hb && vlib_get_buffer_index (vm, hb) != bi0)
356  {
358  hb = 0;
359  }
360  goto next;
361  }
362 
363  n_rx_bytes += b0->current_length;
364 
365  if (got_packet)
366  {
367  if (PREDICT_FALSE (vd->per_interface_next_index != ~0))
368  {
369  next_index = vd->per_interface_next_index;
370  known_next = 1;
371  }
372 
373  if (PREDICT_FALSE
375  {
377  &next_index, hb);
378  known_next = 1;
379  }
380 
381  if (PREDICT_FALSE (known_next))
382  {
383  next[0] = next_index;
384  }
385  else
386  {
387  ethernet_header_t *e = (ethernet_header_t *) hb->data;
388 
391  else
392  vmxnet3_handle_offload (rx_comp, hb, next, gso_size);
393  }
394 
395  n_rx_packets++;
396  next++;
397  bi++;
398  hb = 0;
399  got_packet = 0;
400  gso_size = 0;
401  }
402 
403  next:
405  rx_comp = &rxq->rx_comp[comp_ring->next];
406  }
407 
408  if (PREDICT_FALSE ((n_trace = vlib_get_trace_count (vm, node))))
409  {
410  u32 n_left = n_rx_packets;
411 
412  bi = buffer_indices;
413  next = nexts;
414  while (n_trace && n_left)
415  {
416  vlib_buffer_t *b;
418 
419  b = vlib_get_buffer (vm, bi[0]);
420  vlib_trace_buffer (vm, node, next[0], b, /* follow_chain */ 0);
421  tr = vlib_add_trace (vm, node, b, sizeof (*tr));
422  tr->next_index = next[0];
423  tr->hw_if_index = vd->hw_if_index;
424  tr->buffer = *b;
425 
426  n_trace--;
427  n_left--;
428  bi++;
429  next++;
430  }
431  vlib_set_trace_count (vm, node, n_trace);
432  }
433 
434  if (PREDICT_TRUE (n_rx_packets))
435  {
436  vlib_buffer_enqueue_to_next (vm, node, buffer_indices, nexts,
437  n_rx_packets);
440  VNET_INTERFACE_COUNTER_RX, thread_index,
441  vd->hw_if_index, n_rx_packets, n_rx_bytes);
442  }
443 
444  error = vmxnet3_rxq_refill_ring0 (vm, vd, rxq);
445  if (PREDICT_FALSE (error != 0))
446  {
447  vlib_error_count (vm, node->node_index,
448  VMXNET3_INPUT_ERROR_BUFFER_ALLOC, 1);
449  }
450  error = vmxnet3_rxq_refill_ring1 (vm, vd, rxq);
451  if (PREDICT_FALSE (error != 0))
452  {
453  vlib_error_count (vm, node->node_index,
454  VMXNET3_INPUT_ERROR_BUFFER_ALLOC, 1);
455  }
456 
457  return n_rx_packets;
458 }
459 
461  vlib_node_runtime_t * node,
462  vlib_frame_t * frame)
463 {
464  u32 n_rx = 0;
465  vmxnet3_main_t *vmxm = &vmxnet3_main;
466  vnet_device_input_runtime_t *rt = (void *) node->runtime_data;
468 
470  {
471  vmxnet3_device_t *vd;
472  vd = vec_elt_at_index (vmxm->devices, dq->dev_instance);
473  if ((vd->flags & VMXNET3_DEVICE_F_ADMIN_UP) == 0)
474  continue;
475  n_rx += vmxnet3_device_input_inline (vm, node, frame, vd, dq->queue_id);
476  }
477  return n_rx;
478 }
479 
480 #ifndef CLIB_MARCH_VARIANT
481 /* *INDENT-OFF* */
483  .name = "vmxnet3-input",
484  .sibling_of = "device-input",
485  .format_trace = format_vmxnet3_input_trace,
486  .type = VLIB_NODE_TYPE_INPUT,
487  .state = VLIB_NODE_STATE_DISABLED,
488  .n_errors = VMXNET3_INPUT_N_ERROR,
489  .error_strings = vmxnet3_input_error_strings,
490 };
491 #endif
492 
493 /* *INDENT-ON* */
494 
495 /*
496  * fd.io coding-style-patch-verification: ON
497  *
498  * Local Variables:
499  * eval: (c-set-style "gnu")
500  * End:
501  */
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
Definition: buffer.h:124
static_always_inline clib_error_t * vmxnet3_rxq_refill_ring0(vlib_main_t *vm, vmxnet3_device_t *vd, vmxnet3_rxq_t *rxq)
Definition: vmxnet3.h:688
vnet_device_and_queue_t * devices_and_queues
Definition: devices.h:69
static u32 vlib_get_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt)
Definition: trace_funcs.h:156
static void vlib_increment_combined_counter(vlib_combined_counter_main_t *cm, u32 thread_index, u32 index, u64 n_packets, u64 n_bytes)
Increment a combined counter.
Definition: counter.h:220
#define VMXNET3_RXCF_TCP
Definition: vmxnet3.h:124
vnet_main_t * vnet_get_main(void)
Definition: misc.c:47
#define vnet_buffer2(b)
Definition: buffer.h:428
vmxnet3_rx_desc * rx_desc[VMXNET3_RX_RING_SIZE]
Definition: vmxnet3.h:520
vnet_interface_main_t interface_main
Definition: vnet.h:56
#define PREDICT_TRUE(x)
Definition: clib.h:112
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
Definition: buffer.h:110
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
Definition: error_funcs.h:57
#define VMXNET3_RXCF_IP4
Definition: vmxnet3.h:127
u32 thread_index
Definition: main.h:197
u16 current_length
Nbytes between current data and the end of this buffer.
Definition: buffer.h:113
u8 data[0]
Packet data.
Definition: buffer.h:181
vmxnet3_main_t vmxnet3_main
Definition: vmxnet3.c:28
#define VLIB_NODE_FN(node)
Definition: node.h:201
static_always_inline void vmxnet3_handle_offload(vmxnet3_rx_comp *rx_comp, vlib_buffer_t *hb, u16 *next, u16 gso_size)
Definition: input.c:78
struct _tcp_header tcp_header_t
unsigned char u8
Definition: types.h:56
#define VMXNET3_RXCF_GEN
Definition: vmxnet3.h:129
static void vlib_trace_buffer(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, vlib_buffer_t *b, int follow_chain)
Definition: trace_funcs.h:114
#define VMXNET3_RXCF_IPC
Definition: vmxnet3.h:125
vmxnet3_rxq_t * rxqs
Definition: vmxnet3.h:569
static __clib_unused char * vmxnet3_input_error_strings[]
Definition: input.c:44
#define static_always_inline
Definition: clib.h:99
vlib_combined_counter_main_t * combined_sw_if_counters
Definition: interface.h:824
#define VMXNET3_RXCF_UDP
Definition: vmxnet3.h:123
static_always_inline int vnet_device_input_have_features(u32 sw_if_index)
Definition: feature.h:301
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define VMXNET3_RXC_INDEX
Definition: vmxnet3.h:131
#define VMXNET3_RXCL_LEN_MASK
Definition: vmxnet3.h:175
unsigned int u32
Definition: types.h:88
#define VLIB_FRAME_SIZE
Definition: node.h:376
static u32 vlib_get_buffer_index(vlib_main_t *vm, void *p)
Translate buffer pointer into buffer index.
Definition: buffer_funcs.h:257
#define VMXNET3_RXCF_CT
Definition: vmxnet3.h:128
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:136
#define VMXNET3_RXECF_MSS_MASK
Definition: vmxnet3.h:185
const u32 device_input_next_node_advance[((VNET_DEVICE_INPUT_N_NEXT_NODES/CLIB_CACHE_LINE_BYTES)+1)*CLIB_CACHE_LINE_BYTES]
Definition: devices.c:47
#define VMXNET3_RXCF_TUC
Definition: vmxnet3.h:122
static_always_inline void vmxnet3_rx_comp_ring_advance_next(vmxnet3_rxq_t *rxq)
Definition: input.c:65
unsigned short u16
Definition: types.h:57
vmxnet3_rx_comp_ring rx_comp_ring
Definition: vmxnet3.h:522
#define PREDICT_FALSE(x)
Definition: clib.h:111
u32 node_index
Node index.
Definition: node.h:495
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:169
vlib_main_t * vm
Definition: buffer.c:312
static_always_inline void vlib_buffer_enqueue_to_next(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 *nexts, uword count)
Definition: buffer_node.h:332
vlib_buffer_t buffer
Definition: vmxnet3.h:619
u32 per_interface_next_index
Definition: vmxnet3.h:558
u32 current_config_index
Used by feature subgraph arcs to visit enabled feature nodes.
Definition: buffer.h:147
#define ASSERT(truth)
static_always_inline int ethernet_frame_is_tagged(u16 type)
Definition: ethernet.h:78
#define VMXNET3_RXCI_EOP
Definition: vmxnet3.h:178
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
Definition: buffer.h:248
#define foreach_vmxnet3_input_error
Definition: input.c:29
static_always_inline uword vmxnet3_device_input_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vmxnet3_device_t *vd, u16 qid)
Definition: input.c:198
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
Definition: trace_funcs.h:57
vlib_node_registration_t vmxnet3_input_node
(constructor) VLIB_REGISTER_NODE (vmxnet3_input_node)
Definition: input.c:482
#define foreach_device_and_queue(var, vec)
Definition: devices.h:161
Definition: defs.h:47
#define VMXNET3_RXCL_ERROR
Definition: vmxnet3.h:176
u32 next_buffer
Next buffer for this linked-list of buffers.
Definition: buffer.h:140
VLIB buffer representation.
Definition: buffer.h:102
u64 uword
Definition: types.h:112
#define VMXNET3_RXF_BTYPE
Definition: vmxnet3.h:118
vmxnet3_rx_comp * rx_comp
Definition: vmxnet3.h:521
#define VMXNET3_RXCI_CNC
Definition: vmxnet3.h:180
vmxnet3_rx_ring rx_ring[VMXNET3_RX_RING_SIZE]
Definition: vmxnet3.h:519
vmxnet3_input_error_t
Definition: input.c:36
format_function_t format_vmxnet3_input_trace
Definition: vmxnet3.h:632
#define vnet_buffer(b)
Definition: buffer.h:369
#define VMXNET3_RXCF_IP6
Definition: vmxnet3.h:126
static_always_inline void vnet_feature_start_device_input_x1(u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
Definition: feature.h:308
static int tcp_header_bytes(tcp_header_t *t)
Definition: tcp_packet.h:93
vmxnet3_device_t * devices
Definition: vmxnet3.h:592
static_always_inline clib_error_t * vmxnet3_rxq_refill_ring1(vlib_main_t *vm, vmxnet3_device_t *vd, vmxnet3_rxq_t *rxq)
Definition: vmxnet3.h:734
#define VMXNET3_RXCI_SOP
Definition: vmxnet3.h:179
static void vlib_buffer_free_one(vlib_main_t *vm, u32 buffer_index)
Free one buffer Shorthand to free a single buffer chain.
Definition: buffer_funcs.h:898
static int ip4_header_bytes(const ip4_header_t *i)
Definition: ip4_packet.h:235
static void vlib_set_trace_count(vlib_main_t *vm, vlib_node_runtime_t *rt, u32 count)
Definition: trace_funcs.h:172
u32 total_length_not_including_first_buffer
Only valid for first buffer in chain.
Definition: buffer.h:167
#define VMXNET3_RXCOMP_TYPE_LRO
Definition: vmxnet3.h:183
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:85
Definition: defs.h:46
static_always_inline u16 vmxnet3_find_rid(vmxnet3_device_t *vd, vmxnet3_rx_comp *rx_comp)
Definition: input.c:51