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 834D442C12; Fri, 2 Jun 2023 22:19:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8929427F2; Fri, 2 Jun 2023 22:19:46 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2052.outbound.protection.outlook.com [40.107.244.52]) by mails.dpdk.org (Postfix) with ESMTP id 082E940F16 for ; Fri, 2 Jun 2023 22:19:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PzH4tTYZUDaFCDL6n4wA051mMMopt9/OqCxx1+rLglv5NGcC0DL3fInO/53HquYgOY0LuBW5MauDYD5QMn2nSwhcu7+SUQ0R2lcq6Sd2Ri87TdGsFd70L/254IAGgW4ehLxI/QuZyh97gzRT7ZZgkwGtcdovv2nts3PUalndBSsnzFOZn0AP0h9n+pyEy+7Sjy7FhNDutVJ8lGw0HNg4esG9kNb1xKPRYbg9HDR7rpVhgGmp80aJQ6yfSvDyveofRG7PuCPDtB8VPI24ghaI1+3qlJ+WAUbxjUKAoqSK8j9sce4mfyojj2DFZZiwa2e0Z2TOUyA0+7yt/jLM6xCELA== 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=PgCDO3HGLu1kkfvNB2DB+WI6/9Frh+8M9RiZlW8bQFw=; b=itN2tzwe+xyjwHIlNujOiTo+7uRxeJ0GyoTs6Xn8t5NjI/8dsUmZjn5+NyblxuoBGn8yGHZUE85qck1bc19BeidKgTmVALtRHYxTrc6cJWFs399Rw/BqvAye9rS/s89yZQDoNjvIQrHMVF6LZ/potUNpJoRZbPvZn9TUQjwnAlk/2Ml0N7VxqD6A5c3g0S+zRNEk09LK4LFwCjvO85HoIbBtKtB90PiQzoWJIPEvG5uUD38hApmmbIcOJL0wDQ49iROjJzKiuJK0zN0lSostcijHbVWjB69mS88SGU7K6QGD1IKnyB92p4/ZJrBnOtv/BSrYnqh9AOGjQJhpPMb89w== 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=PgCDO3HGLu1kkfvNB2DB+WI6/9Frh+8M9RiZlW8bQFw=; b=xua4sdaSGP/LnXtlxt/SBqI9swfWlVQnqTAxhBXMn6ex3uFTOh6R4c7cZ7xcnK/npqLFilvhEjDahLdx8+/GdIHrQpMYTs2IpIcJ/THNCRR2ckWvgZbUSJve/bY70oMtsDaZM9fQkTNW7fGI8OQKDrK2riZJgCZQlbvUGt6sjJw= 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 BL1PR12MB5923.namprd12.prod.outlook.com (2603:10b6:208:39a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23; Fri, 2 Jun 2023 20:19:42 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a%4]) with mapi id 15.20.6433.022; Fri, 2 Jun 2023 20:19:42 +0000 Message-ID: Date: Fri, 2 Jun 2023 21:19:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Content-Language: en-US To: Gregory Etelson , dev@dpdk.org, Ori Kam Cc: elibr@nvidia.com, asafp@nvidia.com, tmonjalon@nvidia.com, Aman Singh , Yuying Zhang References: <20230222141139.3233715-2-elibr@nvidia.com> <20230316141934.23181-1-getelson@nvidia.com> <20230316141934.23181-2-getelson@nvidia.com> From: Ferruh Yigit Subject: Re: [PATCH V2 2/2] app/testpmd: assign custom ID to flow rules In-Reply-To: <20230316141934.23181-2-getelson@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P302CA0037.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:317::9) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|BL1PR12MB5923:EE_ X-MS-Office365-Filtering-Correlation-Id: 163a9c84-13fc-4394-8b6d-08db63a6b32d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5M4FYQmk0nR9lrHtPUpEzC8HBiHGyAIIy4UDCk2X9RdAH2TW9XtH45R7eTaz4Ma2TS0ILjH2agccKRvkxKVfTPLDwDwSi5FuomE8N3e7iPQK//SbEJgv4ML8uX9mV1SCCJ5oqZErf8slgMcN2qnQEL2MjnApyadotoeBFsxPpSiQixxpB8lrFc+4iX5J5cH+2n9gx/d2vY2fday+Bb4Jg6r38oaHGsZpufXyAXV0Bcdnm+7UB8K+UUpX9yfuXHv1glTeJfdbE+DskrmrKziG0/u/JKHQkujepdE7MdQ0/CeR9rS7/TrAmDnSe8wKMrimqfgkKI2KdH5zvXPl13/QNSOwmrU3eDTV7RhScGXxWkmfYcnhej5Bn8Be52x9rR/oLy7d0I51P3OzjcBllkSo8NeLzwVnh6ufEizipvGTP/xwxWBaUQ5Az1kqPd22M2XnsWizHFH9dTXbYO/loUumqF7ufSHkcHSSrr0BsFi50qhtRtZKGrQvfv+sXbsgbQaFAdHAkxlYBek2FzEqSUwVePtxid9WSqR1z4dyLLAjZvJG4kGoHzyRTxeqeNbTxvrEE9o6CjrbVtSPbJp5eQtPYT3pWl45qiiLybjlfTYuN0agEvb3u9Ftms6I7wVE/quRoWv2X7iFykwoaDte2gwI5A== 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:(13230028)(4636009)(366004)(136003)(39860400002)(346002)(376002)(396003)(451199021)(44832011)(66556008)(66946007)(66476007)(316002)(4326008)(41300700001)(110136005)(8936002)(5660300002)(31686004)(2906002)(8676002)(54906003)(6486002)(6666004)(478600001)(26005)(53546011)(36756003)(186003)(83380400001)(6506007)(6512007)(86362001)(2616005)(38100700002)(31696002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QkNWamZZa000M0p0S1Y4ZmVFU04vaGZ1TTVxTWxrZTZUT0tBZTZnUGRYemdq?= =?utf-8?B?QmVuazdEalNCMkxXUVhCVHpGOWhjcXhxM1hYY1dBQkZHRmNsVXk0T0dCdVZu?= =?utf-8?B?SzlBNk1iYUtuY1NnbUZ0MTdERXFSdTlQSVRDTjg0OWpFbUE4YVB6V3dUSC9v?= =?utf-8?B?WFRDaVBrdDVJOFo1N1JtVkVjUXlGRWNaYXFqclFBUjdsKy9TZlZFWlhMcjBP?= =?utf-8?B?S0JMSEVhdERJSXJEcGNCTytmSENhTU56Um5NOTZSQUpGajZFaWEzWU5sNVZV?= =?utf-8?B?YnJ6V1dzbDk2N3kxdjNmYmx4VCtDYWtzbStoRzNCYzd5MVRqSjZVOVpMcUN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utf-8?Q?Y0Ei6xt2Wqe+xGsJ0kJJCzCNy?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 163a9c84-13fc-4394-8b6d-08db63a6b32d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 20:19:42.7062 (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: fCzZ/NYkithv9txgIDcmdnPXurnnZp2JrJPuVnqNOhyElxcxKmPh2chZSbG2Ax+u X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5923 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/16/2023 2:19 PM, Gregory Etelson wrote: > From: Eli Britstein > > Upon creation of a flow, testpmd assigns it a flow ID. Later, the > flow ID is used for flow operations (query, destroy, dump). > > The testpmd application allows to manage flow rules with its IDs. > The flow ID is known only when the flow is created. > In order to prepare a complete sequence of testpmd commands to > copy/paste, the flow IDs must be predictable. > > Allow the user to provide an assigned ID. > > Example: > testpmd> flow create 0 ingress user_id 0x1234 pattern eth / end actions > count / drop / end > Flow rule #0 created, user-id 0x1234 > > testpmd> flow query 0 0x1234 count user_id > > testpmd> flow dump 0 user_id rule 0x1234 > > testpmd> flow destroy 0 rule 0x1234 user_id > Flow rule #0 destroyed, user-id 0x1234 > > Here, "user_id" is a flag that signifies the "rule" ID is the user-id. > > The motivation is from OVS. OVS dumps its "rte_flow_create" calls to the > log in testpmd commands syntax. As the flow ID testpmd would assign is > unkwon, it cannot log valid "flow destroy" commands. > > With this enhancement, valid testpmd commands can be created in a > log to copy/paste to testpmd. > The application's flows sequence can then be played back in > testpmd, to enable enhanced dpdk debug capabilities of the > applications's flows in a controlled environment of testpmd > rather than a dynamic, more difficult to debug environment of the > application. > > Signed-off-by: Eli Britstein > --- > app/test-pmd/cmdline_flow.c | 72 +++++++++++++++++++-- > app/test-pmd/config.c | 34 +++++++--- > app/test-pmd/testpmd.h | 12 ++-- > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33 +++++++--- > 4 files changed, 121 insertions(+), 30 deletions(-) > Hi Ori, Can you please help reviewing this patch? Thanks, ferruh