diff mbox series

[bpf-next] net: lan966x: set xdp_features flag

Message ID 01f4412f28899d97b0054c9c1a63694201301b42.1676055718.git.lorenzo@kernel.org (mailing list archive)
State Accepted
Commit ef01749f6a0d3d77e18488263fa920c49a001bfb
Delegated to: Netdev Maintainers
Headers show
Series [bpf-next] net: lan966x: set xdp_features flag | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for bpf-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 2 maintainers not CCed: hawk@kernel.org john.fastabend@gmail.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-next-PR fail PR summary
bpf/vmtest-bpf-next-VM_Test-1 success Logs for ShellCheck
bpf/vmtest-bpf-next-VM_Test-7 success Logs for llvm-toolchain
bpf/vmtest-bpf-next-VM_Test-8 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-2 success Logs for build for aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-3 success Logs for build for aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-5 success Logs for build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-6 success Logs for build for x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-4 success Logs for build for s390x with gcc
bpf/vmtest-bpf-next-VM_Test-34 success Logs for test_verifier on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-35 success Logs for test_verifier on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-37 success Logs for test_verifier on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-38 success Logs for test_verifier on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-9 success Logs for test_maps on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-10 success Logs for test_maps on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-12 success Logs for test_maps on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-13 success Logs for test_maps on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-14 success Logs for test_progs on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-15 success Logs for test_progs on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-17 success Logs for test_progs on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-18 success Logs for test_progs on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-19 fail Logs for test_progs_no_alu32 on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-20 success Logs for test_progs_no_alu32 on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-22 success Logs for test_progs_no_alu32 on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-23 success Logs for test_progs_no_alu32 on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-24 success Logs for test_progs_no_alu32_parallel on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-25 success Logs for test_progs_no_alu32_parallel on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-27 success Logs for test_progs_no_alu32_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-28 success Logs for test_progs_no_alu32_parallel on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-29 success Logs for test_progs_parallel on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-30 success Logs for test_progs_parallel on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-32 success Logs for test_progs_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-33 success Logs for test_progs_parallel on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-36 success Logs for test_verifier on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-26 success Logs for test_progs_no_alu32_parallel on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-16 fail Logs for test_progs on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-21 success Logs for test_progs_no_alu32 on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-31 success Logs for test_progs_parallel on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-11 success Logs for test_maps on s390x with gcc

Commit Message

Lorenzo Bianconi Feb. 10, 2023, 7:06 p.m. UTC
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(+)

Comments

Lorenzo Bianconi Feb. 12, 2023, 9:07 a.m. UTC | #1
> 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
>
Daniel Borkmann Feb. 13, 2023, 5 p.m. UTC | #2
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
Lorenzo Bianconi Feb. 13, 2023, 6:46 p.m. UTC | #3
> 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
>
Horatiu Vultur Feb. 13, 2023, 8:24 p.m. UTC | #4
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
>
patchwork-bot+netdevbpf@kernel.org Feb. 14, 2023, 1:50 a.m. UTC | #5
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!
diff mbox series

Patch

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");