[PATCH 0/5] hw/net/igb: emulated network device with SR-IOV

Sriram Yagnaraman posted 5 patches 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221222114120.8790-1-sriram.yagnaraman@est.tech
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Jason Wang <jasowang@redhat.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>
There is a newer version of this series
hw/i386/Kconfig             |    1 +
hw/net/Kconfig              |    5 +
hw/net/e1000_regs.h         |  357 +++-
hw/net/e1000x_common.c      |   13 +
hw/net/e1000x_common.h      |   28 +
hw/net/igb.c                |  627 ++++++
hw/net/igb.h                |  184 ++
hw/net/igb_core.c           | 3782 +++++++++++++++++++++++++++++++++++
hw/net/igb_core.h           |  216 ++
hw/net/igbvf.c              |  262 +++
hw/net/meson.build          |    2 +
hw/net/net_tx_pkt.c         |   17 +-
hw/net/net_tx_pkt.h         |    8 +
hw/net/trace-events         |  190 ++
hw/pci/pcie_sriov.c         |    6 +
include/hw/pci/pcie_sriov.h |    5 +
16 files changed, 5671 insertions(+), 32 deletions(-)
create mode 100644 hw/net/igb.c
create mode 100644 hw/net/igb.h
create mode 100644 hw/net/igb_core.c
create mode 100644 hw/net/igb_core.h
create mode 100644 hw/net/igbvf.c
[PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
Posted by Sriram Yagnaraman 1 year, 4 months ago
A new attempt at adding support for Intel 82576 Gigabit Ethernet adapter
with SR-IOV support.

Start qemu with the following parameters.
   qemu-system-x86_64 -enable-kvm -M q35 \
   ...
   -device pcie-root-port,slot=3,id=pcie_port.3 \
   -netdev tap,id=net3,script=no,downscript=/tmp/rmtap,ifname=xcbr3_t2,queues=1 \
   -device igb,bus=pcie_port.3,netdev=net3,mac=00:00:00:01:03:02

Load IGB/IGBVF modules if needed.
modprobe igb
modprobe igbvf

Create VFs via /sys 
ls /sys/bus/pci/devices/0000:01:00.0/
echo 2 > /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs

Sriram Yagnaraman (5):
  pcie: add helper function to get number of VFs
  hw/net/net_tx_pkt: helper function to get l2 hdr
  hw/net/igb: register definitions
  hw/net/igb: emulated intel IGB (82576EB) network device
  hw/net/igb: build support for igb/igbvf devices

 hw/i386/Kconfig             |    1 +
 hw/net/Kconfig              |    5 +
 hw/net/e1000_regs.h         |  357 +++-
 hw/net/e1000x_common.c      |   13 +
 hw/net/e1000x_common.h      |   28 +
 hw/net/igb.c                |  627 ++++++
 hw/net/igb.h                |  184 ++
 hw/net/igb_core.c           | 3782 +++++++++++++++++++++++++++++++++++
 hw/net/igb_core.h           |  216 ++
 hw/net/igbvf.c              |  262 +++
 hw/net/meson.build          |    2 +
 hw/net/net_tx_pkt.c         |   17 +-
 hw/net/net_tx_pkt.h         |    8 +
 hw/net/trace-events         |  190 ++
 hw/pci/pcie_sriov.c         |    6 +
 include/hw/pci/pcie_sriov.h |    5 +
 16 files changed, 5671 insertions(+), 32 deletions(-)
 create mode 100644 hw/net/igb.c
 create mode 100644 hw/net/igb.h
 create mode 100644 hw/net/igb_core.c
 create mode 100644 hw/net/igb_core.h
 create mode 100644 hw/net/igbvf.c

-- 
2.34.1
Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
Posted by Jason Wang 1 year, 4 months ago
On Thu, Dec 22, 2022 at 7:43 PM Sriram Yagnaraman
<sriram.yagnaraman@est.tech> wrote:
>
> A new attempt at adding support for Intel 82576 Gigabit Ethernet adapter
> with SR-IOV support.
>
> Start qemu with the following parameters.
>    qemu-system-x86_64 -enable-kvm -M q35 \
>    ...
>    -device pcie-root-port,slot=3,id=pcie_port.3 \
>    -netdev tap,id=net3,script=no,downscript=/tmp/rmtap,ifname=xcbr3_t2,queues=1 \
>    -device igb,bus=pcie_port.3,netdev=net3,mac=00:00:00:01:03:02
>
> Load IGB/IGBVF modules if needed.
> modprobe igb
> modprobe igbvf
>
> Create VFs via /sys
> ls /sys/bus/pci/devices/0000:01:00.0/
> echo 2 > /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs
>
> Sriram Yagnaraman (5):
>   pcie: add helper function to get number of VFs
>   hw/net/net_tx_pkt: helper function to get l2 hdr
>   hw/net/igb: register definitions
>   hw/net/igb: emulated intel IGB (82576EB) network device
>   hw/net/igb: build support for igb/igbvf devices

Haven't reviewed this series but I think we'd have two more things:

1) update the MAINTAINERS
2) a qtest for igb (having a qtest for sr-iov would be even better)

