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 A9D6843220; Sat, 28 Oct 2023 08:17:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DA5F40DDC; Sat, 28 Oct 2023 08:16:44 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2091.outbound.protection.outlook.com [40.107.92.91]) by mails.dpdk.org (Postfix) with ESMTP id 89C8E4068A for ; Sat, 28 Oct 2023 08:16:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NZ7CrAKOLqIQLlEG5Vmswp98LufYgKt+fqoJCzzMet1pebBwxOe2dtvdnscjtZT0WMAQoX+lG4kLndGKt0+G6FtZWWLjmoszWHkzIkxNCQFKdNbPYEtFQJHBieb2pAwTauB7W2eGXVjxNYptUhEUsJtbYzqd4pml3Unj1M3KXs7GpFODP3ESW4CO0y4Am+SD6E4lyXaZSrGBKXkH9mRm1KnCvHg5izKFU+EwdNStdUbaQvOeeVxvZQkj2CKeIm8GXNl8S/cJc717w2uCd/T4/ftBTYrnAzDjelX9cCni5MFXRhRsTm5YZl1wbBI/pQJfobcgJnMny+sySn7v2peLoA== 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=cJGhBt+Rz5AG+WwmTKx4Xi/cR9nXK4w7tf0Errj3GiyCEZU293NEnxPhcud5k06JzaPzuWW2OZ0Zx2hDKwkQ9Jbl9msxxq8Hvg/VC7EdQl0X2b2Aq1IwtqtE+8AdoBhKg07xHlLLRf5xTalKoo62mK4496pZMXq7CQn6+LoRIgFrV4JDy8u8lWftXH/zfWTpckP+I0gUwzdQ8JjuvXKuG9wKFlqB3Lk4zLGioz9hTPeFkc2G6TiGIIscl9lVuppFejFkVEnkH/QSgZGfzF2Mcpwsl7u+lHFOjHUUhV1C9jD7AS+93+GFFDa87RGzQVCROaisTr0K+l/slWCmuEQh8Q== 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=Y3Ky28TetgmTbwJ+EQwBsEwrxz2TlzGFcfHZdaIlZeElm/JkCs5wmtTi76MtRuTsNo4UJIXErAkmw30DdEI13fHfwO8cJqwfkeKiDFEwXOVU8aW///pAL6o8nG7bZAeibZQLr612694Nage22RTc8WJIRPekUBepMsM6UiA7d2w= 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 PH7PR13MB6268.namprd13.prod.outlook.com (2603:10b6:510:24f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.22; Sat, 28 Oct 2023 06:16:41 +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:16:41 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Peng Zhang Subject: [PATCH 08/11] net/nfp: replace hard coded value Date: Sat, 28 Oct 2023 14:15:55 +0800 Message-Id: <20231028061558.1842855-9-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231028061558.1842855-1-chaoyong.he@corigine.com> References: <20231028061558.1842855-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0246.namprd03.prod.outlook.com (2603:10b6:a03:3a0::11) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB6268:EE_ X-MS-Office365-Filtering-Correlation-Id: 4017954d-61c8-4644-bccf-08dbd77d7354 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w4gdBrq+LEX9JxNqdXR0jaqxAIrOoqTDO4I7Lx28qvYkUY82T2/Gl0ZetCUDh79C3VORPynrqIvIRyFktfc3298So/6zq+ki79eI0o2A4+vHwB1pFwt62i+N/FFpI1XlmsvyoTsnmSLHbczhtmrjUgdTpVl2Qmu76wVieHs5Pb+lGoEFGGzLES5bp46kzT/Z/zJXVA9GmdbErXOT197mFnf6l4Ez04FDJU82NJmT68GmDFXlCUFARg9swYQWhx3ovEjhVVWeTgwTh3Ewn8ve2CuI73xVXOrWQk/Q6pCG91PtO0qfbd950Z/at3+5Hrb5pApYeyn/+xxCubQaDPMZL724yqUVfHSZM1npNlUdCyvEElRQVop4UyNk9uyuYziveql7Y6dr8HxuwSLPUHuaATX2i6LjJTM9CbmPu7ttduBR1ZVqDfO2NPP3xIs8bje6gijLwjuqfGtsG/Z/vnUv8o1skX6dyL0YrCsI2wIHdbHr15sh8Rwy9AYSJAWiRnzX8lXl2C+PqaS5L8UJpeM1ZC3nhtadOpxSjf/NsCy68413UBKFjtLeSNmiyFObrvcBuzd9mFDL7ezIBEQbr/fxFVPCP5YGyLQUdVu24WTJFM5y9onB7s/DsHlaIxW7X5H3Q+psUiRwb0szfGlneOATWty5Nm2E2g41KCyTChHlEWo= 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)(396003)(39830400003)(366004)(346002)(376002)(136003)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(2906002)(38100700002)(4744005)(83380400001)(1076003)(107886003)(5660300002)(2616005)(86362001)(6512007)(41300700001)(44832011)(36756003)(38350700005)(66476007)(316002)(6916009)(66946007)(54906003)(66556008)(52116002)(6666004)(6506007)(6486002)(8676002)(26005)(478600001)(4326008)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?033aJKp80ylbbjPZXtvrKyoCcjhXAZomhqbHEoeaMVOUeZEp5Iy9qLSo4K0s?= =?us-ascii?Q?XiyQgYpE4pMqZCSXCD1mz7i8A5fry8dQqzplA2oMR4nmjyZLZBn4DnPZPhTK?= =?us-ascii?Q?NOCJ6u67sl+jy66XH4EEDUkd7UjasTmtjWmkcnrfJq+KV/csziDm0muPRTCp?= =?us-ascii?Q?iC4Vd/AKSka9g5tjARmNVnplNrtCJwJ8bBL1lA0kEkFuAGLbuboT7G52h8VS?= =?us-ascii?Q?5TjJeJNJX6PDYmoQaJaerIrFSB5wXxzXeAqZuKAoE7U7hGWMt0Dsn5pAxt/p?= =?us-ascii?Q?rPOG7ld0TeqIBvFhuxylUv2n9uCCvzAmNhAv1WM9eLAcVQuFAaqtT9j1t7wj?= =?us-ascii?Q?URyS2C0juPeZdMRJWwCzKz9HOPYQJdhxwyhCpflQ9D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Q?aFBMHY7GG/NSy9uVLj5de9czswyLYvjCEiasmrlljWIS+/1L2dxrRavPIouG?= =?us-ascii?Q?K5ciUPaTprrx/4K2Qgd9X1Xh1JSn4DGREHczRC1amkmYQTt4xk8iM/D1+ycI?= =?us-ascii?Q?sQBm30Ig0ey9M/5R7kF7YBZ6DCMA4kq96DFmEOVTsUR3FNNHhWZ438jW+89s?= =?us-ascii?Q?C0GJ0m+DH0DezTt3p1g9qKC9r2LnxvU/z5oPvZOrepryH6eiN/zxq9N1fZJ8?= =?us-ascii?Q?tXl/N969pXsYjOOOxIpKfSXm3F31TwoRrW6DsZkPUWq8bhOINg/EATCo0BGx?= =?us-ascii?Q?C/7tauhfatKn9bn/ZfKffiLjneoz0zh5Ax/zHvylBV88/Zw25yxezTGdhOEg?= =?us-ascii?Q?Jg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4017954d-61c8-4644-bccf-08dbd77d7354 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:16:41.2298 (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: YwoY39WmOci/8dGMlRAAzar6BEt1fN+5s4FLwog4gp70Q31b7hbzf7W4NiIBON/UwPZqYWyIW+rya55LKrkWcPDsAbG+dvO6EdpGm+ChbK8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB6268 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