Skip to content

Commit

Permalink
rdma: fix bug related to ring buffer
Browse files Browse the repository at this point in the history
Fix a bug that caused some input packets to be dropped due to errors of
the type 'ip4 length > l2 length'. The change is related to the second
call to the rdma_device_input_bufs() function that happens when the end
of the ring buffer is reached.

Type: fix
Change-Id: I332d69ab22242b3443a0baca6e5dd86349a54765
Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
  • Loading branch information
Elias Rudberg authored and Dave Barach committed Feb 18, 2020
1 parent 3b85181 commit e5ecf3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/rdma/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ rdma_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
&bt);
if (n_tail < n_rx_packets)
n_rx_bytes +=
rdma_device_input_bufs (vm, rd, &to_next[n_tail], &rxq->bufs[0], wc,
n_rx_packets - n_tail, &bt);
rdma_device_input_bufs (vm, rd, &to_next[n_tail], &rxq->bufs[0],
&wc[n_tail], n_rx_packets - n_tail, &bt);
rdma_device_input_ethernet (vm, node, rd, next_index);

vlib_put_next_frame (vm, node, next_index, n_left_to_next - n_rx_packets);
Expand Down

0 comments on commit e5ecf3e

Please sign in to comment.