From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 814F7A0C5B; Fri, 19 Nov 2021 18:10:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2657640395; Fri, 19 Nov 2021 18:10:04 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id BB15A40143 for ; Fri, 19 Nov 2021 18:10:00 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10173"; a="221329308" X-IronPort-AV: E=Sophos;i="5.87,248,1631602800"; d="scan'208";a="221329308" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 09:08:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,248,1631602800"; d="scan'208";a="455501710" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 19 Nov 2021 09:08:30 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 19 Nov 2021 09:08:29 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 19 Nov 2021 09:08:29 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 19 Nov 2021 09:08:29 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Fri, 19 Nov 2021 09:08:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gYT4qKTZGO7DQI17pUu7Hzq9NVRQfkwaMeg8Nkwnj+ojV4IERnkLh8j+vukbqFUcMEU6KiraZbTI8esnds6k/8l+e8Ljs6yrWrZNPg+Kwf9FV5d16kMd/Ocf9Jkit7doBtMJTvrvcBgW/YiFVSe1b2SSEHRRsY6gLSlOvebs/1Pcmadyf6ljaTgVnfXOA5oufYo2raFClVKbSz9zVOEba4Fdg3fzyB16Jhp90ahtvh4jVAGvvEkQEjIsC8Pb3Qgu+5uPZ7sPNB/4sl6mkoFJtR8ZZnIojPWW3B/Qi3Ct8fFes6raSFjxyvZTbG+OIvff8T59i5nxYEqzSBV5Mc1bzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JwqpNwQHjKddEvIGdthajjPbYmSVKJ8+nhwFt3o7twk=; b=MfGqsbIVo8BnhNs+ec1TSzNn8J8Iz47/4LNXP5Kvk7i7iocG+SC8Daai35crXhFyUcgAPjaSS8Uc1DjzDwtug4GZ14r+9HP7m+YXitzrXo6Ov/t2foEEa0Vd0X7jh+1Pn9XjBULY6nJzfSXhLBo/dT4mwQl7xl5dYey5siSPummgpKmsPtqujC1fiuTs3GHujy4zUH2YdOIs/xehC1Ou2nBWAeyXoJPTgtevUXcdB4dLqmw5K+rFmSsrDF16BnIdOXBAY+x4RBWI9Y28vJFax6F5r5Xx8MZv5nBVAWnSqgTWBBEBHsx5ERsQS5BCrCLZD08E/Xo9QlwmEM9Wi9rRYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JwqpNwQHjKddEvIGdthajjPbYmSVKJ8+nhwFt3o7twk=; b=Hor16PseyWe/cdFhivpEBbXKNVm65aftzcpGvnERjok2wItm7CBZh17iqMbBaIWL0zWRjmXqRoKwajBOpo88ko17DEO27yEPHd/sAhFc+Qjf+E697ss/8EMcHHDcPMQEARzz1rCKOAF54VtyYdScwDFGT0G3frAQuV44zchVeSw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5062.namprd11.prod.outlook.com (2603:10b6:510:3e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Fri, 19 Nov 2021 17:08:27 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c%5]) with mapi id 15.20.4690.028; Fri, 19 Nov 2021 17:08:27 +0000 Message-ID: <857beced-415e-221c-60ae-775185174bda@intel.com> Date: Fri, 19 Nov 2021 17:08:21 +0000 Content-Language: en-US To: Gregory Etelson , , References: <20211110093841.32153-1-getelson@nvidia.com> From: Ferruh Yigit Subject: Re: [dpdk-dev] [PATCH] doc: add flex item API examples X-User: ferruhy In-Reply-To: <20211110093841.32153-1-getelson@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6PR0601CA0004.eurprd06.prod.outlook.com (2603:10a6:4:7b::14) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB6PR0601CA0004.eurprd06.prod.outlook.com (2603:10a6:4:7b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22 via Frontend Transport; Fri, 19 Nov 2021 17:08:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 89fdb57d-9b12-480e-9f9a-08d9ab7f33dd X-MS-TrafficTypeDiagnostic: PH0PR11MB5062: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:345; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AuTD9DDvChNt5Me6RWF83VdbhO5UYcfbqNSzNqB4SMc/ZBLatnNG17bctjTQ7dW/lMtnIHFYpCA885OKpPktWUncgPjIcg+7BTFDZH+m9xTBjaAkszokTNiaHBOliGQkQZWUmaNPvqBMenL38QXX9mtZyq/OJdBn/AJxMcpe6MNmkLgmisYOYKKfOpRYJSYXvPkxrKmXVheNdzgTQ9nuGnxbjHV+NIM83M67QqjFGOwFhwC2ad4DySPBZgev3s/magS0pUSlrzv6dCQ7kXJn7I++wDkOP6MDYnwFX+D/C15MLgX0tnvaTztlUPTIUjkCt9eC60TFJklfUB6A5AtJ7GVnDbM/yu+icnHQNVfMKyHAncC5EffYcNPrIbADM8nAcEp5aEbrQQzMoLLkTO0HgGNGyAPi7/aw8TPKqjI0HjAnMk17z7x+N6dar9zabV276Fla/2vPi0KNWoKPWp5AjV7SWSlsZCrHrCla+x3ud+DSujlyHStaXaNCNVS8x746our6NIptDT9GHttRLPtPyf2rqJ7GiS0TzBxDHf83ZOWWPFF9nEQkzyTsbP4aHkKle0mz1otaK20SvJDuKuM/ZmdRoK7T/UuDTQ82US57Dq86oPRM2Ckx6ZXtjSeir65fyIeX1DRsTB8yT6/D6qKTmfMrriCde/I3lGx3cmoi5T3qPkjrrpptrt9Khm9wYJVFfCOx+wbEK85t+eP9yxhqCg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8936002)(31696002)(508600001)(83380400001)(82960400001)(6486002)(316002)(31686004)(66476007)(956004)(44832011)(66946007)(2906002)(6666004)(2616005)(16576012)(53546011)(8676002)(186003)(5660300002)(86362001)(38100700002)(66556008)(26005)(36756003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N3JGL0xtMGF3eThqUGQ4UnYycjBhTktoQ2h5dGJsMjVlMWQyWXY2YWRkNGg2?= =?utf-8?B?ek5Cb1VlZkV3K0dBaWlOcHdsM1FjanI5aG9wVG9CNlpNcDA3Um5NekVXMDMx?= =?utf-8?B?OFFsUHNVUVhicnd2K0trenFEY1dWejI4Ym4zMmJrdmlrZEtWNE9CQzZDL2dx?= =?utf-8?B?QnBId2NFTzFydGZSZExSTjdudlBiSGhKK2F0a0lXZG5IQlFxWUFVRkU0K2la?= =?utf-8?B?SDNQc3YzV3hlaXNmeFI2UlpjbGI3NWdWQm01eVA4ajl5RUVkVVEydlp5SThF?= =?utf-8?B?T3djTmNCdlVWWCtnc0VUUUpDcDF6R01SRmVmUUphUUI4WGwxN0RoK1YzYkl1?= =?utf-8?B?YU5JMUN5L2lQM05IT3VSUS9JTGNqaWZ1THBPYVR2bXFPSnVXM2d0bis3SmdI?= =?utf-8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-MS-Exchange-CrossTenant-Network-Message-Id: 89fdb57d-9b12-480e-9f9a-08d9ab7f33dd X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2021 17:08:27.3494 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZPmRXjdscupcB9r0TeWaHqiLsg/c9xsgQCBLWl9u2S+w1PGxLs8MEvKVh8nD/CQr0qPBMe9FdmcaD8/BgIvMsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5062 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 11/10/2021 9:38 AM, Gregory Etelson wrote: > Demonstrate flex item API usage on known network protocols. > > Signed-off-by: Gregory Etelson > Reviewed-by: Viacheslav Ovsiienko <...> > +* Match Geneve basic header > + > + .. code-block:: c > + :linenos: > + > + const struct geneve_hdr geneve_basic_header_spec = { > + .ver = 0, > + .opt_len = 0, > + }; > + const struct geneve_hdr geneve_basic_header_mask = { > + .ver = 3, > + .opt_len = 0x3f, > + }; > + > + const struct rte_flow_item_flex geneve_basic_header_flex_spec = { > + .handle = geneve_flex_handle, > + .length = sizeof(geneve_basic_header_spec), > + .pattern = &geneve_basic_header_spec > + }; > + > + const struct rte_flow_item_flex geneve_basic_header_flex_mask = { > + .handle = geneve_flex_handle, > + .length = sizeof(geneve_basic_header_mask), > + .pattern = &geneve_basic_header_mask > + }; > + > + const struct rte_flow_item geneve_basic_header_flow_item = { > + .type = RTE_FLOW_ITEM_TYPE_FLEX, > + .spec = (const void *)&geneve_basic_header_flex_spec, > + .maks = (const void *)&geneve_basic_header_flex_mask, s/maks/mask/ > + }; > + > +* Match if the first option class is Open vSwitch > + > + .. code-block:: c > + :linenos: > + > + const struct geneve_option_hdr geneve_ovs_opt_spec = { > + .class = rte_cpu_to_be16(0x0101), > + }; > + > + const struct geneve_option_hdr geneve_ovs_opt_mask = { > + .class = 0xffff, > + }; > + > + const struct geneve_hdr geneve_hdr_with_ovs_spec = { > + .ver = 0, > + .options = (const unsigned long *)&geneve_ovs_opt_spec > + }; > + > + const struct geneve_hdr geneve_hdr_with_ovs_mask = { > + .ver = 3, > + .options = (const unsigned long *)&geneve_ovs_opt_mask > + }; > + > + const struct rte_flow_item_flex geneve_flex_spec = { > + .handle = geneve_flex_handle, > + .length = sizeof(geneve_hdr_with_ovs_spec) + sizeof(geneve_ovs_opt_spec), > + .pattern = &geneve_hdr_with_ovs_spec > + }; > + > + const struct rte_flow_item_flex geneve_flex_mask = { > + .handle = geneve_flex_handle, > + .length = sizeof(geneve_hdr_with_ovs_mask) + sizeof(geneve_ovs_opt_mask), > + .pattern = &geneve_hdr_with_ovs_mask > + }; > + > + const struct rte_flow_item geneve_vni_flow_item = { > + .type = RTE_FLOW_ITEM_TYPE_FLEX, > + .spec = (const void *)&geneve_flex_spec, > + .maks = (const void *)&geneve_flex_mask, ditto