From: Paolo Abeni <pabeni@redhat.com>
To: Lukasz Majewski <lukma@denx.de>,
Andrew Lunn <andrew+netdev@lunn.ch>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Richard Cochran <richardcochran@gmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
Stefan Wahren <wahrenst@gmx.net>, Simon Horman <horms@kernel.org>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [net-next v13 04/11] net: mtip: The L2 switch driver for imx287
Date: Tue, 24 Jun 2025 15:24:27 +0200 [thread overview]
Message-ID: <b31793de-e34f-438c-aa37-d68f3cb42b80@redhat.com> (raw)
In-Reply-To: <20250622093756.2895000-5-lukma@denx.de>
On 6/22/25 11:37 AM, Lukasz Majewski wrote:
> +static void mtip_aging_timer(struct timer_list *t)
> +{
> + struct switch_enet_private *fep = timer_container_of(fep, t,
> + timer_aging);
> +
> + fep->curr_time = mtip_timeincrement(fep->curr_time);
> +
> + mod_timer(&fep->timer_aging,
> + jiffies + msecs_to_jiffies(LEARNING_AGING_INTERVAL));
> +}
It's unclear to me why you decided to maintain this function and timer
while you could/should have used a macro around jiffies instead.
[...]
> +static int mtip_sw_learning(void *arg)
> +{
> + struct switch_enet_private *fep = arg;
> +
> + while (!kthread_should_stop()) {
> + set_current_state(TASK_INTERRUPTIBLE);
> + /* check learning record valid */
> + mtip_atable_dynamicms_learn_migration(fep, fep->curr_time,
> + NULL, NULL);
> + schedule_timeout(HZ / 100);
> + }
> +
> + return 0;
> +}
Why are you using a full blown kernel thread here? Here a timer could
possibly make more sense. Why are checking the table every 10ms, while
the learning intervall is 100ms? I guess you could/should align the
frequency here with such interval.
Side note: I think you should move the buffer management to a later
patch: this one is still IMHO too big.
/P
next prev parent reply other threads:[~2025-06-24 13:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-22 9:37 [net-next v13 00/11] net: mtip: Add support for MTIP imx287 L2 switch driver Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 01/11] dt-bindings: net: Add MTIP L2 switch description Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 02/11] ARM: dts: nxp: mxs: Adjust the imx28.dtsi " Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 03/11] ARM: dts: nxp: mxs: Adjust XEA board's DTS to support L2 switch Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 04/11] net: mtip: The L2 switch driver for imx287 Lukasz Majewski
2025-06-24 13:24 ` Paolo Abeni [this message]
2025-06-24 21:04 ` Lukasz Majewski
2025-06-25 7:13 ` Paolo Abeni
2025-06-26 6:28 ` Lukasz Majewski
2025-06-24 13:37 ` Paolo Abeni
2025-06-24 21:22 ` Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 05/11] net: mtip: Add net_device_ops functions to the L2 switch driver Lukasz Majewski
2025-06-24 13:42 ` Paolo Abeni
2025-06-24 21:33 ` Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 06/11] net: mtip: Add mtip_switch_{rx|tx} " Lukasz Majewski
2025-06-24 13:58 ` Paolo Abeni
2025-06-24 21:54 ` Lukasz Majewski
2025-06-30 11:34 ` Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 07/11] net: mtip: Extend the L2 switch driver with management operations Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 08/11] net: mtip: Extend the L2 switch driver for imx287 with bridge operations Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 09/11] ARM: mxs_defconfig: Enable CONFIG_NFS_FSCACHE Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 10/11] ARM: mxs_defconfig: Update mxs_defconfig to 6.16-rc1 Lukasz Majewski
2025-06-22 9:37 ` [net-next v13 11/11] ARM: mxs_defconfig: Enable CONFIG_FEC_MTIP_L2SW to support MTIP L2 switch Lukasz Majewski
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=b31793de-e34f-438c-aa37-d68f3cb42b80@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=horms@kernel.org \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukma@denx.de \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=wahrenst@gmx.net \
/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).