public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: lukasz.majewski@mailbox.org
Cc: Jakub Kicinski <kuba@kernel.org>,
	festevam@gmail.com, linux-arm-kernel@lists.infradead.org,
	s.hauer@pengutronix.de, kernel@pengutronix.de, horms@kernel.org,
	shawnguo@kernel.org, imx@lists.linux.dev,
	linux-kernel@vger.kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, wahrenst@gmx.net, pabeni@redhat.com,
	davem@davemloft.net, netdev@vger.kernel.org,
	richardcochran@gmail.com, edumazet@google.com,
	andrew+netdev@lunn.ch, robh@kernel.org, krzk+dt@kernel.org,
	andrew@lunn.ch
Subject: Re: [net-next,v20,4/7] net: mtip: Add net_device_ops functions to the L2 switch driver
Date: Tue, 27 Jan 2026 18:25:58 -0800	[thread overview]
Message-ID: <20260128022558.4151582-1-kuba@kernel.org> (raw)
In-Reply-To: <20260126103400.1683125-5-lukasz.majewski@mailbox.org>

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.

For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
net: mtip: Add net_device_ops functions to the L2 switch driver

This patch adds the net_device_ops callback implementations for the MTIP
L2 switch driver including transmit, timeout handling, multicast setup,
MAC address configuration, and port parent ID retrieval.

> diff --git a/drivers/net/ethernet/freescale/mtipsw/mtipl2sw.c b/drivers/net/ethernet/freescale/mtipsw/mtipl2sw.c
> index 9c21a3d29c1c..a6424ee1a9d9 100644
> --- a/drivers/net/ethernet/freescale/mtipsw/mtipl2sw.c
> +++ b/drivers/net/ethernet/freescale/mtipsw/mtipl2sw.c

[ ... ]

> +static netdev_tx_t mtip_start_xmit_port(struct sk_buff *skb,
> +					struct net_device *dev, int port)
> +{

[ ... ]

> +	/* Push the data cache so the CPM does not get stale memory
> +	 * data.
> +	 */
> +	bdp->cbd_bufaddr = dma_map_single(&fep->pdev->dev, bufaddr,
> +					  MTIP_SWITCH_TX_FRSIZE,
> +					  DMA_TO_DEVICE);

The dma_map_single() call here creates a DMA mapping, but mtip_switch_tx()
at this point in the series is an empty stub that never calls
dma_unmap_single(). Is the intention for this to be resolved by a later
patch in the series? Looking ahead, a4c3fa1c66c9 ("net: mtip: Add
mtip_switch_{rx|tx} functions to the L2 switch driver") does add the full
TX completion handler with the dma_unmap_single() call. However, this
commit on its own could cause DMA resource exhaustion if used standalone
(e.g., during bisection).

Would it make sense to merge these two patches together, or at minimum
have a note in the commit message explaining the dependency?

[ ... ]

  reply	other threads:[~2026-01-28  2:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26 10:33 [net-next v20 0/7] net: mtip: Add support for MTIP imx287 L2 switch driver Lukasz Majewski
2026-01-26 10:33 ` [net-next v20 1/7] dt-bindings: net: Add MTIP L2 switch description Lukasz Majewski
2026-01-26 10:33 ` [net-next v20 2/7] net: mtip: The L2 switch driver for imx287 Lukasz Majewski
2026-01-28  2:25   ` [net-next,v20,2/7] " Jakub Kicinski
2026-01-28 21:41     ` Łukasz Majewski
2026-01-28 22:00       ` Andrew Lunn
2026-01-28 22:47         ` Łukasz Majewski
2026-01-26 10:33 ` [net-next v20 3/7] net: mtip: Add buffers management functions to the L2 switch driver Lukasz Majewski
2026-01-28  2:25   ` [net-next,v20,3/7] " Jakub Kicinski
2026-01-28 21:48     ` Łukasz Majewski
2026-01-26 10:33 ` [net-next v20 4/7] net: mtip: Add net_device_ops " Lukasz Majewski
2026-01-28  2:25   ` Jakub Kicinski [this message]
2026-01-28 21:55     ` [net-next,v20,4/7] " Łukasz Majewski
2026-01-29  2:05       ` Jakub Kicinski
2026-01-26 10:33 ` [net-next v20 5/7] net: mtip: Add mtip_switch_{rx|tx} " Lukasz Majewski
2026-01-26 10:33 ` [net-next v20 6/7] net: mtip: Extend the L2 switch driver with management operations Lukasz Majewski
2026-01-26 10:34 ` [net-next v20 7/7] net: mtip: Extend the L2 switch driver for imx287 with bridge operations Lukasz Majewski
2026-01-28  2:26   ` [net-next,v20,7/7] " Jakub Kicinski
2026-01-28 22:58     ` Łukasz 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=20260128022558.4151582-1-kuba@kernel.org \
    --to=kuba@kernel.org \
    --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=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.majewski@mailbox.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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