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 CFB0EA0548; Tue, 11 Oct 2022 23:48:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B89CA42BE3; Tue, 11 Oct 2022 23:48:31 +0200 (CEST) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2050.outbound.protection.outlook.com [40.107.103.50]) by mails.dpdk.org (Postfix) with ESMTP id DDA5040697; Tue, 11 Oct 2022 23:48:29 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=JAlchT1+XX3PCN7/PFvkED8PYDd8VMWO6pNGWzBNgyLPKipVfOj5y/sR1/dPDv2s7ktBk5X1C3GkQ88+VY5TPcfqreQeFUITdk4uQrS9WJU4i+Sf9gQcn3OImTDwlrFxQJfp/0FCG1SUYzECMhxVHeFCiEijGwA0NTBDEr2Y6l7/5uyKT54dRtWjUEyxR4A7JMS5faRvVrMfAILAwvaI8229ozRKb/2xYP/uBLTzNgYjFuWuRimhPTd737gKi8nbAVyDsFSiZtTKZM1s8LiPl3RWfS3PmgD3o+KpQFw7vbzSMf0PPerOkQEUzSYA0lTb2sX7xtyn4qNrMKpEIQO4tA== ARC-Message-Signature: i=2; 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=Odf7lgPSeN5OBYyi7ILWk7AmkQ08m0rLHXuAOBHIeRM=; b=HMkRESDoU/dVFtUXTWNc64SY9xCSAN83+ReCimt3AKhGStuQZioaYpFol8KeIzd8oJrJfgX3NgERK7Wuh3JIBghUTV1hw6dPYHEyb/WVAR8wKBpjP1pschYrioYHjpNa1wOWkGrEEddPVKyyx6PQhJuxDEpLLWr+MbxqZnI4+iwt3lYswkUcJ8GCGZpu2DA/7RRXmbMxG7W3qRxuvKvJ46yOygh4xaYZ30IRhlcv6fRn4UXpzdyUGO/vZvrNylkBI4J+PK7PcqQ6LKEWq70UWlaZmoQUDjdkFqnjPHdcQ23M64K32AcZYuGAPQctDCsny6Th+cavhdZDV5NQPY0YsQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Odf7lgPSeN5OBYyi7ILWk7AmkQ08m0rLHXuAOBHIeRM=; b=r1kaUXcM4b0zI8KYWVao1N/bydFykVgWqzAEooL+TGS7mSkpBt7biBvz0UiH/V+Mw9XftaS5zI7UM9dOsTnWRkRI2Iap6qLFZXEFpwZoqkokB34QUbHq44az8Leg+5O5udYaA09vg1ruPBFp7cO9UGb0WPPSHVfhhTIEvAOtM2U= Received: from AS9PR06CA0613.eurprd06.prod.outlook.com (2603:10a6:20b:46e::34) by AS8PR08MB8490.eurprd08.prod.outlook.com (2603:10a6:20b:567::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24; Tue, 11 Oct 2022 21:48:12 +0000 Received: from AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46e:cafe::37) by AS9PR06CA0613.outlook.office365.com (2603:10a6:20b:46e::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.21 via Frontend Transport; Tue, 11 Oct 2022 21:48:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT016.mail.protection.outlook.com (100.127.140.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.10 via Frontend Transport; Tue, 11 Oct 2022 21:48:12 +0000 Received: ("Tessian outbound ce981123c49d:v128"); Tue, 11 Oct 2022 21:48:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 31c682007fa074f0 X-CR-MTA-TID: 64aa7808 Received: from 48b6ec89332d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4B4372D7-E7E8-4B06-970F-35B137C482B7.1; Tue, 11 Oct 2022 21:48:01 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 48b6ec89332d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 11 Oct 2022 21:48:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+DtEjraRPtepUdV1g0ez0dJBF1lJCX8bZhjZrn/j4cSfgPtbPh8V896lEVif+samIpr0hC42ljY4YEdYcQp+KNmOdpJWz5p0dgFycJr82YV1Oe9MBEl83SaxaBpINSERxpsoIZ+4jvV3SNQ9xJeAiZLPffdGpstCW9Z0eRXdelSlHZ4q/qkE1Y6hQvp3cKUjQ/IA+cHH9M+obp2WjDRtayJtK+cbbfNutTwgq1VqQknADlj2MCQjJiKqPF32nfUf1QCdTv1oi7CLxVi4jeNJ0QvMJf/wdNL2fj+2CHuhO+JIeBjDtP4/RrlJ3/lsKkvnExRJXJivoVClXDNPan0rg== 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=Odf7lgPSeN5OBYyi7ILWk7AmkQ08m0rLHXuAOBHIeRM=; b=Q2v9oHf3SFkIwNZRxXKQa5O6X5pskPgnHcnZKhwg5LuVy+ohl1pITIVjY5I26OVmDgFrAUKoRz5fMyiyjwHbFsVwviGfxzuqDlbxkOb2nplPPTnQo9TGdZVxUCOcx2D0tfTZ0unPmzljk3MvXnl9Z7wK1mVPWRKA2whRMNQqXKgZB3WvqxIGRYAI7zctgCEyK2kF+EaviWLv1IIg4Uu4lV+/D0lVZO1nQzX8DQZKQxzEtCji1Db0+8lgOH64xrJysKZCurLUpjRUaGWViKPNm86BrU8x6gb0FMSbN04fe8VWJAA/9I6UZRjrnCoa9TyQci7BY4TpUcv1h3rXbChEgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Odf7lgPSeN5OBYyi7ILWk7AmkQ08m0rLHXuAOBHIeRM=; b=r1kaUXcM4b0zI8KYWVao1N/bydFykVgWqzAEooL+TGS7mSkpBt7biBvz0UiH/V+Mw9XftaS5zI7UM9dOsTnWRkRI2Iap6qLFZXEFpwZoqkokB34QUbHq44az8Leg+5O5udYaA09vg1ruPBFp7cO9UGb0WPPSHVfhhTIEvAOtM2U= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by AM8PR08MB5731.eurprd08.prod.outlook.com (2603:10a6:20b:1c7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.21; Tue, 11 Oct 2022 21:47:58 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::3fb6:b7b2:1e8d:11d6]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::3fb6:b7b2:1e8d:11d6%7]) with mapi id 15.20.5709.021; Tue, 11 Oct 2022 21:47:58 +0000 From: Honnappa Nagarahalli To: =?iso-8859-1?Q?Morten_Br=F8rup?= , Yuying Zhang , Beilei Xing , Jingjing Wu , Qiming Yang , Qi Zhang CC: Olivier Matz , "dev@dpdk.org" , "thomas@monjalon.net" , Andrew Rybchenko , Feifei Wang , Ruifeng Wang , nd , "techboard@dpdk.org" , Kamalakshitha Aligeri , nd Subject: RE: Copy-pasted code should be updated Thread-Topic: Copy-pasted code should be updated Thread-Index: AdjbWGfEPxN9xhyUTWC3ksfvr03I7QCTnycAAAT1IAA= Date: Tue, 11 Oct 2022 21:47:57 +0000 Message-ID: References: <98CBD80474FA8B44BF855DF32C47DC35D86DB2@smartserver.smartshare.dk> <20221007104450.2567961-1-andrew.rybchenko@oktetlabs.ru> <4406925.8F6SAcFxjW@thomas> <98CBD80474FA8B44BF855DF32C47DC35D873D2@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D873D2@smartserver.smartshare.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: A6C5CD6282C23345A70AA0A5A14DBB8D.0 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: DBAPR08MB5814:EE_|AM8PR08MB5731:EE_|AM7EUR03FT016:EE_|AS8PR08MB8490:EE_ X-MS-Office365-Filtering-Correlation-Id: bb2e66b5-c802-4965-09fa-08daabd24b88 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: bz9Xpm5DrhqqZ9DKy/ErwTBO5hLKqEZuwNDJNAEKSi2bzp/ZXoONtG6jMWmrlngalcd3ZiDtquyn1OX4KcVtY7w0ZPZkdvIm+esqonNalaOsc0+j2+/EUnYG0Q0PIRcu8VsO1Ylc704XypGYUbYtkOWbN/qvUcnzccbb96rx99MhEqNXSHYSzd5G/NgOu2jkJHyqxsE9jIVQFcIKUPCBWlzznHb2XXDhBq160k/Uv2ERg2j7P7atBwMLYQsKffB3RWzamkL9U9HL2PRWWUtkB4WAs0McxCcGfJABKMAuF+WOzaLMtRPmXmIvJDY4UdZGTm/sAPIJfcFKjVqD+L739VY65DoO+3NWbhizEEvRsKd4I2Y8FlWTYijZWIp5BDwccq6MIGHttDEiSqJxHfndKolWAbQ32hcTPkV+DO4KJuueh8lYMBdxg6r4j3qP0VFJ64ixAxywIB1MIxX+zr8I2hJZPTTha2mk8M2wNxqlcpxmWg3VPAsqh1xphP8LR5usgB+rqnXewMASuU5YkAE+kk7zD2ewVm9w2f7rE39sZEzevITzv2UhcuRrdwTlcWkUKypWf/nVkSyeef+iKiqpI1NBQtmsoMtZRtmAkkHFeQyHn/OTdkEJLsWr3zpoDzideD1eCWIJcBQ1kTXrvF6z/j3i3tg22mfX/6/A9N21NlSi9ehkWEeQxDNoQblMxUMYoYoamOMbY5XNXSLSETkATKGyI9OcwnjPMV0G4hOgY0dt33qNgy3EubtnhG75DE2dt3qG6GT86WrawaCbtAsDAGpBozbQXdQKhRKocf+278se3Bg5y5xXR6lu9tOt5b2nS8+ACKHrKyWMG37gUwD7fg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(346002)(376002)(39860400002)(396003)(136003)(451199015)(122000001)(2906002)(15650500001)(41300700001)(66446008)(66476007)(66556008)(66946007)(64756008)(8936002)(8676002)(4326008)(5660300002)(7416002)(52536014)(38070700005)(86362001)(38100700002)(9686003)(110136005)(6506007)(7696005)(26005)(54906003)(186003)(71200400001)(966005)(478600001)(76116006)(33656002)(55016003)(316002)(83380400001); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5731 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: abc1b259-3941-4f16-73fb-08daabd242be X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9rBRjDPRfqXMKpcbgUztF+BVKPRGfhEhanDeXSqQ6lfeXrGmixx67QsT6HT5Ye3mwR0WixyXnbWKzCaplolGIg1ntb07X5rjsP8XUiwAKq4k1zC7j6nxkNhl03+VKQlwqYMSI3Wjmk+G7Z1mBv/rzopUCcHR4laLezEELf9NdMRYTOsz63hbTb8Owa5IDrnwPKmg2AcNjK4phqj16NQeoDlal/9499EelEK1ua1sdLFMCjKm4X1ze4EZEuc+lFUd5we8Mp9E3/PEBvA/7f5u2b5g+azTKRj6YSVF/11WNYDmY/Zm5kXRu6DvWxyDtxdB2RRgsHpkKrZkqyY7Zm9PHynrw7mAYq4JWF5Tao8rXsov9k1Y97gxATQUCM/caUEaV4XH2cuMYDUC/dnhyIlNUaSQLF27oknMnFAfAcNTRmOyXuTBuB0I2N5243CYTi3DSSbi/hiqaRtktau3CFICnajqsqt3EaDIF+Y9aFXRykUnIMJD+EkPE/AqIHP8zigQzgqBZKKjG7HnpjdvOajjDmUo48TwqRX0GWvSYdG/RIeXio3+Hi82rVTMHTg+5ZR1GCfH+q300QUDwz1H+EZomdyaDqwGnsIzg3h1/HeswhM9C8AaXMmNL2mk+jU55dKoU7USXyGUvGIWnEtAtpVUgPEwx6qRXwGbJRFXBGPsXCRF0pCkeUyTr+5mJkcCHCPAGJ568s9Cre+Q0lDytXnu0RDUS5nq4C1CQ0bYrI8PnqS7jPPWj4DzIT8dfXBZsfRNJNj0XbNsCW5SFAMQDwKLM3kCjyKfNCBbLKaxKz9IOZmcX4NTVro3mqqh79T6bwSHHKmIZQNfU5oSqUJ8gQkxtQ== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(450100002)(36860700001)(110136005)(54906003)(2906002)(316002)(70206006)(83380400001)(15650500001)(33656002)(8936002)(52536014)(86362001)(8676002)(26005)(70586007)(40480700001)(47076005)(6506007)(82740400003)(55016003)(41300700001)(336012)(186003)(5660300002)(356005)(9686003)(966005)(40460700003)(7696005)(82310400005)(4326008)(478600001)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2022 21:48:12.4097 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb2e66b5-c802-4965-09fa-08daabd24b88 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8490 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 >=20 > Dear Intel PMD maintainers (CC: techboard), >=20 > I strongly recommend that you update the code you copy-pasted from the > mempool library to your PMDs, so they reflect the new and improved > mempool cache behavior [1]. When choosing to copy-paste code from a core > library, you should feel obliged to keep your copied code matching the so= urce > code you copied it from! >=20 > Also, as reported in bug #1052, you forgot to copy-paste the instrumentat= ion, > thereby 1. making the mempool debug statistics invalid and 2. omitting th= e > mempool accesses from the trace when using your PMDs. :-( We are working on mempool APIs to expose the per core cache memory to PMD s= o that the buffers can be copied directly. We are planning to fix this dupl= ication as part of that. >=20 > Alternatively, just remove the copy-pasted code and use the mempool > library's API instead. ;-) >=20 > The direct re-arm code also contains copy-pasted mempool cache handling > code - which was accepted with the argument that the same code was > already copy-pasted elsewhere. I don't know if the direct re-arm code als= o > needs updating... Authors of that patch (CC to this email), please coordi= nate > with the PMD maintainers. Direct-rearm patch is not accepted yet. >=20 > PS: As noted in the 22.11-rc1 release notes, more changes to the mempool > library [2] may be coming. >=20 > [1]: > https://patches.dpdk.org/project/dpdk/patch/20221007104450.2567961-1- > andrew.rybchenko@oktetlabs.ru/ >=20 > [2]: https://patches.dpdk.org/project/dpdk/list/?series=3D25063 >=20 > -Morten