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 30AC54234B; Tue, 10 Oct 2023 12:49:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5EE240297; Tue, 10 Oct 2023 12:49:33 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2073.outbound.protection.outlook.com [40.107.94.73]) by mails.dpdk.org (Postfix) with ESMTP id 4630240278 for ; Tue, 10 Oct 2023 12:49:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D4Alp0T2wTIKNy7dlJekbprILyC0TukOLNnUS6bXlj6et7T0cN8r+qxH3MckZ4u34/ZEEtYcAVRfXt4DAIlHgF65l3EreC9/qVxPpNyUzsbicElgr3s24FhbRcCKTVg/Ezt88yYowEidQtyF1JTL3xkanoBuzqZa/YJ1qDZPRRON31GjKpo25gfiHnB9gwGsIBggLxsm0bDkHTWuhN0xzO5Q4avsdWB7ICTa4OT4JYP0zr3dXt/9yqsi2Wqx3yIkOeHmdSUA3WypECMvQaY8QncJjJ7rXw0eJO/YGqiRx+YcQ8rGfq7XG88ezU04JgKvGRpFLa4gZZNaX8Wz8Ia7fQ== 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=snBcrBdxPpOgY2vPe5tp+vT4hKRWsClHKH0uvuLLB4Y=; b=ZbczFjaHxpx8wDJZSSiHSdHOcHxG7+wp2lI5I/pbeY2tEdviG6zbuKd7gbK6oXwmr6p0XOw0i0nQsss0Iv2eGx9JHoTFY/eNB06nOoNegLlr7WeOeBF4EHr28ALtUbckOshyAwWWdsrTicFFBJB25Q0YbeMRBgzeSgkz+YjX9rR+08NAqXFsWXT0lqBbQmbrqo7nNLEQkKBr5h49GMPZ6rAB6Q0UAH3HqlEusz1XCrECD3U0oCaUnrxNPlcqYuGB5G/jILptFoNpXOjiU7LjII9YSPwFK1gIZ77DtwUEKJVdhP1VNovgIzrnGHu/GMf5fQ2+vkOzVh2Vg8DQBFvHMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=snBcrBdxPpOgY2vPe5tp+vT4hKRWsClHKH0uvuLLB4Y=; b=RdfSz4swfR/ZIg7XcbsXJ+XijT8+KoECDQrjH+7pgHBRMrZRaVZ00sFJHqlI7afRplT3sgF2TI8AdrBQdOAwYb2dPJvbomUpb4ZIsqJhq5muLROZyy3W5/h1mho0ScP4Q8zHtnkmbu9PJ/TMS2EdYxa1bYlWcPLH94HlilcjJfk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by BY5PR12MB4260.namprd12.prod.outlook.com (2603:10b6:a03:206::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.41; Tue, 10 Oct 2023 10:49:29 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8%4]) with mapi id 15.20.6863.032; Tue, 10 Oct 2023 10:49:29 +0000 Message-ID: <06ff4322-bc65-4092-af18-21bfedbb8daf@amd.com> Date: Tue, 10 Oct 2023 11:49:24 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4] app/testpmd: enable cli for programmable action Content-Language: en-US To: Qi Zhang , aman.deep.singh@intel.com, yuying.zhang@intel.com Cc: dev@dpdk.org, cristian.dumitrescu@intel.com, orika@nvidia.com References: <20231005100246.242970-1-qi.z.zhang@intel.com> <20231007104730.441719-1-qi.z.zhang@intel.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQ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q29dihLYpzd6dqB708k7 4RBz9051oLaFVGkguFw/tXmA17nx+c2uR5jx8wb4j68umG2X++0dSta5eHAVhmtXvrqPW6Ku 3FQ= In-Reply-To: <20231007104730.441719-1-qi.z.zhang@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0139.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c4::14) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|BY5PR12MB4260:EE_ X-MS-Office365-Filtering-Correlation-Id: ed282381-5dce-4f4a-2938-08dbc97e9420 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g34JytIyd/HBNSoBdKtHgel7XbyyQLe+dBEWV16CAzPqKev48ZWYXQU9A8FA84sEYwSgI0a+hmTask7qKjIZ2kJFwMtq533ctjl0eIch2ZaP5PIqbfGhu8zL93mraFaPXLmHO2jf0zzsGoMP7woBvp/XWci4ebTrX3lYNwbYsl2NZt9AXUdMr4qy5C00e8voEcgrF1PGsYBWkzV5TlmKZ4LcWq/opRS+pnmdNfmMAeJ87ESrNQ34++VMgksiQtSe5eZh8UNZO8yKRPMvDJv7Lu12A3mOSwEQcRkeFBetN7tl3HewJta/0I0XVGPdQcgFBqkczs8DXYDWzEK1ct4+1Wqwii4bWmuzkeymVvLsE4FIVuFJ3qeH/rm7eHzdm/DMer+GCmPOmGI5j8FbfVQkU1LGJ9dd29232O8pffSwKuJ97aEGRAm4NT859/d24Nx7FEE4VTAv9PH1ffMAMUEs40XObz7sxhEvhz6LJb+M4z19D11r6kTfgLs9JL9rjggCweL3E5gQOfC3ugFC5wbPMS4omqtMzHTiMAvAfTrtuA6sGDHqKB0RKGEAk73cT093x63gG6ib9lJNJDfxEr5d3dsbR+Ha1ylllBMju5kiv/zYqB0yTB7qM/P02zOOgDuiEcsS+4oppZfoffVarRDrNw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(39860400002)(136003)(396003)(366004)(376002)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(478600001)(41300700001)(6486002)(316002)(83380400001)(44832011)(8936002)(4326008)(5660300002)(8676002)(66476007)(66556008)(66946007)(31686004)(6666004)(2906002)(6506007)(53546011)(6512007)(2616005)(26005)(36756003)(38100700002)(86362001)(31696002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eU9NZ245dW1ENjVoK3ZRZFJaWEdScW8zdEtzM2xCV0FBaHBSdWlsYUVuMjY3?= =?utf-8?B?QUthWmVJN2ZGTkExaCtvQ1hVa1F1OVlRd1ZWd0FiK0RlcHBGVlBVMktLSGdy?= =?utf-8?B?MVhIYTczbXZqNXh1ZjVZNWc3MXFsdGVDeEwwUTJkNXA5Tm1qRWdNb05SYThJ?= =?utf-8?B?S01SdFdsdnJHZUV3dHpTclczWVdoTGZ1VGoxMnd3ek9oZGgzek04ODNNZUI2?= =?utf-8?B?QVNUNVpxUW9KUFVZVWVHZytqUktTMThhRTl1M2ZSWE44Y2hLWFZoNkZOR2hi?= =?utf-8?B?UmdOTUc2RnhTQlIxcG1zMlBsdnB1WWVKRlh3N0lJUXpSeWp3WTd6alRIazJt?= =?utf-8?B?djI2Zlh6SE5OaDI5dHJzTDIxeWVDT1NIQkoxRkYvME4rRlh0YmNJQmpzNHFk?= =?utf-8?B?MUNEZDJJSlJoM2wxcHJXakFFM3F2VXJEZ3dERHJUdEpURkdpUkVNSVRxZWt2?= =?utf-8?B?SSswQlJRVktoZVBwWmdm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XQjY0ekFsZitrR3RNMWxISVRMbVJVdktuVXNCazdoYWEyOEtDNGN0ekhl?= =?utf-8?B?RGp1NGs0MERlNStOMTFJa3lLTng4K2Z6UFNFYTB4TjluSUpxSXU1KzV6K2o3?= =?utf-8?B?a2djeGV6TmFVNlNsYy9SQzhUM3JCZTlRd1BXbFE2VExpMEtrQStoZDFDeHZw?= =?utf-8?B?alFlWFdOZ3F3bVFVUlVMTW94ajhhSVhNOVMzdUswK3pZdHMvT2pJQTNhMmJZ?= =?utf-8?B?MmtpNTIxRzhwNlB4Yk5CdEpWMThmU215SzRiSG9RZVI5NHJHRU91RGcvbkY2?= =?utf-8?B?cm5HTnVmeHB0cmg3ekFCTHloZ3JiOGl0TGNBOXlmcVZLRVRpakY1TnNsWmJp?= =?utf-8?B?cTVsTjVMZ2wwbDJyQUliNkZ6VE5oT2NvbEpJZGhybURyVUNzTGQveDhNU2NM?= =?utf-8?B?S0xrYVVWb1lNWUtCTTlIdWJ4cnE0aUJqa0MzcTJqd2VxUFdrSFNVWm9ZWDVi?= =?utf-8?B?V3c2b20wWEhoU2tQcEMvQ2JjZHZKY0NLclhWWXM1aitUZmEvemdjRmlOODdD?= =?utf-8?B?MzN2L28waWRvMEhTRzlsbXluSnQ0TXZpYndVaCtoNDJHWk1vUjJacldiNDZK?= =?utf-8?B?T0t6RWRxM3JhdEx3TDJKWDZPVHNWZUR3V0lsWTVaNE41YVo4VFBsZis3Qmhv?= =?utf-8?B?WFNyTzRhaVFIMmpFcnNXSDJycWxUcmMvSVEzazl2ZERhUTBLanJ5Tk5kRkpQ?= =?utf-8?Q?0eYHshAnZZVjwbKzrQeCyymS6?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed282381-5dce-4f4a-2938-08dbc97e9420 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 10:49:29.3327 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ez4SHG0HZfbLpAv1nfTRcM1hgETpcnF6XTymmwFWx0XgHO19uENKf2g0Bg78W4Df X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4260 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 10/7/2023 11:47 AM, Qi Zhang wrote: > Parsing command line for rte_flow_action_prog. > > Syntax: > > "prog name [arguments \ > ... end]" > Can you please put full rte flow command in the commit log? Like what is the 'pattern' for above command? > Use parse_string0 to parse name string. > Use parse_hex to parse hex string. > Use struct action_prog_data to store parsed result. > > Example: > > Action with 2 arguments: > > "prog name action0 arguments field0 03FF field1 55AA end" > > Action without argument: > > "prog name action1" > > Signed-off-by: Qi Zhang > Is there an existing driver implementation, checking it helps to understand feature implementation? > --- > > v4: > - be more generous on the max size of name and value. > > v3: > - refine struct action_prog_data > - enlarge the max size > > v2: > - fix title > - minor coding style refine. > > app/test-pmd/cmdline_flow.c | 232 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 232 insertions(+) > Hi Qi, Can you please update documentation too, `doc/guides/testpmd_app_ug/testpmd_funcs.rst`, `Flow rules management` section. > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 21828c144c..ae5556e704 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -719,6 +719,13 @@ enum index { > ACTION_IPV6_EXT_PUSH, > ACTION_IPV6_EXT_PUSH_INDEX, > ACTION_IPV6_EXT_PUSH_INDEX_VALUE, > + ACTION_PROG, > + ACTION_PROG_NAME, > + ACTION_PROG_NAME_STRING, > + ACTION_PROG_ARGUMENTS, > + ACTION_PROG_ARG_NAME, > + ACTION_PROG_ARG_VALUE, > + ACTION_PROG_ARG_END, > }; > > /** Maximum size for pattern in struct rte_flow_item_raw. */ > @@ -749,6 +756,23 @@ struct action_rss_data { > uint16_t queue[ACTION_RSS_QUEUE_NUM]; > }; > > +#define ACTION_PROG_NAME_SIZE_MAX 256 > +#define ACTION_PROG_ARG_NUM_MAX 16 > +#define ACTION_PROG_ARG_VALUE_SIZE_MAX 64 > + > +/** Storage for struct rte_flow_action_prog including external data. */ > +struct action_prog_data { > + struct rte_flow_action_prog conf; > + struct { > + char name[ACTION_PROG_NAME_SIZE_MAX]; > + struct rte_flow_action_prog_argument args[ACTION_PROG_ARG_NUM_MAX]; > + struct { > + char names[ACTION_PROG_NAME_SIZE_MAX]; > + uint8_t value[ACTION_PROG_ARG_VALUE_SIZE_MAX]; > + } arg_data[ACTION_PROG_ARG_NUM_MAX]; > + } data; > +}; > + > /** Maximum data size in struct rte_flow_action_raw_encap. */ > #define ACTION_RAW_ENCAP_MAX_DATA 512 > #define RAW_ENCAP_CONFS_MAX_NUM 8 > @@ -2169,6 +2193,7 @@ static const enum index next_action[] = { > ACTION_QUOTA_QU, > ACTION_IPV6_EXT_REMOVE, > ACTION_IPV6_EXT_PUSH, > + ACTION_PROG, > ZERO, > }; > > @@ -2510,6 +2535,13 @@ static const enum index action_represented_port[] = { > ZERO, > }; > > +static const enum index action_prog[] = { > + ACTION_PROG_NAME, > + ACTION_PROG_ARGUMENTS, > + ACTION_NEXT, > + ZERO, > +}; > + > static int parse_set_raw_encap_decap(struct context *, const struct token *, > const char *, unsigned int, > void *, unsigned int); > @@ -2786,6 +2818,18 @@ static int > parse_qu_mode_name(struct context *ctx, const struct token *token, > const char *str, unsigned int len, void *buf, > unsigned int size); > +static int > +parse_vc_action_prog(struct context *, const struct token *, > + const char *, unsigned int, void *, > + unsigned int); > +static int > +parse_vc_action_prog_arg_name(struct context *, const struct token *, > + const char *, unsigned int, void *, > + unsigned int); > +static int > +parse_vc_action_prog_arg_value(struct context *, const struct token *, > + const char *, unsigned int, void *, > + unsigned int); > static int comp_none(struct context *, const struct token *, > unsigned int, char *, unsigned int); > static int comp_boolean(struct context *, const struct token *, > @@ -7518,6 +7562,48 @@ static const struct token token_list[] = { > .args = ARGS(ARGS_ENTRY(struct rte_flow_item_tx_queue, > tx_queue)), > }, > + [ACTION_PROG] = { > + .name = "prog", > + .help = "match a programmable action", > + .priv = PRIV_ACTION(PROG, sizeof(struct action_prog_data)), > + .next = NEXT(action_prog), > + .call = parse_vc_action_prog, > + }, > + [ACTION_PROG_NAME] = { > + .name = "name", > + .help = "programble action name", > Can you please remind me again what was the 'name' filed of "struct rte_flow_action_prog" was for? > + .next = NEXT(action_prog, NEXT_ENTRY(ACTION_PROG_NAME_STRING)), > + .args = ARGS(ARGS_ENTRY(struct action_prog_data, data.name)), > + }, > + [ACTION_PROG_NAME_STRING] = { > + .name = "{string}", > + .type = "STRING", > + .help = "programmable action name string", > + .call = parse_string0, > + }, > + [ACTION_PROG_ARGUMENTS] = { > + .name = "arguments", > + .help = "programmable action name", > + .next = NEXT(action_prog, NEXT_ENTRY(ACTION_PROG_ARG_NAME)), > + .call = parse_vc_conf, > + }, > + [ACTION_PROG_ARG_NAME] = { > + .name = "{string}", > + .help = "programmable action argument name", > + .next = NEXT(NEXT_ENTRY(ACTION_PROG_ARG_VALUE)), > + .call = parse_vc_action_prog_arg_name, > + }, > + [ACTION_PROG_ARG_VALUE] = { > + .name = "{hex}", > + .help = "programmable action argument value", > + .next = NEXT(NEXT_ENTRY(ACTION_PROG_ARG_END, ACTION_PROG_ARG_NAME)), > + .call = parse_vc_action_prog_arg_value, > + }, > + [ACTION_PROG_ARG_END] = { > + .name = "end", > + .help = "end of the programmable action arguments", > + }, > + > Does this means two 'end' required if multiple args provided, like: prog name "name" arguments field0 03FF field1 1 end / end I am aware there is variable length of key/value, and need a marker to stop, but this end specific for action is not used, I wonder if that is because there is a better way to do it, @Ori may comment better.