Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp691900pxj; Fri, 11 Jun 2021 09:05:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7GVdiEPkbbDNh67eHQtKaP8K1DArLXE6/dmq9TMCv5DioueF0j1tR6yCyisYJ8R1GMt1Y X-Received: by 2002:a17:906:a95:: with SMTP id y21mr4386256ejf.522.1623427511100; Fri, 11 Jun 2021 09:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623427511; cv=none; d=google.com; s=arc-20160816; b=pVTaKSocpeR3B2SYj12YyJ8G0aSLVtfpSHA+tgiybIEVsZMoqM6dB6lwmsLpMRcQ3f fZLGfkl5NAxUtXulplclFC85D7xiH+8nYOjL555J25sJRZQF/BJuvmpowXbUj5vYHsiW Y718cin9tF0Lceemd1eRvViYvPOZ1iZJUPaaVtQhDVlSex3MaTaicZVKzx0iDlBLdg2j T36Hg+iI7dIK+E2K2m8VU7zVqu47CQweVK3B7tnuOjRKyDcCeuQLPpK3CReEeXQHtydH XVyk4i6ShIbBmVylaBj+UBe/vDj+8aB32cKfMj06PTy20RCxGRYCJcs10VLBdzRaOj/r a1yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qh6fUwhfWguo0206wYaXTsvP1VPTLG5DyBSO/qGICoA=; b=ZOb1FfCROqFhXfaW+hw8UP+ZyigvFin1t0glzGWJBJvMpYU6riub3WCETuqpyQVFOD BueFVxcSYMw5nDQt1N6FjO6+Vk0sO9e0/Rjtyy7kF0k2t478pO1AwRX+vJEMPEbuATbP 6zqvUxq1831900qgjlgNOjEbV7EEDHvfzegdQ4Fs9WE4ORJJwP6iSQF9BO2nIQbirmdf 1IDqKs7vcPQXVtYslB15+Jen3LqJB0Y9pMfeo3PRWsEcLE9x4c1B6JKkdlmrhui3fid3 8IgwNwqrW/57DzE856Wh1vVtkRnILsJkTPlp2gSsLsZgqZ9TqZhd3V8lNzXuWSg3wvLd i2Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mEQEIJEk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si5527484ejo.217.2021.06.11.09.04.45; Fri, 11 Jun 2021 09:05:11 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=mEQEIJEk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231622AbhFKQEX (ORCPT + 99 others); Fri, 11 Jun 2021 12:04:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:39502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231618AbhFKQD2 (ORCPT ); Fri, 11 Jun 2021 12:03:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6628F613EE; Fri, 11 Jun 2021 16:01:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623427290; bh=2cJ7OWTRabSZbYW4G2yda3GKL7nFS0qMZ1I7SLuGSK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mEQEIJEklpFW1wfF5cxHSm65aP0XUVTlA03rbnyB2DuQPzKQOOHFOkAm39rVifLW1 xWcpiUpy6aBM4TG8cND7Gp+VFpJxx1jFNXhMWlmqp8WZ7WAIgCSHyKXejbuTLGH33V ymbW8iU6K9VhN0GBZBYu3KGlvTBw6n7U6CKYdmN6Y/Anp54XptwYKlSuypwTVMszjG jfhZL7TaspACbATmEua/8qCljzOIj4avy73II5l1Y+di+uiLmv+qA9h8OrU+K6jGX8 fdZxR6szDfdcbjCp+s1rXhsJ+yYqbRe1AXXkZIlThSmACyIjuzrkMFgKqyc1PLTOFr K63O0ZH8JpS3w== From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Greg KH , Kees Cook , Nathan Chancellor , Leon Romanovsky , Adit Ranadive , Ariel Elior , Christian Benvenuti , clang-built-linux@googlegroups.com, Dennis Dalessandro , Devesh Sharma , Gal Pressman , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Michal Kalderon , Mike Marciniszyn , Mustafa Ismail , Naresh Kumar PBS , Nelson Escobar , Nick Desaulniers , Potnuri Bharat Teja , Selvin Xavier , Shiraz Saleem , VMware PV-Drivers , Yishai Hadas , Zhu Yanjun Subject: [PATCH rdma-next v2 14/15] RDMA/core: Allow port_groups to be used with namespaces Date: Fri, 11 Jun 2021 19:00:33 +0300 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jason Gunthorpe Now that the port_groups data is being destroyed and managed by the core code this restriction is no longer needed. All the ib_port_attrs are compatible with the core's sysfs lifecycle. When the main device is destroyed and moved to another namespace the driver's port sysfs can be created/destroyed as well due to it now being a simple attribute list. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/device.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 2cbd77933ea5..92f224a97481 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -1698,13 +1698,11 @@ int ib_device_set_netns_put(struct sk_buff *skb, } /* - * Currently supported only for those providers which support - * disassociation and don't do port specific sysfs init. Once a - * port_cleanup infrastructure is implemented, this limitation will be - * removed. + * All the ib_clients, including uverbs, are reset when the namespace is + * changed and this cannot be blocked waiting for userspace to do + * something, so disassociation is mandatory. */ - if (!dev->ops.disassociate_ucontext || dev->ops.port_groups || - ib_devices_shared_netns) { + if (!dev->ops.disassociate_ucontext || ib_devices_shared_netns) { ret = -EOPNOTSUPP; goto ns_err; } -- 2.31.1