From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A75F47E7B for ; Wed, 22 Oct 2014 12:57:07 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 22 Oct 2014 03:59:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,768,1406617200"; d="scan'208";a="609242815" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga001.fm.intel.com with ESMTP; 22 Oct 2014 04:05:15 -0700 Received: from kmsmsx151.gar.corp.intel.com (172.21.73.86) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 22 Oct 2014 19:03:20 +0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 22 Oct 2014 19:03:19 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.202]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.207]) with mapi id 14.03.0195.001; Wed, 22 Oct 2014 19:03:12 +0800 From: "Liu, Jijiang" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 5/9] librte_ether:add data structures of VxLAN filter Thread-Index: AQHP7QuJFKbMRL7JK0C/1AlzdyzoJ5w6ItQAgAE5OcD///mOAIAAnkYg Date: Wed, 22 Oct 2014 11:03:11 +0000 Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D829F1@SHSMSX101.ccr.corp.intel.com> References: <1413881168-20239-1-git-send-email-jijiang.liu@intel.com> <1893361.J7EnPDFulE@xps13> <1ED644BD7E0A5F4091CF203DAFB8E4CC01D827DB@SHSMSX101.ccr.corp.intel.com> <1475006.YvKxECmGku@xps13> In-Reply-To: <1475006.YvKxECmGku@xps13> 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 Subject: Re: [dpdk-dev] [PATCH v6 5/9] librte_ether:add data structures of VxLAN filter 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, 22 Oct 2014 10:57:09 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, October 22, 2014 5:31 PM > To: Liu, Jijiang > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v6 5/9] librte_ether:add data structures o= f > VxLAN filter >=20 > 2014-10-22 02:25, Liu, Jijiang: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > 2014-10-21 16:46, Jijiang Liu: > > > > +#define RTE_TUNNEL_FILTER_IMAC_IVLAN (ETH_TUNNEL_FILTER_IMAC > | \ > > > > + ETH_TUNNEL_FILTER_IVLAN) > > > > +#define RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID > (ETH_TUNNEL_FILTER_IMAC | \ > > > > + ETH_TUNNEL_FILTER_IVLAN | \ > > > > + ETH_TUNNEL_FILTER_TENID) > > > > +#define RTE_TUNNEL_FILTER_IMAC_TENID (ETH_TUNNEL_FILTER_IMAC > | \ > > > > + ETH_TUNNEL_FILTER_TENID) > > > > +#define RTE_TUNNEL_FILTER_OMAC_TENID_IMAC > (ETH_TUNNEL_FILTER_OMAC | \ > > > > + ETH_TUNNEL_FILTER_TENID | \ > > > > + ETH_TUNNEL_FILTER_IMAC) > > > > > > I thought you agree that these definitions are useless? > > > > Sorry, this MAY be some misunderstanding, I don't think these > > definition are useless. I just thought change "uint16_t filter_type" > > is better than define "enum filter_type". > > > > Let me explain here again. > > The filter condition are: > > 1. inner MAC + inner VLAN > > 2. inner MAC + IVLAN + tenant ID > > .. > > 5. outer MAC + tenant ID + inner MAC > > > > For each filter condition, we need to check if the mandatory > > parameters are valid by checking corresponding bit MASK. >=20 > Checking bit mask doesn't imply to define all combinations of bit masks. > There's probably something obvious that one of us is missing. Anybody else have comments on this?=20 > > An pseudo code example: > > > > Switch (filter_type) > > Case 1: //inner MAC + inner VLAN > > If (filter_type & ETH_TUNNEL_FILTER_IMAC ) > > if (IMAC=3D=3DNULL) > > return -1; > > > > case 5: // outer MAC + tenant ID + inner MAC > > If (filter_type & ETH_TUNNEL_FILTER_IMAC ) > > if (IMAC=3D=3DNULL) > > return -1; > > > > If (filter_type & ETH_TUNNEL_FILTER_OMAC ) > > if (IMAC=3D=3DNULL) > > return -1; > > ......