Skip to contentSkip to conversation

[21.11] net/mlx5: increase in number of required hugepages

Bug 983 [email protected] 1 participant 2 messages Mar 25, 2022 – Aug 28, 2022

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=983

            Bug ID: 983
           Summary: [21.11] net/mlx5: increase in number of required
                    hugepages
           Product: DPDK
           Version: 21.11
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: future

Greetings,

I'm developing a DPDK application, and recently I've found myself in the need to upgrade from version 20.11 to version 21.11.

I noticed that when I use a ConnectX-6 NIC in PCI-Passthrough mode it seems to require me to allocate a few extra hugepages. I have not seen this behavior when I use the NIC in SR-IOV mode, or with other existing drivers. I've not seen this in version 20.11.

I think I may have managed to reproduce the same behavior using dpdk-testpmd. I am using 2 MB hugepages on my local setup.

DPDK 20.11 - Mlx5 Driver

NR_HUGEPAGES=200
mount -p /mnt/hugepages
mount -t hugetlbfs hugetlbfs /mnt/hugepages
sysctl vm.nr_hugepages="${NR_NUGEPAGES}" ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-4 --log-level=.*,8

DPDK 21.11 - Mlx5 Driver

NR_HUGEPAGES=220
mount -p /mnt/hugepages
mount -t hugetlbfs hugetlbfs /mnt/hugepages
sysctl vm.nr_hugepages="${NR_NUGEPAGES}" ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-4 --log-level=.*,8

It seems that starting with DPDK 21.11, I have to allocate an extra 20 hugepages, otherwise the driver fails in allocating the mbuf pool.

testpmd: create a new mbuf pool <mb_pool_0>: n=171456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate memory

I am trying to keep the number of used hugepages to a minimum, and I was curious if something changed in the new driver that could determine it to require more hugepages when managing a PF. I've tried to look at the PMD guide
[1] and then at the code, but I haven't really found anything yet which could help me explain the increase.

The NIC that I'm using is the following:
00:04.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6]

OS Distribution: Ubuntu 20.04

[1] https://doc.dpdk.org/guides-21.11/nics/mlx5.html?highlight=mlx5

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.