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 681F442DF8; Fri, 7 Jul 2023 14:46:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5571043048; Fri, 7 Jul 2023 14:46:32 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2087.outbound.protection.outlook.com [40.107.92.87]) by mails.dpdk.org (Postfix) with ESMTP id B640B43048 for ; Fri, 7 Jul 2023 14:46:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E71aztxdsRQWFfK48Ojwq0NKI30645Vo8Ca+pGEOVDB+GHQTmeKcnRMTZlWBSvt4nU8374AjQmhyQVkr5MwL3ry+8hlXbDXTfdYVXPLh+jW7G/t3+JmlSEvBR7u29Cg1+lxw5tn49el8rMcpzhtHiaLwnMbRIOoCrg7GeNZdTabMIiUUls65Xe2ilF49YnvUr0blEtFunydLQoq9M0CYt/c57K58d7nSZ9QB3b1uhkizBSJPEiQ9YlmEPwhQjTRNAQrjG1V7RqQXYWzcwOrHOOortjmn+Ikz8u2bC21k+n8VhUurh4V3LckTEEBUwqXMcp98EaZz1t91UiQwKb0H2Q== 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=UD3JzwzvW1s2zi1FiEQ8jjBDPF2X2CXtyvizahkzVjM=; b=fLFQqIxvEhPGTPUozRJ0IPjP/Xgtk4NLXc+MPOxe7vQSM9/3dJjlygBkpS1vOekHfCWdzJHFdL1R9MTcdcbEBNubuwo6VQeOPmDcYOXbR+eMhf7nME7N8rzkWX255Gq1k55n9nf5VaB/QfTQKuTWcjWSR15WPtT4ySAGlmXpHDZ8EyJBq7ZUTKgU468MXy3rKDKuGZW3rdrFSS2PrXNXRse81K9C5eYgH2DOFYL8vSKolfClZmyzsvfLKQs//PGyVMSgGXuaAN3vNDvfGuXg5DMMeN1qrRnBVcWyowRQWbBz1FN5MqPk0Lo644qg6ftVzY2DM3DPS9iIj9Wi47Lo7A== 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=UD3JzwzvW1s2zi1FiEQ8jjBDPF2X2CXtyvizahkzVjM=; b=mT6PtCr2CZwF1nlSScT30XsbkVEIoKzvJwNgP8Rxa4NXRSlmQ22/X7IxxUXJSOHc5UAdpg5fD/bR46CBLf5mHncN56sb8Af0hOSWogyuBOFbg+2rzhaR5dHA0am3FDzIeDxmGnvjEwERoAGmIQIMDpgAZZRDfGX303+NPEzRC7Y= 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:29 +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:29 +0000 Message-ID: <6115111e-8754-1a0a-bade-ed57f780dd7f@amd.com> Date: Fri, 7 Jul 2023 13:46:22 +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: Matan Azrad , Viacheslav Ovsiienko References: <20230505174813.133894-1-stephen@networkplumber.org> <20230706175938.62721-1-stephen@networkplumber.org> <20230706175938.62721-14-stephen@networkplumber.org> From: Ferruh Yigit Subject: Re: [PATCH v3 13/14] net/mlx4: use rte_pktmbuf_mtod_offset In-Reply-To: <20230706175938.62721-14-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0501.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1ab::20) 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: f8dcdcd2-016c-4327-505e-08db7ee82f01 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m1yfbe0UZS8DiICXW+EgLEz1QvYsxYQkdNty9//s9Q4tq3dSmbsDF5VXBvJJR+OBB+N8avnGWCTUNN8Fro9qxN38s9ZOH4REpxmbKIR2a11Exlb5z3GSp8DGvKgACyT0lKBZxgRdCJ+Ou6tKZWy88v64cofT2/kaIeKfqRfZJcy+F3/za2m/hIPvhrn76kVTbakvTWY4uVqyGj3IYvfhi+AeM5wRNspsBm7/vVVqOXDHcBMZUtPGhvW7cmHg7rzAgK9WHRqWiKc5k+zEccewTEE0uKpF6qk5ArXGKiw/MoZ4LwcojKP0RIWkk+62gs1tUVK70cdFbpRujwX0pPBNsDIRHjD2LHiQDjqiItT2/Tr/Eriumzt2lqk+ZEFNVi4PkDn3vO34UlfnD4jYe1an4g7gPL4PoAnONc2Ee5v3CfZJfyc50GM3NCH47Fy6O0WhYlNdSzOMmCz4VE0zHcqa1m24uJfsLfcyaeXKl2P/MXiwLdIQF79fw/oDJ0XkZDt61gjP8/ni3QQ+iMdEno8EO7GjYYbQqdlFwJf+UEjVlA7P8TWZgXA5pRAbTuvCAljKpkIvVlhABExPvAkzeVvFzvoQgzkIzc5+OLh7Z1CEvkXe3ITk78gsPpHZBl8djtySEC1Ev+eRXqhjGLchD50tpA== 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)(2906002)(83380400001)(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?U1B0eUxEWmdMWk92TTVQWExRL20zMElRM1kzSEpXM2Zld3hQOFdsYXF1bVFp?= =?utf-8?B?MldMVzh2NVlhajdWUkRXcXFjbFJybWZYanhVWVArTnorUGlUK0ZaYjJJd3lY?= =?utf-8?B?T3NnSkFPc0pLR21qdHBydG5naVY4a1hYekV2QlJtSTB0ejdTdnk0QTJxSXZo?= =?utf-8?B?K0pFbmlZbnpTbFpGam12cDkySFgrd2d1cDJIeUlnbGRraVIxK2JHOCtsTGZ0?= =?utf-8?B?UFFUSStxcTB1cjdjd0pMTWdXdS9VamYyTjViVnlreTEwTzVZWk1tWVRBcXJs?= =?utf-8?B?RmtOclp5OHNUZTRKdGtDM1hMNktqOXVER3lVNzZpY05pWk04a3drSDhOZnlW?=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-Exchange-CrossTenant-Network-Message-Id: f8dcdcd2-016c-4327-505e-08db7ee82f01 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:29.1328 (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: 1nDnUc3ENzrZ85py0orYwy2bTYVVTBX0P6WHK7TshiEWxWEwgszbjcNdnL+Zf1I6 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: > Autogenerated with cocci/mtod-offset.cocci. > > Signed-off-by: Stephen Hemminger > --- > drivers/net/mlx4/mlx4_rxtx.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c > index 059e432a63fc..d5feeb7f7e6d 100644 > --- a/drivers/net/mlx4/mlx4_rxtx.c > +++ b/drivers/net/mlx4/mlx4_rxtx.c > @@ -1014,9 +1014,9 @@ mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) > * loopback in eSwitch, so that VFs and PF can > * communicate with each other. > */ > - srcrb.flags16[0] = *(rte_pktmbuf_mtod(buf, uint16_t *)); > - ctrl->imm = *(rte_pktmbuf_mtod_offset(buf, uint32_t *, > - sizeof(uint16_t))); > + srcrb.flags16[0] = *rte_pktmbuf_mtod(buf, uint16_t *); > + ctrl->imm = *rte_pktmbuf_mtod_offset(buf, uint32_t *, > + sizeof(uint16_t)); > } else { > ctrl->imm = 0; > } Although parenthesis may not be required, keeping them looks more clear to me; personal preferences. And patch title is not accurate for this patch.