dpdk.git
2 years agonet/bnxt: fix RSS action parser
Ajit Khaparde [Tue, 26 Oct 2021 05:14:32 +0000 (22:14 -0700)]
net/bnxt: fix RSS action parser

Minor fixes are needed in the RTE_FLOW RSS action parser.
1. Update the comment in the parser to indicate RSS level 1 implies RSS
   on outer header.
2. RSS action will not be supported if level is > 1.
3. RSS action will not be supported if user or application specifies
   MARK or COUNT action.
4. If RSS types is not specified i.e., is 0, the best effort RSS should
   use IPv4 and IPv6 headers. Currently we are considering only IPv4.

Fixes: 239695f754cb ("net/bnxt: enhance RSS action support")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
2 years agonet/bnxt: fix RSS behavior on Thor
Kalesh AP [Tue, 26 Oct 2021 05:14:30 +0000 (10:44 +0530)]
net/bnxt: fix RSS behavior on Thor

Move the Rx queue state update before bnxt_setup_one_vnic()
is called. For Thor, rxq->rx_started and eth_dev->data->rx_queue_state[]
needs to be set for all queues before bnxt_hwrm_vnic_cfg() or
bnxt_vnic_rss_configure() are called.

Fixes: 0105ea1296c9 ("net/bnxt: support runtime queue setup")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
2 years agonet/mlx5: fix integrity item validation and translation
Gregory Etelson [Tue, 26 Oct 2021 09:25:43 +0000 (12:25 +0300)]
net/mlx5: fix integrity item validation and translation

Integrity item validation and translation must verify that integrity
item bits match L3 and L4 items in flow rule pattern.
For cases when integrity item was positioned before L3 header, such
verification must be split into two stages.
The first stage detects integrity flow item and makes initializations
for the second stage.
The second stage is activated after PMD completes processing of all
flow items in rule pattern. PMD accumulates information about flow
items in flow pattern. When all pattern flow items were processed,
PMD can apply that data to complete integrity item validation
and translation.

Fixes: 79f8952783d0 ("net/mlx5: support integrity flow item")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix integrity match on inner and outer headers
Gregory Etelson [Tue, 26 Oct 2021 09:25:42 +0000 (12:25 +0300)]
net/mlx5: fix integrity match on inner and outer headers

MLX5 PMD can match on integrity bits for inner and outer headers in
a single flow.
That means a single flow rule can reference both inner and outer
integrity bits. That is implemented by adding 2 flow integrity items
to a rule - one item for outer integrity bits and other for
inner integrity bits.
Integrity item `level` parameter specifies what part is being
targeted.

Current PMD treated integrity items for outer and inner headers as
the same.
The patch separates PMD verifications for inner and outer integrity
items.

Fixes: 79f8952783d0 ("net/mlx5: support integrity flow item")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: enhance flow dump
Haifei Luo [Tue, 26 Oct 2021 03:56:32 +0000 (06:56 +0300)]
net/mlx5: enhance flow dump

Multiple rules could use the same encap_decap/modify_hdr/counter action.
The flow dump data could be duplicated.

To avoid redundancy, flow dump value is based on the actions' pointer
instead of previous rules' pointer.

For counter, the data is stored in cmng of priv->sh.
For encap_decap/modify_hdr, the data stored in encaps_decaps/modify_cmds.
Traverse the fields and get action's pointer and information.

Formats are same for information in the dump except "id" stands for
actions' pointer:
    Counter:     rec_type,id,hits,bytes
    Modify_hdr:  rec_type,id,actions_number,actions
    Encap_decap: rec_type,id,buf

Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: optimize device spawn time with representors
Jiawei Wang [Wed, 27 Oct 2021 10:35:10 +0000 (13:35 +0300)]
net/mlx5: optimize device spawn time with representors

During the device spawn process, mlx5 PMD queried the available flow
priorities by calling mlx5_flow_discover_priorities, queried
if the DR drop action was supported on the root table by calling
the mlx5_flow_discover_dr_action_support routine, and queried the
availability of metadata register C by calling mlx5_flow_discover_mreg_c

These functions created the test flows to get the supported fields, and
at the end destroyed the test flows. The test flows in the first two
functions was created on the root table.
If the device was spawned with multiple representors, these test flows
were created and destroyed on each representor as well. The above
operations took a significant amount of init time during the device
spawn.

This patch optimizes the device discover functions, if there is
the device with multiple representors (VF/SF) being spawned,
the priority and drop action and metadata register support check can be
done only ones and check results can be shared for all representors.

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agocommon/mlx5: optimize debug log
Sean Zhang [Mon, 11 Oct 2021 08:46:03 +0000 (11:46 +0300)]
common/mlx5: optimize debug log

Remove debug log inside of mlx5_list_init to avoid flooding debug
messages when creating hash list with large actual size.

Fixes: 9c373c524bae ("common/mlx5: move list utility from net driver")
Cc: stable@dpdk.org
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agonet/mlx5: support socket direct mode bonding
Rongwei Liu [Tue, 26 Oct 2021 08:48:30 +0000 (11:48 +0300)]
net/mlx5: support socket direct mode bonding

In socket direct mode, it's possible to bind any two (maybe four
in future) PCIe devices with IDs like xxxx:xx:xx.x and
yyyy:yy:yy.y. Bonding member interfaces are unnecessary to have
the same PCIe domain/bus/device ID anymore,

Kernel driver uses "system_image_guid" to identify if devices can
be bound together or not. Sysfs "phys_switch_id" is used to get
"system_image_guid" of each network interface.

OFED 5.4+ is required to support "phys_switch_id".

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agocommon/mlx5: support PCIe device GUID query
Rongwei Liu [Tue, 26 Oct 2021 08:48:29 +0000 (11:48 +0300)]
common/mlx5: support PCIe device GUID query

sysfs entry "phys_switch_id" holds each PCIe device'
guid.

The devices which reside in the same physical NIC should
have the same guid.

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/iavf: fix shared data in multi-process
Dapeng Yu [Wed, 27 Oct 2021 08:28:39 +0000 (16:28 +0800)]
net/iavf: fix shared data in multi-process

The shared pointer is initialized to a static local array defined in the
primary process and it shall not be accessed in the secondary process.

This patch copies the local data to shared data, to avoid data access
violation.

Fixes: 040b44551f77 ("net/iavf: unify Rx packet type table")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2 years agonet/ice: fix function pointer in multi-process
Dapeng Yu [Tue, 26 Oct 2021 01:55:42 +0000 (09:55 +0800)]
net/ice: fix function pointer in multi-process

This patch uses the index value to call the function, instead of the
function pointer assignment to save the selection of Receive Flex
Descriptor profile ID.

Otherwise the secondary process will run with wrong function address
from primary process.

Fixes: 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
2 years agonet/ice: workaround DCF reset failure
Dapeng Yu [Tue, 26 Oct 2021 09:53:07 +0000 (17:53 +0800)]
net/ice: workaround DCF reset failure

After DCF is reset by PF, the DCF device un-initialization cannot
function normally, ignore the failure does not help since the kernel
does not clean up resource.

The patch workaround the issue by triggering an additional DCF enable/
disable cycle when a passive reset is detected.