Thanks

>
>  hw/i386/Kconfig             |    1 +
>  hw/net/Kconfig              |    5 +
>  hw/net/e1000_regs.h         |  357 +++-
>  hw/net/e1000x_common.c      |   13 +
>  hw/net/e1000x_common.h      |   28 +
>  hw/net/igb.c                |  627 ++++++
>  hw/net/igb.h                |  184 ++
>  hw/net/igb_core.c           | 3782 +++++++++++++++++++++++++++++++++++
>  hw/net/igb_core.h           |  216 ++
>  hw/net/igbvf.c              |  262 +++
>  hw/net/meson.build          |    2 +
>  hw/net/net_tx_pkt.c         |   17 +-
>  hw/net/net_tx_pkt.h         |    8 +
>  hw/net/trace-events         |  190 ++
>  hw/pci/pcie_sriov.c         |    6 +
>  include/hw/pci/pcie_sriov.h |    5 +
>  16 files changed, 5671 insertions(+), 32 deletions(-)
>  create mode 100644 hw/net/igb.c
>  create mode 100644 hw/net/igb.h
>  create mode 100644 hw/net/igb_core.c
>  create mode 100644 hw/net/igb_core.h
>  create mode 100644 hw/net/igbvf.c
>
> --
> 2.34.1
>
RE: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
Posted by Sriram Yagnaraman 1 year, 4 months ago
> -----Original Message-----
> From: Jason Wang <jasowang@redhat.com>
> Sent: Friday, 23 December 2022 04:24
> To: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> Cc: qemu-devel@nongnu.org; Dmitry Fleytman
> <dmitry.fleytman@gmail.com>; Michael S . Tsirkin <mst@redhat.com>;
> Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Subject: Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
> 
> On Thu, Dec 22, 2022 at 7:43 PM Sriram Yagnaraman
> <sriram.yagnaraman@est.tech> wrote:
> >
> > A new attempt at adding support for Intel 82576 Gigabit Ethernet
> > adapter with SR-IOV support.
> >
> > Start qemu with the following parameters.
> >    qemu-system-x86_64 -enable-kvm -M q35 \
> >    ...
> >    -device pcie-root-port,slot=3,id=pcie_port.3 \
> >    -netdev
> tap,id=net3,script=no,downscript=/tmp/rmtap,ifname=xcbr3_t2,queues=1 \
> >    -device igb,bus=pcie_port.3,netdev=net3,mac=00:00:00:01:03:02
> >
> > Load IGB/IGBVF modules if needed.
> > modprobe igb
> > modprobe igbvf
> >
> > Create VFs via /sys
> > ls /sys/bus/pci/devices/0000:01:00.0/
> > echo 2 > /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs
> >
> > Sriram Yagnaraman (5):
> >   pcie: add helper function to get number of VFs
> >   hw/net/net_tx_pkt: helper function to get l2 hdr
> >   hw/net/igb: register definitions
> >   hw/net/igb: emulated intel IGB (82576EB) network device
> >   hw/net/igb: build support for igb/igbvf devices
> 
> Haven't reviewed this series but I think we'd have two more things:
> 
> 1) update the MAINTAINERS
Any suggestions on who should/will maintain this? 

