summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorElias Rudberg <elias.rudberg@bahnhof.net>2020-02-18 12:12:25 +0100
committerBenoƮt Ganne <bganne@cisco.com>2020-03-10 08:59:47 +0000
commit9ef52ab8589586f6659aa00426149fc36c7589fe (patch)
tree31d252b1286d9955221c14f26237e45fff883674 /src
parenta9df8e40c78a1fa6a321661163c16045c0ff25fb (diff)
rdma: fix bug related to ring buffer
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> (cherry picked from commit e5ecf3ea4b456afb710f4ed903cd7e4c1ae87859)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/rdma/input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/rdma/input.c b/src/plugins/rdma/input.c
index 30fae83e058..95909f4c251 100644
--- a/src/plugins/rdma/input.c
+++ b/src/plugins/rdma/input.c
@@ -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);