Fixes: 1a86f4dbdf42 ("net/ice: support DCF device reset")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2 years agoethdev: warn once when using port not ready
David Marchand [Wed, 27 Oct 2021 12:01:44 +0000 (14:01 +0200)]
ethdev: warn once when using port not ready

Warning continuously is a pain when developping or if a unit test
is/gets broken.

It could also be a problem if application behaves badly only in some
corner cases and a DoS results of those logs being continuously displayed.

Let's warn once per port and per rx/tx.

Getting such a log is scary, but let's make it more eye catching by
dumping a backtrace with it.

Tested by introducing a bug in testpmd:
 static int
 eth_dev_start_mp(uint16_t port_id)
 {
-       if (is_proc_primary())
+       if (!is_proc_primary())
                return rte_eth_dev_start(port_id);

        return 0;

Then, running a basic null test:
$ ./devtools/test-null.sh
...
Start automatic packet forwarding
io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support
  enabled, MP allocation mode: native
Logical Core 1 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00

lcore 0 called rx_pkt_burst for not ready port 0
8: [build/app/dpdk-testpmd() [0x59e839]]
7: [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7ff481b69555]]
6: [build/app/dpdk-testpmd(main+0x54b) [0x662d24]]
5: [build/app/dpdk-testpmd(start_packet_forwarding+0x263) [0x65e795]]
4: [build/app/dpdk-testpmd() [0x65e1be]]
3: [build/app/dpdk-testpmd() [0x65a996]]
2: [build/app/dpdk-testpmd() [0xa6cbc7]]
1: [build/app/dpdk-testpmd(rte_dump_stack+0x27) [0xaee796]]
lcore 0 called rx_pkt_burst for not ready port 1
8: [build/app/dpdk-testpmd() [0x59e839]]
7: [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7ff481b69555]]
6: [build/app/dpdk-testpmd(main+0x54b) [0x662d24]]
5: [build/app/dpdk-testpmd(start_packet_forwarding+0x263) [0x65e795]]
4: [build/app/dpdk-testpmd() [0x65e1be]]
3: [build/app/dpdk-testpmd() [0x65a996]]
2: [build/app/dpdk-testpmd() [0xa6cbc7]]
1: [build/app/dpdk-testpmd(rte_dump_stack+0x27) [0xaee796]]
  io packet forwarding packets/burst=32
  nb forwarding cores=1 - nb forwarding ports=2
  port 0: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x0

Fixes: c87d435a4d79 ("ethdev: copy fast-path API into separate structure")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2 years agonet/memif: fix driver init with default MTU
Ferruh Yigit [Wed, 27 Oct 2021 09:14:29 +0000 (10:14 +0100)]
net/memif: fix driver init with default MTU

Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
which doesn't include FCS (4 bytes CRC). But ethdev by default uses
frame size with FCS when application doesn't define any explicit value.

As a result device configuration fails because device is tried to be
configured with a frame size length that is bigger than what device
reported as supported. Device reports as max supported frame size is
1514 but configured value is 1518.

Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
driver to report the max supported frame size, this matches to the
initial intention.

Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")

Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2 years agonet/af_packet: fix driver init with default MTU
Ferruh Yigit [Wed, 27 Oct 2021 09:14:28 +0000 (10:14 +0100)]
net/af_packet: fix driver init with default MTU

Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
which doesn't include FCS (4 bytes CRC). But ethdev by default uses
frame size with FCS when application doesn't define any explicit value.

As a result device configuration fails because device is tried to be
configured with a frame size length that is bigger than what device
reported as supported. Device reports as max supported frame size is
1514 but configured value is 1518.

Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
driver to report the max supported frame size, this matches to the
initial intention.

Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")

Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2 years agomem: fix dynamic hugepage mapping in container
Olivier Matz [Fri, 29 Oct 2021 09:53:10 +0000 (11:53 +0200)]
mem: fix dynamic hugepage mapping in container

Since its introduction in 2018, the SIGBUS handler was never registered,
and all related functions were unused.

A SIGBUS can be received by the application when accessing to hugepages
even if mmap() was successful, This happens especially when running
inside containers when there is not enough hugepages. In this case, we
need to recover. A similar scheme can be found in eal_memory.c.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agomalloc: fix allocation with unknown socket ID
Ilyes Ben Hamouda [Fri, 29 Oct 2021 09:49:29 +0000 (11:49 +0200)]
malloc: fix allocation with unknown socket ID

When using rte_malloc() from a thread which is not bound to a numa
socket (the typical case is a control thread, but it can also happen
on a dataplane thread if its cpu affinity is on cores attached to
several sockets), the used heap is the one from numa socket 0, which
may not have available memory.

Fix this by selecting the first socket which has available memory.

Note: malloc_get_numa_socket() is only used from one .c file, so move
it there, and remove the inline keyword.

Fixes: b94580d6887e ("malloc: avoid unknown socket id")
Cc: stable@dpdk.org
Signed-off-by: Ilyes Ben Hamouda <ilyes.ben_hamouda@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agoeal: suggest using --lcores option
David Hunt [Wed, 3 Nov 2021 14:32:28 +0000 (14:32 +0000)]
eal: suggest using --lcores option

If the user requests to use an lcore above 128 using -l,
the eal will exit with "EAL: invalid core list syntax" and
very little else useful information.

This patch adds some extra information suggesting to use --lcores
so that physical cores above RTE_MAX_LCORE (default 128) can be
used. This is achieved by using the --lcores option by mapping
the logical cores in the application to physical cores.

For example, if "-l 12-16,130,132" is used, we see the following
additional output on the command line:

EAL: lcore 132 >= RTE_MAX_LCORE (128)
EAL: lcore 133 >= RTE_MAX_LCORE (128)
EAL: To use high physical core ids, please use --lcores to map them
to lcore ids below RTE_MAX_LCORE,
EAL: e.g. --lcores 0@12,1@13,2@14,3@15,4@16,5@132,6@133

The same is added to -c option parsing.

For example, if "-c 0x300000000000000000000000000000000" is
used, we see the following additional output on the command line:

EAL: lcore 128 >= RTE_MAX_LCORE (128)
EAL: lcore 129 >= RTE_MAX_LCORE (128)
EAL: To use high physical core ids, please use --lcores to map them
to lcore ids below RTE_MAX_LCORE,
EAL: e.g. --lcores 0@128,1@129

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agoapp/flow-perf: add destination ports parameter
Sean Zhang [Fri, 29 Oct 2021 05:52:51 +0000 (08:52 +0300)]
app/flow-perf: add destination ports parameter

Add optional destination ports parameter for port-id action.
The parameter is not must, and the value is 1 by default as before
if the parameter not provided.

For example:

$ dpdk-test-flow-perf -w 08:00.0,representor=[0,1] -- --transfer \
  --ingress --transfer --ether --portmask=0x2 --vxlan-encap \
  --port-id=0

This command means the rule created on representor 0 with port 0
as destination, since the portmask is 0x2 and dst-ports is 0:

$ dpdk-test-flow-perf -w 08:00.0,representor=[0,1] \
  -w 08:00.1,representor=[0,1]-- --transfer --ingress --transfer \
  --ether --portmask=0x12 --vxlan-encap --port-id=0,3

