summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
AgeCommit message (Collapse)AuthorFilesLines
2023-05-19dpdk: fix compatibility with DPDK < 21.11Andrew Ying2-2/+1
Signed-off-by: Andrew Ying <hi@andrewying.com> Type: fix Change-Id: I3c428c90146387ad9ce291c7f646d74f06952b40
2023-05-19dpdk: fix format device name using wrong indexDaniel Ding1-10/+10
When I setup vpp by netvsc driver, occurs the following crash: (format_dpdk_device_name) assertion `(i) < vec_len (dm->devices)' fails vnet[100166]: #6 0x00007f434d651f6a _clib_error + 0x2da vnet[100166]: #7 0x00007f430b4bef64 format_dpdk_device_name + 0xf4 vnet[100166]: #8 0x00007f434d6555f3 do_percent + 0xee3 vnet[100166]: #9 0x00007f434d654359 va_format + 0xb9 vnet[100166]: #10 0x00007f434d7ac16e vlib_log + 0x3ce vnet[100166]: #11 0x00007f430b49ebe3 dpdk_device_start + 0x193 vnet[100166]: #12 0x00007f430b4aa233 dpdk_interface_admin_up_down + 0x163 vnet[100166]: #13 0x00007f434d988fc8 vnet_sw_interface_set_flags_helper + 0x378 vnet[100166]: #14 0x00007f434d989338 vnet_sw_interface_set_flags + 0x48 This patch fix it by device_index as a index for devices vec, and not dpdk port_id. Type: fix Change-Id: I84c46616d06117c9ae3b2c7d0473050f1b8ded5f Signed-off-by: Daniel Ding <danieldin95@163.com>
2023-05-16dpdk: fix format rx/tx burst function name failedXiaoming Jiang1-8/+9
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I9971e69135e0652a36e4b4754774a43ea1d92e8b
2023-05-15dpdk: Be wary of the return value from rte_eth_dev_socket_idSteven Luong1-1/+7
Prior to dpdk-22.11, VPP can count on rte_eth_dev_socket_id to return numa node 0 if the device didn't set it. Ever since below patch is committed in dpdk https://patchwork.dpdk.org/project/dpdk/patch/20220929120512.480-1-olivier.matz@6wind.com/#152498 the aforementioned assumption is no longer true. If the device didn't set the numa node, VPP gets -1 from the aforementioned API call. This causes VPP to crash. This fix is to set the numa node to 0 if the API returns -1, or SOCKET_ID_ANY Type: fix Change-Id: I2fde2870e5a3eb98473fe8d119fef594bfba9a8d Signed-off-by: Steven Luong <sluong@cisco.com>
2023-04-25dpdk: code preparation for bumping to DPDK 22.11Xinyao Cai5-17/+41
This patch prepares code for bumping DPDK version to 22.11, but the DPDK version of this patch keeps at 22.07 for compatibility. the "no-dsa" parameter in DPDK configuration is removed, the "blacklist" parameter can be used to block the related DSA devices. Type: feature Signed-off-by: Xinyao Cai <xinyao.cai@intel.com> Change-Id: I08787c6584bba66383fc0a784963f33171196910
2023-03-14dpdk: enable Google Virtual EthernetMarvin Liu2-0/+7
Recognize and drive google virtual ethernet (gve) in google cloud. Type: feature Signed-off-by: Marvin Liu <yong.liu@intel.com> Change-Id: Ia559615ac059cabbca5d10bcd4049e87beaad638
2023-03-06dpdk: plugin init should be protect by thread barrierXiaoming Jiang1-0/+2
Witout thread barrier, when dpdk_process_node initiating dpdk lib, workers thread may also be initiating. Main and workers threads may both setting error_main info, that will cause memory ASAN issue. Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I87b73b310730719035d4985a2cff2e3308120ec2
2023-03-06flow dpdk: introduce IP in IP support for flowXinyao Cai1-20/+149
This patch introduces IP in IP packet support for flow cli and dpdk plugin. Specifically, the following IP in IP packet types are supported: MAC-IPv4-IPv4-TCP/UDP/None, MAC-IPv4-IPv6-TCP/UDP/None, MAC-IPv6-IPv4-TCP/UDP/None, MAC-IPv6-IPv6-TCP/UDP/None, IP in IP flow rules can be created by using the following new keywords in vppctl: in-src-ip, in-dst-ip : to provide information for inner IPv4 header in-ip6-src-ip, in-ip6-dst-ip: to provide information for inner IPv6 header in-proto : to specify inner transport layer protocol type (TCP or UDP) in-src-port, in-dst-port : to provide information for inner TCP/UDP header An example to create flow rule for MAC-IPv6-IPv6-TCP: test flow add index 0 ip6-src-ip any ip6-dst-ip any in-ip6-src-ip any in-ip6-dst-ip any in-proto tcp in-src-port 1234 in-dst-port any rss function default Another example to create flow rule for MAC-IPv6-IPv6: test flow add index 0 ip6-src-ip any in-ip6-src-ip any rss function default Type: feature Signed-off-by: Xinyao Cai <xinyao.cai@intel.com> Change-Id: I6a1ca36d47eb65b9cb5a4b8d874b2a7f017c35cd
2023-02-08avf dpdk: fix incorrect handling of IPv6 src address in flowTing Xu1-1/+2
In current flow creating process in native avf and dpdk-plugins, when parsing the input arguments, it does not copy IPv6 src address correctly, so that IPv6 src address will not be configured in any flow rule, and any packet with the same address will not be matched. Type: fix Signed-off-by: Ting Xu <ting.xu@intel.com> Change-Id: Ic957c57e3e1488b74e6281f4ed1df7fd491af35c
2023-01-26dpdk: add intf tag to dev{} subinputNathan Skrzypczak2-0/+6
This patch allows to pass a tag when specifying the dpdk `dev { }` interface configuration. It allows a control plane generating a vpp.conf file to retreive the resulting mapping between dpdk interfaces & sw_if_indices in VPP without having to change the interface name exposed to the user. Type: feature Change-Id: I55907417de0083b82d4a127172816cec3459acf3 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-01-19vxlan: convert vxlan to a pluginSteven Luong1-1/+1
per https://jira.fd.io/browse/VPP-2058 Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ica0828de218d25ada2d0d1491e373c3b78179ac1
2023-01-11pci: add option to force uio bindingBenoît Ganne2-1/+5
Type: improvement Change-Id: Ifea4badd58f7e2b5e792d7506f6747851a08587f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-10-24dpdk: add Intel QAT 200xx series supportVladimir Ratnikov1-1/+2
Type: feature Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com> Change-Id: I2fd1e321983ac5caa03aac8705dfc596985c35f7
2022-08-25vlib: introduce DMA infrastructureMarvin Liu1-0/+10
This patch introduces DMA infrastructure into vlib. This is well known that large amount of memory movements will drain core resource. Nowadays more and more hardware accelerators were designed out for freeing core from this burden. Meanwhile some restrictions still remained when utilizing hardware accelerators, e.g. cross numa throughput will have a significant drop compared to same node. Normally the number of hardware accelerator instances will less than cores number, not to mention that applications number will even beyond the number of cores. Some hardware may support share virtual address with cores, while others are not. Here we introduce new DMA infrastructure which can fulfill the requirements of vpp applications like session and memif and in the meantime dealing with hardware limitations. Here is some design backgrounds: Backend is the abstract of resource which allocated from DMA device and can do some basic operations like configuration, DMA copy and result query. Config is the abstract of application DMA requirement. Application need to request an unique config index from DMA infrastructure. This unique config index is associated with backend resource. Two options cpu fallback and barrier before last can be specified in config. DMA transfer will be performed by CPU when backend is busy if cpu fallback option is enabled. DMA transfer callback will be in order if barrier before last option is enabled. We constructs all the stuffs that DMA transfer request needed into DMA batch. It contains the pattern of DMA descriptors and function pointers for submission and callback. One DMA transfer request need multiple times batch update and one time batch submission. DMA backends will assigned to config's workers threads equally. Lock will be used for thread-safety if same backends assigned to multiple threads. Backend node will check all the pending requests in worker thread and do callback with the pointer of DMA batch if transfer completed. Application can utilize cookie in DMA batch for selves usage. DMA architecture: +----------+ +----------+ +----------+ +----------+ | Config1 | | Config2 | | Config1 | | Config2 | +----------+ +----------+ +----------+ +----------+ || || || || +-------------------------+ +-------------------------+ | DMA polling thread A | | DMA polling thread B | +-------------------------+ +-------------------------+ || || +----------+ +----------+ | Backend1 | | Backend2 | +----------+ +----------+ Type: feature Signed-off-by: Marvin Liu <yong.liu@intel.com> Change-Id: I1725e0c26687985aac29618c9abe4f5e0de08ebf
2022-08-04dpdk: enable interrupt support for vmxnet3Benoît Ganne1-0/+1
Type: feature Change-Id: I0abbe925d6b9d3dd7196cd8beaf4f471beb45bd6 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-07-18dpdk: fix mlx5 dpdk init with no-multi-segTianyu Li1-1/+2
Build vpp with MLX DPDK PMD, make DPDK_MLX4_PMD=y DPDK_MLX5_PMD=y DPDK_MLX5_COMMON_PMD=y build-release With no-multi-seg in startup.conf, Mellanox NIC init failed with following message, rte_eth_rx_queue_setup[port:2, errno:-12]: Unknown error -12 mlx5_net: port 2 Rx queue 0: Scatter offload is not configured and no enough mbuf space(2176) to contain the maximum RX packet length(2065) with head-room(128) In Mellanox NIC PMD driver, 'di.max_rx_pktlen' is returned as 65536, and 'di.max_mtu' is returned as 65535, which makes the driver_frame_overhead logic not suitable for Mellanox NICs. So skip the logic code if MAX_MTU is returned as 65535. Type: fix Fixes: 1cd0e5dd533f ("vnet: distinguish between max_frame_size and MTU") Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I027b76b8d07fb453015b8eebb36d160b4bc8df9c
2022-07-08dpdk: add ID for 4xxx QAT VFMatthew Smith1-3/+5
Type: improvement Enable use of 4th gen QAT devices. Will be available on Sapphire Rapids. Signed-off-by: Matthew Smith <mgsmith@netgate.com> Change-Id: I89e7d29e10ecb4c36c700ff5e017796161ec6c5e
2022-05-23dpdk: fix update link stateAlexander Skorichenko1-18/+13
Type: fix Correct vnet_hw_interface_t flags update on link state changes. Currently incomplete set of flags is applied on each change, only flags related to the most recent change are being set correct. E.g. setting the link up would erase the duplex part of the flags. Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com> Change-Id: I5b95e1c0eaea0c283b108dbf7f809682ec9064eb
2022-05-17interface: fix overflow of link speed.Anton Nikolaev1-1/+3
Type: fix There were several places where mbps were converted to kbps for link_speed, but often drivers of devices set link speed to unknown (0xFFFFFFFF) on initialization, so there was multiplication of link_speed equal 0xFFFFFFFF(UINT32_MAX) by 1000, this provides overflow of unsigned int, and as result link_speed was equal 4295 Gbps, but actually link_speed is unknown. Signed-off-by: Anton Nikolaev <anikolaev@netgate.com> Change-Id: Ib462ed6ed685654af4687041e115bfb74e640f13
2022-05-13dpdk: fix overflow in mtu arithmeticMohammed Hawari2-2/+2
When the driver's max_rx_pktlen is >= 65536, max_supported_frame_size overflows and queue creation fails. Change-Id: If78707cb698adf8619ec44a852dd05d570917577 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix
2022-04-26flow: enable RSS queue group action for 5G enhancementTing Xu1-0/+23
Enable the flow action for RSS queue group. Packets can be distributed among queues in group based on specific fields. Queues must be continous in the group. This feature is to support 5G enhancement requirement. Type: feature Signed-off-by: Ting Xu <ting.xu@intel.com> Change-Id: I74fdc617659bcb61f00b3b1934c95ab1c73bb8f3
2022-04-08dpdk: add multi-txq supportMohsin Kazmi4-13/+31
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I9f061a05d947bc2867e1b962bf0522ad344bcc1a
2022-04-05dpdk: macros changes for dpdk 22.03Dastin Wilski4-60/+62
New dpdk version deprecates some macros used by VPP. This patch changes them to 22.03 version. Type: improvement Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com> Change-Id: Ic362ed318dc1ad88bb682ef13fbd6159171fbaef
2022-04-05dpdk: compatibility layer for dpdk 22.03 bumpDastin Wilski2-26/+87
New version of dpdk changes some macros names. This patch ensures VPP will be compatible with older dpdk versions. Type: improvement Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com> Change-Id: I3d9736278e70064610a1dcad5f2d2f6eb26e0d4b
2022-04-05dpdk: fix max frame sizeDamjan Marion2-11/+11
Type: fix Change-Id: I70f9ec2eb6c9c1494a4ecd56e06898f6162a0e0e Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-04vppinfra: make _vec_len() read-onlyDamjan Marion3-7/+7
Use of _vec_len() to set vector length breaks address sanitizer. Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead. Type: improvement Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-01dpdk: fix vlan creation on ixgbeAlexander Chernavin1-1/+0
Type: fix VLAN programming is currently enabled for IXGBE. However, that is only supported for IXGBE_VF. With this fix, disable VLAN programming for IXGBE. Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I37b1d0733988c964d2b0f5a49328effacec1cb6f
2022-04-01dpdk: fix coverity issueFan Zhang1-13/+4
Type: fix This patch fixes the following DPDK plugin issue: CID 253333: Control flow issues (DEADCODE) The change also includes some cosmetic changes for error handling. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Change-Id: I830020bc3ae9a508f3a905f78333fa3ae25ce784
2022-03-29dpdk: make log pipe non-blocking on both sidesDamjan Marion1-1/+2
Type: fix Change-Id: I857403b9d93ee4c17f2dd5ac8e6dafd66260a252 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-24dpdk: enable int mode for virtioPaul Atkins1-0/+1
The way of specifying which interface supports what has changed. Re-add support for adaptive mode in virtio. Type: fix Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: I2f8ffa6311a4081b93fb08a7e92408b8bffbae64
2022-03-23dpdk: copy the enable_rxq_int flag from driver to confPaul Atkins1-0/+1
The support for interrupt mode is not being respected as it is not copied into the driver conf, which is what is checked when trying to enable it. Type: fix Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: I2e502306e27bd98f8037d1a0a396201e099b50b5
2022-03-23vppinfra: deprecate clib_mem_is_vecDamjan Marion1-2/+0
Use of clib_mem_is_heap_object is not reliable enough for production use as it relies on just few bytes of memory allocator chunk header. Type: improvement Change-Id: I48c8adde8b6348b15477e3a015ba515eb7ee7ec2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-23dpdk: fix rx/tx burst function nameTianyu Li1-2/+2
Type: fix Fixes: 65105c95fe03 ("dpdk: improve logging") Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I69d616c7e6e7b5395ebf083b1ac5c3e85f99bbdd
2022-03-15flow: add generic flow pattern for 5G flow enhancementTing Xu1-0/+16
In order to support the requirement of RSS and packet steering of new protocols, such as GTPU PDU-type and QFI, for 5G UPF, a generic pattern is introduced in vnet flow. The generic flow pattern is based on DDP (Dynamic Device Personalization) function and Parser Library module in DPDK. Using generic flow pattern, we do not need to create new packet and field type and offset in API parser for every new protocols. We can create flows for any protocol immediately as long as supported by DDP. The generic flow can be used to support 5G related protocols in different scenarios. The input of this generic pattern are two binary strings for spec and mask. Spec is the binary presentation of the target packet type, and mask is used to mark the target fields. In this patch DPDK plugins is enabled for POC. Next step we will enable generic flow in native IAVF, which is the main target. Here is an example. If we want to create a flow for GTPU QFI, spec is: 00000000000100000000000208004500003C00000000001100000101010102020202000 008680028000034FF001C00000000000000850100010045000014000000000000000001 01010102020202 mask is: 00000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000007F0000000000000000000000000000 00000000000000 A naming API POC is created via VAPI to help create the rule with the target packet format similar to Scapy. It is based on a function module called PacketForge. In this way, the user no need to create binary string spec and mask by themselves. Type: feature Signed-off-by: Ting Xu <ting.xu@intel.com> Change-Id: Id3444f95c158bdcdfeeee19d795cd9ecbeeec07c
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-03-10dpdk: fix program vlans on ixgbevfDzmitry Sautsa1-2/+7
Recent "dpdk: refactor device setup" have broken vlans programming for IXGBE_VF. Type: fix Signed-off-by: Dzmitry Sautsa <dzmitry.sautsa@nokia.com> Change-Id: Idacda33a473f6b10dbe002d9926661a19d0f3f97
2022-02-18dpdk: support devargs for vmbusVladimir Ratnikov1-19/+29
Type: feature Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com> Change-Id: I2fd12a5b30aacdbaecb9156b829bfc06dfea377f
2022-02-17dpdk: enable scatter on Rx for net/enaakolechk1-1/+0
Type: fix Since commit https://github.com/DPDK/dpdk/commit/e2a6d08bef489215ebb77b1d3033875ada757cfa DPDK started advertising scattered Rx feature for elastic network adapters. Thus, dpdk plugin doesn't have to disable it for ENA by default anymore Signed-off-by: akolechk <akolechk@cisco.com> Change-Id: I2d4f429be992e3c4edcc0c3adf8c55f3d5381631
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-02-06dpdk: remove dead codeBenoît Ganne1-15/+1
rte_eth_tx_burst() returns the number of packets actually stored in transmit descriptors and the return type is uint16. n_sent cannot be negative and the if branch is dead code. Type: improvement Change-Id: Idc2980d342756c1093ddf74ea6207d072e819331 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-01-20dpdk: fix compilation for DPDK < 21.11Benoît Ganne2-2/+5
Type: fix Change-Id: Ic5b74fb7a8e479e8cdccbb6a564ff3fdd299455c Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-01-18dpdk: limit number of TX queues to max supportedDamjan Marion1-3/+17
Also improve logging.... Type: fix Change-Id: I3d3aee52cd45e59ecd6ce13bd516c66559638fec Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-18vnet: distinguish between max_frame_size and MTUDamjan Marion4-35/+65
Type: improvement Change-Id: I3659de6599f402c92e3855e3bf0e5e3388f2bea0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-17interface: improve MTU handlingDamjan Marion1-9/+37
- per hw-interface-class handlers - ethernet set_mtu callback - driver can now refuse MTU change Type: improvement Change-Id: I3d37c9129930ebec7bb70caf4263025413873048 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-14dpdk: refactor device setupDamjan Marion6-540/+327
Type: improvement Change-Id: I9772088bca176fd0fdb162677ec55c59aa8f3adf Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-14dpdk: fix burst function outputDamjan Marion1-3/+3
Type: fix Fixes: 65105c95f Change-Id: I8dee4b560a49891f954d7eb8e79ea535cedeaa88 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-12dpdk: bump to DPDK v21.11Damjan Marion2-10/+24
Type: feature This patch bumps dpdk version from 21.08 to 21.11 Change-Id: Id37fdba75f1ea4f4eac3c92226f3b1c539e1daca Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-12dpdk: improve loggingDamjan Marion3-10/+49
Type: improvement Change-Id: If61d7409ff14b9f771c1dc8ec9f35e179cea7a28 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-12dpdk: update packet offload flagsDamjan Marion2-41/+89
Type: improvement Change-Id: Ib2c55dd2a246a690b2089f5c0b88508f732281f2 Signed-off-by: Damjan Marion <damarion@cisco.com>