* [PATCH bpf-next] net: lan966x: set xdp_features flag
@ 2023-02-10 19:06 Lorenzo Bianconi
2023-02-12 9:07 ` Lorenzo Bianconi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2023-02-10 19:06 UTC (permalink / raw)
To: bpf
Cc: netdev, davem, edumazet, kuba, pabeni, ast, daniel, andrii,
lorenzo.bianconi, horatiu.vultur, UNGLinuxDriver
Set xdp_features netdevice flag if lan966x nic supports xdp mode.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
index 580c91d24a52..b24e55e61dc5 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
@@ -823,6 +823,11 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
port->phylink = phylink;
+ if (lan966x->fdma)
+ dev->xdp_features = NETDEV_XDP_ACT_BASIC |
+ NETDEV_XDP_ACT_REDIRECT |
+ NETDEV_XDP_ACT_NDO_XMIT;
+
err = register_netdev(dev);
if (err) {
dev_err(lan966x->dev, "register_netdev failed\n");
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] net: lan966x: set xdp_features flag
2023-02-10 19:06 [PATCH bpf-next] net: lan966x: set xdp_features flag Lorenzo Bianconi
@ 2023-02-12 9:07 ` Lorenzo Bianconi
2023-02-13 17:00 ` Daniel Borkmann
2023-02-13 20:24 ` Horatiu Vultur
2023-02-14 1:50 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Lorenzo Bianconi @ 2023-02-12 9:07 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: bpf, netdev, davem, edumazet, kuba, pabeni, ast, daniel, andrii,
horatiu.vultur, UNGLinuxDriver
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
> Set xdp_features netdevice flag if lan966x nic supports xdp mode.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> index 580c91d24a52..b24e55e61dc5 100644
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> @@ -823,6 +823,11 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
>
> port->phylink = phylink;
>
> + if (lan966x->fdma)
> + dev->xdp_features = NETDEV_XDP_ACT_BASIC |
> + NETDEV_XDP_ACT_REDIRECT |
> + NETDEV_XDP_ACT_NDO_XMIT;
> +
> err = register_netdev(dev);
> if (err) {
> dev_err(lan966x->dev, "register_netdev failed\n");
Since the xdp-features series is now merged in net-next, do you think it is
better to target this patch to net-next?
Regards,
Lorenzo
> --
> 2.39.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] net: lan966x: set xdp_features flag
2023-02-12 9:07 ` Lorenzo Bianconi
@ 2023-02-13 17:00 ` Daniel Borkmann
2023-02-13 18:46 ` Lorenzo Bianconi
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Borkmann @ 2023-02-13 17:00 UTC (permalink / raw)
To: Lorenzo Bianconi, Lorenzo Bianconi
Cc: bpf, netdev, davem, edumazet, kuba, pabeni, ast, andrii,
horatiu.vultur, UNGLinuxDriver
On 2/12/23 10:07 AM, Lorenzo Bianconi wrote:
>> Set xdp_features netdevice flag if lan966x nic supports xdp mode.
>>
>> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>> ---
>> drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
>> index 580c91d24a52..b24e55e61dc5 100644
>> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
>> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
>> @@ -823,6 +823,11 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
>>
>> port->phylink = phylink;
>>
>> + if (lan966x->fdma)
>> + dev->xdp_features = NETDEV_XDP_ACT_BASIC |
>> + NETDEV_XDP_ACT_REDIRECT |
>> + NETDEV_XDP_ACT_NDO_XMIT;
>> +
>> err = register_netdev(dev);
>> if (err) {
>> dev_err(lan966x->dev, "register_netdev failed\n");
>
> Since the xdp-features series is now merged in net-next, do you think it is
> better to target this patch to net-next?
Yes, that would be better given it's a pure driver change. I moved delegate
to netdev.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] net: lan966x: set xdp_features flag
2023-02-13 17:00 ` Daniel Borkmann
@ 2023-02-13 18:46 ` Lorenzo Bianconi
0 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2023-02-13 18:46 UTC (permalink / raw)
To: Daniel Borkmann
Cc: Lorenzo Bianconi, bpf, netdev, davem, edumazet, kuba, pabeni, ast,
andrii, horatiu.vultur, UNGLinuxDriver
[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]
> On 2/12/23 10:07 AM, Lorenzo Bianconi wrote:
> > > Set xdp_features netdevice flag if lan966x nic supports xdp mode.
> > >
> > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > > ---
> > > drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> > > index 580c91d24a52..b24e55e61dc5 100644
> > > --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> > > +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> > > @@ -823,6 +823,11 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
> > > port->phylink = phylink;
> > > + if (lan966x->fdma)
> > > + dev->xdp_features = NETDEV_XDP_ACT_BASIC |
> > > + NETDEV_XDP_ACT_REDIRECT |
> > > + NETDEV_XDP_ACT_NDO_XMIT;
> > > +
> > > err = register_netdev(dev);
> > > if (err) {
> > > dev_err(lan966x->dev, "register_netdev failed\n");
> >
> > Since the xdp-features series is now merged in net-next, do you think it is
> > better to target this patch to net-next?
>
> Yes, that would be better given it's a pure driver change. I moved delegate
> to netdev.
ack, thx, in this way I do not need to repost :)
Regards,
Lorenzo
>
> Thanks,
> Daniel
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] net: lan966x: set xdp_features flag
2023-02-10 19:06 [PATCH bpf-next] net: lan966x: set xdp_features flag Lorenzo Bianconi
2023-02-12 9:07 ` Lorenzo Bianconi
@ 2023-02-13 20:24 ` Horatiu Vultur
2023-02-14 1:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 6+ messages in thread
From: Horatiu Vultur @ 2023-02-13 20:24 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: bpf, netdev, davem, edumazet, kuba, pabeni, ast, daniel, andrii,
lorenzo.bianconi, UNGLinuxDriver
The 02/10/2023 20:06, Lorenzo Bianconi wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Set xdp_features netdevice flag if lan966x nic supports xdp mode.
It looks OK. In case you will need to do another version can you
move this change just a little bit more up next to the other
dev->features assignments which are found in the same function.
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> index 580c91d24a52..b24e55e61dc5 100644
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> @@ -823,6 +823,11 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
>
> port->phylink = phylink;
>
> + if (lan966x->fdma)
> + dev->xdp_features = NETDEV_XDP_ACT_BASIC |
> + NETDEV_XDP_ACT_REDIRECT |
> + NETDEV_XDP_ACT_NDO_XMIT;
> +
> err = register_netdev(dev);
> if (err) {
> dev_err(lan966x->dev, "register_netdev failed\n");
> --
> 2.39.1
>
--
/Horatiu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] net: lan966x: set xdp_features flag
2023-02-10 19:06 [PATCH bpf-next] net: lan966x: set xdp_features flag Lorenzo Bianconi
2023-02-12 9:07 ` Lorenzo Bianconi
2023-02-13 20:24 ` Horatiu Vultur
@ 2023-02-14 1:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-14 1:50 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: bpf, netdev, davem, edumazet, kuba, pabeni, ast, daniel, andrii,
lorenzo.bianconi, horatiu.vultur, UNGLinuxDriver
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 10 Feb 2023 20:06:04 +0100 you wrote:
> Set xdp_features netdevice flag if lan966x nic supports xdp mode.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 5 +++++
> 1 file changed, 5 insertions(+)
Here is the summary with links:
- [bpf-next] net: lan966x: set xdp_features flag
https://git.kernel.org/netdev/net-next/c/ef01749f6a0d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-02-14 1:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10 19:06 [PATCH bpf-next] net: lan966x: set xdp_features flag Lorenzo Bianconi
2023-02-12 9:07 ` Lorenzo Bianconi
2023-02-13 17:00 ` Daniel Borkmann
2023-02-13 18:46 ` Lorenzo Bianconi
2023-02-13 20:24 ` Horatiu Vultur
2023-02-14 1:50 ` patchwork-bot+netdevbpf
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).