HomeFreeBSD

dpaa2: Apply if_flags and MAC filters in dpaa2_ni_init()

Description

dpaa2: Apply if_flags and MAC filters in dpaa2_ni_init()

dpaa2_ni_init() only enabled the DPNI object; it never pushed the
promiscuous/allmulti state or the multicast filter table to the MC
firmware. The SIOCSIFFLAGS handler ignores flag changes that arrive
while the interface is down, yet still latches them into sc->if_flags,
so a promiscuous mode request made before the first up was silently
lost and could never be applied afterwards: the up path runs
dpaa2_ni_init(), which did not read the flags, and every later
SIOCSIFFLAGS compares against the already-latched value and sees no
change.

This is exactly what happens when if_bridge adds a dpni member while
the dpni is still down, e.g. rc.conf's

create_args_bridge0="... addm dpni0"

running at bridge clone time, before ifconfig_dpni0="up" is processed.
bridge_ioctl_add() puts the member into promiscuous mode at addm time;
the request never reaches the firmware, so the DPNI continues to
hardware-filter unicast destined to other MACs. ifconfig still
reports PROMISC (a stack-level flag), which makes the failure
invisible: the host stays reachable only via the DPNI's own MAC
address (e.g. with net.link.bridge.inherit_mac=1), while bridged
epair/vnet jail traffic is silently dropped on RX.

Reapply both pieces of administrative state after enabling the DPNI,
as other NIC drivers do in their init path. This also restores
multicast memberships joined while the interface was down.

PR: 292006
Reported by: jhibbits

Signed-off-by: Nick Price <nick@spun.io>

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D58330

Details

Provenance
nick_spun.ioAuthored on Jul 19 2026, 2:27 AM
adrianCommitted on Jul 19 2026, 3:09 AM
Reviewer
jhibbits
Differential Revision
D58330: dpaa2: Apply if_flags and MAC filters in dpaa2_ni_init()
Parents
rG91b419bc7e15: arm64: Fix the build
Branches
Unknown
Tags
Unknown