From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 9C286130AF6 for ; Thu, 3 Oct 2024 09:34:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727948097; cv=none; b=JiSnixTkeOrfnNGRdKwH/SIkL7QUl0MFha3qglCY3HH+B8wIrbjVGMZFsPVbXU6TlGN0sVdCUoub7vwlGReNaMlAUc7qAwTeggNNVEUgqQHZlKO18YBf80ER/ufGgiiQx3dhEw++pTTbfeIxW9qBYtaTrv1UNW9t9IQ97lB0uIc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727948097; c=relaxed/simple; bh=8PNWb8f5FF5xUid5MxaKNsCFti1xv+NLEa0wWHyNbBU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gTZpWXa2cyYzQhuam4qGvRuZXCwLftuUvWQpoLJJHeHlOJCAuwzNmEBHavhKZsbedMJ5kU1W8KlqBiNwgBUSPfKV5exXFznm7a9sAV9dVkDS7e3mhx6U4sKhY4pHR3dYDefYswJmK7GPgo8LPdeLGR/63wr01ImoOD3wEY4p9mg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=A+e2eYVV; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="A+e2eYVV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727948094; 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=KXMpAb3wF74PmmdRNbw2eEeLnsh8xWYLhJFUtS51lww=; b=A+e2eYVVUacu50MGbFR8nGA+uCdA6zdKBZHwxakRgE2Sl2kstmPD5iu+dLNo6MTB8I4pvP cdlhQuUHSg7mVXSK//3ug47osyVt1Z9gAegh0qQby7Rp1jPs3KwkucLiG+va5Tf342dGLu jEpcYCxuzmc6GF6tQPfygAZSQRz+EzQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-388-3UaPv60VNtaUqXwbPuKaVw-1; Thu, 03 Oct 2024 05:34:53 -0400 X-MC-Unique: 3UaPv60VNtaUqXwbPuKaVw-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42cb5f6708aso3889725e9.2 for ; Thu, 03 Oct 2024 02:34:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727948092; x=1728552892; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KXMpAb3wF74PmmdRNbw2eEeLnsh8xWYLhJFUtS51lww=; b=oI5mI07eGvn+QkWdNZdkHZ+drqS8T3noQZ+mSTiGpA12NAu5D39tepORg+yzOY5/v3 pqOYm6mwLrKsNaEXi5icjfclGErETdVN7z3WHKsdyR0b/z+K6S8k5hztEy2XWzZqyjsh 0j3IcJv1Fw+Avc/1SBe2/AUAiyIyfx73Nk498YyCbF4Wh0n6GZNtcrwKBSLAckmm+iAM YDPhuYnx8ftQ6rUSFhB18NTno15bO+um8YCfDzVWpHF8UTgRwCQvSxQW/CHrNC+zjwgu 27KsshaoRkczvOSADYPFIPMbSdFg++L1AEVTv2xJBk4I/eoAKcHs+MrMuMwYA0NCgEG4 qArg== X-Forwarded-Encrypted: i=1; AJvYcCVTwqqBuRg/4UHsnnPuyHvd+LOAg0jUUia6pDXFe8MjclhglxHGxC+J2zLbpIXy0LiGE6ewl2w7wAKjyh0=@vger.kernel.org X-Gm-Message-State: AOJu0YzBwLxANNdzQa2JL086FZgisMgGPqWbHRr+dfVHDvfQmtGOMSxf MXIW9ZV1rQB675Yn+LePQHTFT4n6bQPYW96ol1enpp9A6GAONB6OrgHKc544F4doHP97pnSXwGn gRimiBiFjvcaZgDNPiCRtKd6wvULAJvPdFad0EDRjaPZEuacdtATVRLUzjYLknA== X-Received: by 2002:a05:600c:3510:b0:426:6ed5:d682 with SMTP id 5b1f17b1804b1-42f777bfa85mr41752555e9.12.1727948092114; Thu, 03 Oct 2024 02:34:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBowI5zhEycK9k+WgMuHJJtTO0OTPJ5Pur5BI9oIv9qrWES3L7uxAbpAFQkDhtkECemtMfmQ== X-Received: by 2002:a05:600c:3510:b0:426:6ed5:d682 with SMTP id 5b1f17b1804b1-42f777bfa85mr41752385e9.12.1727948091654; Thu, 03 Oct 2024 02:34:51 -0700 (PDT) Received: from [192.168.88.248] (146-241-47-72.dyn.eolo.it. [146.241.47.72]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f79d8d3edsm39844885e9.7.2024.10.03.02.34.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Oct 2024 02:34:51 -0700 (PDT) Message-ID: Date: Thu, 3 Oct 2024 11:34:49 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] hv_netvsc: Fix VF namespace also in netvsc_open To: Haiyang Zhang , linux-hyperv@vger.kernel.org, netdev@vger.kernel.org Cc: kys@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, edumazet@google.com, kuba@kernel.org, stephen@networkplumber.org, davem@davemloft.net, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <1727470464-14327-1-git-send-email-haiyangz@microsoft.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: <1727470464-14327-1-git-send-email-haiyangz@microsoft.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/27/24 22:54, Haiyang Zhang wrote: > The existing code moves VF to the same namespace as the synthetic device > during netvsc_register_vf(). But, if the synthetic device is moved to a > new namespace after the VF registration, the VF won't be moved together. > > To make the behavior more consistent, add a namespace check to netvsc_open(), > and move the VF if it is not in the same namespace. > > Cc: stable@vger.kernel.org > Fixes: c0a41b887ce6 ("hv_netvsc: move VF to same namespace as netvsc device") > Signed-off-by: Haiyang Zhang This looks strange to me. Skimming over the code it looks like that with VF you really don't mean a Virtual Function... Looking at the blamed commit, it looks like that having both the synthetic and the "VF" device in different namespaces is an intended use-case. This change would make such scenario more difficult and could possibly break existing use-cases. Why do you think it will be more consistent? If the user moved the synthetic device in another netns, possibly/likely the user intended to keep both devices separated. Thanks, Paolo