Re: [PATCH net-next v3 2/2] vxlan: allow specifying multiple default destinations
From: Thomas Graf <tgraf@suug.ch>
Date: 2013-05-30 11:37:41
From: Thomas Graf <tgraf@suug.ch>
Date: 2013-05-30 11:37:41
On 05/30/13 at 02:16pm, Mike Rapoport wrote:
On Thu, May 30, 2013 at 12:09:48PM +0100, Thomas Graf wrote:quoted
Looks much better, thanks for taking the feedback. Some additional feedback inlined:quoted
+ const struct vxlan_dev *vxlan) +{ + struct vxlan_rdst *rdst; + struct nlattr *nest, *rdst_nest; + __be32 ip; + int i; + + if (vxlan->remote_cnt) { + nest = nla_nest_start(skb, IFLA_VXLAN_REMOTES); + if (nest == NULL) + goto nla_put_failure; + + for (rdst = vxlan->default_dst.remote_next, i = 0; rdst; + rdst = rdst->remote_next, i++) { + ip = rdst->remote_ip; + + rdst_nest = nla_nest_start(skb, i);Attribute type '0' is reserved, please don't use it. Start with '1'.quoted
+enum { + IFLA_VXLAN_REMOTE_NEW, + IFLA_VXLAN_REMOTE_DEL, +};Same here, attribute type '0' is reserved.Does it mean I have to add _UNSPEC and _MAX? And, consequently, rename either REMOTE_{NEW,DEL} or REMOTE_ADDR and friends to avoid redefinition of _MAX attribute?
I think this is good enough:
enum {
IFLA_VXLAN_REMOTE_NEW = 1,
IFLA_VXLAN_REMOTE_DEL,
};