diff options
| author | Wei Fang <wei.fang@nxp.com> | 2026-05-22 12:24:38 +0300 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-05-26 14:20:13 +0300 |
| commit | 9d7b650888ff532f3d2f92722143c39ab780a6f6 (patch) | |
| tree | 8aeef43f9d0a0c0c7d8501c0820cb0bb2c43226f /include/linux/debugobjects.h | |
| parent | c55a33014b52b8c0c2f2fdc99dd805b8fc913949 (diff) | |
| download | linux-9d7b650888ff532f3d2f92722143c39ab780a6f6.tar.xz | |
net: enetc: dynamically allocate rxmsg based on VF count
The constant ENETC_MAX_NUM_VFS is defined as 2 when enabling support for
LS1028A. This works for LS1028A because its ENETC hardware supports up
to 2 VFs. However, ENETC v4 has varying VF capabilities depending on the
SoC:
i.MX94 standalone ENETC: 0 VFs
i.MX94 internal ENETC: 3 VFs
i.MX952: 1 VF
Using a fixed ENETC_MAX_NUM_VFS for memory allocation leads to
over-allocation on SoCs with fewer or no VF support. To better match
hardware capabilities and avoid unnecessary memory usage, change rxmsg
memory allocation from a fixed-size array to dynamic allocation based
on the actual VF count retrieved via pci_sriov_get_totalvfs().
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260522092438.1264020-13-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
