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 5B58742DF8; Fri, 7 Jul 2023 14:46:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE37E406B5; Fri, 7 Jul 2023 14:46:16 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2051.outbound.protection.outlook.com [40.107.101.51]) by mails.dpdk.org (Postfix) with ESMTP id B6C9F40685 for ; Fri, 7 Jul 2023 14:46:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OazCt732ZJARtdRB4jEWnARktJOR4T86HjDR7cjYde7/M/3d2sn81otbs141dfNC17usR7skx7zBcs/YQVd6riHsUXWiM6FhFfFz3yNkggB/LOz5W5MxiXpKQEDLoDJ6SnG5ZlNcoXqTtsPEUjhsJvwjmE35x45Z/gAce6E737/lowWTVCYwTpsTJPI0ULWv2SA9CxXV4itOsaIV2hO/pGDJYfQcTmlJHG4RLYte/uN0eSvQlUwMjxnAtDMl3b1aJqereto/akVs7bId7ER9MB3Gat35MMySTjAB7rR1KM1UCVxrDSKvLgTKNsX6Ok7z9N47ZB4HpzNcCU5gvoqP6Q== 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=9bgR2zfmF2nJHLn6xzTuTOFH6jIXhs04pOOSovKVRDw=; b=WqtRSjtyIqgwt5JdG+Umn7+DWkARvliSqhbrq46K+A4Gzt7cZkVFvSRZrKG8KX+n7pG3V+3MR9HAIkeY+0G/n5eh+1u9zujwlURgwslE6zPj/HTenX+RwyWk8Qqv3MWsHWwAonIYayAlLb5sVsiLFY6rVBaxkWWetCYDgCP5GcYDLMnBp3qbGCqdnulQ8JCfRXgVKb1xlGAR5zSPHtPHew1zcBVtqis5MD+luZMouHjpJ8eEbDpIJK/Ckg3XGNnlCocZ6HuzMZQssJPDdoUq8yPTil+kipy8LB2Mub1wqFtU+9x/i0A9wIFAk6IOc3yZIow/r/N2sMmpsVJ1k3VCnA== 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=9bgR2zfmF2nJHLn6xzTuTOFH6jIXhs04pOOSovKVRDw=; b=qgMUU//xefABBMWS722oCgMH9tE4wybxa5I8DQQ8FHIk6cCdHWnBoG9hvEGonQDejM13YvJhVW/Y7kM49IO+GOd6CpIkbZZrY6P+dvF8pRCy7RhmqZ/HZB6M5lC9ELtqcoEIJhG5UrHDA++smjSCgbRGnQfSEJgA0KArUFsKP5I= 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 BL1PR12MB5255.namprd12.prod.outlook.com (2603:10b6:208:315::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 12:46:13 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::369d:5f05:aaba:ebd8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::369d:5f05:aaba:ebd8%3]) with mapi id 15.20.6565.019; Fri, 7 Jul 2023 12:46:12 +0000 Message-ID: Date: Fri, 7 Jul 2023 13:46:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Stephen Hemminger , dev@dpdk.org Cc: Akhil Goyal , Fan Zhang References: <20230505174813.133894-1-stephen@networkplumber.org> <20230706175938.62721-1-stephen@networkplumber.org> <20230706175938.62721-5-stephen@networkplumber.org> From: Ferruh Yigit Subject: Re: [PATCH v3 04/14] test: cryptodev use rte_pktmbuf_mtod_offset In-Reply-To: <20230706175938.62721-5-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0487.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1ab::6) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|BL1PR12MB5255:EE_ X-MS-Office365-Filtering-Correlation-Id: 028cc9c0-bcb7-49cb-4da5-08db7ee82527 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p8Pgcl7M9lmf7PMcwkgXjhvXdgVSBS4s3I+kucRDJToQl56Z0sdCH1y2j4EPXhqp3m9JYv/T337RZUZ8vZ1C0JZkK8d7P46zIcO29R6QdEo2GZ9Se+TsauUoUDBzWQYAkey4FNjnszH98Gjhk0vypI1kysQWcdogm9TS7q6l578qrhFnFiNRTY4Lhg3quBowUqmpBkVX0uJj/f+a331We9Z/pjvi0VI/r1z35zus0Mw9yjyBFdxjt7g8feHGhUhvEQ5YnX3ZNPQa4HlJdlOlnyqBevYoCT0ty9XegL0RYMGkdrYtGYBQuuerHGvvhPQZT3kbix86BwgRYEr6fgJII6J2XEw/iB1u3jgI9QBe5O2YPr9r7W1NfxF7uElIJJKG6fh5INbVHiSxXulPEb2AHbxSGnUHQ/t3urlZZ0iq3eKVYz/obkxQ70S2Y9a7quhUbeAxEKw1SMYks7QP/FcYSRmciPat9C02A/5YP9o0Yx3o/3s8tzveh1ehU0xQr39gb1C/PxSTrazdX0BkndrqlsDZtDVfdm9mQU53m3K1LBm+JOB9ryeS/mWfECrZDz9EfdJfZh3XhMxKdkQUH/v0gmbBao7Cy+uvHZgmrwYozK2IjUiKd4AEZmf1i2k7snGrG454PhSEiv0eO5YxYwtquQ== 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)(376002)(346002)(136003)(396003)(366004)(39860400002)(451199021)(316002)(38100700002)(31696002)(36756003)(86362001)(31686004)(8936002)(41300700001)(26005)(6512007)(5660300002)(6506007)(44832011)(53546011)(186003)(8676002)(4744005)(2906002)(2616005)(6666004)(66946007)(478600001)(54906003)(6486002)(4326008)(66476007)(66556008)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ejl6RVpkby83ZWFVS1pUajl5M0ZmZCs1eFpLWS9IQkNFOGNBUjYxdm9panNR?= =?utf-8?B?SWRlWkp3VnYraWQ4UkxxVDBkek1zRmwyb1cxN2RhSTkrMkFpTlJKK3BEUXc0?= =?utf-8?B?ckRhNFF0SFFSRG91ck1mT1NHTGRZUXhhZlJ0QmNXbDlYazRQb3czY0t5bkU2?= =?utf-8?B?SUw5aHA1ckEyYXBxZjJJSUM1dzB2TjlieTJ4UUJmK3VsVWFXdVpmOEF2Z2Zn?= =?utf-8?B?cG55MzY1UUx0eU5RWDB3bXg4MFlkalhZRTJ4K1BaamtoWi9PMGVWcDFSaTFV?= =?utf-8?B?NFRFN2hiYVJXcG9nSFhtU242bWlVbDlQOXd4SFNGS0N5S1pseWh3ek0zR2xt?= =?utf-8?B?d01pclBrNzhVZklkaFFxQmJWZ1J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id: 028cc9c0-bcb7-49cb-4da5-08db7ee82527 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 12:46:12.6203 (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: U80AjXPmsd4jBUUWrpThF+Wpxso3CeebxRISOQWboRKJg4JGpAhOLHh73CH8fH1o X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5255 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 7/6/2023 6:59 PM, Stephen Hemminger wrote: > Based off patch generated by cocci/mtod-offset.cocci. > With some cleanup to shorten lines by using conditional > with omitted operand. > > Signed-off-by: Stephen Hemminger <...> > @@ -5163,9 +5169,9 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata, > debug_hexdump(stdout, "ciphertext expected:", > tdata->ciphertext.data, tdata->ciphertext.len >> 3); > > - ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *) > - + (tdata->digest.offset_bytes == 0 ? > - plaintext_pad_len : tdata->digest.offset_bytes); > + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, > + uint8_t *, > + tdata->digest.offset_bytes ? : plaintext_pad_len); > As far as I know "x ?: y" support is gcc extention, what about sticking to standard syntax?