This command means the rules created on both representor 0 of PF 0
and PF 1, the destination port for the first representor is PF 0,
and the destination port for the other one is PF 1.

Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
Reviewed-by: Wisam Jaddo <wisamm@nvidia.com>
2 years agoeal: promote non-EAL lcore API as stable
David Marchand [Fri, 22 Oct 2021 06:55:28 +0000 (08:55 +0200)]
eal: promote non-EAL lcore API as stable

This API has been around for more than a year (and is in LTS 20.11).
It did not receive negative feedback and will be used in a next OVS
release.
Mark it stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2 years agobpf: fix convert API when libpcap missing
Konstantin Ananyev [Wed, 3 Nov 2021 11:17:47 +0000 (11:17 +0000)]
bpf: fix convert API when libpcap missing

rte_bpf_convert() implementation depends on libpcap.
Right now it is defined only when this library is installed and
RTE_PORT_PCAP is defined.
Fix that by providing for such case stub rte_bpf_convert()
implementation that will always return an error.
To draw user attention, if proper implementation is disabled,
warning will be thrown at meson configure stage.
Also move stub for another function (rte_bpf_elf_load) into
the same place (bpf_stub.c).

Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2 years agobpf: fix doxygen comment
Konstantin Ananyev [Wed, 3 Nov 2021 11:17:46 +0000 (11:17 +0000)]
bpf: fix doxygen comment

Fix typo in doxygen comments for rte_bpf_convert().

Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2 years agopipeline: remove unreachable branch
David Marchand [Wed, 3 Nov 2021 06:56:58 +0000 (07:56 +0100)]
pipeline: remove unreachable branch

A previous change blamed it on compiler/ASan, while this is a real
(yet minor) issue.

This return -EINVAL is never reached since we test all combinations of
fidx and fcin booleans.
All branches end up with a return 0, factorize them.

Fixes: 84f5ac9418ea ("pipeline: fix build with ASan")
Fixes: f38913b7fb8e ("pipeline: add meter array to SWX")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2 years agopipeline: fix dead code
Yogesh Jangra [Wed, 27 Oct 2021 22:15:54 +0000 (18:15 -0400)]
pipeline: fix dead code

Fix minor dead code issue reported by Coverity.

Coverity issue: 373653
Fixes: e9d870 ("pipeline: add SWX pipeline tables")

Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2 years agoexamples/ip_pipeline: support PIE congestion management
Wojciech Liguzinski [Thu, 4 Nov 2021 11:03:35 +0000 (11:03 +0000)]
examples/ip_pipeline: support PIE congestion management

Adding the PIE support for IP Pipeline

Signed-off-by: Wojciech Liguzinski <wojciechx.liguzinski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2 years agoexamples/qos_sched: support PIE congestion management
Wojciech Liguzinski [Thu, 4 Nov 2021 11:03:34 +0000 (11:03 +0000)]
examples/qos_sched: support PIE congestion management

patch add support enable PIE or RED by
parsing config file.

Signed-off-by: Wojciech Liguzinski <wojciechx.liguzinski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2 years agosched: add PIE based congestion management
Wojciech Liguzinski [Thu, 4 Nov 2021 11:03:33 +0000 (11:03 +0000)]
sched: add PIE based congestion management

Implement PIE based congestion management based on rfc8033.

The Proportional Integral Controller Enhanced (PIE) algorithm works
by proactively dropping packets randomly.
PIE is implemented as more advanced queue management is required to
address the bufferbloat problem and provide desirable quality of
service to users.

Tests for PIE code added to test application.
Added PIE related information to documentation.

Signed-off-by: Wojciech Liguzinski <wojciechx.liguzinski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2 years agobus/pci: fix use after free on unplug
David Marchand [Wed, 3 Nov 2021 11:16:15 +0000 (12:16 +0100)]
bus/pci: fix use after free on unplug

rte_pci_unmap_device() needs intr_handle objects to unregister
callbacks.

Bugzilla ID: 845
Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Yan Xia <yanx.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2 years agoeal/linux: fix device hotplug
David Marchand [Tue, 2 Nov 2021 07:52:58 +0000 (08:52 +0100)]
eal/linux: fix device hotplug

The device event interrupt handler was always freed.

Bugzilla ID: 845
Fixes: c2bd9367e18f ("lib: remove direct access to interrupt handle")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Yan Xia <yanx.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2 years agoeal/linux: fix uevent message parsing
David Marchand [Tue, 2 Nov 2021 18:40:20 +0000 (19:40 +0100)]
eal/linux: fix uevent message parsing

Caught with ASan:
==9727==ERROR: AddressSanitizer: stack-buffer-overflow on address
  0x7f0daa2fc0d0 at pc 0x7f0daeefacb2 bp 0x7f0daa2fadd0 sp 0x7f0daa2fa578
READ of size 1 at 0x7f0daa2fc0d0 thread T1
    #0 0x7f0daeefacb1  (/lib64/libasan.so.5+0xbacb1)
    #1 0x115eba1 in dev_uev_parse ../lib/eal/linux/eal_dev.c:167
    #2 0x115f281 in dev_uev_handler ../lib/eal/linux/eal_dev.c:248
    #3 0x1169b91 in eal_intr_process_interrupts
  ../lib/eal/linux/eal_interrupts.c:1026
    #4 0x116a3a2 in eal_intr_handle_interrupts
  ../lib/eal/linux/eal_interrupts.c:1100
    #5 0x116a7f0 in eal_intr_thread_main
  ../lib/eal/linux/eal_interrupts.c:1172
    #6 0x112640a in ctrl_thread_init
  ../lib/eal/common/eal_common_thread.c:202
    #7 0x7f0dade27159 in start_thread (/lib64/libpthread.so.0+0x8159)
    #8 0x7f0dadb58f72 in clone (/lib64/libc.so.6+0xfcf72)

Address 0x7f0daa2fc0d0 is located in stack of thread T1 at offset 4192
  in frame
    #0 0x115f0c9 in dev_uev_handler ../lib/eal/linux/eal_dev.c:226

  This frame has 2 object(s):
    [32, 48) 'uevent'
    [96, 4192) 'buf' <== Memory access at offset 4192 overflows this
  variable
HINT: this may be a false positive if your program uses some custom
  stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
Thread T1 created by T0 here:
    #0 0x7f0daee92ea3 in __interceptor_pthread_create
  (/lib64/libasan.so.5+0x52ea3)
    #1 0x1126542 in rte_ctrl_thread_create
  ../lib/eal/common/eal_common_thread.c:228
    #2 0x116a8b5 in rte_eal_intr_init
  ../lib/eal/linux/eal_interrupts.c:1200
    #3 0x1159dd1 in rte_eal_init ../lib/eal/linux/eal.c:1044
    #4 0x7a22f8 in main ../app/test-pmd/testpmd.c:4105
    #5 0x7f0dada7f802 in __libc_start_main (/lib64/libc.so.6+0x23802)

Bugzilla ID: 792
Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Yan Xia <yanx.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2 years agoeal/linux: remove unused variable for socket memory
Jim Harris [Fri, 29 Oct 2021 17:14:10 +0000 (17:14 +0000)]
eal/linux: remove unused variable for socket memory

