AgeCommit message (Collapse)Author
3 daysmbuf: detach mbuf with pinned external bufferViacheslav Ovsiienko
Update detach routine to check the mbuf pool type. Introduce the special internal version of detach routine to handle the special case of pinned external bufferon mbuf freeing. Signed-off-by: Shahaf Shuler <> Signed-off-by: Viacheslav Ovsiienko <> Acked-by: Olivier Matz <>
3 daysmbuf: introduce routine to get private mbuf pool flagsViacheslav Ovsiienko
The routine rte_pktmbuf_priv_flags is introduced to fetch the flags from the mbuf memory pool private structure in unified fashion. Signed-off-by: Viacheslav Ovsiienko <> Acked-by: Olivier Matz <>
3 daysmbuf: use structure marker from EALJerin Jacob
Use new marker typedef available in EAL and remove private marker typedef. Signed-off-by: Jerin Jacob <> Reviewed-by: Gavin Hu <> Acked-by: Olivier Matz <> Acked-by: Matan Azrad <>
3 daysdrivers/net: use structure marker from EALJerin Jacob
Use new marker typedef available in EAL. Signed-off-by: Jerin Jacob <> Reviewed-by: Gavin Hu <> Acked-by: Matan Azrad <>
3 dayseal: introduce structure markersJerin Jacob
Introduce EAL typedef for structure 1B, 2B, 4B, 8B alignment marking and a generic marker for a point in a structure. Signed-off-by: Jerin Jacob <> Reviewed-by: Gavin Hu <> Acked-by: Matan Azrad <>
3 daysmem: improve log message for too low memzone segmentsArtur Trybula
In case of too low number of memzone segments user notification was misleading. This patch improves the description by providing better explanation about the cause. Signed-off-by: Artur Trybula <> Acked-by: Anatoly Burakov <>
3 daysconfig: disable Linux kernel modules by defaultJerin Jacob
Based on the techboard meeting held on 2019-11-06, It's been decided to disable all kmods by default from v20.02. Signed-off-by: Jerin Jacob <>
3 dayscontigmem: update for FreeBSD 13Bruce Richardson
FreeBSD 13 has changed the definition of vm_page_replace so we need to have slightly different code paths around this function depending on the BSD version. Signed-off-by: Bruce Richardson <>
3 dayseal/freebsd: update CPU macro for FreeBSD 13Bruce Richardson
In (currently unreleased) FreeBSD 13, the CPU_NAND macro has been renamed to CPU_ANDNOT, so we need to use different DPDK-specific macros depending on what system-defined ones are present. Signed-off-by: Bruce Richardson <>
3 daysapp/test: remove meson dependency on file in /sysBruce Richardson
Meson versions 0.52 and 0.53 are being overly smart and detecting the path "/sys/devices/system/cpu/present" in the call to cat in app/test/ and then adding it as a dependency to the build configuration. This causes issues on systems where the timestamp of that file always returns the current time, since it means that the file is always out of date, and therefore needs to be rebuilt. We can fix this by just using a simple shell script to return the coremask appropriately for BSD and Linux, and removing that code logic from meson - thereby hiding the use of the /sys file. Fixes: c70622ac6f72 ("test: detect number of cores with meson") Cc: Signed-off-by: Bruce Richardson <>
3 daysmeter: remove experimental flag from RFC4115 trTCM APIEelco Chaudron
Moved RFC4115 APIs to non-experimental as they have been there since 19.02. Also, these APIs are the same as the non RFC4115 APIs. Signed-off-by: Eelco Chaudron <> Acked-by: Cristian Dumitrescu <>
3 daysmbuf: improve API doc for attaching external bufferJörg Thalheim
Enhance API documentation of rte_pktmbuf_attach_extbuf() to explain that the attached mbuf is initialized with length = 0. Link: Signed-off-by: Jörg Thalheim <> Signed-off-by: Olivier Matz <>
3 daysmempool: remove memory wastage on non-x86Jerin Jacob
The existing optimize_object_size() function address the memory object alignment constraint on x86 for better performance. Different (micro) architecture may have different memory alignment constraint for better performance and it not the same as the existing optimize_object_size(). Some use, XOR(kind of CRC) scheme to enable DRAM channel distribution based on the address and some may have a different formula. Introducing arch_mem_object_align() function to abstract the difference between different (micro) architectures to avoid wasting memory for mempool object alignment for the architecture that it is not required to do so. Details on the amount of memory saving: Currently, arm64 based architectures use the default (nchan=4, nrank=1). The worst case is for an object whose size (including mempool header) is 2 cache lines, where it is optimized to 3 cache lines (+50%). Examples for cache lines size = 64: orig optimized 64 -> 64 +0% 128 -> 192 +50% 192 -> 192 +0% 256 -> 320 +25% 320 -> 320 +0% 384 -> 448 +16% ... 2304 -> 2368 +2.7% (~mbuf size) Additional details: Signed-off-by: Jerin Jacob <> Reviewed-by: Gavin Hu <> Acked-by: Olivier Matz <>
3 daysdoc: announce API change for mempool IOVA populateOlivier Matz
Starting from v20.05, rte_mempool_populate_iova() will return 0. The ABI will be preserved through symbol versioning until 20.11. Signed-off-by: Olivier Matz <>
3 daysmempool: fix populate with small virtual chunksOlivier Matz
To populate a mempool with a virtual area, the mempool code calls rte_mempool_populate_iova() for each iova-contiguous area. It happens (rarely) that this area is too small to store one object. In this case, rte_mempool_populate_iova() returns an error, which is forwarded by rte_mempool_populate_virt(). This case should not throw an error in rte_mempool_populate_virt(). Instead, the area that is too small should just be ignored. To fix this issue, change the return value of rte_mempool_populate_iova() to 0 when no object can be populated, so it can be ignored by the caller. As this would be an API/ABI change, only do this modification internally for now. Fixes: 354788b60cfd ("mempool: allow populating with unaligned virtual area") Cc: Signed-off-by: Olivier Matz <> Tested-by: Anatoly Burakov <> Tested-by: Alvin Zhang <>
3 daysmempool: fix slow allocation of large poolsOlivier Matz
When allocating a mempool which is larger than the largest available area, it can take a lot of time: a- the mempool calculate the required memory size, and tries to allocate it, it fails b- then it tries to allocate the largest available area (this does not request new huge pages) c- add this zone to the mempool, this triggers the allocation of a mem hdr, which request a new huge page d- back to a- until mempool is populated or until there is no more memory This can take a lot of time to finally fail (several minutes): in step a- it takes all available hugepages on the system, then release them after it fails. The problem appeared with commit eba11e364614 ("mempool: reduce wasted space on populate"), because smaller chunks are now allowed. Previously, it had to be at least one page size, which is not the case in step b-. To fix this, implement our own way to allocate the largest available area instead of using the feature from memzone: if an allocation fails, try to divide the size by 2 and retry. When the requested size falls below min_chunk_size, stop and return an error. Fixes: eba11e364614 ("mempool: reduce wasted space on populate") Cc: Signed-off-by: Olivier Matz <> Acked-by: Anatoly Burakov <> Reviewed-by: Andrew Rybchenko <> Tested-by: Ali Alnubani <>
3 daysmempool: fix anonymous populateOlivier Matz
The documentation says that a negative errno is returned on error, but in most places that's not the case. Fix the documentation and the exceptions in code. The second one (return from populate_virt) also fixes a memory leak. Note that testpmd was using the function correctly. Fixes: aa10457eb4c2 ("mempool: make mempool populate and free api public") Fixes: 6780f72fb82f ("mempool: populate with anonymous memory") Fixes: 66e7ba0bad4c ("mempool: ensure mempool is initialized before populating") Cc: Signed-off-by: Olivier Matz <>
3 daysethdev: allow multiple security sessions to use flow ruleAnoob Joseph
The rte_security API which enables inline protocol/crypto feature mandates that for every security session an rte_flow is created. This would internally translate to a rule in the hardware which would do packet classification. In rte_security, one SA would be one security session. And if an rte_flow need to be created for every session, the number of SAs supported by an inline implementation would be limited by the number of rte_flows the PMD would be able to support. If the fields SPI & IP addresses are allowed to be a range, then this limitation can be overcome. Multiple flows will be able to use one rule for SECURITY processing. In this case, the security session provided as conf would be NULL. Application should do an rte_flow_validate() to make sure the flow is supported on the PMD. Signed-off-by: Anoob Joseph <> Reviewed-by: Jerin Jacob <> Acked-by: Ori Kam <> Acked-by: Konstantin Ananyev <> Acked-by: Vladimir Medvedkin <>
3 daysraw/octeontx2_ep: fix shared libraryThomas Monjalon
The version of the PMD should not be overwritten with LIBABIVER. All internal libs must have the same version. Moreover, specifying LIBABIVER in the driver causes a symbolic link loop: -> Fixes: 56d46d13f736 ("raw/octeontx2_ep: add build infra and device probe") Reported-by: Ferruh Yigit <> Signed-off-by: Thomas Monjalon <> Tested-by: Ferruh Yigit <>
3 daysexamples/ntb: fix mempool ops settingXiaoyun Li
Mempool ops may register in different order when compiling. The default ops index is always zero but the wanted ops is ring_mp_mc. This patch sets best mempool ops before generating mbuf pool to fix this issue. Fixes: 5194299d6ef5 ("examples/ntb: support more functions") Cc: Signed-off-by: Xiaoyun Li <>
3 daysdoc: fix igb_uio parameter in ntb guideXiaoyun Li
In prerequisites of ntb guide, the correct flag when loading igb_uio module should be `wc_activate=1`, not `wc_active=1`. Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions") Cc: Signed-off-by: Xiaoyun Li <> Acked-by: Jingjing Wu <>
3 daysraw/ntb: fix write memory barrierXiaoyun Li
All buffers and ring info should be written before tail register update. This patch relocates the write memory barrier before updating tail register to avoid potential issues. Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions") Cc: Signed-off-by: Xiaoyun Li <> Reviewed-by: Gavin Hu <> Acked-by: Jingjing Wu <>
3 daysraw/octeontx2_ep: add driver self testMahipal Challa
Add rawdev's selftest feature in SDP VF driver, which verifies the EP mode functionality test. Signed-off-by: Mahipal Challa <> Reviewed-by: Gavin Hu <>
3 daysraw/octeontx2_ep: add dequeue operationMahipal Challa
Add rawdev dequeue operation for SDP VF devices. Signed-off-by: Mahipal Challa <> Reviewed-by: Gavin Hu <>
3 daysraw/octeontx2_ep: add enqueue operationMahipal Challa
Add rawdev enqueue operation for SDP VF devices. Signed-off-by: Mahipal Challa <> Reviewed-by: Gavin Hu <>
3 daysraw/octeontx2_ep: add device uninitializationMahipal Challa
Add rawdev close/uninitialize operation for SDP VF devices. Signed-off-by: Mahipal Challa <> Reviewed-by: Gavin Hu <>
3 daysraw/octeontx2_ep: add device configurationMahipal Challa
Register "dev_configure" API to configure/initialize the SDP VF PCIe devices. Signed-off-by: Mahipal Challa <> Reviewed-by: Gavin Hu <>
3 daysraw/octeontx2_ep: add build infra and device probeMahipal Challa
Add the OCTEON TX2 SDP EP device probe along with the build infrastructure for Make and meson builds. Signed-off-by: Mahipal Challa <> Reviewed-by: Gavin Hu <>
4 daystimer: add API to query ticks until the next timerStephen Hemminger
It is useful to know when the next timer will expire when using rte_epoll_wait (or sleep when idle). This experimental API provides a hook to query the number of ticks remaining. Signed-off-by: Stephen Hemminger <> Acked-by: Erik Gabriel Carrillo <>
4 dayslatency: fix calculation for multi-threadReshma Pattan
Make latency calculation multithread safe by using spinlock. Fixes: 5cd3cac9ed ("latency: added new library for latency stats") Cc: Signed-off-by: Reshma Pattan <>
4 dayshash: add max key id query APIKumar Amber
Adding new API function to query the maximum key ID that could possibly be returned by rte_hash_add_key and rte_hash_add_key_with_hash. When RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD is set, the maximum key id is larger than the entry count specified by the user. Signed-off-by: Kumar Amber <> Acked-by: Yipeng Wang <>
4 dayshash: remove unnecessary locks in lock-freeDharmik Thakkar
Remove __hash_rw_reader_unlock() calls from lock free hash lookup Signed-off-by: Dharmik Thakkar <> Reviewed-by: Gavin Hu <> Reviewed-by: Honnappa Nagarahalli <> Acked-by: Yipeng Wang <>
4 dayscfgfile: fix symbols mapLiron Himi
rte_cfgfile_section_num_entries_by_index was missing from the map file. meson build failed when calling this function, due to linking a binary to cfgfile built as a shared library. Fixes: 3d2e0448ebb5 ("cfgfile: add section number of entries by index") Cc: Signed-off-by: Liron Himi <> Acked-by: Cristian Dumitrescu <>
4 dayskni: rename variable with namespace prefixStephen Hemminger
All global variables in kernel should be prefixed by the same to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier. Fixes: 89397a01ce4a ("kni: set default carrier state of interface") Cc: Signed-off-by: Stephen Hemminger <> Acked-by: Ferruh Yigit <>
4 dayseal/linux: fix build when VFIO is disabledAli Alnubani
The header linux/version.h isn't included when CONFIG_RTE_EAL_VFIO is explicitly disabled. LINUX_VERSION_CODE and KERNEL_VERSION are therefore undefined, causing the build failure: lib/librte_eal/linux/eal/eal.c: In function ‘rte_eal_init’: lib/librte_eal/linux/eal/eal.c:1076:32: error: "LINUX_VERSION_CODE" is not defined, evaluates to 0 [-Werror=undef] Fixes: a0dede62a537 ("eal/linux: remove KNI restriction on IOVA") Cc: Signed-off-by: Ali Alnubani <>
4 daysmk: avoid combining -r and -export-dynamic linker optionsRafael Ávila de Espíndola
Running ld with -r switches the linker to a very special mode where some other linker options don't make sense. In particular, -export-dynamic normally requires that all global symbols be included in the dynamic symbol table, but a .o file doesn't even have a dynamic symbol table. When given both options it looks like the gnu linker just ignores -export-dynamic. Unfortunately some versions of lld ( have a bug that causes it to try to create a dynamic symbol table in the output .o file and ends up corrupting it ( Current (git) version of lld now issues an error. This patch filters out -export-dynamic from $(LDFLAGS) when using -r. With this patch I can build dpdk with lld. Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver") Cc: Signed-off-by: Rafael Ávila de Espíndola <>
6 daysdoc: add flow dump to mlx5 guideXueming Li
Guide of mlx5 is updated on how to dump HW flows. Signed-off-by: Xueming Li <> Signed-off-by: Xiaoyu Min <>
6 daysnet/mlx5: add socket server for external toolsXueming Li
Add pmd unix socket server to enable external tool applications to trigger flow dump. Socket path: /var/tmp/dpdk_mlx5_<pid> Socket format: io_raw: port_id of uint16 file: file descriptor of int Signed-off-by: Xueming Li <> Signed-off-by: Xiaoyu Min <> Acked-by: Viacheslav Ovsiienko <>
6 daysapp/testpmd: add flow dump commandXueming Li
New flow dump CLI to dump device internal representation information of flows into screen. Signed-off-by: Xueming Li <> Signed-off-by: Xiaoyu Min <> Acked-by: Ori Kam <>
6 daysnet/mlx5: support flow dump APIXiaoyu Min
Dump fdb/nic_rx/nic_tx raw flow data into specified file. Signed-off-by: Xueming Li <> Signed-off-by: Xiaoyu Min <> Acked-by: Viacheslav Ovsiienko <>
6 daysethdev: add API to dump device internal flow infoXiaoyu Min
Introduce an API which dump the device's internal representation information of rte flows in hardware. Signed-off-by: Xiaoyu Min <> Acked-by: Ori Kam <> Reviewed-by: Ferruh Yigit <>
6 daysethdev: fix secondary process memory overwriteFang TongHao
Avoid overwriting device flags and other information in device data stored in shared memory when a secondary process probes PCI device. Fixes: 494adb7f63f2 ("ethdev: add device fields from PCI layer") Cc: Signed-off-by: Fang TongHao <> Reviewed-by: Andrew Rybchenko <> Reviewed-by: Ferruh Yigit <>
6 daysnet/mlx5: fix metadata item endianness conversionViacheslav Ovsiienko
The mlx5 datapath does not implement any endianness conversions for the metadata being sent and received to provide the better performance (because these conversions would be performed for each packet). These metadata are also involved into flow processing (there might be some flows matching on metadata patterns or setting the new metadata values) inside the NIC. It order to configure hardware in correct way all necessary endianness conversions are done by rte_flow handling code (only once on flow creation). This patch fixes one of these conversions for the little-endian hosts in case if META/MARK items are less than 32 bits. Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set") Cc: Signed-off-by: Viacheslav Ovsiienko <> Acked-by: Matan Azrad <>
6 daysnet/mlx5: fix matcher field usage for metadata entitiesViacheslav Ovsiienko
Matcher is flow table related structure providing the flow pattern to be translated directly in hardware controlling data. This structure includes the metadata register c0 field, that might be engaged to support META and MARK related flow items and actions. Also, this register might be used by kernel to specify the source vport index. In this case (if kernel uses the field) the register c0 is split into two 16-bit subfields - one for META/MARK items and another to handle vport. The actual configuration is queried by PMD from kernel in runtime and depending on the mask returned by kernel the PMD can use upper or lower half of register c0 field. This patch adds the missing support for upper half. This missed support caused the non-operational META/MARK items on some kernel configurations. Fixes: e554b672aa05 ("net/mlx5: support flow tag") Cc: Signed-off-by: Viacheslav Ovsiienko <> Acked-by: Matan Azrad <>
6 daysnet/mlx5: fix shared metadata matcher field setupViacheslav Ovsiienko
Matcher is flow table related structure providing the flow pattern to be translated directly in hardware controlling data. Some fields in this structure might be split (by software) between multiple items. For example, the metadata register c0 field in the matcher might be split into two independent subfields - the source vport index and META item value. These subfields have no permanent assigned masks, the actual configuration is queried from the kernel drivers in runtime. To handle source vport value (the port of e-Switch which is origin of the packet) the kernel might use the dedicated vport field in the matcher or the part of register c0 field, depending on configuration. To setup the matcher structure fields the macro MLX5_SET is used. MLX5_SET configures the specified 32-bit field as whole entity. For metadata register c0 we should take into account the provided mask in order to configure the specified subfield bits only, otherwise setting vport overrides the META values and vice versa. Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set") Cc: Signed-off-by: Viacheslav Ovsiienko <> Acked-by: Matan Azrad <>
6 daysethdev: fix VLAN offloads set if no driver callbackWei Hu (Xavier)
Currently, there is a potential problem that changing the content of dev->data->dev_conf.rxmode.offloads even when there is no vlan_offload_set driver callback. It is a good idea that prevent the side effect and make the API return success if no change requested. This patch fixes the problem, the detail information as below: - keep possibility to do dummy set even if there is no driver callback - do not touch Rx mode offloads in device data before checking the driver callback availability - ensure that Rx mode offloads are rolled back correctly if driver callback returns error Fixes: 81f9db8ecc2c ("ethdev: add vlan offload support") Cc: Signed-off-by: Wei Hu (Xavier) <> Signed-off-by: Chunsong Feng <> Signed-off-by: Min Wang (Jushui) <> Signed-off-by: Min Hu (Connor) <> Reviewed-by: Andrew Rybchenko <>
6 daysapp/testpmd: support GTP message typeDekel Peled
This patch adds CLI option to enter the msg_type value for GTP flow pattern item. Signed-off-by: Dekel Peled <> Acked-by: Ori Kam <>
6 daysethdev: fix switching domain allocationViacheslav Ovsiienko
The maximum amount of unique swutching domain is supposed to be equal RTE_MAX_ETHPORTS. Current implementation allows to allocate only RTE_MAX_ETHPORTS-1 domains. The definition of RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is changed from 0 to UINT16_MAX, the rte_eth_dev_info_get is updated to initialize dev_ibfo structure accordingly. Fixes: ce9250406323 ("ethdev: add switch domain allocator") Cc: Signed-off-by: Viacheslav Ovsiienko <> Reviewed-by: Ferruh Yigit <>
6 daysnet/axgbe: support auto-negotiation for 1GbpsGirish Nandibasappa
Added CL37 Auto-neg support for 1Gbps interface in axgbe DPDK driver Signed-off-by: Girish Nandibasappa <> Acked-by: Ravi Kumar <>
6 daysnet/axgbe: support 1/2.5GbpsGirish Nandibasappa
Added support for 1Gbps and 2.5Gbps in axgbe dpdk driver Signed-off-by: Girish Nandibasappa <> Acked-by: Ravi Kumar <>