Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp608073pxh; Tue, 9 Nov 2021 16:06:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUhMWFIneYjFT4Cfmzstz3yjDluHqDjVJae9U0doEKJp5HU3Mt7BZQlHD7zzui8rk6LX7g X-Received: by 2002:a05:6638:238b:: with SMTP id q11mr9029657jat.43.1636502798355; Tue, 09 Nov 2021 16:06:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636502798; cv=none; d=google.com; s=arc-20160816; b=xkOzf3Aoycc8ErlK4xLqpRcmneJp9Nv+PwJDDC8JmUNaRBFh4OtSlEbe9iLAaq+Rfb vFjYnrHBhRg7rkofQhL0A0UzZBYoSJ+/Pg6Jb/j5/PIb0BPANHcDldOo37QpKmQTlu9/ dj1Yf2GgYFVPuRbowZQ9Pa4hFtv/lyAyuWqSt5me99/ia9dGXrbeBDruizcQYfuqgHQV k1YTnVqgp6KQo+gwCM7LnndeYNylfUw4fekHo2+8CZCLMhJEmEFfPJX68GDWggiECi2K 1bd2RZHgpiAQqMV1fk6wt/jGE+b2Kc2ssym0AVljSfIVhj7nxam1jrSTX1mIipBAjne+ OsXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=K1Djn1NGugleL3fdls1eG7emz8Ub2InlCxiphHf4t7E=; b=PbJHU3NQiVGFq5J2DmWyhAiqO3527fPS59wk0KrB/sbnDgo17gbEOcah6ZD9JLVT5y W2UM7jz7Y5eYmkq+erG0WQoT6B4f8Sc2IdoZtlitjWJtqM+ugMDe/hhGxI9cdDA/XFsa g3kp2YVF/yTdDLCBaMiyBNBT9dRF0/KrNF5wDGK5jgutzoaRgvn306MBZZgXQECu/ZA9 4Ki5CmvrKPAkWV3MBS4PyPt8suBulDcjR+wfuLYT2iPqaqzmyY2u/lLdryP361J8mKxY FxGPYdV2Nnt8N1I3bHvLHNiE3WooGjGpwr2fjmermGjCZQFICdSw6hLeAOLtfe7uSkeI o5gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=qUs74T4W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s8si39553962ilu.48.2021.11.09.16.06.26; Tue, 09 Nov 2021 16:06:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=qUs74T4W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240229AbhKIQdo (ORCPT + 97 others); Tue, 9 Nov 2021 11:33:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234491AbhKIQdm (ORCPT ); Tue, 9 Nov 2021 11:33:42 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5EC2C061764 for ; Tue, 9 Nov 2021 08:30:55 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 133so16374000wme.0 for ; Tue, 09 Nov 2021 08:30:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=K1Djn1NGugleL3fdls1eG7emz8Ub2InlCxiphHf4t7E=; b=qUs74T4WDHbDg4VLPJeM6tBjKDnYcGwupmuMns6IF61DOUZnlSkguJzd6OsfIj8JY2 VwqY6DKzzfSWjyzeQa2hc87dKw577ejwMEL8avGyWKzn/9awXq1RdTrOuCpYSQyTFfCh pRS6pWOK9kK3o3xxjvYHA+pOQ5/Hi6AXwhsqzUb09EyQfkm6g9pBAeWOws0VlWcxOo0Y pnupPpPdnhI3BwlBREuAVfxjsSBxcMQI1u8XPElwnuU7ENKtB925FL/vS8QekH72gVcb Jn2K5y8V7wNj+J7QTYeaqYMCJUmsF3PmFr4UVR2CcH/W6d5YM61guMgRRaD5u9qMgZvx /2Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=K1Djn1NGugleL3fdls1eG7emz8Ub2InlCxiphHf4t7E=; b=4gjiDwmscsySLA5IjpK5uhTKT3g6fxuQQHqPcXecjOJOvndr4ZJ7lgvOHwGx35/o49 9AE9G1AUz8F+dyihi26nSOiqY3AZYi1E7RJvQ4g+etgMiD38EjLEDe4n1LiWma5ZTYEv b2+XwpphOqum1hGgT1K7Lkjw5Rzi2gP8yhgM4BUtXet8lLXP0MsiAhe+0t73PvkUCBIh F6APT9ahk7nYW/kv45jK+dax34pLh6xO2tPo5/LUr0RRxuJ63EB4M+RzePFdKuT/zhXL 6tKB2JjLvG5GY74W2ne2Ouu6g7GiceQ5iszl/M6A8utG4o/KQQekX2PjomUS/rZr9Ixh FiXw== X-Gm-Message-State: AOAM531/bLlvP4L8ERyEGklCLa43uOtKJU3qNz5pWkz73U/yhJZwx3cH OoIkQRC824lk/brVzlv42JMNXg== X-Received: by 2002:a1c:4e0c:: with SMTP id g12mr8508110wmh.56.1636475454367; Tue, 09 Nov 2021 08:30:54 -0800 (PST) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id r1sm3145896wmr.36.2021.11.09.08.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Nov 2021 08:30:53 -0800 (PST) Date: Tue, 9 Nov 2021 17:30:52 +0100 From: Jiri Pirko To: Jakub Kicinski Cc: Jason Gunthorpe , Leon Romanovsky , Ido Schimmel , "David S . Miller" , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, edwin.peer@broadcom.com Subject: Re: [PATCH net-next] devlink: Require devlink lock during device reload Message-ID: References: <20211108101646.0a4e5ca4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211108104608.378c106e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211108153126.1f3a8fe8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211109144358.GA1824154@nvidia.com> <20211109070702.17364ec7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211109082648.73092dfb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211109082648.73092dfb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tue, Nov 09, 2021 at 05:26:48PM CET, kuba@kernel.org wrote: >On Tue, 9 Nov 2021 17:15:24 +0100 Jiri Pirko wrote: >> Tue, Nov 09, 2021 at 04:07:02PM CET, kuba@kernel.org wrote: >> >On Tue, 9 Nov 2021 10:43:58 -0400 Jason Gunthorpe wrote: >> >> This becomes all entangled in the aux device stuff we did before. >> > >> >So entangled in fact that neither of you is willing to elucidate >> >the exact need ;) >> > >> >> devlink reload is defined, for reasons unrelated to netns, to do a >> >> complete restart of the aux devices below the devlink. This happens >> >> necessarily during actual reconfiguration operations, for instance. >> >> >> >> So we have a situation, which seems like bad design, where reload is >> >> also triggered by net namespace change that has nothing to do with >> >> reconfiguring. >> > >> >Agreed, it is somewhat uncomfortable that the same callback achieves >> >two things. As clear as the need for reload-for-reset is (reconfig, >> >recovery etc.) I'm not as clear on reload for netns. >> > >> >The main use case for reload for netns is placing a VF in a namespace, >> >for a container to use. Is that right? I've not seen use cases >> >requiring the PF to be moved, are there any? >> > >> >devlink now lives in a networking namespace yet it spans such >> >namespaces (thru global notifiers). I think we need to define what it >> >means for devlink to live in a namespace. Is it just about the >> >configuration / notification channel? Or do we expect proper isolation? >> > >> >Jiri? >> >> Well honestly the primary motivation was to be able to run smoothly with >> syzkaller for which the "configuration / notification channel" is >> enough. > >Hm. And syzkaller runs in a namespace? Correct. > >> By "proper isolation" you mean what exactly? > >For the devlink instance and all subordinate objects to be entirely >contained to the namespace within which devlink resides, unless >explicitly liked up with or delegated to another namespace. What makes sense to me and that is actually how the current drivers should behave (mlxsw, netdevsim are for sure).