clang-13 rightfully complains that the total_mem variable in
eal_parse_socket_arg is set but not used, since the final
accumulated total_mem result isn't used anywhere.
So just remove the total_mem variable.

Fixes: 0a703f0f36c1 ("eal/linux: fix parsing zero socket memory and limits")

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2 years agofib: add RIB extension size parameter
Vladimir Medvedkin [Wed, 27 Oct 2021 15:49:40 +0000 (16:49 +0100)]
fib: add RIB extension size parameter

This patch adds a new parameter to the FIB configuration to specify
the size of the extension for internal RIB structure.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Tested-by: Conor Walsh <conor.walsh@intel.com>
2 years agoeal: fix device iterator when no bus is selected
Xueming Li [Wed, 27 Oct 2021 08:22:21 +0000 (16:22 +0800)]
eal: fix device iterator when no bus is selected

Devargs used in device iterator initialization wasn't set to zero, random
data like bus string lead to invalid address access.

This patch initializes devargs.

Bugzilla ID: 862
Fixes: c99a2d4c6b7f ("eal: implement device iteration initialization")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
2 years agohash: fix use after free in Toeplitz hash
Vladimir Medvedkin [Fri, 29 Oct 2021 14:54:59 +0000 (15:54 +0100)]
hash: fix use after free in Toeplitz hash

This patch fixes use after free in thash library, reported by ASAN.

Bugzilla ID: 868
Fixes: 28ebff11c2dc ("hash: add predictable RSS")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2 years agotest/mbuf: fix access to freed memory
Olivier Matz [Fri, 29 Oct 2021 12:15:44 +0000 (14:15 +0200)]
test/mbuf: fix access to freed memory

Seen by ASan.

In the external buffer mbuf test, we check that the buffer is freed
by checking that its refcount is 0.
This is not a valid condition, because it accesses to an already
freed area.

Fix this by setting a boolean flag in the callback when rte_free()
is actually called, and check this flag instead.

Bugzilla ID: 867
Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2 years agotest/cmdline: fix memory leak
David Marchand [Fri, 29 Oct 2021 11:23:15 +0000 (13:23 +0200)]
test/cmdline: fix memory leak

Previous change wrongly removed cmdline_free().

Fixes: 6ad06203a587 ("cmdline: free on exit")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2 years agotest/thash: add performance tests for Toeplitz hash
Vladimir Medvedkin [Tue, 2 Nov 2021 18:38:25 +0000 (18:38 +0000)]
test/thash: add performance tests for Toeplitz hash

This patch adds performance tests for the following Toeplitz hash
function implementations:
  Scalar:
    - rte_softrss()
    - rte_softrss_be()
  Vector using gfni:
    - rte_thash_gfni()
    - rte_thash_gfni_bulk()

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
2 years agohash: enable GFNI Toeplitz hash implementation
Vladimir Medvedkin [Tue, 2 Nov 2021 18:38:24 +0000 (18:38 +0000)]
hash: enable GFNI Toeplitz hash implementation

This patch enables new GFNI Toeplitz hash in
predictable RSS library.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2 years agohash: add bulk Toeplitz hash implementation
Vladimir Medvedkin [Tue, 2 Nov 2021 18:38:23 +0000 (18:38 +0000)]
hash: add bulk Toeplitz hash implementation

This patch adds a bulk version for the Toeplitz hash implemented
with Galios Fields New Instructions (GFNI).

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2 years agohash: add new Toeplitz hash implementation
Vladimir Medvedkin [Tue, 2 Nov 2021 18:38:22 +0000 (18:38 +0000)]
hash: add new Toeplitz hash implementation

This patch add a new Toeplitz hash implementation using
Galios Fields New Instructions (GFNI).

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2 years agoconfig/ppc: fix native build with GCC 4.8.5 on RHEL 7
David Christensen [Wed, 3 Nov 2021 20:01:26 +0000 (13:01 -0700)]
config/ppc: fix native build with GCC 4.8.5 on RHEL 7

The POWER meson.build file incorrectly checks if the detected CPU is
"greater than" POWER8 when it should actually test for "greater than or
equal to" POWER8.  Fixed the comparison operator.

Bugzilla ID: 875
Fixes: 750196880843 ("config/ppc: select instruction set for IBM Power10")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
2 years agoregex/mlx5: prevent double setup of queue pair
Ady Agbarih [Fri, 22 Oct 2021 15:45:59 +0000 (15:45 +0000)]
regex/mlx5: prevent double setup of queue pair

When mlx5_regex_qp_setup() is called, make sure
the provided QP is not already setup.

Signed-off-by: Ady Agbarih <adypodoman@gmail.com>
Acked-by: Ori Kam <orika@nvidia.com>
2 years agoregex/mlx5: remove RXP CSR file
Francis Kelly [Fri, 22 Oct 2021 15:45:57 +0000 (15:45 +0000)]
regex/mlx5: remove RXP CSR file

The mlx5_rxp_csrs.h file has been deprecated as
its contents has now been moved to FW.

Signed-off-by: Francis Kelly <fkelly@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2 years agoregex/mlx5: remove engine start/stop commands
Ady Agbarih [Fri, 22 Oct 2021 15:45:56 +0000 (15:45 +0000)]
regex/mlx5: remove engine start/stop commands

Remove the engine start/stop DevX commands,
as they have been deprecated and moved to FW.

Signed-off-by: Ady Agbarih <adypodoman@gmail.com>
2 years agoregex/mlx5: move RXP to CrSpace
Ady Agbarih [Fri, 22 Oct 2021 15:45:55 +0000 (15:45 +0000)]
regex/mlx5: move RXP to CrSpace

Add patch for programming the regex database through ROF file,
using the firmware instead of manually through the software.
No need to setup the DB anymore, the regex-daemon is responsible
for that always.
In the new flow the regex driver only has to program ROF rules
by using set params DevX cmd, requires ROF mkey creation.
The rules file has to be read into 4KB aligned memory.

Signed-off-by: Ady Agbarih <adypodoman@gmail.com>
Acked-by: Ori Kam <orika@nvidia.com>
2 years agoregex/mlx5: remove register read/write
Ady Agbarih [Fri, 22 Oct 2021 15:45:54 +0000 (15:45 +0000)]
regex/mlx5: remove register read/write

Remove the set/query regexp register commands from DevX.
Remove functions that used these commands.
Remove manual rules programming.

Signed-off-by: Ady Agbarih <adypodoman@gmail.com>
Acked-by: Ori Kam <orika@nvidia.com>
2 years agocommon/mlx5: update regex DevX commands
Ady Agbarih [Fri, 22 Oct 2021 15:45:53 +0000 (15:45 +0000)]
common/mlx5: update regex DevX commands

This patch modifies the SET_REGEXP_PARAMS DevX command as follows:

Remove DB setup DevX command. The command is no longer needed
in DPDK, it will always be invoked by the regex-daemon.

Add new DevX command, for programming ROF rules for a specific engine.
The command takes as an input an mkey of the ROF.
It also introduces a new field_select bit.

