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 7B641425A5; Fri, 15 Sep 2023 15:45:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6679540A77; Fri, 15 Sep 2023 15:45:05 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 51E0B40A76 for ; Fri, 15 Sep 2023 15:45:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b6K7Wd9RpNVcz2Q1MSCKLkGqufwvgMe3Qv4WgP6e9jBSzelFEYSimP9S1T5KkgPRHlGzwjyKrmZhigLrQ9spsSHUXl6SbEI9sAWpry3TqHTfskArcg7agBiUwk2sl8Yc0zCetAHVDZ3ms0sqVAz62JH8d6lDcj/4uw9NZga7RG2lNTh64stInmjQL1xJ7LdSLx5enCCMRuDKnPJAWhfUhhsaskrtgAtFMdCuGN7nQ/NC8zM9EZpIG4ZUQUOE3x5i2g79Bk2EFksB0+pEM9p7Pr4H559267R8/TsqA7zzYfRTe2yXFyaDgau3XYl/F0ZZDmpCq3KtHrmc4Cck0Gnn4g== 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=HKZn9Zu7tTWxpq4aBciHL9/Y1SOnG4c2gYUn4deZ44k=; b=C/v0vhZAzilqGvCo8G8QjPi8dyXQ9drfhP5SX5HUnruQHhvUQpyMKbIKjoAV4S7dkb4naR6KWbtM7FDlKq0VkjW8M4eUOJAbIoyfTHcgB6CSVOS+xfkAeBo0a6lOD51ALqbU4SFC2UZLvns4r/r1Bs54ICNiMDXfrzHadmUeA0e97v4ttAUVnCV+ZLhO9rWbKJNPBaiHV3lN/ZWlCg9tbjvAd4r1hIwVHWiw/jGMUb4vKGx6JyTp6pcgRCpL1IDsCEWgmDLYFUiJzkzt4aFil4nbbqRfOqnwjfHRLLkOTAWXK3BD5wGfznqhbygXu1I9/7GyO7c88biqvdUgawFB6w== 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=HKZn9Zu7tTWxpq4aBciHL9/Y1SOnG4c2gYUn4deZ44k=; b=3vu5y9iGRCs89PX6kOcv3Jbmp/4y3kCuWU7cUbL0M6Geb+KBxVh2sc6WY6rMZLPevAi6L7Bu+ly7V9DdKKIbsQHNWPiqkNBcEdPPWw1UbLwuGONj6UApPC8rbHuaExc4VqJR0ExuGWsJwglY4oIph2Odcp8OCeAw/DhoMG6nmCs= 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 CO6PR12MB5393.namprd12.prod.outlook.com (2603:10b6:5:356::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.21; Fri, 15 Sep 2023 13:45:02 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8%4]) with mapi id 15.20.6792.021; Fri, 15 Sep 2023 13:45:02 +0000 Message-ID: Date: Fri, 15 Sep 2023 14:45:01 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 08/27] net/nfp: using the DPDK memory management API Content-Language: en-US To: Chaoyong He , dev@dpdk.org Cc: oss-drivers@corigine.com, =?UTF-8?Q?Niklas_S=C3=B6derlund?= , "Burakov, Anatoly" References: <20230830021457.2064750-1-chaoyong.he@corigine.com> <20230915091551.1459606-1-chaoyong.he@corigine.com> <20230915091551.1459606-9-chaoyong.he@corigine.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkIC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9EgGIbItv3qWTq29dihLYpzd6dqB708k7 4RBz9051oLaFVGkguFw/tXmA17nx+c2uR5jx8wb4j68umG2X++0dSta5eHAVhmtXvrqPW6Ku 3FQ= In-Reply-To: <20230915091551.1459606-9-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0054.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::18) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CO6PR12MB5393:EE_ X-MS-Office365-Filtering-Correlation-Id: 5121f8c0-4287-4283-4583-08dbb5f1f611 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J6PNrK/d4kC212KUWF8qusMR9rbmisRCcoWIaa6t+CftAbLIEoKvnQB5p6EFXVpF5mGnuIHbsPSLO5s9FPnK2+94Oo6gu8QqzqowJuPRpRL4w795xIEBPgS9NJFYhvpt4hJ2+IaXpXIIoVO9/HF3KMoQJOYKi9CKFYjwGWTEop+uD+zfm0A5AGxqFfA+fxTvgnTQGmI9g+RtyphmjM7OuYotdVRxdWaUXmqyqZo1LdpFGR4gwuZb9wIA/Ox4NfF1B5gpsJkC3kO8V8tJO3HnJB5ZZ8Bv+XOutOG3Pu2fEA8vW5w3sDXYCEjFUgHNxzHNfsqE7Xpa9e0okitrN2ZkcZftrn91rO25IRaXSCqHIsVPLzihvobL5ftlhuymKBD8iP4cKWNbnU/E/kgzE1539bHYebaebn7EqkI5pcUAKAC5pRjI7in21p16Zkrlnr6uuaVMrbhKCoMEsWRWNiref0/hcnGm6bDZUMJtMhInwfpjwOZslxc2lOt4vjvsmHRkXejQcBKywi4a3JtHikaOX1+eQ3ZAef2YebuzyMCayFPrMquyrsTT3wnNokfa2sYKpCA0/Dp/KgSv/JgbwgJkqA88RkZV2wc3zkyC/y92OfIDgxsE8qK0QF9yLsKIJ8tEO8p/BaYlj6QQnoNhpAHpxQ== 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:(13230031)(136003)(346002)(39860400002)(396003)(376002)(366004)(1800799009)(186009)(451199024)(6506007)(53546011)(6486002)(6512007)(478600001)(83380400001)(26005)(2616005)(4744005)(2906002)(44832011)(54906003)(66476007)(66556008)(66946007)(8676002)(316002)(4326008)(5660300002)(8936002)(41300700001)(86362001)(31696002)(36756003)(38100700002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dkwzOHEyMGhBcEdhU1E1SGkxYTBMTjFuT2FMZTloMWdZQWE2anI4ZnhEalo2?= =?utf-8?B?anpHOUJFdkZjcTRjdFdVZUEwTUN3OHJGQXNXclZydCtLR3hCUzdzbC9BQUUx?= =?utf-8?B?U2gvRkhCRTZ5c1hKemhGMXN5cE5NaDN3RGR5bXlZcUpJamZ0WWJjd1VWblJr?= =?utf-8?B?KzlkUWVDdU4yTGI2Q2Zyblk0cURrWWtYclMzVmVKWXo2L2hKOGZuRUNNZVdT?= =?utf-8?B?R2xxTHppN244QUVjajNVMHZBYTJBRTVFQUVhNFU5UHZoMTdpT0pMV1RCVzA0?= =?utf-8?B?ZkNHb3FPRURUQUtlOVBIaDBaOUpOeVVyWEY4dU5mSXlWaCtxek5oajhLRzZs?= =?utf-8?B?Uy9hbHJFQldtUXl6bUdhakdkTHRuWERlc1VjRVVieDQ2VU1obGd6NVIxLzFl?= =?utf-8?B?ZzdiTzBlMCtyRjFxbEI3R0VWeDNDcDJzVFpmYk12VjM0MUVMREZFdXMyOGdn?= =?utf-8?B?d0J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?utf-8?B?MUFSMFAvVWJUbWxkVDAwSGFLTkl1UTNoREdXbmdsYzE3MjNmTzg0ZHIyL0F0?= =?utf-8?B?WEU1NG5SNW1qVFp6RDFyVWhOUnVOU1YzU2lWNjAzWnhnS0YyelI0OC9JVWVk?= =?utf-8?B?TjZmWjV1T2lDZG1YSUEyMjhTMFdTYXJuY0llcnJIeXVUZVhEWjRSVWUzMFAy?= =?utf-8?B?MlRuQzcxUkozWDNIWm9Ba2lXMEdIZnNqcDIrWGFXS001QTBQcHZqamdvUHR1?= =?utf-8?B?dmJTWkw4MW5ZR2RqOTRwNU5KVDVIaHVTV0FQd3NpQmpPcTJ2VnRxZnB6cThZ?= =?utf-8?B?K1NqMUtZc25mTjlqVnJXQUtoeGw1TS9YUGxhY3pWbWZvQlI3YVdPZ25Lemlu?= =?utf-8?B?ZHdXVURzY1h2UEhnMEFFSXc4S3Y1NjZTWDk1Vk5IQUpXWUg0SnE1WHBkSHps?= =?utf-8?B?MUtmNVVZZjNVSXMrWlM3ZFlKTkZubDgzem42Mjd1MXlyblA0dmRUeDlkc2Er?= =?utf-8?B?OFdmODk3Ykp2bUF2cXhYeUlSK1l5aWdzR250SGhkQWFreENrUmM2U3B6YWMz?= =?utf-8?B?UmFuaGJCM1c4cTg1SjFOZTRMbkNRNTFlSFByTlI4b05CTXNoWEg5KzkvamJ1?= =?utf-8?B?amJqYzdCT25xRmQyTlZveGNFeHA4bzNvS3UxdUU2Y1BpRkxCN1dXVXlIUkd0?= =?utf-8?B?ZmpxNDYzVEExNUhIRjAybUc4YUFXQmNQV3NydUVFSEsyWVVYVGtFMnVqLzNk?= =?utf-8?Q?+eUkDnWFMl9LpVI2lI4uYHilM?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5121f8c0-4287-4283-4583-08dbb5f1f611 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2023 13:45:02.4115 (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: MdZQMx2hAszxJcA3dFGJ82Cu/X+e0lX/YKEenkOVS1B/re7feDneydzbrsHLdi9I X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5393 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 9/15/2023 10:15 AM, Chaoyong He wrote: > Revise the logic, using the DPDK memory management API to replace the > malloc()/free(). > DPDK memory management APIs are required for datapath, where it matters from which socket it is allocated, it is accessed a lot (datapath), or it is shared between primary & seconday processes. But memory for the control path come from regular heap, and perhaps that is even better as it doesn't fragment the DPDK memory space, @Anatoly can comment better on it. Briefly, if there is no reason to the otherwise, I suggest keep using malloc()/free().