From: sashiko-bot@kernel.org
To: wei.fang@oss.nxp.com
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH v2 net-next 10/14] net: enetc: refactor SI VLAN promiscuous mode configuration
Date: Fri, 03 Jul 2026 03:27:04 +0000 [thread overview]
Message-ID: <20260703032705.28E751F00A3E@smtp.kernel.org> (raw)
In-Reply-To: <20260702025714.456233-11-wei.fang@oss.nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Removing explicit initialization of VLAN promiscuous mode leaves hardware and software out of sync if PCI FLR fails or is bypassed.
--
commit e4ae080b51f21aa8943d5f438c5a46ac35824f4b
Author: Wei Fang <wei.fang@nxp.com>
Subject: net: enetc: refactor SI VLAN promiscuous mode configuration
This commit refactors the VLAN promiscuous mode configuration in the enetc
driver. It removes explicit initialization of VLAN promiscuous mode during
port configuration, relying instead on the PCI FLR default state, and
introduces a unified function for setting SI VLAN promiscuous mode.
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
> index db2a800a7aaf0..096ccb35508c5 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
> +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
[ ... ]
> @@ -442,10 +438,6 @@ static void enetc_configure_port(struct enetc_pf *pf)
> /* split up RFS entries */
> enetc_port_assign_rfs_entries(pf->si);
>
> - /* enforce VLAN promisc mode for all SIs */
> - pf->vlan_promisc_simap = ENETC_VLAN_PROMISC_MAP_ALL;
> - enetc_set_vlan_promisc(hw, pf->vlan_promisc_simap);
> -
> enetc_port_wr(hw, ENETC_PSIPMMR, 0);
[Severity: High]
Is it safe to rely solely on PCI FLR for VLAN promiscuous mode initialization
here in enetc_configure_port()?
If the PF driver is reloaded, or the kernel is warm-booted (e.g., via kexec)
and PCI FLR fails or is disabled (e.g., via pci=noflr), the hardware's VLAN
promiscuous mode register (ENETC_PSIPVMR) will retain its previous state.
If VLAN filtering was previously enabled, could the hardware silently drop
VLAN-tagged packets while the software assumes they are accepted?
Because NETIF_F_HW_VLAN_CTAG_FILTER is not enabled by default in
ndev->features, the core network stack will not invoke enetc_pf_set_features()
during registration to sync the software state with the hardware.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702025714.456233-1-wei.fang@oss.nxp.com?part=10
next prev parent reply other threads:[~2026-07-03 3:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 2:57 [PATCH v2 net-next 00/14] net: enetc: cleanups and improvements wei.fang
2026-07-02 2:57 ` [PATCH v2 net-next 01/14] net: enetc: extract common helpers for MAC promiscuous mode setting wei.fang
2026-07-02 2:57 ` [PATCH v2 net-next 02/14] net: enetc: extract common helpers for MAC hash filter configuration wei.fang
2026-07-03 3:27 ` sashiko-bot
2026-07-03 7:02 ` Wei Fang (OSS)
2026-07-02 2:57 ` [PATCH v2 net-next 03/14] net: enetc: convert ndo_set_rx_mode() to ndo_set_rx_mode_async() wei.fang
2026-07-02 2:57 ` [PATCH v2 net-next 04/14] net: enetc: improve MAFT entry management with bitmap tracking wei.fang
2026-07-02 2:57 ` [PATCH v2 net-next 05/14] net: enetc: use PCI device name for debugfs directory wei.fang
2026-07-02 2:57 ` [PATCH v2 net-next 06/14] net: enetc: simplify enetc4_set_port_speed() wei.fang
2026-07-02 17:32 ` Maxime Chevallier
2026-07-03 3:27 ` sashiko-bot
2026-07-02 2:57 ` [PATCH v2 net-next 07/14] net: enetc: differentiate phylink capabilities for pseudo-MAC and standalone MAC wei.fang
2026-07-02 17:30 ` Maxime Chevallier
2026-07-03 3:27 ` sashiko-bot
2026-07-02 2:57 ` [PATCH v2 net-next 08/14] net: enetc: remove invalid code from enetc4_pl_mac_link_up() wei.fang
2026-07-02 17:35 ` Maxime Chevallier
2026-07-02 2:57 ` [PATCH v2 net-next 09/14] net: enetc: remove enetc4_set_default_si_vlan_promisc() wei.fang
2026-07-02 2:57 ` [PATCH v2 net-next 10/14] net: enetc: refactor SI VLAN promiscuous mode configuration wei.fang
2026-07-03 3:27 ` sashiko-bot [this message]
2026-07-02 2:57 ` [PATCH v2 net-next 11/14] net: enetc: move enetc_set_si_vlan_promisc() to enetc_pf_common.c wei.fang
2026-07-02 2:57 ` [PATCH v2 net-next 12/14] net: enetc: remove redundant num_vsi field from enetc_port_caps wei.fang
2026-07-02 2:57 ` [PATCH v2 net-next 13/14] net: enetc: use alloc_etherdev_mqs() to create netdev for VF driver wei.fang
2026-07-03 3:27 ` sashiko-bot
2026-07-02 2:57 ` [PATCH v2 net-next 14/14] net: enetc: use kzalloc_flex() for enetc_psfp_gate allocation wei.fang
2026-07-03 3:27 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260703032705.28E751F00A3E@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wei.fang@oss.nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox