[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fd60e1b-a234-4663-ad35-1696a6fd6827@oracle.com>
Date: Fri, 29 Aug 2025 00:12:02 +0530
From: ALOK TIWARI <alok.a.tiwari@...cle.com>
To: Michael Dege <michael.dege@...esas.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Niklas Söderlund <niklas.soderlund@...natech.se>,
Paul Barker <paul@...rker.dev>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Nikita Yushchenko <nikita.yoush@...entembedded.com>
Subject: Re: [PATCH net-next v4 3/4] net: renesas: rswitch: add offloading for
L2 switching
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
Powered by blists - more mailing lists