> 2) a qtest for igb (having a qtest for sr-iov would be even better)
> 
> Thanks
> 
> >
> >  hw/i386/Kconfig             |    1 +
> >  hw/net/Kconfig              |    5 +
> >  hw/net/e1000_regs.h         |  357 +++-
> >  hw/net/e1000x_common.c      |   13 +
> >  hw/net/e1000x_common.h      |   28 +
> >  hw/net/igb.c                |  627 ++++++
> >  hw/net/igb.h                |  184 ++
> >  hw/net/igb_core.c           | 3782 +++++++++++++++++++++++++++++++++++
> >  hw/net/igb_core.h           |  216 ++
> >  hw/net/igbvf.c              |  262 +++
> >  hw/net/meson.build          |    2 +
> >  hw/net/net_tx_pkt.c         |   17 +-
> >  hw/net/net_tx_pkt.h         |    8 +
> >  hw/net/trace-events         |  190 ++
> >  hw/pci/pcie_sriov.c         |    6 +
> >  include/hw/pci/pcie_sriov.h |    5 +
> >  16 files changed, 5671 insertions(+), 32 deletions(-)  create mode
> > 100644 hw/net/igb.c  create mode 100644 hw/net/igb.h  create mode
> > 100644 hw/net/igb_core.c  create mode 100644 hw/net/igb_core.h  create
> > mode 100644 hw/net/igbvf.c
> >
> > --
> > 2.34.1
> >

Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
Posted by Jason Wang 1 year, 4 months ago
On Fri, Dec 30, 2022 at 3:17 AM Sriram Yagnaraman
<sriram.yagnaraman@est.tech> wrote:
>
> > -----Original Message-----
> > From: Jason Wang <jasowang@redhat.com>
> > Sent: Friday, 23 December 2022 04:24
> > To: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> > Cc: qemu-devel@nongnu.org; Dmitry Fleytman
> > <dmitry.fleytman@gmail.com>; Michael S . Tsirkin <mst@redhat.com>;
> > Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> > Subject: Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
> >
> > On Thu, Dec 22, 2022 at 7:43 PM Sriram Yagnaraman
> > <sriram.yagnaraman@est.tech> wrote:
> > >
> > > A new attempt at adding support for Intel 82576 Gigabit Ethernet
> > > adapter with SR-IOV support.
> > >
> > > Start qemu with the following parameters.
> > >    qemu-system-x86_64 -enable-kvm -M q35 \
> > >    ...
> > >    -device pcie-root-port,slot=3,id=pcie_port.3 \
> > >    -netdev
> > tap,id=net3,script=no,downscript=/tmp/rmtap,ifname=xcbr3_t2,queues=1 \
> > >    -device igb,bus=pcie_port.3,netdev=net3,mac=00:00:00:01:03:02
> > >
> > > Load IGB/IGBVF modules if needed.
> > > modprobe igb
> > > modprobe igbvf
> > >
> > > Create VFs via /sys
> > > ls /sys/bus/pci/devices/0000:01:00.0/
> > > echo 2 > /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs
> > >
> > > Sriram Yagnaraman (5):
> > >   pcie: add helper function to get number of VFs
> > >   hw/net/net_tx_pkt: helper function to get l2 hdr
> > >   hw/net/igb: register definitions
> > >   hw/net/igb: emulated intel IGB (82576EB) network device
> > >   hw/net/igb: build support for igb/igbvf devices
> >
> > Haven't reviewed this series but I think we'd have two more things:
> >
> > 1) update the MAINTAINERS
> Any suggestions on who should/will maintain this?

I think you should be the best candidate for the maintainer :)

(Btw, we have a lot of NIC without a maintainer which usually makes
the review very slow).

Thanks

