[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MWHPR1101MB209476B1939ADB73C57E71AC9E409@MWHPR1101MB2094.namprd11.prod.outlook.com>
Date: Wed, 28 Apr 2021 13:32:12 +0000
From: "Walukiewicz, Miroslaw" <Miroslaw.Walukiewicz@...el.com>
To: Jason Wang <jasowang@...hat.com>,
Arkadiusz Kudan <arkadiusz.kudan@...ilime.com>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>
CC: "mst@...hat.com" <mst@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Jayagopi, Geetha" <geetha.jayagopi@...el.com>
Subject: RE: [PATCH] virtio-net: enable SRIOV
HI Jason,
You are right here. We did not catch your change in driver and the SRIOV flag is set correctly as you stated.
We want to orchestrate the HW implementation of VFs and PFs for virtio-net using libvirt.
The issue that we want to resolve is that there is no .ndo_get_vf_config Callback implemented in virtio-net driver as other NIC's drivers have, called by libvirt.
See https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/intel/igb/igb_main.c#L2996, for example
This callback really should create a minimal configuration inside of driver, but we cannot avoid it.
Another issue is lack of sysfs fro virtual functions /sys/class/net/ens801f0/device/virtfnX (where X is VF number and ens801fo is its PF netdev),
Could you advise us, how we can solve our issue and drive us to proper solution?
Regards,
Mirek
-----Original Message-----
From: Jason Wang <jasowang@...hat.com>
Sent: wtorek, 27 kwietnia 2021 04:44
To: Arkadiusz Kudan <arkadiusz.kudan@...ilime.com>; virtualization@...ts.linux-foundation.org
Cc: mst@...hat.com; netdev@...r.kernel.org; Walukiewicz, Miroslaw <Miroslaw.Walukiewicz@...el.com>
Subject: Re: [PATCH] virtio-net: enable SRIOV
在 2021/4/26 下午6:21, Arkadiusz Kudan 写道:
> With increasing interest for virtio, NIC have appeared that provide
> SRIOV with PF appearing in the host as a virtio network device and
> probably more similiar NICs will emerge.
> igb_uio of DPDK or pci-pf-stub can be used to provide SRIOV, however
> there are hypervisors/VMMs that require VFs, which are to be PCI
> passthrued to a VM, to have its PF with network representation in the
> kernel. For virtio-net based PFs, virtio-net could do that by
> providing both SRIOV interface and netdev representation.
>
> Enable SRIOV via VIRTIO_F_SR_IOV feature bit if the device supports
> it.
>
> Signed-off-by: Arkadiusz Kudan <arkadiusz.kudan@...ilime.com>
> Signed-off-by: Miroslaw Walukiewicz <Miroslaw.Walukiewicz@...el.com>
> ---
> drivers/net/virtio_net.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index
> 0824e6999e49..a03aa7e99689 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -3249,6 +3249,7 @@ static struct virtio_device_id id_table[] = {
>
> static unsigned int features[] = {
> VIRTNET_FEATURES,
> + VIRTIO_F_SR_IOV,
> };
So I'm suprised that it needs to be enabled per device. We had:
static void vp_transport_features(struct virtio_device *vdev, u64 features) {
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
struct pci_dev *pci_dev = vp_dev->pci_dev;
if ((features & BIT_ULL(VIRTIO_F_SR_IOV)) &&
pci_find_ext_capability(pci_dev,
PCI_EXT_CAP_ID_SRIOV))
__virtio_set_bit(vdev, VIRTIO_F_SR_IOV); }
And I had used this driver for SRIOV virtio-pci hardware for more than one year.
Thanks
>
> static unsigned int features_legacy[] = {
Powered by blists - more mailing lists