Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3933231pxv; Mon, 28 Jun 2021 17:05:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBujfIJI+n0YBsiUR0jD0Fc4We16opfBLqcsdCGHGrjrX4EGfk3Yasievbc67PGW8FK+ej X-Received: by 2002:a05:6402:1a38:: with SMTP id be24mr36712167edb.243.1624925113607; Mon, 28 Jun 2021 17:05:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624925113; cv=none; d=google.com; s=arc-20160816; b=D6l5gwX3JwDpYYoORgpKpwKvcsvI9iOWWB7ZK01g+kOjYot0Ne9Bj3zMLYbHbpNrpj mK8MoL4g2Q1N6SPrvfhP5JLyKBa9ypdoP8OW7zMIf6HxFW2la9lFfwhOCSgtZprqh8bN etAh0fQFPDv4lD8OhvPwoVxhEbrdN5Pp3bbnJ9nWRH8Djtjy7wW1jq4FQtTw+hg+aSAG wHJlEfs/dCkAieCXn/617KQ4BaIYOW2cLXD0RUFUggq/heJmiN9ukZerVv9xYh8oyzua TRzdUU/dO8ZzFGsSdF5hv6VvTmx0ytiUpwplLQrwE9ZRlbZ3jpCXXwKBJJJ6Xhw5CZll Np9g== 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:subject:cc:to:from:date :dkim-signature; bh=GcUi3W4j9bCnAK214Ds5fcL7OghjM76ZAY3mDl17NWE=; b=TMqdu+hbQaF7E+7GBFLEJOM26swr0orI0vtIfxbF4hLb5k9tOD/2OBVGmJR9kwm+yC FxPJa8//luDCVIwkRHwhFWhSgD/aM9hx/BNOlqnnei+01gPkWCPq5bkRpgJQ9PAYbm19 7TD6i4+/Wxi8F4XjGwidHXryZki+zRilpHK0eP0eIpIfheDiMrIY4h5y7qJhRYRRB9y3 3QQXghMM7vo4LVYJTA7Pr1UayG4xqyhDKWYTMac9eacD1+j1lzI/R+jW2pegZWcpN62x PnNlxuGS5du8u/N3k3Xi+tomvMkKBiLhUdwSctbdYa2+J0pSvKikjkko5ms877jYACEg 2XHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KNogKfXc; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz26si14335446ejc.672.2021.06.28.17.04.50; Mon, 28 Jun 2021 17:05:13 -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=@redhat.com header.s=mimecast20190719 header.b=KNogKfXc; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236835AbhF1UM0 (ORCPT + 99 others); Mon, 28 Jun 2021 16:12:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24230 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232527AbhF1UMZ (ORCPT ); Mon, 28 Jun 2021 16:12:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624910998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GcUi3W4j9bCnAK214Ds5fcL7OghjM76ZAY3mDl17NWE=; b=KNogKfXcS/gVYIHoV9f9x2WpdTqBSDbbQbebDN0ECvlQSwWbnqLvnizQBTHIHQEMQAZoga 2yzxlCWSmqVoOZRTsUC3z0aVv3wvHborXt/F8L7ywyGMX3LM+dS+qz4TstwQOSh58lW6bC thJyTG3ldzRnadQnV3ARj8504/STjFc= Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-22-2Y_QElnIPu2A7lNM7gVD1w-1; Mon, 28 Jun 2021 16:09:57 -0400 X-MC-Unique: 2Y_QElnIPu2A7lNM7gVD1w-1 Received: by mail-ot1-f71.google.com with SMTP id t4-20020a9d77440000b0290463a472d9a2so8738354otl.16 for ; Mon, 28 Jun 2021 13:09:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GcUi3W4j9bCnAK214Ds5fcL7OghjM76ZAY3mDl17NWE=; b=tK56pCEnI2jUJQBaLeNjYKnhgUVDMhlh3atY1Ee3n5/SkGpWGg1nx9JeCTtOqcjgec 6fzeMk4hqlK6OjMSqxsdVPXa97POx8yEJyWsqanuh964HdQ4rVEIFGFLjsexVjflIgcB TSjBdn6mZssLpwydC907Cvo58DKyp8wXw24HrJ0Ix0lh6BVfRiJ68jmArEuuWV15FRsG LnC2BhD1dKBVmXcYTBCTaCJHFGJU5gski66gBTkqKvmr9urH1y2J8Lv2A4rn3iQbf6f+ qJoS+0X0aEmPL6+WXT8XsB0ukyA7oxotPYxTSS9pNYVBmMFYbBVW525wf1aDb98iBf9X VCGQ== X-Gm-Message-State: AOAM532l1uwUSqSdfhPN8QHcdzF6hE47vW2q+p0P1LDhaNkPQtwgsO4U rBBGfNKYE2d3LODBep6AP+UBByFwIMIhNbXitzgPiKRucUo2X7zSF0SkMJY3s/cksYfPK5pgscu 0D0CyfyJBL+683zQ8y0Kt1Jbw X-Received: by 2002:a9d:2eb:: with SMTP id 98mr1117109otl.297.1624910996800; Mon, 28 Jun 2021 13:09:56 -0700 (PDT) X-Received: by 2002:a9d:2eb:: with SMTP id 98mr1117096otl.297.1624910996562; Mon, 28 Jun 2021 13:09:56 -0700 (PDT) Received: from redhat.com ([198.99.80.109]) by smtp.gmail.com with ESMTPSA id o24sm3636373otp.13.2021.06.28.13.09.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 13:09:56 -0700 (PDT) Date: Mon, 28 Jun 2021 14:09:55 -0600 From: Alex Williamson To: Kirti Wankhede Cc: , , , Subject: Re: [PATCH] vfio/mtty: Enforce available_instances Message-ID: <20210628140955.17e770ec.alex.williamson@redhat.com> In-Reply-To: <641a865f-a45b-10ed-8287-3759191a9686@nvidia.com> References: <162465624894.3338367.12935940647049917981.stgit@omen> <20210628125602.5b07388e.alex.williamson@redhat.com> <641a865f-a45b-10ed-8287-3759191a9686@nvidia.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Jun 2021 01:22:00 +0530 Kirti Wankhede wrote: > On 6/29/2021 12:26 AM, Alex Williamson wrote: > > On Mon, 28 Jun 2021 23:19:54 +0530 > > Kirti Wankhede wrote: > > > >> On 6/26/2021 2:56 AM, Alex Williamson wrote: > >>> The sample mtty mdev driver doesn't actually enforce the number of > >>> device instances it claims are available. Implement this properly. > >>> > >>> Signed-off-by: Alex Williamson > >>> --- > >>> > >>> Applies to vfio next branch + Jason's atomic conversion > >>> > >> > >> > >> Does this need to be on top of Jason's patch? > > > > Yes, see immediately above. > > > >> Patch to use mdev_used_ports is reverted here, can it be changed from > >> mdev_devices_list to mdev_avail_ports atomic variable? > > > > It doesn't revert Jason's change, it builds on it. The patches could > > we squashed, but there's no bug in Jason's patch that we're trying to > > avoid exposing, so I don't see why we'd do that. > > > > 'Squashed' is the correct word that 'revert', my bad. > > >> Change here to use atomic variable looks good to me. > >> > >> Reviewed by: Kirti Wankhede > > > > Thanks! It was Jason's patch[1] that converted to use an atomic > > though, so I'm slightly confused if this R-b is for the patch below, > > Jason's patch, or both. Thanks, > > I liked 'mdev_avail_ports' approach than 'mdev_used_ports' approach > here. This R-b is for below patch. Got it, added. Thanks Kirti!