>
> > 2) a qtest for igb (having a qtest for sr-iov would be even better)
> >
> > Thanks
> >
> > >
> > >  hw/i386/Kconfig             |    1 +
> > >  hw/net/Kconfig              |    5 +
> > >  hw/net/e1000_regs.h         |  357 +++-
> > >  hw/net/e1000x_common.c      |   13 +
> > >  hw/net/e1000x_common.h      |   28 +
> > >  hw/net/igb.c                |  627 ++++++
> > >  hw/net/igb.h                |  184 ++
> > >  hw/net/igb_core.c           | 3782 +++++++++++++++++++++++++++++++++++
> > >  hw/net/igb_core.h           |  216 ++
> > >  hw/net/igbvf.c              |  262 +++
> > >  hw/net/meson.build          |    2 +
> > >  hw/net/net_tx_pkt.c         |   17 +-
> > >  hw/net/net_tx_pkt.h         |    8 +
> > >  hw/net/trace-events         |  190 ++
> > >  hw/pci/pcie_sriov.c         |    6 +
> > >  include/hw/pci/pcie_sriov.h |    5 +
> > >  16 files changed, 5671 insertions(+), 32 deletions(-)  create mode
> > > 100644 hw/net/igb.c  create mode 100644 hw/net/igb.h  create mode
> > > 100644 hw/net/igb_core.c  create mode 100644 hw/net/igb_core.h  create
> > > mode 100644 hw/net/igbvf.c
> > >
> > > --
> > > 2.34.1
> > >
>
RE: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
Posted by Sriram Yagnaraman 1 year, 4 months ago
> -----Original Message-----
> From: Jason Wang <jasowang@redhat.com>
> Sent: Friday, 30 December 2022 04:45
> To: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> Cc: qemu-devel@nongnu.org; Dmitry Fleytman
> <dmitry.fleytman@gmail.com>; Michael S . Tsirkin <mst@redhat.com>;
> Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Subject: Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
> 
> On Fri, Dec 30, 2022 at 3:17 AM Sriram Yagnaraman
> <sriram.yagnaraman@est.tech> wrote:
> >
> > > -----Original Message-----
> > > From: Jason Wang <jasowang@redhat.com>
> > > Sent: Friday, 23 December 2022 04:24
> > > To: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> > > Cc: qemu-devel@nongnu.org; Dmitry Fleytman
> > > <dmitry.fleytman@gmail.com>; Michael S . Tsirkin <mst@redhat.com>;
> > > Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> > > Subject: Re: [PATCH 0/5] hw/net/igb: emulated network device with
> > > SR-IOV
> > >
> > > On Thu, Dec 22, 2022 at 7:43 PM Sriram Yagnaraman
> > > <sriram.yagnaraman@est.tech> wrote:
> > > >
> > > > A new attempt at adding support for Intel 82576 Gigabit Ethernet
> > > > adapter with SR-IOV support.
> > > >
> > > > Start qemu with the following parameters.
> > > >    qemu-system-x86_64 -enable-kvm -M q35 \
> > > >    ...
> > > >    -device pcie-root-port,slot=3,id=pcie_port.3 \
> > > >    -netdev
> > > tap,id=net3,script=no,downscript=/tmp/rmtap,ifname=xcbr3_t2,queues=1
> > > \
> > > >    -device igb,bus=pcie_port.3,netdev=net3,mac=00:00:00:01:03:02
> > > >
> > > > Load IGB/IGBVF modules if needed.
> > > > modprobe igb
> > > > modprobe igbvf
> > > >
> > > > Create VFs via /sys
> > > > ls /sys/bus/pci/devices/0000:01:00.0/
> > > > echo 2 > /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs
> > > >
> > > > Sriram Yagnaraman (5):
> > > >   pcie: add helper function to get number of VFs
> > > >   hw/net/net_tx_pkt: helper function to get l2 hdr
> > > >   hw/net/igb: register definitions
> > > >   hw/net/igb: emulated intel IGB (82576EB) network device
> > > >   hw/net/igb: build support for igb/igbvf devices
> > >
> > > Haven't reviewed this series but I think we'd have two more things:
> > >
> > > 1) update the MAINTAINERS
> > Any suggestions on who should/will maintain this?
> 
> I think you should be the best candidate for the maintainer :)
> 
> (Btw, we have a lot of NIC without a maintainer which usually makes the
> review very slow).
> 
> Thanks
Okay, I can update the MAINTAINERS file in the next version then :)