Signed-off-by: Ady Agbarih <adypodoman@gmail.com>
Acked-by: Ori Kam <orika@nvidia.com>
2 years agoregex/mlx5: add cleanup on stop
Ori Kam [Fri, 22 Oct 2021 15:45:52 +0000 (15:45 +0000)]
regex/mlx5: add cleanup on stop

When stopping the device we should release all
data allocated.

After rte_regexdev_configure(), the QPs are pre-allocated,
and will be configured only in rte_regexdev_queue_pair_setup().
That's why the QP jobs array initialization is checked
before attempting to destroy the QP.

Signed-off-by: Ori Kam <orika@nvidia.com>
Signed-off-by: Ady Agbarih <adypodoman@gmail.com>
2 years agocommon/mlx5: update PRM definitions for regex
Ady Agbarih [Fri, 22 Oct 2021 15:45:51 +0000 (15:45 +0000)]
common/mlx5: update PRM definitions for regex

Update PRM hca capabilities definitions as follows:
regexp_version field added - specifies whether BF2 or BF3
regexp field removed
regexp_params field moved
regexp_log_crspace_size field removed
regexp_mmo added - specifies if using regex mmo wqe is supported

Allow regex only if both regexp_params and regexp_mmo are set,
instead of checking regexp_mmo only.

Check version through the new capability field regexp_version instead
of reading crspace register.

Signed-off-by: Ady Agbarih <adypodoman@gmail.com>
Acked-by: Ori Kam <orika@nvidia.com>
2 years agotest/mempool: fix no-huge mode
Dmitry Kozlyuk [Tue, 2 Nov 2021 10:08:17 +0000 (12:08 +0200)]
test/mempool: fix no-huge mode

Amount of locked memory for regular users is limited,
it is usually 64 KB by default.
Hitting this limit in rte_mempool_populate_anon()
resulted in not populating the mempool, and a test case failure:

    EAL: Test assert test_mempool_events line 585 failed: Failed to populate mempool empty1: Success
    test failed at test_mempool():1019
    Test Failed

Decrease the amount of mapped anonymous memory to fit the limit.
While there, make all function-local constants lowercase.

Fixes: 11541c5c81dd ("mempool: add non-IO flag")

Reported-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
2 years agotest/mempool: fix test on FreeBSD
Dmitry Kozlyuk [Tue, 2 Nov 2021 10:08:16 +0000 (12:08 +0200)]
test/mempool: fix test on FreeBSD

FreeBSD EAL does not implement rte_mem_virt2iova() causing an error:

    EAL: Test assert test_mempool_flag_non_io_unset_when_populated_with_valid_iova
    line 781 failed: Cannot get IOVA
    test failed at test_mempool():1030
    Test Failed

Change unit test to use rte_memzone_reserve() to allocate memory,
which allows to obtain IOVA directly.

Bugzilla ID: 863
Fixes: 11541c5c81dd ("mempool: add non-IO flag")

Reported-by: Yu Jiang <yux.jiang@intel.com>
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
2 years agoeal/freebsd: fix IOVA mode selection
Dmitry Kozlyuk [Tue, 2 Nov 2021 10:08:15 +0000 (12:08 +0200)]
eal/freebsd: fix IOVA mode selection

FreeBSD EAL selected IOVA mode PA even in --no-huge mode
where PA are not available. Memory zones were created with IOVA
equal to RTE_BAD_IOVA with no indication this field is not usable.

Change IOVA mode detection:
1. Always allow to force --iova-mode=va.
2. In --no-huge mode, disallow forcing --iova-mode=pa, and select VA.
3. Otherwise select IOVA mode according to bus requests, default to PA.
In case contigmem is inaccessible, memory initialization will fail
with a message indicating the cause.

Fixes: c2361bab70c5 ("eal: compute IOVA mode based on PA availability")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agodistributor: use wait until scheme
Feifei Wang [Mon, 1 Nov 2021 06:00:07 +0000 (14:00 +0800)]
distributor: use wait until scheme

Instead of polling for bufptr64 to be updated, use
wait until scheme for this case.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agobpf: use wait until scheme for Rx/Tx iteration
Feifei Wang [Mon, 1 Nov 2021 06:00:06 +0000 (14:00 +0800)]
bpf: use wait until scheme for Rx/Tx iteration

Instead of polling for cbi->use to be updated, use wait until scheme.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2 years agomcslock: use wait until scheme for unlock
Feifei Wang [Mon, 1 Nov 2021 06:00:05 +0000 (14:00 +0800)]
mcslock: use wait until scheme for unlock

Instead of polling for mcslock to be updated, use wait until scheme
for this case.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agopflock: use wait until scheme for read lock
Feifei Wang [Mon, 1 Nov 2021 06:00:04 +0000 (14:00 +0800)]
pflock: use wait until scheme for read lock

Instead of polling for read pflock update, use wait until scheme for
this case.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agoeal: add a new helper for wait until scheme
Feifei Wang [Mon, 1 Nov 2021 06:00:03 +0000 (14:00 +0800)]
eal: add a new helper for wait until scheme

Add a new generic helper which is a macro for wait until scheme.

Furthermore, to prevent compilation warning in arm:
----------------------------------------------
'warning: implicit declaration of function ...'
----------------------------------------------
Delete 'undef' constructions for '__LOAD_EXC_xx', '__SEVL' and '__WFE'.
And add â€˜__RTE_ARM’ for these macros to fix the namespace.
This is because original macros are undefine at the end of the file.
If the new macro calls them in other files, they will be seen as
'not defined'.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2 years agobuildtools: fix build with Meson 0.60
Bruce Richardson [Mon, 1 Nov 2021 17:03:26 +0000 (17:03 +0000)]
buildtools: fix build with Meson 0.60

