On 9/28/21 6:58 AM, Pablo de Lara wrote:
rte_efd_create() function was using uint8_t for a socket bitmask,
for one of its parameters.
This limits the maximum of NUMA sockets to be 8.
Changing to to uint64_t increases it to 64, which should be
more future-proof.

Coverity issue: 366390
Fixes: 56b6ef874f8 ("efd: new Elastic Flow Distributor library")

Signed-off-by: Pablo de Lara <pablo.de.lara.gua...@intel.com>
Acked-by: John McNamara <john.mcnam...@intel.com>
---

v4: Set socket id in EFD tests

v3: Fixed commit message

v2: Fixed EFD tests

Results with v4 on a non-consecutive NUMA system:

$ lscpu
Architecture:        ppc64le
Byte Order:          Little Endian
CPU(s):              128
On-line CPU(s) list: 0-127
Thread(s) per core:  4
Core(s) per socket:  16
Socket(s):           2
NUMA node(s):        6
Model:               2.3 (pvr 004e 1203)
Model name:          POWER9, altivec supported
CPU max MHz:         3800.0000
CPU min MHz:         2300.0000
L1d cache:           32K
L1i cache:           32K
L2 cache:            512K
L3 cache:            10240K
NUMA node0 CPU(s):   0-63
NUMA node8 CPU(s):   64-127
NUMA node252 CPU(s):
NUMA node253 CPU(s):
NUMA node254 CPU(s):
NUMA node255 CPU(s):

$ sudo /home/drc/src/dpdk/build/app/test/dpdk-test -l 64-127 -n 4 --no-pci
EAL: Detected 128 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available 1048576 kB hugepages reported
EAL: VFIO support initialized
APP: HPET is not enabled, using TSC as default timer
RTE>>efd_autotest
Entering test_add_delete
Entering test_efd_find_existing
Entering test_add_update_delete
Entering test_five_keys
Entering test_efd_creation_with_bad_parameters, **Errors are expected **
EFD: Allocating key array on socket 8 failed
EFD: At least one CPU socket must be enabled in the bitmask
EFD: Allocating EFD table management structure on socket 255 failed
# Test successful. No more errors expected
Evaluating table utilization and correctness, please wait
Added    2097152        Succeeded    2097152    Lost          0
Added    2097152        Succeeded    2097152    Lost          0
Added    2097152        Succeeded    2097152    Lost          0

Average table utilization = 100.00% (2097152/2097152)
Test OK
RTE>>efd_perf_autotest
Measuring performance, please wait
..........
Results (in CPU cycles/operation)
-----------------------------------

Keysize Add Lookup Lookup_bulk Delete
4                 471               17                11                59
8                 502               18                14                73
16                542               23                21                81
32                662               37                36                97
48                782               54                53                110
64                881               75                74                119
9                 512               18                16                75
13                539               23                22                84
37                726               48                47                115
40                726               47                46                112
Test OK

Reply via email to