From: sashiko-bot@kernel.org
To: wei.fang@oss.nxp.com
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH net-next 05/14] net: enetc: decouple VFT logical config from hardware wire format
Date: Sat, 05 Dec 2026 07:11:16 +0000 [thread overview]
Message-ID: <sashiko-outbox-251201@kernel.org> (raw)
In-Reply-To: <20261204071410.692071-6-wei.fang@oss.nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] net: enetc: non-const ntmp_vft_update_entry() and incomplete VFT
docs
--
commit 98b3d6d9f9e5a1818085f893ecfc16c3af754b3d
Author: Wei Fang <wei.fang@nxp.com>
net: enetc: decouple VFT logical config from hardware wire format
This commit introduces a version-agnostic struct vft_entry_data with native
CPU types, moves the wire format structures into ntmp_private.h, and adds
vft_ops_v0 pack/unpack callbacks for VFT version 0. It also updates
ntmp_vft_add_entry() to use NTMP_CMD_AQ and adjusts the NETC switch driver
callers accordingly.
> diff --git a/drivers/net/ethernet/freescale/enetc/ntmp.c b/drivers/net/ethernet/freescale/enetc/ntmp.c
> index 801e4e7bb8314..9d642dbf5e429 100644
> --- a/drivers/net/ethernet/freescale/enetc/ntmp.c
> +++ b/drivers/net/ethernet/freescale/enetc/ntmp.c
[ ... ]
> @@ -1245,21 +1309,22 @@ static int ntmp_vft_set_entry(struct ntmp_user *user, u16 vid, int cmd,
> /**
> * ntmp_vft_add_entry - add an entry into the VLAN filter table
> * @user: target ntmp_user struct
> - * @vid: VLAN ID
> - * @cfge: configuration element data
> + * @entry: the entry data, entry->vid is the VLAN ID and the configuration
> + * element data provides the values
> *
> * Return: 0 on success, otherwise a negative error code
> */
> -int ntmp_vft_add_entry(struct ntmp_user *user, u16 vid,
> - const struct vft_cfge_data *cfge)
> +int ntmp_vft_add_entry(struct ntmp_user *user,
> + struct vft_entry_data *entry)
> {
> int err;
>
> - err = ntmp_vft_set_entry(user, vid, NTMP_CMD_ADD, cfge);
> + err = ntmp_vft_set_entry(user, NTMP_CMD_AQ, entry);
> if (err)
> dev_err(user->dev,
> "Failed to add %s entry, vid: %u, err: %pe\n",
> - ntmp_table_name(NTMP_VFT_ID), vid, ERR_PTR(err));
> + ntmp_table_name(NTMP_VFT_ID), entry->vid,
> + ERR_PTR(err));
>
> return err;
> }
> @@ -1269,21 +1334,22 @@ EXPORT_SYMBOL_GPL(ntmp_vft_add_entry);
> * ntmp_vft_update_entry - update the configuration element data of the
> * specified VLAN filter entry
> * @user: target ntmp_user struct
> - * @vid: VLAN ID
> - * @cfge: configuration element data
> + * @entry: the entry data, entry->vid selects the VLAN filter entry and
> + * the configuration element data provides the new values
> *
> * Return: 0 on success, otherwise a negative error code
> */
> -int ntmp_vft_update_entry(struct ntmp_user *user, u16 vid,
> - const struct vft_cfge_data *cfge)
> +int ntmp_vft_update_entry(struct ntmp_user *user,
> + struct vft_entry_data *entry)
[Severity: Low]
Can ntmp_vft_update_entry() keep const on its entry parameter (here and in
include/linux/fsl/ntmp.h)? Unlike ntmp_vft_add_entry(), it only reads *entry,
and sibling update helpers such as ntmp_fdbt_update_entry() and
ntmp_ett_update_entry() take a const pointer; this remains non-const even
after commit "net: enetc: add a generic helper to add an NTMP entry by key"
splits the add and update paths.
Also, the kernel-doc for ntmp_vft_add_entry() does not mention that hardware
writes the assigned entry ID back into entry->entry_id via NTMP_CMD_AQ,
unlike ntmp_ipft_add_entry() and ntmp_fdbt_add_entry().
Finally, the commit message says vft_ops_v0 holds the buffer size and a
pack() callback, omitting struct vft_resp_query, resp_query_len, and
ntmp_vft_unpack_v0().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204071410.692071-1-wei.fang@oss.nxp.com?part=5
next prev parent reply other threads:[~2026-12-05 7:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 7:13 [PATCH net-next 00/14] net: enetc: refactor NTMP table handling and add generic helpers wei.fang
2026-12-04 7:13 ` [PATCH net-next 01/14] net: enetc: use an ID-indexed array to track NTMP table versions wei.fang
2026-12-04 7:13 ` [PATCH net-next 02/14] net: enetc: decouple MAFT logical config from hardware wire format wei.fang
2026-12-04 7:13 ` [PATCH net-next 03/14] net: enetc: decouple IPFT " wei.fang
2026-12-04 7:14 ` [PATCH net-next 04/14] net: enetc: decouple FDBT " wei.fang
2026-12-05 7:11 ` sashiko-bot
2026-12-04 7:14 ` [PATCH net-next 05/14] net: enetc: decouple VFT " wei.fang
2026-12-05 7:11 ` sashiko-bot [this message]
2026-12-04 7:14 ` [PATCH net-next 06/14] net: enetc: decouple ETT " wei.fang
2026-12-04 7:14 ` [PATCH net-next 07/14] net: enetc: decouple BPT " wei.fang
2026-12-05 7:11 ` sashiko-bot
2026-12-04 7:14 ` [PATCH net-next 08/14] net: enetc: add generic ntmp_add_entry_by_id() helper wei.fang
2026-12-05 7:11 ` sashiko-bot
2026-12-04 7:14 ` [PATCH net-next 09/14] net: enetc: simplify callers of ntmp_query_entry_by_id() wei.fang
2026-12-04 7:14 ` [PATCH net-next 10/14] net: enetc: add kernel-doc for ntmp_delete_entry_by_id() wei.fang
2026-12-04 7:14 ` [PATCH net-next 11/14] net: enetc: add a generic helper to update an NTMP entry by entry ID wei.fang
2026-12-05 7:11 ` sashiko-bot
2026-12-04 7:14 ` [PATCH net-next 12/14] net: enetc: convert ntmp_ect_update_entry() to the generic update helper wei.fang
2026-12-04 7:14 ` [PATCH net-next 13/14] net: enetc: add a generic helper to add an NTMP entry by key wei.fang
2026-12-05 7:11 ` sashiko-bot
2026-12-04 7:14 ` [PATCH net-next 14/14] net: enetc: convert the RSST to the generic NTMP entry helpers 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=sashiko-outbox-251201@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.