Re: [PATCH net-next] octeon_ep: add ndo ops for VFs in PF driver

From: Simon Horman
Date: Sun Nov 10 2024 - 08:19:03 EST


On Thu, Nov 07, 2024 at 04:16:37AM -0800, Shinas Rasheed wrote:
> These APIs are needed to support applicaitons that use netlink to get VF
> information from a PF driver.
>
> Signed-off-by: Shinas Rasheed <srasheed@xxxxxxxxxxx>

...

> +static int octep_set_vf_vlan(struct net_device *dev, int vf, u16 vlan, u8 qos, __be16 vlan_proto)
> +{
> + struct octep_device *oct = netdev_priv(dev);
> +
> + dev_err(&oct->pdev->dev, "Setting VF VLAN not supported\n");
> + return 0;
> +}

Hi Shinas,

Given that the operation is not supported I think it would
be more appropriate to return -EOPNOTSUPP. And moreover, given
that this is a noop, I think it would be yet more appropriate
not to implement it at all and let the core treat it as not supported.

Likewise for other NDOs implemented as noops in this patch.

...