From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AF54C3A5A7 for ; Thu, 8 Dec 2022 16:20:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbiLHQT7 (ORCPT ); Thu, 8 Dec 2022 11:19:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbiLHQT6 (ORCPT ); Thu, 8 Dec 2022 11:19:58 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BC0A98972; Thu, 8 Dec 2022 08:19:57 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 15A0D61F96; Thu, 8 Dec 2022 16:19:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F6D2C433EF; Thu, 8 Dec 2022 16:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670516396; bh=M+Jm9v4PbD+01xedeGhK2H9LDFBDPBUKSkXffaF+n4g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nrXhlD5XL3j5Ua9Mq2v5wzA2shGW068fVnqoxFM1z57paGvpw4n1xZbuEyjyXfB9j gaExw6exvMeKoNHPDC2I9nd3O5xQNkrqv+TYJAvY13SbUt7T5CjSP7NOdFHBs93P6p yVbhKZgrUCKCxmOW/W9Ci4CHWY1OcuTOva7LVGmRVqjAZTVijbRKulTrbNUT6Oob1X vPyZkToqrE8gb2HzD6NTqpBkhpmzRwbHqig7r8HN/5WMf8ZP2pWyia5ut6oFVk5e0d rXxTp8UxmeU7ZNR7ojspfpnhHasD5VrC9UBNjmCTU+3u/t5zIWZhzBEOBxqLCnnDUQ ersxppwIOY63Q== Date: Thu, 8 Dec 2022 08:19:55 -0800 From: Jakub Kicinski To: Jiri Pirko Cc: "Kubalewski, Arkadiusz" , Vadim Fedorenko , Jonathan Lemon , Paolo Abeni , "netdev@vger.kernel.org" , Vadim Fedorenko , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, "Olech, Milena" , "Michalik, Michal" Subject: Re: [RFC PATCH v4 2/4] dpll: Add DPLL framework base functions Message-ID: <20221208081955.335ca36c@kernel.org> In-Reply-To: References: <20221202212206.3619bd5f@kernel.org> <20221205161933.663ea611@kernel.org> <20221206092705.108ded86@kernel.org> <20221207085941.3b56bc8c@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 8 Dec 2022 09:14:32 +0100 Jiri Pirko wrote: > >Running DPLL control in a namespace / container. > > > >I mean - I generally think netns is overused, but yes, it's what > >containers use, so I think someone may want to develop their > >timer controller SW in as a container? > > The netdevices to control are already in the container. Isn't that > enough? For DPLL config we need to delegate the permission. So we'd need a "is net admin in namespace X" check, no? > >> Thinking about it a bit more, DPLL itself has no network notion. The > >> special case is SyncE pin, which is linked to netdevice. Just a small > >> part of dpll device. And the netdevice already has notion of netns. > >> Isn't that enough? > > > >So we can't use devlink or netdev. Hm. So what do we do? > >Make DPLLs only visible in init_net? And require init_net admin? > >And when someone comes asking we add an explicit "move to netns" > >command to DPLL? > > Well, as I wrote. The only part needed to be network namespaced are the > netdev related pins. And netdevices have netns support. So my question > again, why is that not enough? For config which goes thru rtnl, yes, but we also need a caps check for: + DPLL_CMD_DEVICE_SET, + DPLL_CMD_PIN_SET,