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 8D7025948 for ; Wed, 22 Oct 2014 04:19:06 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 21 Oct 2014 19:21:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="403888110" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by FMSMGA003.fm.intel.com with ESMTP; 21 Oct 2014 19:19:39 -0700 Received: from pgsmsx102.gar.corp.intel.com (10.221.44.80) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 22 Oct 2014 10:25:52 +0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 22 Oct 2014 10:25:51 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.202]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.174]) with mapi id 14.03.0195.001; Wed, 22 Oct 2014 10:25:50 +0800 From: "Liu, Jijiang" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v6 5/9] librte_ether:add data structures of VxLAN filter Thread-Index: AQHP7QuJFKbMRL7JK0C/1AlzdyzoJ5w6ItQAgAE5OcA= Date: Wed, 22 Oct 2014 02:25:50 +0000 Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D827DB@SHSMSX101.ccr.corp.intel.com> References: <1413881168-20239-1-git-send-email-jijiang.liu@intel.com> <1413881168-20239-6-git-send-email-jijiang.liu@intel.com> <1893361.J7EnPDFulE@xps13> In-Reply-To: <1893361.J7EnPDFulE@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 Cc: "dev@dpdk.org" 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 02:19:07 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, October 21, 2014 11:13 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-21 16:46, Jijiang Liu: > > +#define RTE_TUNNEL_FILTER_TO_QUEUE 1 /**< point to an queue by filter > type */ >=20 > Sorry, I don't understand what is this value for? >=20 > > +#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) >=20 > I thought you agree that these definitions are useless? >=20 Sorry, this MAY be some misunderstanding, I don't think these definition a= re useless. I just thought change "uint16_t filter_type" is better than def= ine "enum filter_type". Let me explain here again. The filter condition are:=20 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. 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; =20 If (filter_type & ETH_TUNNEL_FILTER_OMAC ) if (IMAC=3D=3DNULL) return -1; ...... =20 > Thomas