From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A59375A06 for ; Wed, 3 Feb 2016 09:08:46 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 03 Feb 2016 00:08:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,389,1449561600"; d="scan'208";a="41552499" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 03 Feb 2016 00:08:35 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 3 Feb 2016 00:08:35 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.172]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.218]) with mapi id 14.03.0248.002; Wed, 3 Feb 2016 16:08:17 +0800 From: "Lu, Wenzhuo" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v2 2/7] lib/librte_ether: support l2 tunnel config Thread-Index: AQHRXYb23hDzdqk7eUS50cv0vAOTdp8ZJu0AgACvK2A= Date: Wed, 3 Feb 2016 08:08:16 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC090903427277@shsmsx102.ccr.corp.intel.com> References: <1454051035-25757-1-git-send-email-wenzhuo.lu@intel.com> <1454396225-11784-1-git-send-email-wenzhuo.lu@intel.com> <1454396225-11784-3-git-send-email-wenzhuo.lu@intel.com> <20160203143620.7eccc836@samsung9> In-Reply-To: <20160203143620.7eccc836@samsung9> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 2/7] lib/librte_ether: support l2 tunnel config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 08:08:47 -0000 Hi Stephen, > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Wednesday, February 3, 2016 11:36 AM > To: Lu, Wenzhuo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 2/7] lib/librte_ether: support l2 tunne= l config >=20 > On Tue, 2 Feb 2016 14:57:00 +0800 > Wenzhuo Lu wrote: >=20 > > +/** > > + * l2 tunnel configuration. > > + */ > > +struct rte_eth_l2_tunnel { > > + enum rte_eth_l2_tunnel_type l2_tunnel_type; > > + uint16_t ether_type; > > +}; >=20 > Building an API with an indirect (structure) parameter with only two elem= ents > seems like overkill. If you are building it to support future features, t= hat won't > work because it will break ABI. >=20 > Why not just? >=20 > int > rte_eth_dev_etag_enable(uint8_t port_id, uint16_t ether_type) I'm trying to make the rte ops can support future features, because there'r= e some similar technology 802.1Qbg, 802.1Qbh, 802.1BR, VN-tag.=20 And after applying all the patches in this patch set, the struct rte_eth_l= 2_tunnel will be like this, struct rte_eth_l2_tunnel { enum rte_eth_l2_tunnel_type l2_tunnel_type; uint16_t ether_type; uint32_t tunnel_id; /* port tag id for e-tag */ }; If we want to support a new type of tunnel which can be described by ether = type and tunnel id, we need not to extend this structure. We only need to add new value for l2_tunnel_type. I think it's not an ABI chan= ge. And I think using a l2 tunnel to cover all these tunnels can make interface= simple :)