Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp887185pxf; Wed, 7 Apr 2021 14:10:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXixsUptwz4w2z5N6lehET6u8/PZf7PwtORuc38xq4psFORN+rDW4z4CrafZC7wmfa2PtW X-Received: by 2002:a17:907:e88:: with SMTP id ho8mr6205241ejc.199.1617829838790; Wed, 07 Apr 2021 14:10:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617829838; cv=none; d=google.com; s=arc-20160816; b=lnkU44Q7U3GkbdRYfs3HL5VS3/lmDjN2gGP7gEIV7wUvZRAd2FbPEmh0VCBQBO8mGE XRVv6rXlesF/07s55ntGAitYRocOxyWlaPGLTAGA+3BVJONY0YjuNq8P1mZw47CJnq9j RjA6REklm5oJynl/049iP/BXWTMlPdqcjVqs0hUiiDhTbkuJWDjIx8SzjFop92BZODvL vplVAe/PjKWNgKPJs0ObwZcafzvx2EyrSa/nH+Eqi3N8RT4hSF+E/be/wovSx1b9pH5p KNH8q+E84LfHtRnx1Eyz1UZl0is9XFHfKmHjdi93EMZ8gJS0JRqN+G1gK+8tOnIL4Jc9 PsyQ== 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; bh=EwbSmztaZBEk6NfE4Xk0DiplD2tvdJVlSEP8EVaTzgI=; b=kiRkH9eQR5CXvpdfo6ByEe+4ITBK0jIgVRWvT5Hj77j4ehMC3NB8OPvv8W6skCgzQ/ EQKr6xFHuJNrxjHTyO50cpDNPs1VqZ0P2MWI9joaEN0SIe0HyqYMQEnkfPtGGuAgJ8JY WEAalyOWzbjOPwGUx4laP8AcF9/cnN6/ZFjmJjnF6Qo/DaUUHWsCUFAliJufUeeO7hf6 M6nHRQqEATiNinFzGPUqGOw2wHzDuwAmR5jn3vM2M949sIPYbY2TFMVhNab8XlHZ/SX/ I9VEs8KaKSc832CRT15K1unTznQZP0jyMuadHHzvxB+teHZw7y6Dr0gN6M02DnCmLndB Dq7w== ARC-Authentication-Results: i=1; mx.google.com; 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 x14si8877604ejw.262.2021.04.07.14.10.12; Wed, 07 Apr 2021 14:10:38 -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; 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 S1349054AbhDGPAw (ORCPT + 99 others); Wed, 7 Apr 2021 11:00:52 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:44970 "EHLO mail-wr1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348928AbhDGPAo (ORCPT ); Wed, 7 Apr 2021 11:00:44 -0400 Received: by mail-wr1-f48.google.com with SMTP id e12so5270703wro.11; Wed, 07 Apr 2021 08:00:32 -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:references :mime-version:content-disposition:in-reply-to; bh=EwbSmztaZBEk6NfE4Xk0DiplD2tvdJVlSEP8EVaTzgI=; b=mMrMzgZBaW4NtQjYbt9ndPz54UL85fxm5xvP+Zz5kRhtlL4YKzvbUgCchRXEC7LF6+ e6E9pCaJOfcMYMOUFaFOWR6snHYcCyPuA4epqn4aEHFGl8XJaxpjTF0dbvnu36n8W4Ej MIwMzpcCry3SCpolf9gYmcjjkwVcSa5wJ4jORFNqKvfYBPE6LnHXaO3vYYSZ1QnUmkTo STcbPhVo3Xf7zQp8Bht0eRhJW5cUqrb1vgwk13W/F50m6Zh/+Ig8h4N4ZfdEuHmwIr1n zo/xe5+tXD9NYtEVLJkqsPQH9kKsR0ozzH5GH85ysFaCXT4d4WtrfKlXdjU/WvpWn6lz yIOw== X-Gm-Message-State: AOAM533zTORG57kS1UqWBk197A9VcO07Yaod3gGI+C3tJdXtY4gnYFBE Kd8Rkse/zYS74NaNeGma7dg= X-Received: by 2002:a05:6000:1c7:: with SMTP id t7mr4956713wrx.313.1617807632297; Wed, 07 Apr 2021 08:00:32 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id r5sm3763370wrx.87.2021.04.07.08.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 08:00:32 -0700 (PDT) Date: Wed, 7 Apr 2021 15:00:30 +0000 From: Wei Liu To: Haiyang Zhang Cc: Wei Liu , Dexuan Cui , "davem@davemloft.net" , "kuba@kernel.org" , KY Srinivasan , Stephen Hemminger , Wei Liu , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" Subject: Re: [PATCH net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA) Message-ID: <20210407150030.wvwz6cebxjtjpgfv@liuwe-devbox-debian-v2> References: <20210406232321.12104-1-decui@microsoft.com> <20210407131705.4rwttnj3zneolnh3@liuwe-devbox-debian-v2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 02:34:01PM +0000, Haiyang Zhang wrote: > > > > -----Original Message----- > > From: Wei Liu > > Sent: Wednesday, April 7, 2021 9:17 AM > > To: Dexuan Cui > > Cc: davem@davemloft.net; kuba@kernel.org; KY Srinivasan > > ; Haiyang Zhang ; Stephen > > Hemminger ; wei.liu@kernel.org; Wei Liu > > ; netdev@vger.kernel.org; linux- > > kernel@vger.kernel.org; linux-hyperv@vger.kernel.org > > Subject: Re: [PATCH net-next] net: mana: Add a driver for Microsoft Azure > > Network Adapter (MANA) > > > > On Tue, Apr 06, 2021 at 04:23:21PM -0700, Dexuan Cui wrote: > > [...] > > > +config MICROSOFT_MANA > > > + tristate "Microsoft Azure Network Adapter (MANA) support" > > > + default m > > > + depends on PCI_MSI > > > + select PCI_HYPERV > > > > OOI which part of the code requires PCI_HYPERV? > > > > Asking because I can't immediately find code that looks to be Hyper-V > > specific (searching for vmbus etc). This device looks like any other PCI devices > > to me. > > It depends on the VF nic's PCI config space which is presented by the pci_hyperv driver. I think all it matters is the PCI bus is able to handle the configuration space access, right? Assuming there is an emulated PCI root complex which exposes the config space to the driver, will this driver still work? I'm trying to understand how tightly coupled with Hyper-V PCI this driver is. In an alternative universe, Microsft may suddenly decide to sell this hardware and someone wants to passthrough an VF via VFIO. I don't see how this driver wouldn't work, hence the original question. There is no need to change the code. I'm just curious about a tiny detail in the implementation. Wei. > > Thanks, > - Haiyang