From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Graf Subject: Re: [PATCH 2/6] vxlan: Group Policy extension Date: Tue, 13 Jan 2015 01:03:57 +0000 Message-ID: <20150113010357.GB20387@casper.infradead.org> References: <7339e3bff124cecaf65cd04ea9bdc973c730ba34.1420756324.git.tgraf@suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , Jesse Gross , Stephen Hemminger , Pravin B Shelar , Alexei Starovoitov , Linux Netdev List , "dev@openvswitch.org" To: Tom Herbert Return-path: Received: from casper.infradead.org ([85.118.1.10]:48677 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751411AbbAMBD6 (ORCPT ); Mon, 12 Jan 2015 20:03:58 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 01/12/15 at 10:14am, Tom Herbert wrote: > > diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h > > index f7d0d2d..9f07bf5 100644 > > --- a/include/uapi/linux/if_link.h > > +++ b/include/uapi/linux/if_link.h > > @@ -370,10 +370,18 @@ enum { > > IFLA_VXLAN_UDP_CSUM, > > IFLA_VXLAN_UDP_ZERO_CSUM6_TX, > > IFLA_VXLAN_UDP_ZERO_CSUM6_RX, > > + IFLA_VXLAN_EXTENSION, > > __IFLA_VXLAN_MAX > > }; > > #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) > > > > +enum { > > + IFLA_VXLAN_EXT_UNSPEC, > > + IFLA_VXLAN_EXT_GBP, > > + __IFLA_VXLAN_EXT_MAX, > > +}; > > +#define IFLA_VXLAN_EXT_MAX (__IFLA_VXLAN_EXT_MAX - 1) > > + > > Creating a level of indirection for extensions seems overly > complicated to me. Why not just define IFLA_VXLAN_GBP as just another > enum above? I think it's cleaner to group them in a nested attribute. It clearly separates the optional extensions from the base attributes. RCO, GPE, GBP can all live in there.