> 
> >
> > > 2) a qtest for igb (having a qtest for sr-iov would be even better)
> > >
> > > Thanks
> > >
> > > >
> > > >  hw/i386/Kconfig             |    1 +
> > > >  hw/net/Kconfig              |    5 +
> > > >  hw/net/e1000_regs.h         |  357 +++-
> > > >  hw/net/e1000x_common.c      |   13 +
> > > >  hw/net/e1000x_common.h      |   28 +
> > > >  hw/net/igb.c                |  627 ++++++
> > > >  hw/net/igb.h                |  184 ++
> > > >  hw/net/igb_core.c           | 3782
> +++++++++++++++++++++++++++++++++++
> > > >  hw/net/igb_core.h           |  216 ++
> > > >  hw/net/igbvf.c              |  262 +++
> > > >  hw/net/meson.build          |    2 +
> > > >  hw/net/net_tx_pkt.c         |   17 +-
> > > >  hw/net/net_tx_pkt.h         |    8 +
> > > >  hw/net/trace-events         |  190 ++
> > > >  hw/pci/pcie_sriov.c         |    6 +
> > > >  include/hw/pci/pcie_sriov.h |    5 +
> > > >  16 files changed, 5671 insertions(+), 32 deletions(-)  create
> > > > mode
> > > > 100644 hw/net/igb.c  create mode 100644 hw/net/igb.h  create mode
> > > > 100644 hw/net/igb_core.c  create mode 100644 hw/net/igb_core.h
> > > > create mode 100644 hw/net/igbvf.c
> > > >
> > > > --
> > > > 2.34.1
> > > >
> >

Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
Posted by Akihiko Odaki 1 year, 4 months ago
On 2022/12/23 12:23, Jason Wang wrote:
> On Thu, Dec 22, 2022 at 7:43 PM Sriram Yagnaraman
> <sriram.yagnaraman@est.tech> wrote:
>>
>> A new attempt at adding support for Intel 82576 Gigabit Ethernet adapter
>> with SR-IOV support.
>>
>> Start qemu with the following parameters.
>>     qemu-system-x86_64 -enable-kvm -M q35 \
>>     ...
>>     -device pcie-root-port,slot=3,id=pcie_port.3 \
>>     -netdev tap,id=net3,script=no,downscript=/tmp/rmtap,ifname=xcbr3_t2,queues=1 \
>>     -device igb,bus=pcie_port.3,netdev=net3,mac=00:00:00:01:03:02
>>
>> Load IGB/IGBVF modules if needed.
>> modprobe igb
>> modprobe igbvf
>>
>> Create VFs via /sys
>> ls /sys/bus/pci/devices/0000:01:00.0/
>> echo 2 > /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs
>>
>> Sriram Yagnaraman (5):
>>    pcie: add helper function to get number of VFs
>>    hw/net/net_tx_pkt: helper function to get l2 hdr
>>    hw/net/igb: register definitions
>>    hw/net/igb: emulated intel IGB (82576EB) network device
>>    hw/net/igb: build support for igb/igbvf devices
> 
> Haven't reviewed this series but I think we'd have two more things:
> 
> 1) update the MAINTAINERS
> 2) a qtest for igb (having a qtest for sr-iov would be even better)
> 
> Thanks
> 
>>
>>   hw/i386/Kconfig             |    1 +
>>   hw/net/Kconfig              |    5 +
>>   hw/net/e1000_regs.h         |  357 +++-
>>   hw/net/e1000x_common.c      |   13 +
>>   hw/net/e1000x_common.h      |   28 +
>>   hw/net/igb.c                |  627 ++++++
>>   hw/net/igb.h                |  184 ++
>>   hw/net/igb_core.c           | 3782 +++++++++++++++++++++++++++++++++++
>>   hw/net/igb_core.h           |  216 ++
>>   hw/net/igbvf.c              |  262 +++
>>   hw/net/meson.build          |    2 +
>>   hw/net/net_tx_pkt.c         |   17 +-
>>   hw/net/net_tx_pkt.h         |    8 +
>>   hw/net/trace-events         |  190 ++
>>   hw/pci/pcie_sriov.c         |    6 +
>>   include/hw/pci/pcie_sriov.h |    5 +
>>   16 files changed, 5671 insertions(+), 32 deletions(-)
>>   create mode 100644 hw/net/igb.c
>>   create mode 100644 hw/net/igb.h
>>   create mode 100644 hw/net/igb_core.c
>>   create mode 100644 hw/net/igb_core.h
>>   create mode 100644 hw/net/igbvf.c
>>
>> --
>> 2.34.1
>>
> 
> 

Hi Sriram and Jason,

Coincidentally we has also been working on igb emulation. Our tree is 
available at:
https://github.com/daynix/qemu/tree/akihikodaki/igb_sriov_rebase

Briefly looking at Sriram's series, it seems to have better feature 
coverage, but there are some changes present only in our tree as well. 
For instance, our tree includes a qtest though it does not test SR-IOV 
functionality.

I'd like to suggest you to review and merge Sriram's series first, and I 
can rebase our tree to extract changes present only in our tree, 
including qtest. Or it can be the other way around; I think I can finish 
my series in weeks so I may submit it once it is ready, and you can 
apply changes in Sriram's series on top it. I'd like to hear which is 
more convenient for you, or another idea if you have.

