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 3ADC343220; Sat, 28 Oct 2023 08:54:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AF0742830; Sat, 28 Oct 2023 08:54:02 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2135.outbound.protection.outlook.com [40.107.101.135]) by mails.dpdk.org (Postfix) with ESMTP id 7264742670 for ; Sat, 28 Oct 2023 08:54:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hratTZvXhT2kyUU/EdbRXG7V1+vGKJlw4YMbd6to7B/dEbhtjxVmgUuY1Hh06q0YbMCqdV0EmUHCbG6FGa0LBzH/I9PArabGnCPQQ5KNAyH8mkGgwAXqbmBHUgu3Pe7gdQ+dFCH7oCY0Z+WddR5aZQph/ZxSLZnhrSrGvCK3ymD7HR2Q2tmAjdht1rr3JpzNBOeyGIEkFHxAk9kUovxx9awzm+R58AncavXH56hsMKz93qQ1clZAASTU81+U1j5VdSdXjaKJQkv1joteSJ/WxDAT2oi3RqeLQKZl5ppQz8Chl+tutj3XrBDa2vuV37og8NRCp0QiXQ+/wUtdKl8Pxw== 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=MaDUtzHTfBFp0MBjwsBPq/h/UGD5Qd25WxFD6v1XsS0=; b=BZATwhj4nZwnUZ+o9qns+iAFksgtTEJ3i6LY2pofTDDfQXrtvkWQCihJb2rUA132ivcB4hZLk9YzArdY49gsniILXSWi7P4uIaowpP6mqR9SvY4hOC2dLszPmfDrQS/p50pa9w4zNV19HUYh4MlNTYHsZ6s8fMH/9I9vEp1+O5pm47UL5xcQhff/vHXI+RRM0QzoNE7PQ4ngvbQ04QD+woi/3y9Y/kQbk4sYyketzFtzhYIKTbsnvj3zRcmlUhNFj886CJmWHO82wLhvXhWuJM0LdB2+CobH1oRU3Y9TBu3xH/AhHzTMU5mp55Ri/LiRfbBd6dNbmdQszfhvd6lcsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MaDUtzHTfBFp0MBjwsBPq/h/UGD5Qd25WxFD6v1XsS0=; b=TfS07aMEqDBsyFex0MfJehT6hROOwSaiL9jzp2FvEoZeRszKLQlj7SVKHcQ8PbhvbvUuXt4RDqvQhBsY/ThXmLnlaSf1vu91WQHvc7dhqK8Snw5uhXECOvTmkIGMthLcHif9xVKt2PjU9rkGGgOWobTAtO88LQrYRa0Ko7zQovY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SA1PR13MB6055.namprd13.prod.outlook.com (2603:10b6:806:338::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Sat, 28 Oct 2023 06:53:59 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.6933.022; Sat, 28 Oct 2023 06:53:59 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Peng Zhang Subject: [PATCH v2 08/11] net/nfp: replace hard coded value Date: Sat, 28 Oct 2023 14:53:12 +0800 Message-Id: <20231028065315.1937188-9-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231028065315.1937188-1-chaoyong.he@corigine.com> References: <20231028061558.1842855-1-chaoyong.he@corigine.com> <20231028065315.1937188-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA0PR11CA0020.namprd11.prod.outlook.com (2603:10b6:806:d3::25) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA1PR13MB6055:EE_ X-MS-Office365-Filtering-Correlation-Id: 647241e5-f8a7-4571-1964-08dbd782a95a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ra/Bo3gTutUjJPMXuykeunwfodp3zal8ixZ+l06iBNogxUh0/RXYTiR0ZFWAx6ZomSa9i0yhlv6TmeY4uxeHtaquRlZFmaoGgIFmlMXV/Ay/b7uFl5du6VyyKJVLzBEtIqYgzf7sQJIBD2BJqVmU0SGbLTq4orgBHARqpKh01CuUP5HYbEnob/DDz+fhaZRgNHXiiQmH189kJOeCIEkQtduxmPfWOmIWTHP7Z4kDAgHST/AX4uJONub7XWQJMimT6BtwgpcHUlDLrYuzH8/4FLZmxuRbaoHJmENVKGe2HQqARHhwUqq2bhzaIH7i6TqaFKA6vsK2cbcs2+v3vbyAQc4omAUzH8W3dWNFGc6362psMC5TgZvRbi+4flKsBp2kBfsJwQCycKwHfkivjEcNAR6coR6bjO//l0KlkwS7GWb+Ac+QMVOXidm2JOCKiKC5aJ5ilnDQjn0Ehw9h6eObqlVed2edC+HrkpyI4BdI/+GC2jRpL+Ks00j9MPWDCG+hEtiOmMNl4Lr9CtzIf/UlhzE+ol72jxVtppr9UUHiLJux3HyHiqez8hg1wogBgx4E2jAJ0Xet9dlA36O+qFNEt1O+XOVorEvMhaArzDw4OGvLalxJv6VVnbPTI0tQKX/rDQhbTEwG9VcWd1QsL2qMF8y9FEgwnnyw0ho2eDTzQ9A= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(396003)(366004)(39830400003)(376002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(4744005)(6486002)(8676002)(8936002)(478600001)(6666004)(54906003)(66476007)(66946007)(66556008)(86362001)(4326008)(41300700001)(5660300002)(6916009)(2906002)(44832011)(316002)(6506007)(52116002)(38100700002)(36756003)(2616005)(1076003)(107886003)(6512007)(26005)(38350700005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Z6pqkaznGfLM9yWdeTFM8cWyYcHCoz0Ensv1jVE4gVOMejmGcPzYRm5YpjmF?= =?us-ascii?Q?/xwEpbtcOmcQDjE3362d9a37dg9kvJW8zweAnIZuCYhd7HFABG9K8Oxn4d5H?= =?us-ascii?Q?JMn1EtnkauLs9fWW4Gplkr9J8ap98I3wJAnuv8R9jQU6nMoolkq7iGDEzC48?= =?us-ascii?Q?LWHfG7ULGtZKUQCwfOTOj0CJmrjgJB7l5uE4yY7LWsLjOFye+/98r8yqBIar?= =?us-ascii?Q?AsaemxLTIoonuiy7xUG1N3XZ5moEi7bnoknWCsJ13ckWlwAhpy0qjn7HeDNJ?= =?us-ascii?Q?sRFiygX2BJbn/GlPQdy1vHHOy1cFHuqEmbwv2AI1pDGgQZgo6qZyTlqnqDzq?= =?us-ascii?Q?L1lojN9J6azO7JmTiAyWBgK8JFsS3CbqtRe7DzcJoP1rpggPdHAFvFTqjRww?= =?us-ascii?Q?qwjJD563A41s4ufS9swU6TrZqQsYfFqN+u5hmE2YN/bX8EMwnA6Jt+k+H0+1?= =?us-ascii?Q?CodY7dW0dFCEFJEdcKiN3r6EELC6etLHCXZUZNL6ZF0bOxRFUIPTcWuj8StO?= =?us-ascii?Q?xXlOH/ihDphntJWq+5Ca8YN9VmB4byVfLruyA6i3tHy6xCnjglD8ybXKCule?= =?us-ascii?Q?4ePqVIqCoM7JlcPBruHW+dRFpFWs5ddiG57QZGxfgEAtpdb79y6T6tfRH+0D?= =?us-ascii?Q?+VuLG3kMTyfKW4bBVyjqOtCkPLaYuFFux2aVP455gDW6xN2RKeWjtTGxLN0W?= =?us-ascii?Q?6UNjBdutTp+n2DdJkHbpOFwDeLTYgh5rIfIKLYMoMgi8t77qriyjTcnxHUR+?= =?us-ascii?Q?VRx7r6uwjC25QLfEPYV5l9IuN3A50fNVCeFPk8iDH+cX/wepeAA2q03r7xsx?= =?us-ascii?Q?OwNPHXS796UtZF6wqE08mCDbhrOyxb+uiVKQv+RtvZJ8JHtJWHuA/rH/SP+R?= =?us-ascii?Q?OufqZANP/hDncibcitya5RBU6B3uC3bT2pPXl5P6qHi+U6jTxMtzBGfzZTSW?= =?us-ascii?Q?F1qiOCjiYV272jobfSgiiM7qDEtgb2qaNxnD1Za6ook/Y11SxcWJF/bnqGIw?= =?us-ascii?Q?AJYY80E7T4c7wcr8ke5N9qwWO32HawwE1cHMg5YC49skb2yvig7S8kWOGvwD?= =?us-ascii?Q?Oljcj0W0kaktIQocC8nOHKmkeKbC73AtgoZMkwrVGht3dCFSUsP3cWI6zyey?= =?us-ascii?Q?nMUKPGxxN+KoGF0QwgD97aS8dsTa/zhLySYc3vcZyTznQsIZWkCmNOoc91Di?= =?us-ascii?Q?ug4IDOMVTNHoGIgWoPFWHWB/YttPtrOQz6HaGAH+KZJxMcPylLbu83BdPYPm?= =?us-ascii?Q?Crn0tGHS90l1A8UzSxWl9QsO3XVCUse6nSba+Hjrkoz55OO2aiAsKsoHzrsl?= =?us-ascii?Q?LicwcZhUKofaYPgy+Fgk9q/sM+LFMMJ//b0/D7afgoCTXciZS9rD0+hSXuqz?= =?us-ascii?Q?Iw5XdVXIMvbVB9ey3oYv4/NqFITG8JsbAxtvM6EXi+R6Q4W+lrrim9fFE8J3?= =?us-ascii?Q?kdh1iKEsnCrx21XwzYHSMoI1JFx13HeHHkdQyykuy5apQATQnNJEicvVAOg7?= =?us-ascii?Q?rcI3jJ0GpuO/zgxfV/G2TX6WShF4J3z0im3xNJZT7+u9qiaGCo0IDS3T8U6H?= =?us-ascii?Q?gjaABy6+x612WGxcs9ii/QQMtVu7rSWzbBya3sjbAlxG5Cy1kWGl/WNS6zFJ?= =?us-ascii?Q?XQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 647241e5-f8a7-4571-1964-08dbd782a95a X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2023 06:53:59.6157 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HmL3ru8TAOOfeQgkalZW59mvt4E9hjzf2ZC1BCfZawPzrTo+Sg+VTX/8PBXsggWUvf7h620y/5EwBwo0IBUtWCKdZnlHRvS8llp3jHlV4hg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB6055 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 Replace the hard coded value with meaningful macro to make it more readable. Signed-off-by: Chaoyong He Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_cmsg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.c b/drivers/net/nfp/flower/nfp_flower_cmsg.c index 4013b32fd0..8effe9474d 100644 --- a/drivers/net/nfp/flower/nfp_flower_cmsg.c +++ b/drivers/net/nfp/flower/nfp_flower_cmsg.c @@ -13,7 +13,8 @@ static char* nfp_flower_cmsg_get_data(struct rte_mbuf *m) { - return rte_pktmbuf_mtod_offset(m, char *, 4 + 4 + NFP_FLOWER_CMSG_HLEN); + return rte_pktmbuf_mtod_offset(m, char *, NFP_NET_META_HEADER_SIZE + + NFP_NET_META_FIELD_SIZE + NFP_FLOWER_CMSG_HLEN); } static void * -- 2.39.1