mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ALOK TIWARI <alok.a.tiwari@oracle.com>
To: "Michael Dege" <michael.dege@renesas.com>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Paul Barker" <paul@pbarker.dev>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Subject: Re: [PATCH net-next v4 3/4] net: renesas: rswitch: add offloading for L2 switching
Date: Fri, 29 Aug 2025 00:12:02 +0530	[thread overview]
Message-ID: <2fd60e1b-a234-4663-ad35-1696a6fd6827@oracle.com> (raw)
In-Reply-To: <20250828-add_l2_switching-v4-3-89d7108c8592@renesas.com>



On 8/28/2025 3:53 PM, Michael Dege wrote:
> +static int rswitch_get_port_parent_id(struct net_device *ndev,
> +				      struct netdev_phys_item_id *ppid)
> +{
> +	struct rswitch_device *rdev = netdev_priv(ndev);
> +	const char *name;
> +
> +	name = dev_name(&rdev->priv->pdev->dev);
> +	ppid->id_len = min_t(size_t, strlen(name), sizeof(ppid->id_len));
> +	memcpy(ppid->id, name, ppid->id_len);

Please recheck here sizeof(ppid->id_len) or sizeof(ppid->id)
it currently uses sizeof(ppid->id_len), which is just 1 byte,
so id_len will always be limited to 1.

> +
> +	return 0;
> +}
> +


Thanks,
Alok

  reply	other threads:[~2025-08-28 18:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 10:23 [net-next PATCH v4 0/4] net: renesas: rswitch: R-Car S4 add HW offloading for layer 2 switching Michael Dege
2025-08-28 10:23 ` [PATCH net-next v4 1/4] net: renesas: rswitch: rename rswitch.c to rswitch_main.c Michael Dege
2025-08-28 10:23 ` [PATCH net-next v4 2/4] net: renesas: rswitch: configure default ageing time Michael Dege
2025-08-28 10:23 ` [PATCH net-next v4 3/4] net: renesas: rswitch: add offloading for L2 switching Michael Dege
2025-08-28 18:42   ` ALOK TIWARI [this message]
2025-08-29  6:15     ` Michael Dege
2025-08-28 10:23 ` [PATCH net-next v4 4/4] net: renesas: rswitch: add modifiable ageing time Michael Dege
2025-08-28 13:37   ` Sergey Shtylyov
2025-08-29  9:17     ` Michael Dege

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=2fd60e1b-a234-4663-ad35-1696a6fd6827@oracle.com \
    --to=alok.a.tiwari@oracle.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=michael.dege@renesas.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikita.yoush@cogentembedded.com \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=pabeni@redhat.com \
    --cc=paul@pbarker.dev \
    --cc=yoshihiro.shimoda.uh@renesas.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

all inboxes | Powered by JetHome®