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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>

> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux