Re: [PATCH net-next v2 1/2] rtnetlink: add extack support in fdb del handlers

Nikolay Aleksandrov
2022-04-23T23:00:21Z

On 4/24/22 01:54, Alaa Mohamed wrote:
> Add extack support to .ndo_fdb_del in netdevice.h and
> all related methods.
>
> Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com>
> ---

Please CC all patch-related maintainers next time. One comment below.

> drivers/net/ethernet/intel/ice/ice_main.c | 3 +--
> drivers/net/ethernet/mscc/ocelot_net.c | 4 ++--
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 +-
> drivers/net/macvlan.c | 2 +-
> drivers/net/vxlan/vxlan_core.c | 2 +-
> include/linux/netdevice.h | 2 +-
> net/bridge/br_fdb.c | 2 +-
> net/bridge/br_private.h | 2 +-
> net/core/rtnetlink.c | 4 ++--
> 9 files changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index d768925785ca..5f9cb4830956 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -5678,10 +5678,9 @@ ice_fdb_add(struct ndmsg *ndm, struct nlattr __always_unused *tb[],
> static int
> ice_fdb_del(struct ndmsg *ndm, __always_unused struct nlattr *tb[],
> struct net_device *dev, const unsigned char *addr,
> - __always_unused u16 vid)
> + __always_unused u16 vid, struct netlink_ext_ack *extack)
> {
> int err;
> -

I don't think you should remove this new line.

> if (ndm->ndm_state & NUD_PERMANENT) {
> netdev_err(dev, "FDB only supports static addresses\n");
> return -EINVAL;