From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id C7D2E1F5 for ; Tue, 16 May 2017 07:05:34 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 15 May 2017 22:05:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,347,1491289200"; d="scan'208";a="262059155" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by fmsmga004.fm.intel.com with ESMTP; 15 May 2017 22:05:32 -0700 Received: from pgsmsx101.gar.corp.intel.com ([169.254.1.174]) by KMSMSX153.gar.corp.intel.com ([169.254.5.32]) with mapi id 14.03.0319.002; Tue, 16 May 2017 13:05:31 +0800 From: "Zhao1, Wei" To: Adrien Mazarguil CC: "dev@dpdk.org" , "Xing, Beilei" , "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH v5 19/26] app/testpmd: add item raw to flow command Thread-Index: AQHSyv/4UndC4lsVekiE9Vh9iRKG76H2bKkg Date: Tue, 16 May 2017 05:05:30 +0000 Message-ID: References: <180091c2bf814c846abbbfb1c2c50e9ec32d7324.1482331076.git.adrien.mazarguil@6wind.com> <20170512091231.GY16218@6wind.com> In-Reply-To: <20170512091231.GY16218@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 19/26] app/testpmd: add item raw to flow command X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 05:05:35 -0000 Hi, Adrien Mazarguil > -----Original Message----- > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com] > Sent: Friday, May 12, 2017 5:13 PM > To: Zhao1, Wei > Cc: dev@dpdk.org; Xing, Beilei ; Lu, Wenzhuo > > Subject: Re: [dpdk-dev] [PATCH v5 19/26] app/testpmd: add item raw to flo= w > command >=20 > Hi Wei, >=20 > On Thu, May 11, 2017 at 06:53:52AM +0000, Zhao1, Wei wrote: > > Hi, Adrien > > > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Adrien > > > Mazarguil > > > Sent: Wednesday, December 21, 2016 10:52 PM > > > To: dev@dpdk.org > > > Subject: [dpdk-dev] [PATCH v5 19/26] app/testpmd: add item raw to > > > flow command > > > > > > Matches arbitrary byte strings with properties: > > > > > > - relative: look for pattern after the previous item. > > > - search: search pattern from offset (see also limit). > > > - offset: absolute or relative offset for pattern. > > > - limit: search area limit for start of pattern. > > > - length: pattern length. > > > - pattern: byte string to look for. > > > > > > Signed-off-by: Adrien Mazarguil > > > Acked-by: Olga Shern > [...] > > #define ITEM_RAW_PATTERN_SIZE 36 > > > > The size of NIC i350 flex byte filter can accommodate the max length > > size of 128 byte, and the reason to Define it as 36 is ?If it is the ma= x length > of pattern, maybe 128 is more appropriate? > > Maybe I have not understand your purpose. > > > > Thank you. >=20 > It's more or less an arbitrary compromise due to various limitations. >=20 > Once parsed, the result of an entire command is stored in a fixed buffer = of > size CMDLINE_PARSE_RESULT_BUFSIZE (8192). Each parsed token ends up > somewhere in that buffer. >=20 > Each flow item always consumes sizeof(struct rte_flow_item) + sizeof(stru= ct > rte_flow_item_xxx) * 3 (spec, last and mask) + alignment constraints. >=20 > For the raw item, this makes at least: >=20 > (sizeof(rte_flow_item) + > (sizeof(rte_flow_item_raw) + ITEM_RAW_PATTERN_SIZE) * 3) > /* (32 + (12 + 36) * 3) =3D> 176 bytes */ >=20 > Because space is always consumed regardless of the size of the byte strin= g to > match for implementation reasons, there is a chance to fill the buffer to= o > quickly with a larger ITEM_RAW_PATTERN_SIZE. >=20 > Also, this does not prevent users from specifying larger raw patterns (ev= en > larger than 128) by combining them, e.g.: >=20 > flow create 0 > pattern eth / raw relative is 1 pattern is foobar / > raw relative is 1 pattern is barbaz / end > actions queue index 42 / end >=20 > Such a pattern ends up matching a single "foobarbarbaz" string. >=20 > To summarize, it is only due to testpmd limitations. Even without PMD > support for combination, the current ability to provide 36 bytes of raw d= ata > to match per specified item is plenty to validate basic functionality. We= 'll > improve testpmd eventually. >=20 Thank you for your detailed explanation. Igb flex byte filter will support for that type combination for raw item.=20 But this testpmd limitation will make trouble for users and tester. > -- > Adrien Mazarguil > 6WIND