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 6673DA0351; Thu, 3 Mar 2022 13:20:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5E2640687; Thu, 3 Mar 2022 13:20:54 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 5360040141 for ; Thu, 3 Mar 2022 13:20:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646310053; x=1677846053; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=R2aV4tigz2mocpQ/7IlAzWIMjxElqyrWwmuIYeuhhuQ=; b=NX0H1QqxLJwvumk8GynPXWIjVkhX1KxJWjLHwiPpS5xNyf7ClXh+5oCZ 7Xkibj55IUB5oIZ3/bogCbURtX1WfVMvRYXWG6N1B+xraNyNY1SqKNNKH CgMnEHBdWt2Fc+pSC/+NHimpOksJEIKcMPiliYTXVBSe1gT5xx6uHRWTW opWUevJBf8hNPYjGf4X0ahJ5S6MA+WBLBiLVW6x2cQGNvCDgbQjwnXs/A zxS52nNw9awitEjJmASCz3Ydf4Re+MWbfNj+CsWp9ktId9h2pXegBOygs APCqx4duW2tFau7r11dp4jR3cjx7D/6awaQ/mxXAoGYeoVgRA8YW9Lkwh g==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="253393088" X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="253393088" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 04:20:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="594377662" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga008.fm.intel.com with ESMTP; 03 Mar 2022 04:20:48 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 3 Mar 2022 04:20:48 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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.2308.21; Thu, 3 Mar 2022 04:20:47 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.2308.21 via Frontend Transport; Thu, 3 Mar 2022 04:20:47 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Thu, 3 Mar 2022 04:20:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QLgJt+/V9Wt+r22v4HpCzEE3anoyrIDRVKLcad4kFngbJcKKFLgTWvOQD1HgMn9i0u+h9XLhXc8ePwka4g2NLnmMKDLVzL/O9c9aApE1+gU7ANPfyFWerkAvB+OwDa3t5xMimbBuGU2xeOz8TaNkNcDf6HE7HZFoyHNEyJa1BLvAj+Fo5MOFJ8fGGHHwpCnR3pU8moZ0LV2qAc79c+/c7SlCQQi957CuTuwzca5HdfttwsoLd7xrPqBt08ALG/WRUXnvwou9qFZyxMEs9/o2KJPO0hNmst1bverce0Uu9crRy4DqbHP7i6HszNGkYAFT2Qh0oaSPR5yfuHfZFeHGOw== 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=n7cAdvaUXltyZapKIcZCcAyfiBa1UpEUi1az2P3SqNw=; b=fm+TX9eRwtV5O3kUcwfMpIVEWN7h4yQiAj+hpDroTLdFVc8yp7a8WQhEc22+NiP6uvl8dP3dhZMO6yYlXmGaxpFeiAJaHz8RppM5073ymhFcR8boRQZpX0uSsfDx70ouerXhDMjIG/NaZ5jEX3/ylgg3L3bCWc7AszHMGo/Izxdu8jZ877laF1SDMXaYDOdZgqpWefBmf+gg9/egw1dG7I/B4EMH8wrRn0oHzdwgR+y/ZLi/l0+QHMieMvh7ycuAOawSZTWjMMxGgIckuKSJmBbXf+e4k086/EH1JiO1IdayJkx4EaVjaLVXeZtsfMDoMGNymubMl+GXMPAPdd7NuQ== 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 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 CY4PR11MB1975.namprd11.prod.outlook.com (2603:10b6:903:11f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.26; Thu, 3 Mar 2022 12:20:45 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd21:6fbe:8308:2ecf]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd21:6fbe:8308:2ecf%7]) with mapi id 15.20.5038.015; Thu, 3 Mar 2022 12:20:45 +0000 Message-ID: <254404e0-2882-3eff-2820-74063660a23b@intel.com> Date: Thu, 3 Mar 2022 12:20:38 +0000 Content-Language: en-US To: Dariusz Sosnowski , Ori Kam , Xiaoyun Li , Aman Singh , Yuying Zhang CC: , Viacheslav Ovsiienko References: <20220301115113.306497-1-dsosnowski@nvidia.com> From: Ferruh Yigit Subject: Re: [PATCH] app/testpmd: register metadata dynfield on modify field X-User: ferruhy In-Reply-To: <20220301115113.306497-1-dsosnowski@nvidia.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0029.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ae::9) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d8e1ee2-d164-4b57-ce5e-08d9fd103e14 X-MS-TrafficTypeDiagnostic: CY4PR11MB1975:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cw4hIlW/35VDB6h+XH1v1iDiNunXi4JFVIrAz18K2mhiQymXK6zBIH0GvqtuINoIAiY6yDnpOR8z5wIJQ/5OAhJs9go9/rVyw7ydygu0ak1WtpD3CaWR42rNs4YSTOFhcITYx/cDMiH50y7aczOq8tA5X9DtY1F6IFjUwgBMiZJ6MJ5UlchpbkUvCpCrG/hrDUZpyimZxKBap1mf5fheXwfVFobpPzrdXIwCzvzBkIsp6w7MbW4BQ4VOphusVcrAUQ4ZSAW/6DtfGzCIRFpDIUn4wpzr4WNy+InXkcdKSj3Gk4324xNGFENG2CGQkxaYLDuxlnNs8wJsZ3+cY72mBWEnomB6ouXFb77Kaz4tCgoS68pwRqTwD1ne6AjF172AKsqjyx0lX0wnGyu+91YwhdX/L90FbjgqjOezANQFfk/gdnFEgLRmkPAZIT9/NtOLvryRXdjND/30xvznwEwzWhyOIlFkqdPQfjLqHbszmRVMp8BuJq4/Ckifb+mHA8osBvTbZln/NxDijysfvztNIqL+IKinm9zn7PHQ1PpCXkRFIsfdgCUhMsNydGs1LqulOxWihHaRPgQWpKm5DxLkxcFeS2q/uNUnxDQgzQvxD5LRlzjzJz8BsEq8dNod6bfejZlZZYa7Ss2EIRgscRxVRdRXfnIlatw/utYGnwA5J7QMvSolHe2vGG//4hv0R1CVmInAqIFKl0TUmZkYJesTGw== 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:(13230001)(366004)(38100700002)(66476007)(66946007)(4326008)(6512007)(66556008)(8936002)(2616005)(2906002)(86362001)(31696002)(83380400001)(5660300002)(26005)(186003)(44832011)(6666004)(31686004)(36756003)(8676002)(508600001)(6486002)(316002)(82960400001)(6636002)(110136005)(6506007)(53546011)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cHpFRGlrdk5vSXJnY0xYZ3IxZENaS0s2b2txSjBmUVpWTnNKMkp6YmkzQUVJ?= =?utf-8?B?YWtqNVJRWkNIcUJtNC9ER0VLaWFWNHdmenRVLzNZLzc2LzFKN0ljOTN6S1Jx?= =?utf-8?B?SWVEQ3Z0MDZweFY3ZXRPcjROTkUycHZVUGhRUXJ5QlNsK0tZL25WeEF5cjJ0?= =?utf-8?B?bDlXbGJPSitTOW9uSWlKRVlaclJVYUtYbjljdEFKSy9DK3FxSUZYQmFjRHhl?= =?utf-8?B?UGg4N3dXcnBlNUtyVGhVQk8yMEFkWE5La3pzWVpvUC9YUkpvSi9pOFgyMWh1?= =?utf-8?B?dExQTTEvYnNaN3dRVGJJMlFsTncreGFpYTJBZUJ4NUtiUVUxakdldFdURFND?= =?utf-8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5WGhHd2lJOGxO?= =?utf-8?Q?N4ns+M2Rsubs4ndQIWBBBq4=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8d8e1ee2-d164-4b57-ce5e-08d9fd103e14 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2022 12:20:45.5615 (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: FGk0gzOKnAYZDG5LWWLGSa4MdIx3KcILKTlF/bSPPnLlFV0Pqg9xKQWGpNO3lEQOx4PBmhegc6yswWNAF4glyw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1975 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 3/1/2022 11:51 AM, Dariusz Sosnowski wrote: > This patch adds implicit registration of metadata dynamic field and flag Hi Dariusz, metaday dynamic field is explicitly registered when testpmd command used to enable tx metadata, or rte flow rule created with "set_meta" action. Can you please document more when this implicit enablement is required? And why that case doesn't cover above explicit enable cases? > whenever a modify_field action with META as source and/or destination > field is used. > According below code it is only registered in the DST_TYPE block, not is 'else' (which seems src) leg, is this OK? > Signed-off-by: Dariusz Sosnowski > Reviewed-by: Viacheslav Ovsiienko > --- > app/test-pmd/cmdline_flow.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 4f7a9f17f9..dd38a635b0 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -8347,6 +8347,7 @@ parse_vc_modify_field_id(struct context *ctx, const struct token *token, > { > struct rte_flow_action_modify_field *action_modify_field; > unsigned int i; > + int ret; > > (void)token; > (void)buf; > @@ -8362,9 +8363,15 @@ parse_vc_modify_field_id(struct context *ctx, const struct token *token, > if (!ctx->object) > return len; > action_modify_field = ctx->object; > - if (ctx->curr == ACTION_MODIFY_FIELD_DST_TYPE_VALUE) > + if (ctx->curr == ACTION_MODIFY_FIELD_DST_TYPE_VALUE) { > action_modify_field->dst.field = (enum rte_flow_field_id)i; > - else > + if (action_modify_field->dst.field == RTE_FLOW_FIELD_META) { > + ret = rte_flow_dynf_metadata_register(); > + if (ret < 0) > + return -1; > + } > + > + } else > action_modify_field->src.field = (enum rte_flow_field_id)i; > return len; > }