[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220422183701.GA27661@u2004-local>
Date: Fri, 22 Apr 2022 12:37:01 -0600
From: David Ahern <dsahern@...nel.org>
To: Alaa Mohamed <eng.alaamohamedsoliman.am@...il.com>
Cc: netdev@...r.kernel.org, outreachy@...ts.linux.dev,
roopa@...dia.com, roopa.prabhu@...il.com, jdenham@...hat.com,
sbrivio@...hat.com
Subject: Re: [PATCH net-next 2/2] net: vxlan: vxlan_core.c: Add extack
support to vxlan_fdb_delet
On Tue, Apr 19, 2022 at 04:37:18PM +0200, Alaa Mohamed wrote:
> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
> index cf2f60037340..4ecbb5878fe2 100644
> --- a/drivers/net/vxlan/vxlan_core.c
> +++ b/drivers/net/vxlan/vxlan_core.c
> @@ -1129,18 +1129,20 @@ static void vxlan_fdb_dst_destroy(struct vxlan_dev *vxlan, struct vxlan_fdb *f,
>
> static int vxlan_fdb_parse(struct nlattr *tb[], struct vxlan_dev *vxlan,
> union vxlan_addr *ip, __be16 *port, __be32 *src_vni,
> - __be32 *vni, u32 *ifindex, u32 *nhid)
> + __be32 *vni, u32 *ifindex, u32 *nhid, struct netlink_ext_ack *extack)
> {
> struct net *net = dev_net(vxlan->dev);
> int err;
>
> if (tb[NDA_NH_ID] && (tb[NDA_DST] || tb[NDA_VNI] || tb[NDA_IFINDEX] ||
> tb[NDA_PORT]))
> + NL_SET_ERR_MSG(extack, "Missing required arguments");
That's a misleading error message; I think it should be something like:
NL_SET_ERR_MSG(extack, "DST, VNI, ifindex and port are mutually exclusive with NH_ID");
> return -EINVAL;
>
> if (tb[NDA_DST]) {
> err = vxlan_nla_get_addr(ip, tb[NDA_DST]);
> if (err)
> + NL_SET_ERR_MSG(extack, "Unsupported address family");
> return err;
> } else {
> union vxlan_addr *remote = &vxlan->default_dst.remote_ip;
Powered by blists - more mailing lists