Regards,
Akihiko Odaki
RE: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
Posted by Sriram Yagnaraman 1 year, 4 months ago
> -----Original Message-----
> From: Akihiko Odaki <akihiko.odaki@gmail.com>
> Sent: Thursday, 29 December 2022 03:43
> To: Jason Wang <jasowang@redhat.com>; Sriram Yagnaraman
> <sriram.yagnaraman@est.tech>
> Cc: qemu-devel@nongnu.org; Dmitry Fleytman
> <dmitry.fleytman@gmail.com>; Michael S . Tsirkin <mst@redhat.com>;
> Marcel Apfelbaum <marcel.apfelbaum@gmail.com>; Yan Vugenfirer
> <yan@daynix.com>
> Subject: Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV
> 
> On 2022/12/23 12:23, Jason Wang wrote:
> > On Thu, Dec 22, 2022 at 7:43 PM Sriram Yagnaraman
> > <sriram.yagnaraman@est.tech> wrote:
> >>
> >> A new attempt at adding support for Intel 82576 Gigabit Ethernet
> >> adapter with SR-IOV support.
> >>
> >> Start qemu with the following parameters.
> >>     qemu-system-x86_64 -enable-kvm -M q35 \
> >>     ...
> >>     -device pcie-root-port,slot=3,id=pcie_port.3 \
> >>     -netdev
> tap,id=net3,script=no,downscript=/tmp/rmtap,ifname=xcbr3_t2,queues=1 \
> >>     -device igb,bus=pcie_port.3,netdev=net3,mac=00:00:00:01:03:02
> >>
> >> Load IGB/IGBVF modules if needed.
> >> modprobe igb
> >> modprobe igbvf
> >>
> >> Create VFs via /sys
> >> ls /sys/bus/pci/devices/0000:01:00.0/
> >> echo 2 > /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs
> >>
> >> Sriram Yagnaraman (5):
> >>    pcie: add helper function to get number of VFs
> >>    hw/net/net_tx_pkt: helper function to get l2 hdr
> >>    hw/net/igb: register definitions
> >>    hw/net/igb: emulated intel IGB (82576EB) network device
> >>    hw/net/igb: build support for igb/igbvf devices
> >
> > Haven't reviewed this series but I think we'd have two more things:
> >
> > 1) update the MAINTAINERS
> > 2) a qtest for igb (having a qtest for sr-iov would be even better)
> >
> > Thanks
> >
> >>
> >>   hw/i386/Kconfig             |    1 +
> >>   hw/net/Kconfig              |    5 +
> >>   hw/net/e1000_regs.h         |  357 +++-
> >>   hw/net/e1000x_common.c      |   13 +
> >>   hw/net/e1000x_common.h      |   28 +
> >>   hw/net/igb.c                |  627 ++++++
> >>   hw/net/igb.h                |  184 ++
> >>   hw/net/igb_core.c           | 3782 +++++++++++++++++++++++++++++++++++
> >>   hw/net/igb_core.h           |  216 ++
> >>   hw/net/igbvf.c              |  262 +++
> >>   hw/net/meson.build          |    2 +
> >>   hw/net/net_tx_pkt.c         |   17 +-
> >>   hw/net/net_tx_pkt.h         |    8 +
> >>   hw/net/trace-events         |  190 ++
> >>   hw/pci/pcie_sriov.c         |    6 +
> >>   include/hw/pci/pcie_sriov.h |    5 +
> >>   16 files changed, 5671 insertions(+), 32 deletions(-)
> >>   create mode 100644 hw/net/igb.c
> >>   create mode 100644 hw/net/igb.h
> >>   create mode 100644 hw/net/igb_core.c
> >>   create mode 100644 hw/net/igb_core.h
> >>   create mode 100644 hw/net/igbvf.c
> >>
> >> --
> >> 2.34.1
> >>
> >
> >
> 
> Hi Sriram and Jason,
> 
> Coincidentally we has also been working on igb emulation. Our tree is
> available at:
> https://github.com/daynix/qemu/tree/akihikodaki/igb_sriov_rebase
> 
> Briefly looking at Sriram's series, it seems to have better feature coverage, but
> there are some changes present only in our tree as well.
> For instance, our tree includes a qtest though it does not test SR-IOV
> functionality.
> 
> I'd like to suggest you to review and merge Sriram's series first, and I can
> rebase our tree to extract changes present only in our tree, including qtest. Or
> it can be the other way around; I think I can finish my series in weeks so I may
> submit it once it is ready, and you can apply changes in Sriram's series on top
> it. I'd like to hear which is more convenient for you, or another idea if you
> have.
> 
Great to know there are other people working on this at the same time. 
I just sent a v2 version with a qtest very similar to e1000e-test.

I see that your tree has good documentation and a very nice idea to translate
between PF and VF addresses. Would be good to get those changes as well.

> Regards,
> Akihiko Odaki