summaryrefslogtreecommitdiff
path: root/include/linux/errqueue.h
diff options
context:
space:
mode:
authorWei Fang <wei.fang@nxp.com>2026-05-22 12:24:37 +0300
committerPaolo Abeni <pabeni@redhat.com>2026-05-26 14:20:13 +0300
commitc55a33014b52b8c0c2f2fdc99dd805b8fc913949 (patch)
tree01287aeac79626640ef4cead0db4c5be8c256840 /include/linux/errqueue.h
parent250069ef0df3e1cf996f03c62eb96d1159cf8166 (diff)
downloadlinux-c55a33014b52b8c0c2f2fdc99dd805b8fc913949.tar.xz
net: enetc: use MADDR_TYPE for MAC filter array size
The mac_filter array in struct enetc_pf is sized as ENETC_MAX_NUM_MAC_FLT, defined as (ENETC_MAX_NUM_VFS + 1) * MADDR_TYPE. This resulted in an array of 6 elements (for 2 VFs), but only the first 2 entries are actually used. The PF driver maintains MAC filters for unicast (UC) and multicast (MC) addresses, indexed by the enum enetc_mac_addr_type (UC=0, MC=1). The code only iterates over MADDR_TYPE (2) entries and directly accesses mac_filter[UC] and mac_filter[MC]. The extra space allocated for (ENETC_MAX_NUM_VFS * MADDR_TYPE) entries is never used because VF MAC filtering is not implemented yet. Remove the ENETC_MAX_NUM_MAC_FLT macro and size the array as MADDR_TYPE, reducing the allocation from 6 to 2 entries. This saves 48 bytes per PF and better reflects the actual usage. This change has no functional impact. Future VF MAC filtering support will move mac_filter into struct enetc_si, allowing each SI (PF or VF) to maintain its own independent filter table. Signed-off-by: Wei Fang <wei.fang@nxp.com> Link: https://patch.msgid.link/20260522092438.1264020-12-wei.fang@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions