summaryrefslogtreecommitdiffstats
path: root/src/plugins/rdma/input.c
AgeCommit message (Collapse)AuthorFilesLines
2022-11-29rdma: fix for-loop initialization in scalar pathJieqiang Wang1-20/+35
When n_rx_packets is less then 16(VEC256) or 8(VEC128), code execution will fall into scalar path of processing packets. But with a wrong initialization value for n_left set to zero, i in the for-loop will equal to n_rx_packets. This leads to the bypass of required ip4 checksum validation and byte count endianness conversion in scalar path. Besides, refactor the code using while instead of for-loop to keep consistency with VPP code style. Type: fix Fixes: bf93670c515d ("rdma: fix ipv4 checksum check in rdma-input node") Signed-off-by: Lijian Zhang <lijian.zhang@arm.com> Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Change-Id: Ib4e8cb5202735f8b060c99caddf26035657551e1
2022-10-25rdma: fix ipv4 checksum check in rdma-input nodeJieqiang Wang1-23/+40
- cqe_flags pointer should be incremented accordingly otherwise only the first element in cqe_flags will be updated - flag l3_ok should be set for match variable when verifying if packets are IPv4 packets with flag l3_ok set - mask/match variables should be converted to network byte order to match the endianness of cqe_flags - vector processing of checking cqe flags will set return value to 0xFFFF by mistake if packet numbers are not multiple of 16(VEC256) or 8(VEC128) Type: fix Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Change-Id: I9fec09e449fdffbb0ace8e5a6ccfeb6869b5cac1
2022-05-05rdma: two small improvements for rdma interfaceJieqiang Wang1-1/+1
- fix branch prediction for checking rdma ERROR flag - add the missing right angle bracket to help message Type: improvement Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Reviewed-by: Lijian Zhang <lijian.zhang@arm.com> Reviewed-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I2ce667631b3e3f60939069e2a16ddba0ff12a695
2021-07-15misc: replace CLIB_PREFETCH with clib_prefetch_{load,store}Damjan Marion1-4/+4
Type: refactor Change-Id: Id10cbf52e8f2dd809080a228d8fa282308be84ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-14rdma: fix skip_ipv4_cksum behavior in scalar pathTianyu Li1-1/+1
Current rdma input L3 validating behavior for scalar path is: if any packet L3_OK flag matches, then unset skip_ip4_cksum. The correct behavior should be if any packet L3_OK NOT match, then unset skip_ip4_cksum. The logic is also different from the vector path. This patch fixes the wrong behavior for scalar path. Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I5ca5ed3aa0c07d441f3c87b33f03ea8f7a3c9826
2021-03-25rdma: fix buggy cqe parsing (truncated packets)Mohammed Hawari1-3/+2
Change-Id: I17228bd35cc7aa0d207a16502bf1376c75675302 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix
2021-01-21rdma: adapt to new vnet rxq frameworkMohammed Hawari1-18/+20
Change-Id: Id539d36635f0ab9625dc2fc73630be39bead09af Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2020-11-13rdma: implement multiseg rx without striding rqMohammed Hawari1-28/+219
Change-Id: I623617ad3c80610805dd3cf2a5f371e6677f4844 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2020-11-09vlib: fix trace number accountingBenoît Ganne1-15/+12
When using classifier to filter traces, not all packets will be traced. In that case, we should only count traced packets. Type: fix Change-Id: I87d1e217b580ebff8c6ade7860eb43950420ae78 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-10-24rdma: implement striding rq for multiseg rxMohammed Hawari1-118/+319
This change leverages the striding RQ feature of ConnectX-5 adapters to support chained buffers on the RX path. In Striding RQ mode, WQE are SG lists of data segments, each mapped to a vlib_buffer. When a packet is received, it can consume one or multiple data segments belonging to the WQE, without wasting the whole WQE. Change-Id: I74eba5b2c2c66538e75e046335058ba011cb27fd Type: improvement Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2020-08-31rdma: bugfix in the descriptor refill logic. In case of a partial ↵Mohammed Hawari1-1/+1
allocation, the remainder modulo 8 must be returned to the pool so that the number of kept buffers is a multiple of 8. Type: fix Change-Id: Ifd97b03ea220300e7e6fe81a8ff4a25060fea6c1 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2020-05-07rdma: fix alignment issueDamjan Marion1-2/+2
Type: fix Change-Id: I0ff7a6f3354066c2252c1ebd0d43ac59db278bf0 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
2020-03-16rdma: add Mellanox mlx5 Direct Verbs receive supportDamjan Marion1-27/+352
Type: feature Change-Id: I3f287ab536a482c366ad7df47e1c04e640992ebc Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-03-02rdma: improve rx loopDamjan Marion1-38/+16
Type: improvement Change-Id: If81847bc0c92d167ce03e1e94a2f8e18f8154af2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-03-02rdma: improve refillDamjan Marion1-65/+57
Type: improvement Change-Id: Ib9921718ec88e6dc56a38e40a140f16f86ed2e44 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-03-02rdma: use per-thread buffer templateDamjan Marion1-5/+4
Type: improvement Change-Id: Ie6f2c79e0a769f70eab079c75a500b9308dd51e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-02-18rdma: fix bug related to ring bufferElias Rudberg1-2/+2
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>
2019-09-24vlib: add flag to explicitelly mark nodes which can init per-node packet traceDamjan Marion1-0/+1
Type: feature Change-Id: I913f08383ee1c24d610c3d2aac07cef402570e2c Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-08-26rdma: use rings for buffers managementBenoît Ganne1-92/+89
Refactor rdma driver for improved performance and prepare for raw datapath access. Type: refactor Change-Id: Iae31872055a6947708ea9f430bd1dc083ea63b5a Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-19rdma: add support for input feature arcsBenoît Ganne1-29/+35
Input feature arcs enable functions such as l2patch or bonding. Type: feature Change-Id: Ie333c9b8f7ea20f8a3a409a9a06367807e215a57 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-06rdma: fix double-free in rdma-txBenoît Ganne1-6/+6
In case of tx success after multiple retries, the last buffers to be enqueued will be both enqueued for tx and freed. Type: fix Fixes: 211ef2eb24 Change-Id: I57d218cff58b74c1f3d6dc5722624327f0821758 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-18vlib: convert frame_index into real pointersAndreas Schultz1-1/+1
The fast path almost always has to deal with the real pointers. Deriving the frame pointer from a frame_index requires a load of the 32bit frame_index from memory, another 64bit load of the heap base pointer and some calculations. Lets store the full pointer instead and do a single 64bit load only. This helps avoiding problems when the heap is grown and frames are allocated below vm->heap_aligned_base. Type: refactor Change-Id: Ifa6e6e984aafe1e2755bff80f0a4dfcddee3623c Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Signed-off-by: Dave Barach <dave@barachs.net>
2019-04-09rdma: add multiqueue supportBenoît Ganne1-1/+1
Add support for multiqueue for RDMA devices. Change-Id: I78a2481cec6747494c670cc776475828be3af55b Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-04-05rdma: more batching, compile rdma-core in release modeBenoît Ganne1-79/+254
rx: add batching for WC processing and release tx: improve batching for WC submission and processing rdma-core: compile in release mode to remove assert() Change-Id: I5fb8736db36b50f8b758cd688100477b67e72d80 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-03-28Add RDMA ibverb driver pluginBenoît Ganne1-0/+202
RDMA ibverb is a userspace API to efficiently rx/tx packets. This is an initial, unoptimized driver targeting Mellanox cards. Next steps should include batching, multiqueue and additional cards. Change-Id: I0309c7a543f75f2f9317eaf63ca502ac7a093ef9 Signed-off-by: Benoît Ganne <bganne@cisco.com>