The branch main has been updated by adrian:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=dc12e3e0e72a73f1ad1a14d8d0fa4e2147151720

commit dc12e3e0e72a73f1ad1a14d8d0fa4e2147151720
Author:     Nick Price <[email protected]>
AuthorDate: 2026-07-19 02:27:36 +0000
Commit:     Adrian Chadd <[email protected]>
CommitDate: 2026-07-19 03:09:30 +0000

    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 <[email protected]>
    
    Reviewed by:    jhibbits
    Differential Revision:  https://reviews.freebsd.org/D58330
---
 sys/dev/dpaa2/dpaa2_ni.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c
index f85dc41a748c..435b0fdf4085 100644
--- a/sys/dev/dpaa2/dpaa2_ni.c
+++ b/sys/dev/dpaa2/dpaa2_ni.c
@@ -2491,6 +2491,17 @@ dpaa2_ni_init(void *arg)
                    __func__, error);
        }
 
+       error = dpaa2_ni_setup_if_flags(sc);
+       if (error) {
+               device_printf(dev, "%s: failed to update interface flags: "
+                   "error=%d\n", __func__, error);
+       }
+       error = dpaa2_ni_update_mac_filters(ifp);
+       if (error) {
+               device_printf(dev, "%s: failed to update MAC filters: "
+                   "error=%d\n", __func__, error);
+       }
+
        DPNI_LOCK(sc);
        /* Announce we are up and running and can queue packets. */
        if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE);

Reply via email to