Meson 0.60 switched the format of uninstalled static libraries
to thin archives, that is, they contain only paths to object files,
not the files themselves. Files cannot be extracted in this case,
resulting in build errors:

    ar: `x' cannot be used on thin archives.

Handle thin archives when invoking pmdinfogen by directly using the
files referenced in the archive, when they already exist, and extracting
them if not.

Bugzilla ID: 836
Fixes: e6e9730c7066 ("buildtools: support object file extraction for Windows")
Cc: stable@dpdk.org
Reported-by: Michal Berger <michallinuxstuff@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agopdump: fix freeing statistics memzone
Konstantin Ananyev [Tue, 26 Oct 2021 11:53:01 +0000 (12:53 +0100)]
pdump: fix freeing statistics memzone

rte_pdump_init() always allocates new memzone for pdump_stats.
Though rte_pdump_uninit() never frees it.
So the following combination will always fail:
rte_pdump_init(); rte_pdump_uninit(); rte_pdump_init();
The issue was caught by pdump_autotest UT.
While first test run successful, any consecutive runs
of this test-case will fail.
Fix the issue by calling rte_memzone_free() for statistics memzone.

Fixes: 10f726efe26c ("pdump: support pcapng and filtering")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agodevtools: forbid indent with tabs in Meson
David Marchand [Fri, 22 Oct 2021 20:55:31 +0000 (22:55 +0200)]
devtools: forbid indent with tabs in Meson

The rule for indentation in Meson in DPDK is 4 spaces.

Any tab should be flagged as an issue, let's extend the check and fix
existing offenders.

Fixes: 4ad4b20a7905 ("drivers: change indentation in build files")
Fixes: 2457705e6474 ("crypto/cnxk: add driver skeleton")
Fixes: 634b73104482 ("app/testpmd: build on Windows")
Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")
Fixes: 8ef09fdc506b ("build: add optional NUMA and CPU counts detection")
Fixes: e1369718f553 ("common/octeontx: enable build only on 64-bit Linux")
Fixes: 2b504721bfda ("app/bbdev: enable la12xx")
Fixes: 6cc51b1293ce ("mem: instrument allocator for ASan")
Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework")
Fixes: 918fd2f1466b ("crypto/ipsec_mb: move aesni_mb PMD")
Fixes: 746825e5c0ea ("crypto/ipsec_mb: move aesni_gcm PMD")
Fixes: bc9ef81c42b4 ("crypto/ipsec_mb: move kasumi PMD")
Fixes: 4f1cfda59ad3 ("crypto/ipsec_mb: move snow3g PMD")
Fixes: cde8df1bda9d ("crypto/ipsec_mb: move zuc PMD")
Fixes: f16662885472 ("crypto/ipsec_mb: add chacha_poly PMD")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agoci: fix aarch64 cross compilation in GHA
David Marchand [Fri, 29 Oct 2021 11:27:57 +0000 (13:27 +0200)]
ci: fix aarch64 cross compilation in GHA

CC_FOR_BUILD is a Travis env variable.
This results in GHA aarch64 cross compilation jobs building x86
binaries.

Example in a recent job on main branch:
2021-10-28T09:51:06.4976495Z + .ci/linux-build.sh
2021-10-28T09:51:06.4985674Z + [ -n build ]
2021-10-28T09:51:06.4987636Z + [ true = true ]
2021-10-28T09:51:06.4987991Z + [  = gcc ]
2021-10-28T09:51:06.4989419Z + [  = clang ]
2021-10-28T09:51:06.4990907Z + [ false = true ]
2021-10-28T09:51:06.4991348Z + [ false = true ]
2021-10-28T09:51:06.4992846Z + [ static = static ]
2021-10-28T09:51:06.4993550Z + OPTS= -Dexamples=l2fwd,l3fwd
2021-10-28T09:51:06.4995388Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic
2021-10-28T09:51:06.4996279Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static
2021-10-28T09:51:06.4998553Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static --buildtype=debugoptimized
2021-10-28T09:51:06.4999949Z + OPTS= -Dexamples=l2fwd,l3fwd
-Dplatform=generic --default-library=static --buildtype=debugoptimized
-Dcheck_includes=true
2021-10-28T09:51:06.5002643Z + meson build --werror
-Dexamples=l2fwd,l3fwd -Dplatform=generic --default-library=static
--buildtype=debugoptimized -Dcheck_includes=true

common/cnxk has issues with Ubuntu 18.04 cross compiler.
It is a known issue (https://bugs.dpdk.org/show_bug.cgi?id=697), disable
it.

Fixes: 5d0b4ffa6964 ("ci: add aarch64 clang cross-compilation Travis builds")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2 years agopdump: fix packet snapshot length initialization
Stephen Hemminger [Wed, 27 Oct 2021 18:08:47 +0000 (11:08 -0700)]
pdump: fix packet snapshot length initialization

If packet dump was enabled via pdump_enable_by_deviceid
the packet snapshot length was not being set.

Bugzilla ID: 840
Fixes: 10f726efe26c ("pdump: support pcapng and filtering")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agopcapng: use new ethdev namespace
Stephen Hemminger [Fri, 29 Oct 2021 21:50:12 +0000 (14:50 -0700)]
pcapng: use new ethdev namespace

RTE_ prefix was added by
commit 295968d17407 ("ethdev: add namespace")

Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2 years agomem: instrument allocator for ASan
Zhihong Peng [Wed, 20 Oct 2021 07:46:41 +0000 (15:46 +0800)]
mem: instrument allocator for ASan

This patch adds necessary hooks in the memory allocator for ASan.

This feature is currently available in DPDK only on Linux x86_64.
If other OS/architectures want to support it, ASAN_SHADOW_OFFSET must be
defined and RTE_MALLOC_ASAN must be set accordingly in meson.

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2 years agobuild: enable AddressSanitizer
Zhihong Peng [Wed, 20 Oct 2021 07:46:40 +0000 (15:46 +0800)]
build: enable AddressSanitizer

AddressSanitizer [1] a.k.a. ASan is a widely-used debugging tool to
detect memory access errors.
It helps to detect issues like use-after-free, various kinds of buffer
overruns in C/C++ programs, and other similar errors, as well as
printing out detailed debug information whenever an error is detected.

ASan is integrated with gcc and clang and can be enabled via a meson
option: -Db_sanitize=address
See the documentation for details (especially regarding clang).

Enabling ASan has an impact on performance since additional checks are
added to generated binaries.

Enabling ASan with Windows is currently not supported in DPDK.

1: https://github.com/google/sanitizers/wiki/AddressSanitizer

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2 years agoexamples/performance-thread: fix build with ASan
Zhihong Peng [Wed, 20 Oct 2021 07:46:43 +0000 (15:46 +0800)]
examples/performance-thread: fix build with ASan

Code changes to avoid the following build error:
"strncpy specified bound XX equals destination size".

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agopipeline: fix build with ASan
Zhihong Peng [Wed, 20 Oct 2021 07:46:42 +0000 (15:46 +0800)]
pipeline: fix build with ASan

Code changes to avoid the following build error:
"Control reaches end of non-void function".

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2 years agobus/pci: resize interrupt event list only for MSIX
David Marchand [Fri, 29 Oct 2021 07:38:19 +0000 (09:38 +0200)]
bus/pci: resize interrupt event list only for MSIX

Resizing event list only makes sense in MSIX case.

Besides, event list has always been RTE_MAX_RXTX_INTR_VEC_ID large.
Let's restore this assumption for code that might rely on this property
and only enlarge the event list when necessary.

Bugzilla ID: 843, 865
Fixes: 8cb5d08db940 ("interrupts: extend event list")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
2 years agodoc: clarify SRIOV activation with built-in VFIO
Anatoly Burakov [Wed, 27 Oct 2021 15:37:14 +0000 (15:37 +0000)]
doc: clarify SRIOV activation with built-in VFIO

Currently, the documentation only contains instructions for enabling
SRIOV support for VFIO compiled as a module, but doesn't have any
instructions on how to do the same for cases where VFIO is built-in.
Add these instructions.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2 years agovfio: fix partial unmap
Anatoly Burakov [Tue, 26 Oct 2021 13:26:44 +0000 (13:26 +0000)]
vfio: fix partial unmap

Partial unmap support was introduced in commit c13ca4e81cac
("vfio: fix DMA mapping granularity for IOVA as VA"), and with it
was added a check that dereferenced the IOMMU type to determine whether
partial ummapping is supported for currently configured IOMMU type. In
certain circumstances (such as when VFIO is supported, but no devices
were bound to the VFIO driver), the IOMMU type pointer can be NULL.

However, dereferencing of IOMMU type was guarded by access to the user
maps list - that is, we were always checking the user map list first,
and then, if we found a memory region that encloses the one we're trying
to unmap, we would have performed the IOMMU type check.

This ensured that the IOMMU type check will not cause any NULL pointer
dereferences, because in order for an IOMMU type check to have been
performed, there necessarily must have been at least one memory region
that was previously mapped successfully, and that implies having a
defined IOMMU type.

When commit 56259f7fc010 ("vfio: allow partially unmapping adjacent
memory") was introduced, the IOMMU type check was moved to
before we were traversing the user mem maps list, thereby introducing a
potential NULL dereference, because the IOMMU type access was no longer
guarded by the user mem maps list traversal.

Fix the issue by moving the IOMMU type check to after the user mem maps
traversal, thereby ensuring that by the time the check happens, the
IOMMU type is always valid.

Fixes: 56259f7fc010 ("vfio: allow partially unmapping adjacent memory")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Xuan Ding <xuan.ding@intel.com>
2 years agodma/idxd: fix truncated error code in status check
Kevin Laatz [Tue, 26 Oct 2021 14:20:45 +0000 (14:20 +0000)]
dma/idxd: fix truncated error code in status check

When checking if the DMA device is active, the result of the operand will
always be zero since the err_code is truncated to 8 bits which makes
checking the 31st bit impossible.

This is fixed by changing the type of err_code to uint32_t so that it is
not truncated.

Coverity issue: 373657
Fixes: 9449330a8458 ("dma/idxd: create dmadev instances on PCI probe")

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agoexamples/dma: rename ioat application example
Kevin Laatz [Tue, 26 Oct 2021 13:14:32 +0000 (13:14 +0000)]
examples/dma: rename ioat application example

Since the APIs have been updated from rawdev to dmadev, the application
should also be renamed to match. This patch also includes the documentation
updates for the renaming.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agoexamples/ioat: update naming to match change to dmadev
Kevin Laatz [Tue, 26 Oct 2021 13:14:31 +0000 (13:14 +0000)]
examples/ioat: update naming to match change to dmadev

Existing functions, structures, defines etc need to be updated to reflect
the change to using the dmadev APIs.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agoexamples/ioat: port application to dmadev API
Kevin Laatz [Tue, 26 Oct 2021 13:14:30 +0000 (13:14 +0000)]
examples/ioat: port application to dmadev API

The dmadev library abstraction allows applications to use the same APIs for
all DMA device drivers in DPDK. This patch updates the ioatfwd application
to make use of the new dmadev APIs, in turn making it a generic application
which can be used with any of the DMA device drivers.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agoexamples/ioat: add signal-triggered device dump
Kevin Laatz [Tue, 26 Oct 2021 13:14:29 +0000 (13:14 +0000)]
examples/ioat: add signal-triggered device dump

Enable dumping device info via the signal handler. With this change, when a
SIGUSR1 is issued, the application will print a dump of all devices being
used by the application.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agoexamples/ioat: add option to control stats print interval
Kevin Laatz [Tue, 26 Oct 2021 13:14:28 +0000 (13:14 +0000)]
examples/ioat: add option to control stats print interval

Add a command line option to control the interval between stats prints.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agoexamples/ioat: add option to control maximum frame size
Konstantin Ananyev [Tue, 26 Oct 2021 13:14:27 +0000 (13:14 +0000)]
examples/ioat: add option to control maximum frame size

Add command line option for setting the max frame size.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agoexamples/ioat: add option to control DMA batch size
Konstantin Ananyev [Tue, 26 Oct 2021 13:14:26 +0000 (13:14 +0000)]
examples/ioat: add option to control DMA batch size

Add a commandline options to control the HW copy batch size in the
application.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agoexamples/ioat: use always same lcore for enqueue/dequeue
Konstantin Ananyev [Tue, 26 Oct 2021 13:14:25 +0000 (13:14 +0000)]
examples/ioat: use always same lcore for enqueue/dequeue

Few changes in ioat sample behaviour:
- Always do SW copy for packet metadata (mbuf fields)
- Always use same lcore for both DMA requests enqueue and dequeue

Main reasons for that:
a) it is safer, as idxd PMD doesn't support MT safe enqueue/dequeue (yet).
b) sort of more apples to apples comparison with sw copy.
c) from my testing things are faster that way.

Documentation updates to reflect these changes are also included.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2 years agotest: fix ring PMD initialisation
Konstantin Ananyev [Tue, 26 Oct 2021 11:19:43 +0000 (12:19 +0100)]
test: fix ring PMD initialisation

(bitratestats_autotest|latencystats_autotest|pdump_autotest) tests
generate a log of error messages like that:

test_packet_forward() line 104: Error sending packet to port 0
Send pkts Failed

These tests use of app/test/sample_packet_forward.* code.
This code creates a portid from a ring, but doesn't properly
configure/start it.
The fix adds code to configure/start given port before usage.

Fixes: 7a0935239b9e ("ethdev: make fast-path functions to use new flat array")
Fixes: a52966cd48fd ("test: add helpers using ring PMD Rx/Tx")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
2 years agoversion: 21.11-rc1
Thomas Monjalon [Mon, 25 Oct 2021 20:42:47 +0000 (22:42 +0200)]
version: 21.11-rc1

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2 years agomaintainers: update for oxteontx2 regex
Liron Himi [Mon, 11 Oct 2021 18:23:43 +0000 (21:23 +0300)]
maintainers: update for oxteontx2 regex

Removing Guy Kaneti
Adding Liron Himi

Signed-off-by: Liron Himi <lironh@marvell.com>
2 years agomaintainers: update for NTB
Junfeng Guo [Mon, 18 Oct 2021 06:32:44 +0000 (14:32 +0800)]
maintainers: update for NTB

Remove Xiaoyun and add Junfeng.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
2 years agousertools/devbind: conform to PEP8 recommended style
Stephen Hemminger [Wed, 1 Sep 2021 21:27:07 +0000 (14:27 -0700)]
usertools/devbind: conform to PEP8 recommended style

This fixes most of the warnings from the Flake8 style checker.
The ones remaining are long lines (we allow > 79 characters)
and a line break warning.  The line break style changed in later
versions of PEP 8 and the tool is not updated.

https://www.flake8rules.com/rules/W503.html

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agoexamples/l2fwd: add promiscuous mode option
Sarosh Arif [Wed, 13 Oct 2021 07:23:03 +0000 (12:23 +0500)]
examples/l2fwd: add promiscuous mode option

The default behaviour of l2fwd is to exit if we are unable to turn
promiscuous mode on. On some aws instances turning promiscuous mode
on is not permitted. In such cases there should be a way to run the
application without promiscuous mode.

This patch allows user to turn promiscuous mode on via command line
parameter. l3fwd has a similar option available.

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agoapp/flow-perf: export some config as runtime options
Wisam Jaddo [Mon, 4 Oct 2021 12:55:13 +0000 (15:55 +0300)]
app/flow-perf: export some config as runtime options

Some options are needed in the runtime many times, so leaving
it during compilation is not correct. As a result some options
has been exported into command line options to be used at run
time.

The options exported are:
--txq=N
--rxq=N
--txd=N
--rxd=N
--mbuf-size=N
--mbuf-cache-size=N
--total-mbuf-count=N

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
2 years agotest: test control thread creation
Honnappa Nagarahalli [Thu, 21 Oct 2021 21:32:21 +0000 (16:32 -0500)]
test: test control thread creation

Add a testcase to test launching of control threads.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2 years agoeal: simplify control thread creation
Honnappa Nagarahalli [Thu, 21 Oct 2021 21:32:20 +0000 (16:32 -0500)]
eal: simplify control thread creation

Remove the usage of pthread barrier and replace it with
synchronization using atomic variable.
This also removes the use of reference count required to synchronize
freeing the memory.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2 years agointerrupts: extend event list
Harman Kalra [Fri, 22 Oct 2021 20:49:32 +0000 (02:19 +0530)]
interrupts: extend event list

Dynamically allocating the efds and elist array of intr_handle
structure, based on size provided by user. Eg size can be
MSIX interrupts supported by a PCI device.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agointerrupts: rename device specific file descriptor
Harman Kalra [Fri, 22 Oct 2021 20:49:32 +0000 (02:19 +0530)]
interrupts: rename device specific file descriptor

VFIO/UIO are mutually exclusive, storing file descriptor in a single
field is enough.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agointerrupts: make interrupt handle structure opaque
Harman Kalra [Fri, 22 Oct 2021 20:49:33 +0000 (02:19 +0530)]
interrupts: make interrupt handle structure opaque

Moving interrupt handle structure definition inside a EAL private
header to make its fields totally opaque to the outside world.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agodrivers: remove direct access to interrupt handle
Harman Kalra [Fri, 22 Oct 2021 20:49:32 +0000 (02:19 +0530)]
drivers: remove direct access to interrupt handle

Removing direct access to interrupt handle structure fields,
rather use respective get set APIs for the same.
Making changes to all the drivers access the interrupt handle fields.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agolib: remove direct access to interrupt handle
Harman Kalra [Fri, 22 Oct 2021 20:49:32 +0000 (02:19 +0530)]
lib: remove direct access to interrupt handle

Removing direct access to interrupt handle structure fields,
rather use respective get set APIs for the same.
Making changes to all the libraries access the interrupt handle fields.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agoalarm: remove direct access to interrupt handle
Harman Kalra [Fri, 22 Oct 2021 20:49:32 +0000 (02:19 +0530)]
alarm: remove direct access to interrupt handle

Removing direct access to interrupt handle structure fields,
rather use respective get set APIs for the same.
Making changes to all the libraries access the interrupt handle fields.

Implementing alarm cleanup routine, where the memory allocated
for interrupt instance can be freed.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agotest/interrupts: remove direct access to interrupt handle
Harman Kalra [Fri, 22 Oct 2021 20:49:31 +0000 (02:19 +0530)]
test/interrupts: remove direct access to interrupt handle

Updating the interrupt testsuite to make use of interrupt
handle get set APIs.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agointerrupts: remove direct access to interrupt handle
Harman Kalra [Fri, 22 Oct 2021 20:49:30 +0000 (02:19 +0530)]
interrupts: remove direct access to interrupt handle

Making changes to the interrupt framework to use interrupt handle
APIs to get/set any field.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agointerrupts: add allocator and accessors
Harman Kalra [Fri, 22 Oct 2021 20:49:29 +0000 (02:19 +0530)]
interrupts: add allocator and accessors

Prototype/Implement get set APIs for interrupt handle fields.
User won't be able to access any of the interrupt handle fields
directly while should use these get/set APIs to access/manipulate
them.

Internal interrupt header i.e. rte_eal_interrupt.h is rearranged,
as APIs defined are moved to rte_interrupts.h and epoll specific
definitions are moved to a new header rte_epoll.h.
Later in the series rte_eal_interrupt.h will be removed.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
2 years agoeal/windows: fix IOVA mode detection and handling
Dmitry Kozlyuk [Mon, 25 Oct 2021 12:20:52 +0000 (15:20 +0300)]
eal/windows: fix IOVA mode detection and handling

Windows EAL did not detect IOVA mode and worked incorrectly
if physical addresses could not be obtained
(if virt2phys driver was missing or inaccessible).
In this case, rte_mem_virt2iova() reported RTE_BAD_IOVA for any address.
Inability to obtain IOVA, be it PA or VA, should cause a failure
for the DPDK allocator, but it was hidden by the implementation,
so allocations did not fail when they should.
The mode when DPDK cannot obtain PA but can work is IOVA-as-VA mode.
However, rte_eal_iova_mode() always returned RTE_IOVA_DC
(while it should only ever return RTE_IOVA_PA or RTE_IOVA_VA),
because IOVA mode detection was not implemented.

Implement IOVA mode detection:
1. Always allow to force --iova-mode=va.
2. Allow to force --iova-mode=pa only if virt2phys is available.
3. If no mode is forced and virt2phys is available,
   select the mode according to bus requests, default to PA.
4. If no mode is forced but virt2phys is unavailable, default to VA.
Fix rte_mem_virt2iova() by returning VA when using IOVA-as-VA.
Fix rte_eal_iova_mode() by returning the selected mode.

Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Cc: stable@dpdk.org
Reported-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
2 years agomem: add telemetry infos
Harman Kalra [Fri, 8 Oct 2021 12:44:07 +0000 (18:14 +0530)]
mem: add telemetry infos

Registering new telemetry callbacks to list named (memzones)
and unnamed (malloc) memory reserved and return information
based on arguments provided by user.

Example:
Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
{"version": "DPDK 21.11.0-rc0", "pid": 59754, "max_output_len": 16384}
Connected to application: "dpdk-testpmd"
-->
--> /eal/memzone_list
{"/eal/memzone_list": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]}
-->
-->
--> /eal/memzone_info,0
{"/eal/memzone_info": {"Zone": 0, "Name": "rte_eth_dev_data",    \
"Length": 225408, "Address": "0x13ffc0280", "Socket": 0, "Flags": 0, \
"Hugepage_size": 536870912, "Hugepage_base": "0x120000000",   \
"Hugepage_used": 1}}
-->
-->
--> /eal/memzone_info,6
{"/eal/memzone_info": {"Zone": 6, "Name": "MP_mb_pool_0_0",  \
"Length": 669918336, "Address": "0x15811db80", "Socket": 0,  \
"Flags": 0, "Hugepage_size": 536870912, "Hugepage_base": "0x140000000", \
"Hugepage_used": 2}}
-->
-->
--> /eal/memzone_info,14
{"/eal/memzone_info": null}
-->
-->
--> /eal/heap_list
{"/eal/heap_list": [0]}
-->
-->
--> /eal/heap_info,0
{"/eal/heap_info": {"Head id": 0, "Name": "socket_0",     \
"Heap_size": 1610612736, "Free_size": 927645952,          \
"Alloc_size": 682966784, "Greatest_free_size": 529153152, \
"Alloc_count": 482, "Free_count": 2}}

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agorib: fix IPv6 depth mask
Vladimir Medvedkin [Mon, 6 Sep 2021 15:54:32 +0000 (16:54 +0100)]
rib: fix IPv6 depth mask

Fixes: 03b8372a9a73 ("rib: fix max depth IPv6 lookup")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>