Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1328946rdb; Fri, 16 Feb 2024 12:04:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYzaE1WTRcvdj976up3L2/xNBkpTACdsC91Hkn+fnrkC1ggFeX4IrSBSxWSq4GY4+SmL6nX+VGN1T4VI+QrYMdsvaOgfFio992y56V5w== X-Google-Smtp-Source: AGHT+IFqmm93QDjWOjpmcdUUToWnGO0xPwSz8wBEdeD2M2Pu+B3lFEGPRcWvFIYXqWv7wPeGglpM X-Received: by 2002:ad4:5b89:0:b0:68c:4b1a:b5f7 with SMTP id 9-20020ad45b89000000b0068c4b1ab5f7mr6794330qvp.64.1708113858515; Fri, 16 Feb 2024 12:04:18 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g10-20020a0562140aca00b0068f028ee1f5si519089qvi.373.2024.02.16.12.04.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 12:04:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69273-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=CJWXtv2b; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-69273-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69273-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3A86C1C21533 for ; Fri, 16 Feb 2024 20:04:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AC20137C29; Fri, 16 Feb 2024 20:04:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="CJWXtv2b" Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2082.outbound.protection.outlook.com [40.107.237.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9877A1353E4; Fri, 16 Feb 2024 20:04:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.82 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708113846; cv=fail; b=gDDYnwIdKy8ZVtuQSXVzprVss8sOSsEwmStzkHUXY9VouAKvTzJmPyFUSiKW9vs/bhg0cmIdzHGh1Y9+zcjK7X21CshvCc4oHG97lMpUsC4U1iE9Unk6EpaezzCgIp5Nasqd3n9gem95RA2VQSkjEhoHwE1NazW4KFNKbFxhOyM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708113846; c=relaxed/simple; bh=s5ghp3jSCzu0IR9QYDwda3Vlvkvw64yMH4ktT5pZPPM=; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID: Content-Type:MIME-Version; b=hl/LoS7rLLm8URtpsEVHLgtwwYHD2ExaxokUp8Pl5qlnExoBIYiUHABinu/2tZCzuqS7TXMBb5G7BCrpCBA+dzwqZX928B2p31OoiW4PoiNHPCDmELM9zls+U5HZE6AQPmI7s8sH2OpVxQmGqoJiyevk72Vwd80+DfH+ehHZsFg= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=CJWXtv2b; arc=fail smtp.client-ip=40.107.237.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Scp5Enqht/icmpZOotvRY7/I5jlQPBsjmrxudk6W+g8/BMn4E+nGCq27wdSjWj4Ah65aBdPZQgDQiMyPGD7OkXqggD1H1/dYHr+3jtcsDh1fOgnJncPlxPIrMrJwsMxL2ae+uNyQB+3KXbzyoZGYxUEMMXtHeLoOqbt3YbwIaEV3SghwNMK3CQMURSz2AdnjFKEnIGooNPe7XhmMFY54FsZ0JC41QS8qFNU5lfpLbunErfoiuCMOvkv5OxfsJMZEWIs2owMBTwmU7QFy/NQfgvIdzTMvjc13GXcWI6MB6zV16AtAoan5+opx2T51Alvr6+dH/fcCsFAFs1itZDR1Rw== 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=s5ghp3jSCzu0IR9QYDwda3Vlvkvw64yMH4ktT5pZPPM=; b=b0jGrXbSMwqgFNedO95EdPcpbMAHECsOKXukQzCZHTPiXhCfxZU0U5rat5F4JhC13ou6OuFPAg1UyVa0xIB7RTpDpsa31Q25YXe2idoI9+LUtOl6ihnx54ZFP/vSsZNlip3/+4okoaXKEW/CRSiD8Q4RuOZ/WlwIb+j8CPinCF5HmqYL/WTyv8dMR6zLKOrm8b7QqGLkClOGL9cF0vbQeAbC67l7IXhbq/kcZxXQ/qrbIv1iLm0pcfoli04Yrh26n+xMQxuminKx4s8pYfV3A2fBX9BcDpMNQ0iHhb8sbntaLDPZEIoCdcskcgkb9ZcAM73Hoce5Nv9/w0w0rYnO3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s5ghp3jSCzu0IR9QYDwda3Vlvkvw64yMH4ktT5pZPPM=; b=CJWXtv2bh/3O5glmwoMqFcyMdJfQF8L69FliI9BYRpzGYoHb5awF6LLEJeNZzjH8dVFTEkLx05LYUC7VwvkYmEK8QMKr988BYpItfjXYMtySqwj7PGfFP/J7I0oS7f6qb0vtOOBT3RTvBsNgiBSJxkrllOn7XDLBGYGeR3A0+FDdUUYeBZIvkdt0Fcd6AVt9bIa3JaJfnQDaPqtEje5SZZbThxUSLbFKQLoo42azszRTD9AGicx7med9olgPk5rWyMbebcsji3x/Q3fLhytlT2ZHgtAePgngW0XKcx7EHfNzmxwSfZlsfysbDZyFpEWAJXPTsDN3GQYJFpyPyqKvMg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BYAPR12MB2743.namprd12.prod.outlook.com (2603:10b6:a03:61::28) by CY5PR12MB6453.namprd12.prod.outlook.com (2603:10b6:930:37::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.13; Fri, 16 Feb 2024 20:04:01 +0000 Received: from BYAPR12MB2743.namprd12.prod.outlook.com ([fe80::d726:fa79:bfce:f670]) by BYAPR12MB2743.namprd12.prod.outlook.com ([fe80::d726:fa79:bfce:f670%7]) with mapi id 15.20.7316.012; Fri, 16 Feb 2024 20:04:01 +0000 References: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com> <20240216-feature_ptp_netnext-v8-10-510f42f444fb@bootlin.com> User-agent: mu4e 1.10.8; emacs 28.2 From: Rahul Rameshbabu To: Kory Maincent Cc: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier Subject: Re: [PATCH RFC net-next v8 10/13] net: netdevsim: ptp_mock: Convert to netdev_ptp_clock_register Date: Fri, 16 Feb 2024 11:48:30 -0800 In-reply-to: <20240216-feature_ptp_netnext-v8-10-510f42f444fb@bootlin.com> Message-ID: <871q9cgor3.fsf@nvidia.com> Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0018.namprd03.prod.outlook.com (2603:10b6:a03:33a::23) To BYAPR12MB2743.namprd12.prod.outlook.com (2603:10b6:a03:61::28) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR12MB2743:EE_|CY5PR12MB6453:EE_ X-MS-Office365-Filtering-Correlation-Id: eef35c70-da02-4db7-9010-08dc2f2a6ae9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sgCKktBmgB6OwyGYmYx19XODkAzKF4wdsImWkmuxaFaGUxxhdPeT92T6eou/Lpneh1zukR6nXSVhqSdQcdLM2U5IXQ1S486KXQR6FBBQhRxoYKUI8/V5NP0llHVS+LI9Cvhh0y4VhSGcPfbhA6NCOyJTLQhcHp/3HLgZdaPUhGU4+4iVKG7quZ7KwEIVwGFto9WWuUOvpC+HHu0Ltni1UI8UnlShwR6/mPccapI6qlYh6AaD/GTUb0TZZl90Iw1EWvGhr1XwbdlO/SYg/SwTx52vdfx3bUlTCmXkc8Yg7H7ueTQ4yuRWOCzG/BOhnXNkg785m1zzmsMdLOKg/KvRextdywrdxzTMI/VrJsWBegsdd8/EuCg3g8Mb6u0FkxaZ+hzzqrh0hXg2e0OnaEd7ARb/WaF7xmNkq3MH6JfTpkS+neUsMaUvH/vDqpRwRt7ciP8sprjw6KJi6CLVgEqqFHiAmuPo5JqrprVsbFDNTAQM0tRM8ur2UNygCtXeQT6PILy4IW0wvJdcEiPzqtOC+6xiO+RAVOXLyXXJoYvt+q7xu6QE/T8eB9OrZNznl/p1 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB2743.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(396003)(376002)(39860400002)(366004)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(2906002)(7416002)(6666004)(26005)(6512007)(8936002)(36756003)(6506007)(6486002)(478600001)(38100700002)(2616005)(83380400001)(4326008)(8676002)(66946007)(66476007)(86362001)(66556008)(5660300002)(54906003)(316002)(6916009)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?LDALfNHR+QP6XMJV/C0JPjaJY15FrZGJY1rlucq/jCryYXFN7JTZcsG6M/rB?= =?us-ascii?Q?kFMeKTUySaV6W8hbEXOD4f5t2o+wvNqL+8S/dAUp1vmHGJ+ej4Mh9WWKdcNr?= =?us-ascii?Q?s7AFtO1oWR+o28wR2dVtjUOueNGLPucM3nqZu6n+5/XdzDIoJURTmW4N7a8f?= =?us-ascii?Q?WCDwL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?= =?us-ascii?Q?iXAPirE/mE/OioxXNtdrfjnivD50gaBXwfyN0gvRxnX0yNjA8NkIfNFI42bq?= =?us-ascii?Q?W/vxY3Cit5tpiN3JAzs/OclRUhIfVFT0wFcwNu+5yHMkuvjkRGtVoBXoLA87?= =?us-ascii?Q?FbQ5EAexZP9GD53cxZlUXvjZ3S7PaCcPORxYwWL+Nrgr151JTLEnJsUwT8dU?= =?us-ascii?Q?WmNUISz2FW7ziWIj2bqq6uIpz6w3sp+QCHn7HrJ8d3O/rsWvWSaLaY/iPyJn?= =?us-ascii?Q?sLskf7nsicf8uzzw9nIdW/M7TULmpV9nEjeAgwSfsua9ABXQUJQK+2N+faYy?= =?us-ascii?Q?23iFqa7peXs2LolEL/kU61an34YEQ/sBWycoDECfUXLqtjEc8jkN6IhiQ/SW?= =?us-ascii?Q?AtL7cf1zkHQ31Mu+Ju0KywmNmEEfbBlT3I0dyI4+i2xmp6fl52bC5muOG1Wp?= =?us-ascii?Q?NlVs2nVaCeMINyHsxYtx8ZOorfdsQedtCXcsYBRFR0RA/jFwTQcw9P5LuD2g?= =?us-ascii?Q?2O1bgcFSCaQMVRyjHDNxsCgFigQGtlJoMfVjebYDTJDsD3asQACBZ7vju5/x?= =?us-ascii?Q?Rw=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: eef35c70-da02-4db7-9010-08dc2f2a6ae9 X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB2743.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2024 20:04:00.9837 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Akat9Y/cG+SiSkWGteXfjIH40RyATGXEt5UocBWrE8zO8V1fDWicU9wHobuHCCN+lxu/+yzkIMZZnOQJ7ukwrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6453 On Fri, 16 Feb, 2024 16:52:28 +0100 Kory Maincent wrote: > The hardware registration clock for net device is now using > netdev_ptp_clock_register to save the net_device pointer within the PTP > clock xarray. netdevsim is registering its ptp through the mock driver. > It is the only driver using the mock driver to register a ptp clock. > Convert the mock driver to the new API. > > Signed-off-by: Kory Maincent > --- > Shouldn't we move the mock driver in the netdevsim directory as it is only > used by netdevsim driver? This gets interesting. I think the reason it live under drivers/ptp rather than drivers/net/netdevsim is because a bunch of reference/simple phc implementations live under drivers/ptp already. In the case of mlx5, it lives under the mlx5 driver directory to avoid needing to export symbols between some mlx5_ptp driver and the netdev driver. I think since the mock-up driver makes for a good reference for developers wanting to know what it would take to implement the functionality for a phc, it is fine living under drivers/ptp. That is just my opinion though. > > Changes in v8: > - New patch > --- Reviewed-by: Rahul Rameshbabu