summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/node.c
AgeCommit message (Collapse)AuthorFilesLines
2022-03-14dpdk: improve rx burst count per loopFan Zhang1-4/+5
Type: improvement This patch improves the per dpdk-input loop number of packets received from the port. The change mimics how packets rx happened before VPP 22.02/DPDK 21.11: instead of trying to rx huge number of packets (256) in one go, rx more times with up to 32 packets max each time. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Change-Id: I804dce6d9121ab21b02e53dd0328dc52ac49d80f
2022-03-11vlib: remoove unused fieldDamjan Marion1-1/+1
Type: refactor Change-Id: Ieb7a595e40d801af5349c83b128fa92c7698a346 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-02-15tcp: Do not include the tcp_packet.h file in the ip4_packet.hNeale Ranns1-0/+1
Type: refactor IP4 does not depend on TCP (it's the other way around). This upside down dependency leads to some nasty circular includes when trying to use ip46_address.h in interface.h Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I4a1bd21543b08b9c1cf1e5563da738414734a878
2022-01-08dpdk: new flags formatDamjan Marion1-19/+19
introduced in DPDK 21.11 Type: improvement Change-Id: I8c845949dd904a2bf8fa4a91e2f3ae5d704f2283 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-05dpdk: improve checksum computationFlorin Coras1-2/+22
Type: improvement Based on gerrit 26480 by chenmin.sun@intel.com Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id8f2127f0fac5f555b38483714fe92c038875915
2022-01-05dpdk: keep buffer flags per-deviceDamjan Marion1-0/+1
Type: improvement Change-Id: Idb0b079df49c12643c9a93ee0effe011d3489068 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-25dpdk: prefetch becomes prefetchwRay Kinsella1-4/+4
Changed dpdk-input prefetch of vlib_buffer_t to prefetchw. vlib_buffer_t was being prefetched without 'ownership', which may cause a stall when the buffer is subsequently written to. This saves 4 clocks a packet when the buffer is shared a cross cores, and has no impact when not sharing. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I317af2a38ef536022e68552351a8507861f62dad
2021-10-31interface: handoff refactor and optimizationsFlorin Coras1-1/+0
- move existing ethernet hash functions to hash infra (no l4 awareness) - refactor code to use hash infra and add apis to request l4 aware hashing functions - hashing functions per interface - code cleanup Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia9f44db98d83f0f027aeb37718585a2e10ffd2c6
2021-09-07dpdk: lro supportMohammed Hawari1-12/+74
Change-Id: Ifa09dcdfd567ac3c2afab4bd3bd468260f766e1d Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2021-07-15misc: replace CLIB_PREFETCH with clib_prefetch_{load,store}Damjan Marion1-8/+8
Type: refactor Change-Id: Id10cbf52e8f2dd809080a228d8fa282308be84ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-6/+0
trajectory trace has been broken for a while because we used to save the buffer trajectory in a vector pointed to in opaque2. This does not work well when opaque2 is copied (eg. because of a clone) as 2 buffers end up sharing the same vector. This dedicates a full cacheline in the buffer metadata instead when trajectory is compiled in. No dynamic allocation, no sharing, no tears. Type: refactor Change-Id: I6a028ca1b48d38f393a36979e5e452c2dd48ad3f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-21interface: rx queue infra rework, part oneDamjan Marion1-8/+9
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-09vlib: fix trace number accountingBenoît Ganne1-15/+22
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-06-04dpdk: cleanup, add rx queue structDamjan Marion1-1/+2
Type: improvement Change-Id: I3defde103ab245404de42d2be7abcb2c43d49a60 Signed-off-by: Damjan Marion <damarion@cisco.com>
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-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-05-30dpdk: remove bonding codeDamjan Marion1-2/+0
We have native implementation and we should not maintain both.... Change-Id: Ic09ebffda52cdc733b3cfeff06690e0d3cc08084 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-05-09dpdk: fix return variable sizeZhiyong Yang1-2/+2
The function dpdk_ol_flags_extract should return u16 instead of u8. Change-Id: Id0b08b04c93598818f9a2eee5a88733900320dfa Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-04-25Change dpdk thread data flags type to u16 from u8 to get more useful dataSimon Zhang1-5/+6
Change-Id: Idc3763c38f5aa638d4f290f4d4730577601d78b8 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2019-04-17Predicate a packet whether be marked by PKT_RX_FDIR_ID instead of PKT_RX_FDIRSimon Zhang1-1/+1
Change-Id: I65b1af5fa0cec4f9789f91f720d1396d06fa0206 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2019-02-26Move pcap rx/tx trace code out of the dpdk pluginDave Barach1-48/+0
Moved code to the ethernet input node, and the interface output path(s). Since we no longer skip ethernet-input, there's no reason for device drivers to know anything about pcap rx tracing, etc. Change-Id: I08d32fb1b90cbee1bd4f609837d533e047b36fa4 Signed-off-by: Dave Barach <dave@barachs.net>
2019-02-22Add no-append flag to vlib_frame_tDamjan Marion1-0/+1
Change-Id: I01c4f5755d579282773ac227b0bc24f8ddbb2bd1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-19dpdk: do not shift PKT_RX_FDIRHyong Youb Kim1-1/+1
PKT_RX_FDIR is a bit flag, not a bit position. Change-Id: Ib31ec9257e906b045522fa7c2b515b7b0c13bb32 Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
2019-02-12fix assert failureDave Barach1-0/+6
Change-Id: I9a2e8ea2bf334dd8dabf3d25abbcc91087a43882 Signed-off-by: Dave Barach <dbarach@cisco.com>
2019-01-30buffers: add missing ref_count = 1 in driversDamjan Marion1-0/+1
Change-Id: I6aa030429c1740f7376e95daf82fce49efa6716b Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-20dpdk: add buffer.hDamjan Marion1-0/+1
Change-Id: I998658ad7860b23425444e218ce2e1ec655b885a Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-18deprecate clib_memcpy64_x4Damjan Marion1-16/+15
Storing buffer in local template seems to be better option.... Change-Id: I1a2fdd68cb956f99a5b36d2cd810fc623e089bcf Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-21dpdk: don't shift flags twiceDamjan Marion1-3/+3
Change-Id: I3555230ef7b7677d6187282fb0c0f02af216e0a0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-20ethernet-input optimizationsDamjan Marion1-210/+81
Change-Id: I4ec7750ef58363bd8966a16a2baeec6db18b7e9e Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-7/+8
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-3/+3
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-08-13Multiarch handling in different constructor macrosDamjan Marion1-4/+0
This significantly reduces need for ... in multiarch code. Simply constructor macros will jost create static unused entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by compiler. Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-21configurable per-dispatch-cycle sleepDave Barach1-21/+0
Workaround for lack of driver interrupt support. Also quite handy for home gateway, laptop/vagrant, other use-cases not requiring maximum vectors/second for proper operation. Change-Id: Ifc4b98112450664beef67b89ab8a6940a3bf24b5 Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-19flow:free lookup entries after packets are handledeyal bari1-2/+2
Change-Id: I737dad64bf6dd0743d36500d5cfa1cb1a6594b98 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-13vxlan:offload RX floweyal bari1-1/+1
ip4 vxlan cli/api (using flow infra) to create flows and enable them on different hardware (currently tested with i40e) to offload a vxlan tunnel onto hw: set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 to remove offload: set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 del TODO:ipv6 handling Change-Id: I70e61f792ef8e3f007d03d7df70e97ea4725b101 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-05-31dpdk: Decoupling the meaning of xd->device_index in dpdk_pluginRui Cai1-1/+1
Prior to the change, dpdk plugin assumes xd->device_index is used both as index for internal dpdk_main->devices array and DPDK port index to call into DPDK APIs. However, when running on top of Failsafe PMDs, DPDK port index range may no longer be contiguous (as noted: http://dpdk.org/ml/archives/dev/2018-March/092375.html for related changes in DPDK). Because this, dpdk plugin can no longer iterate through all available DPDK ports with a for 0->rte_eth_dev_count() loop and the assumption of device_index no longer holds. This is part of initial effort to enable vpp running over dpdk on failsafe PMD in Microsoft Azure(3/4). Change-Id: I416fd80f2d40e12e139f8f3492814da98343eae7 Signed-off-by: Rui Cai <rucai@microsoft.com>
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion1-19/+3
Change-Id: Ibab5e27277f618ceb2d543b9d6a1a5f191e7d1db Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-25Add interface rx pcap tracingDave Barach1-1/+43
Should cost at most 1 clock per frame when not enabled. Add "pcap rx trace..." debug CLI, refactored "pcap tx trace" debug CLI to avoid duplicating code. Change-Id: I19ac75d1cf94a6a24c98facbf0753381d37963ea Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-05-18Add vlib_buffer_enqueue_to_next inline functionDamjan Marion1-75/+3
Change-Id: I1042c0fe179b57a00ce99c8d62cb1bdbe24d9184 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-17Add buffer pointer-to-index and index-to-pointer array functionsDamjan Marion1-60/+3
Change-Id: Ib3fcc3ceb7f315389bcdecbb7d9632540a5dd6ba Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-10vnet: device flow offload infraDamjan Marion1-0/+40
Change-Id: Ibea4a96bdec5e368301a03d8b11a0712fa0265e0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-09dpdk:fix mbuf index typo'sEyal Bari1-4/+4
Change-Id: I387b22427b3f322969bcf32fcfc189123c8ed6ae Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-05-07dpdk: improve perf of buffer indices calc in the input nodeDamjan Marion1-34/+53
Change-Id: I16557189aa4a763ec496cb4a45f6e12f2d46971f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-27A bit of buffer metadata reshuffling to accommodate flow_idDamjan Marion1-1/+1
Change-Id: I2794384557c6272fe217269b14a9db09eda19220 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-25dpdk: complete rework of the dpdk-input nodeDamjan Marion1-424/+515
Change-Id: If174d189de40e6f9ffae99997bba93a2519d9fda Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-04dpdk:fix checksum handling of l2 interfacesEyal Bari1-17/+19
dpdk-input was dropping packets with bad ip-checksum on l2 interfaces Change-Id: Ife5b52766bb71e878b1da6e94ae7b8a1e59fc478 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-03-11dpdk-input node packet trace intermittent on IP forwading pathJohn Lo1-36/+37
Packet trace initiated by dpdk-input node would occasionally not fully function if next node is ip4-input. Change packet trace saving order in the quad-loop so "sho trace" will display trace in packet receive order. Fold calling of vlib_trace_buffer() into dpdk_add_trace(). Change-Id: I9d7a9bf3b9391f95590e66150b26b0b15912d803 Signed-off-by: John Lo <loj@cisco.com>
2018-02-12dpdk:fix trace to follow feature arcEyal Bari1-80/+66
Change-Id: Icd2184dec16d30cdcc689ca37c834b5df2f0a1a3 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-02-01dpdk:fix typo in prefetch sequenceEyal Bari1-2/+2
Change-Id: I7110436626352d45ffe0ca71fb88dea2c77ab639 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-04dpdk: remove duplicate functionEyal Bari1-32/+1
dpdk_rx_next_from_packet_start is equivalent to dpdk_rx_next_from_etype and seems to have no side effects Change-Id: I629dadfbfb35ad1f5c7198e7824883ae4bd6abaa Signed-off-by: Eyal Bari <ebari@cisco.com>