From: Jakub Kicinski <kuba@kernel.org>
To: Wei Fang <wei.fang@nxp.com>
Cc: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com,
xiaoning.wang@nxp.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
christophe.leroy@csgroup.eu, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev
Subject: Re: [PATCH net-next 04/13] net: enetc: add MAC filter for i.MX95 ENETC PF
Date: Sat, 4 Jan 2025 17:45:02 -0800 [thread overview]
Message-ID: <20250104174502.0d43e7c0@kernel.org> (raw)
In-Reply-To: <20250103060610.2233908-5-wei.fang@nxp.com>
On Fri, 3 Jan 2025 14:06:00 +0800 Wei Fang wrote:
> The i.MX95 ENETC supports both MAC hash filter and MAC exact filter. MAC
> hash filter is implenented through a 64-bits hash table to match against
> the hashed addresses, PF and VFs each have two MAC hash tables, one is
> for unicast and the other one is for multicast. But MAC exact filter is
> shared between SIs (PF and VFs), each table entry contains a MAC address
> that may be unicast or multicast and the entry also contains an SI bitmap
> field that indicates for which SIs the entry is valid.
>
> For i.MX95 ENETC, MAC exact filter only has 4 entries. According to the
> observation of the system default network configuration, the MAC filter
> will be configured with multiple multicast addresses, so MAC exact filter
> does not have enough entries to implement multicast filtering. Therefore,
> the current MAC exact filter is only used for unicast filtering. If the
> number of unicast addresses exceeds 4, then MAC hash filter is used.
>
> Note that both MAC hash filter and MAC exact filter can only be accessed
> by PF, VFs can notify PF to set its corresponding MAC filter through the
> mailbox mechanism of ENETC. But currently MAC filter is only added for
> i.MX95 ENETC PF. The MAC filter support of ENETC VFs will be supported in
> subsequent patches.
clang reports:
drivers/net/ethernet/freescale/enetc/enetc4_pf.c:1158:6: warning: variable 'pf' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
1158 | if (err)
| ^~~
drivers/net/ethernet/freescale/enetc/enetc4_pf.c:1179:24: note: uninitialized use occurs here
1179 | enetc4_pf_struct_free(pf);
| ^~
drivers/net/ethernet/freescale/enetc/enetc4_pf.c:1158:2: note: remove the 'if' if its condition is always false
1158 | if (err)
| ^~~~~~~~
1159 | goto err_wq_task_init;
| ~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/freescale/enetc/enetc4_pf.c:1128:21: note: initialize the variable 'pf' to silence this warning
1128 | struct enetc_pf *pf;
| ^
| = NULL
--
pw-bot: cr
next prev parent reply other threads:[~2025-01-05 1:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 6:05 [PATCH net-next 00/13] Add more feautues for ENETC v4 - round 2 Wei Fang
2025-01-03 6:05 ` [PATCH net-next 01/13] net: enetc: add initial netc-lib driver to support NTMP Wei Fang
2025-01-03 16:20 ` Andrew Lunn
2025-01-06 2:45 ` Wei Fang
2025-01-03 6:05 ` [PATCH net-next 02/13] net: enetc: add command BD ring support for i.MX95 ENETC Wei Fang
2025-01-03 6:05 ` [PATCH net-next 03/13] net: enetc: move generic MAC filterng interfaces to enetc-core Wei Fang
2025-01-03 6:06 ` [PATCH net-next 04/13] net: enetc: add MAC filter for i.MX95 ENETC PF Wei Fang
2025-01-05 1:45 ` Jakub Kicinski [this message]
2025-01-03 6:06 ` [PATCH net-next 05/13] net: enetc: add debugfs interface to dump MAC filter Wei Fang
2025-01-03 16:25 ` Andrew Lunn
2025-01-06 2:19 ` Wei Fang
2025-01-03 6:06 ` [PATCH net-next 06/13] net: enetc: make enetc_set_rxfh() and enetc_get_rxfh() reusable Wei Fang
2025-01-03 6:06 ` [PATCH net-next 07/13] net: enetc: add RSS support for i.MX95 ENETC PF Wei Fang
2025-01-03 6:06 ` [PATCH net-next 08/13] net: enetc: enable RSS feature by default Wei Fang
2025-01-03 6:06 ` [PATCH net-next 09/13] net: enetc: move generic VLAN filter interfaces to enetc-core Wei Fang
2025-01-03 6:06 ` [PATCH net-next 10/13] net: enetc: move generic VLAN hash filter functions to enetc_pf_common.c Wei Fang
2025-01-03 6:06 ` [PATCH net-next 11/13] net: enetc: add VLAN filtering support for i.MX95 ENETC PF Wei Fang
2025-01-03 6:06 ` [PATCH net-next 12/13] net: enetc: add loopback " Wei Fang
2025-01-03 6:06 ` [PATCH net-next 13/13] MAINTAINERS: add new file ntmp.h to ENETC driver Wei Fang
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=20250104174502.0d43e7c0@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=christophe.leroy@csgroup.eu \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@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;
as well as URLs for NNTP newsgroup(s).