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 939A342D94; Fri, 30 Jun 2023 12:21:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 222CE406B6; Fri, 30 Jun 2023 12:21:36 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2074.outbound.protection.outlook.com [40.107.223.74]) by mails.dpdk.org (Postfix) with ESMTP id CAAFC406B5 for ; Fri, 30 Jun 2023 12:21:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h/WRcivunMgGhUtX3+/6bEpUx6vX3+zFaASCYGom5M3SL8OleL+00XtzPStPYFrrqGibCuz47ZQO6kfttcExO+okeCiNATai+USPehYQxwyTPn0JYMA53KS9PVKOOwxEo88JLyuORHMKGv81IWUbigE32KvygtDA+Jxwa/Z91vqzSHUDEE/FWH3wy4mCyag18ZFfE5/woXYyFLmVCLnHjx5OyjKQkIi5bcuWS4sOLQAbTp91dTWsLlNhwhrlm4GhN6P1GHTgIm1sDgdx5383ezXpRGuSV5qHR0++trplYJzaf0mperRmRtIkUYqva0cnubAcThb43VzRLBPKNhL+qw== 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=3uLSYolemVeAnPeltFR0f7pdzxO83/aw60gHzJxN3Yc=; b=XFdCOvUPZaoGniSH4dO9bhWCptmK+3VzL7tlgCE5bL995VXOLNzYdOXpHmpF8fT1ZwLFV1g/Q4DNDfrs0DvFkG8InI+X86b2WoIfWQjmMQvXRTmAAjdVJh5hRLPtaqude87ixRMBYB2khuAQp2di8QLC6iUXqNAT+2R47RNexPc/GDbFmPHajLHSszvLJ1RWBB1yNSXJGacy7//T5/aQBD/aMA1W5eed5Hc+xltZSuyui2YlBUQdy75SjZaapcrXFMVDSC7MxFkWJ1Srte+kYcl4uHO190rFNeQ6VulGyFLQvGb5xdJPJH11QAVZ+a/ky8TJ5EfdGo1MFeJyj0wMDw== 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=3uLSYolemVeAnPeltFR0f7pdzxO83/aw60gHzJxN3Yc=; b=pKTq1sEgIYc6UHkAKT3eZJkVRK54aad/jTSMnAg36ShJ/FcCnZz1BX9ndS1+S8hXzyrmJxGwBzYPfGoIXkBka74q3YOBCTpljRbtpjWJvdnrwui88knVSW1UBFtHZq6HFln+MAPa/GjPm2mKq8mBLLfZyLPT5FHAIJ5BwfMpUBY= 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 SN7PR12MB7788.namprd12.prod.outlook.com (2603:10b6:806:345::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Fri, 30 Jun 2023 10:21:31 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::16e3:326c:5c2a:be42]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::16e3:326c:5c2a:be42%3]) with mapi id 15.20.6544.012; Fri, 30 Jun 2023 10:21:31 +0000 Message-ID: Date: Fri, 30 Jun 2023 11:21:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH V2 2/2] app/testpmd: assign custom ID to flow rules Content-Language: en-US From: Ferruh Yigit 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0056.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:153::7) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SN7PR12MB7788:EE_ X-MS-Office365-Filtering-Correlation-Id: 811aa167-cd03-4367-424d-08db7953c5d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xC0SuX1z5tSSrnidrJJ8U/Hg4bfEWvHOlPKqqliAgkFMNvjGKuKY48BN576raUppceLMKfoWAk/ExaezLJSqpN8gLE1256xHUcJIFW9Jvi8jgfjG8Ov5rYSb45yQOfX02cR+2Tc0PvVKxNJaumBjc4EGGLZ9i5b2dvXEsNMDJU0isL+jbF1LKXVr2wByRaLr4nvVKBAIKgYGAdSymzn0FziF4arrf9GDh67LOHJGppWkQcRr/3bewb3WD+BicV32tLYT79EeiXfx6r8LAD+rLnJaEW41dQv+Rqm8673xIyHYxHlJ/Wfd0oK4ueHgjg2HH6+JU63sh5Tv3WigbfuhncxWw702A0XhCG4oGgdCF2tZo19UfgpqzIDwTA7+dyFIyfV1zlt3c6uMig/cJemvZsgVL5L7Q5EUCQ8LnyRy726ZRW+He+dXOmlkerOli4+7sqaK8iEywaa7sIhfuPeFQokLf7HNFFRHHD/nZ4EkyzxO9DrgXsE2t0/Cc3Gg0dLlHRyrfvQ1z59szgMsVrujgkj+oWT5tiw8lDZiR6hOnaEr8mcVGCrQKmRCybilYhVJkDKjzzVffbp3kDukV0NQAnhv2RIppmMer3aA/DedUrI0+MTQkq3aWA35OEa3/dlguieTq6tHaJzeGll/e3JJXQ== 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)(396003)(39860400002)(376002)(136003)(346002)(366004)(451199021)(31686004)(66946007)(54906003)(110136005)(66556008)(66476007)(2906002)(44832011)(36756003)(8936002)(316002)(38100700002)(41300700001)(4326008)(478600001)(83380400001)(6486002)(6666004)(5660300002)(86362001)(6512007)(31696002)(8676002)(6506007)(26005)(2616005)(186003)(53546011)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ajBaRUR3REtlYklRdmdCOFZWbkQ5MHAvakFsYVV6anozT3BSNldUdHhJTFN6?= =?utf-8?B?SUUwcDdDSmVYNktOWEp6YXFwc1Q5VTZ1d0s0cXQwbEN5WUZlV0crYlRPNnFY?= =?utf-8?B?MFlkZFJKcERUTERKa3dNaFlPbE84Y3Q1L01FaUxVc0NMdFcvWE1GN1pHOU9S?= =?utf-8?B?MTQvOXNDTHRjNjVFZFNqTVkvbldWLzJRYWVMUTBjNmxaMlRObElFT2x3cmRa?= =?utf-8?B?MFpJQ1ZDbzFFVDhnVDl5ZW5RWEdWQ2J1QjZZRW95UXVOR3ZEVG9uSzVTSXRG?= =?utf-8?B?RnYzS3NOaVNiK20vRy8xbHhsWGdKV25PVVM4WTVCYW5QUjk1cmVkQUpoSmlv?= =?utf-8?B?MzhUM2Z1a3pGMHY2ZGNvbzY3YkVrNEdublZYOUd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953c5d9 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 10:21:31.3820 (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: cKJE3GlrHWb2sbDw5qkpBzp5uCvDNl67cpzo1EH/HD9+R8SE+DY/2LTGXuI+uRuO X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7788 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 6/2/2023 9:19 PM, Ferruh Yigit wrote: > 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? > Reminder for review.