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 61E6441DA2; Wed, 1 Mar 2023 02:01:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44CF740A8A; Wed, 1 Mar 2023 02:01:05 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2071.outbound.protection.outlook.com [40.107.223.71]) by mails.dpdk.org (Postfix) with ESMTP id E246C4067B for ; Wed, 1 Mar 2023 02:01:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dzdOxaujGng2Z0Fj4WQzFOEPeHLvymVLH+lzy8obWitE4XKTTwGOGD31+3s7Bk84jsLHbrvlKHZsWoZ6XWGDvf6c/E9TEyq9gVBd7S1vw1nltbpaBqmGxplj7iHBkzNDgRV+404/0eITQ51DjBQiHuaWyouKt6ECBs/h+mFyRobQSJsFBA355H6cbFlwZ3oBc6tFJunAG/1XlHiSZctFhJJ8jLwjfTuZLfUtD4CydJVUt3Eu9702Hnj6IBnkSjbRGhW9KBkn5nji19G09KBqJh9pcw1jnJL6gq62VYMzLVviHIbYye3A3ZNqezY1vk1dZ1ps+eXw6eHP/xNdmiPTLQ== 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=bcVBbSHU2jEktlnbqRddTV+n8/wrWmOOK1rldQyCKtY=; b=Rr9wNozc8HiN+F+RDhSe+BtTAbUVxyx4oVkGRmmvXhSvNeXXEtW3w/W9wFl4148emAfRsThibHImHZ6pOagUjAyLKUFr0yrUYvvfBZpOzIlecrtwQFuH/PNSXZJwE3DThR/WZr36ZkN8mBqOAXBeyS/dvxDqa3jP5jqUPY7UTxCw6mL8rg2SM5v7TEbnb0IGiNbQPZ6praCWilAbfiBx3PzEtSxzy32vOI+Ihw5lKpMy1Kyw007HFd+EQ88O2VKNAib9UrTfwazo7igfG/U/W2oFXzBEQHb10y/Ru1pymyHm63UXjZ4Dtfq/6TYBwZAlUtO1fw3gJICqprBRlMucxw== 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=bcVBbSHU2jEktlnbqRddTV+n8/wrWmOOK1rldQyCKtY=; b=RjLvrneyleIkBgCUsS1+7pLsi5wrqLKNWT0k0vGPQF8sVwimHFa2LAow4LgAWsxprIeDQbQycIfitr6QkT0VRuMYNvHhDehGBbIl25RJ6qbR4c541Kus840sRnfs0rXM8jhGMZHeZS7YRyQMYFEfM38+/BCvvoy6Tzz/9bvWq6Y= 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 CH2PR12MB4890.namprd12.prod.outlook.com (2603:10b6:610:63::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29; Wed, 1 Mar 2023 01:01:01 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%4]) with mapi id 15.20.6156.017; Wed, 1 Mar 2023 01:01:01 +0000 Message-ID: <47c87597-92a9-8708-c7ca-3c8a6c1bc0b9@amd.com> Date: Wed, 1 Mar 2023 01:00:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Eli Britstein , dev@dpdk.org Cc: asafp@nvidia.com, Thomas Monjalon , Ori Kam , Aman Singh , Yuying Zhang References: <20230222141139.3233715-1-elibr@nvidia.com> From: Ferruh Yigit Subject: Re: [PATCH 1/2] app/testpmd: change rule type In-Reply-To: <20230222141139.3233715-1-elibr@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO0P123CA0011.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:354::15) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH2PR12MB4890:EE_ X-MS-Office365-Filtering-Correlation-Id: 837fabae-4ec5-4713-6384-08db19f06cdb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m8nqia2XBigr8Uw96DFAA7s4AcGs0Seg8RAln49j9un39NlH7hZYMUuFZHFEIsJI7if+b+qUdfemjaddV9BcE9FniH58eNzgo8K3RFuxsb9nfXcskVe3+fPrV/iHfnn0AtyzPKUZwCUd8hwKEO5rAeR3+J9iElGe78UTN1J/+/1pbuwhAc2zzOrcY6vQWrtjooDmuyPqP11fbryhRdpAOjGt/WhvtprbZ1DAcHQBpQAqatoasjEMHfJQlKxGOpQ/BNG10Xi+sjamXtQnzI3GCTZwUVRG7NgE9UPwwyn7BgTl5HM9mHtXeuICpAfKezNrC4RFSFs6ngbTBpHc/7uHjv2v9VFCDoLbDNcRZatIjEzPD5/j61ZbyoVsnxcOPDLxi1p+ZdGcqM34WuJX7mHiZ8ApQHXTkkniPRVS+vzSlZ9UMd68LfxHR5ypr6NYtswwo0dQmybFZEe6p4NVB2JG76BisX7m3g8njlrxytooXX1Z5ySBW5vM2CTy5+NUGhcf+RNXUg/JwdhBXrPapnMxBks00VFgUyFTWGVzXXBjGnIZumsiGqMOk2ut1g98E4Mm1Y+3foGThG3MADl7wAmcxNFvJ56y+WG2MvtcQPHG1hw5itEsKHju6YQK0SfA4gcgEP5n/yGHbidhX+WpbhDDjJA1pBK7nrs28sje7umHaowTTU1lq5DuUbmNBQ23hpIlfTGVgtVCiWxB+fDpJ41fRLacl0nxr5Yo0tHDMSiY1JA= 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:(13230025)(4636009)(376002)(136003)(396003)(39860400002)(346002)(366004)(451199018)(36756003)(66476007)(5660300002)(8936002)(38100700002)(6512007)(6666004)(6506007)(2616005)(186003)(26005)(53546011)(83380400001)(31696002)(316002)(41300700001)(86362001)(66556008)(66946007)(54906003)(8676002)(4326008)(478600001)(6486002)(31686004)(2906002)(44832011)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SWZTOTltSHlweC9UeWh3ZjdZMEdsNWVlbE1TZVZoN3d2VlpibGtjajRFUllN?= =?utf-8?B?OFl5NE9LTU1rQkJXeStha1BoQ3FXdW8zR0VZcGw3Yjl0YjBuZWJmWWpnRHNj?= =?utf-8?B?VGgvOHc1Q0s0cHp1bzFIa2ZYTEVTZ21ReVZTV2g0RkNWdlhSOXBGYTUvd01t?= =?utf-8?B?aXc2Y2hadTczZjJReEViTUFCOVZ3bU1RK2R5aElkZm1ONlJ2cE9GeWd1NVhz?= =?utf-8?B?QU84R1dpY1Z4WEE5cG5KQXFKZ1pUYlRVUlF3V0NrREdheXExbDQvSkIrRjFX?= =?utf-8?B?MUdYb2RYSTdRTlBQcTA5TXp2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bUtuTTJkemFjR2hR?= =?utf-8?Q?FZsKalzTkwh78WKL0lr1oa91u?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 837fabae-4ec5-4713-6384-08db19f06cdb X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2023 01:01:01.7075 (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: Y8j1dOUVCRAGFAaui6XBAgka8H3vOiyp//X47dtOUtQrsqgt2cEA0rlKcdKI8y+a X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4890 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 2/22/2023 2:11 PM, Eli Britstein wrote: > Change rule type to be uintptr_t (instead of currently uint32_t) to be > able to accomodate larger IDs, as a pre-step towards allowing user-id > to flows. > No objection to extend id storage type, but I am not clear why allowing user-id justifies this, will user insert id more than uint32_max, or is there some intention to partition variable for user provided ids etc? Can you please elaborate? > Signed-off-by: Eli Britstein > --- > app/test-pmd/cmdline_flow.c | 12 ++++++------ > app/test-pmd/config.c | 34 ++++++++++++++++++---------------- > app/test-pmd/testpmd.h | 10 +++++----- > 3 files changed, 29 insertions(+), 27 deletions(-) > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 9309607f11..a2709e8aa9 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -1085,16 +1085,16 @@ struct buffer { > uint8_t *data; > } vc; /**< Validate/create arguments. */ > struct { > - uint32_t *rule; > - uint32_t rule_n; > + uintptr_t *rule; Why not using 'uint64_t'? As far as I know 'uintptr_t' is logically to hold pointer values, it is good for usage like: `` void *val; uintptr_t ptr = (uintptr_t)val; `` Having 'uintptr_t' as type for pointer looks confusing to me. > + uintptr_t rule_n; Similarly, why not 'uint64_t' or 'size_t'? Variable name suggest it is storing a count, if so 'size_t' is more suitable logically (functionally I guess both are same). Same comments apply for all below type changes.