[PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements

Akihiko Odaki posted 19 patches 1 year, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231210-rss-v8-0-9553ee714d38@daynix.com
Maintainers: Jason Wang <jasowang@redhat.com>, Andrew Melnychenko <andrew@daynix.com>, Yuri Benditovich <yuri.benditovich@daynix.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, Akihiko Odaki <akihiko.odaki@daynix.com>, Sriram Yagnaraman <sriram.yagnaraman@est.tech>, "Michael S. Tsirkin" <mst@redhat.com>, Luigi Rizzo <rizzo@iet.unipi.it>, Giuseppe Lettieri <g.lettieri@iet.unipi.it>, Vincenzo Maffione <v.maffione@gmail.com>
There is a newer version of this series
ebpf/rss.bpf.skeleton.h  | 1557 +++++++++++++++++++++++-----------------------
include/net/net.h        |    8 -
net/tap_int.h            |    1 -
ebpf/ebpf_rss.c          |   12 +-
hw/net/e1000e.c          |    1 -
hw/net/igb.c             |    1 -
hw/net/net_tx_pkt.c      |    4 +-
hw/net/virtio-net.c      |  308 +++++----
hw/net/vmxnet3.c         |    2 -
net/dump.c               |    4 +-
net/net.c                |   47 +-
net/netmap.c             |    5 -
net/tap-bsd.c            |    5 -
net/tap-linux.c          |   20 -
net/tap-solaris.c        |    5 -
net/tap-stub.c           |    5 -
net/tap.c                |   77 +--
tools/ebpf/rss.bpf.c     |   46 +-
tools/ebpf/Makefile.ebpf |   15 +-
19 files changed, 986 insertions(+), 1137 deletions(-)
[PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements
Posted by Akihiko Odaki 1 year, 11 months ago
This series contains fixes and improvements for virtio-net RSS and hash
reporting feature.

V7 -> V8:
  Reset author email addresses.
  Rebased.

V6 -> V7:
  Dropped patch "virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT".
  Dropped the changes to remove packet flags.
  Re-introduced tap_receive() and changed it to call tap_receive_iov().
  Removed tap_get_vnet_hdr_len().
  Fixed tap initialization not to call tap_fd_set_vnet_hdr_len() for tap
  without virtio-net header.
  Changed to call error_report() instead of warn_report() for
  programming errors.

V5 -> V6:
  Corrected the message for patch "virtio-net: Return an error when vhost
  cannot enable RSS".
  Removed changes to introduce asserts from "virtio-net: Return an error
  when vhost cannot enable RSS".
  Reorganized patches "virtio-net: Return an error when vhost cannot
  enable RSS" and "virtio-net: Do not clear VIRTIO_NET_F_RSS". This
  version now contains patches "virtio-net: Return an error when vhost
  cannot enable RSS" and "virtio-net: Enable software RSS".
  Rebased.

V4 -> V5:
  Added patch "virtio-net: Do not write hashes to peer buffer".

V3 -> V4:
  Extract patches "tap: Remove tap_receive()" and  "net: Remove flag
  propagation" from "net: Remove receive_raw()".
  Added patch "virtio-net: Always set populate_hash".
  Added patch "virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT".
  Added patch "ebpf: Use standard section name".
  Added patch "ebpf: Simplify error handling".
  Added patch "ebpf: Return 0 when configuration fails".
  Added patch "ebpf: Refactor tun_rss_steering_prog()".
  Added patch "ebpf: Add a separate target for skeleton".

V2 -> V3:
  Added patch "tap: Remove tap_probe_vnet_hdr_len()".
  Added patch "tap: Remove qemu_using_vnet_hdr()".
  Added patch "net: Move virtio-net header length assertion".
  Added patch "net: Remove receive_raw()".
  Added patch "tap: Shrink zeroed virtio-net header".
  Dropped patch "tap: Fix virtio-net header buffer size".

V1 -> V2:
  Added patch "ebpf: Fix RSS error handling".

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
Akihiko Odaki (19):
      tap: Remove tap_probe_vnet_hdr_len()
      tap: Remove qemu_using_vnet_hdr()
      net: Move virtio-net header length assertion
      net: Remove receive_raw()
      tap: Call tap_receive_iov() from tap_receive()
      tap: Shrink zeroed virtio-net header
      virtio-net: Copy header only when necessary
      virtio-net: Disable RSS on reset
      virtio-net: Unify the logic to update NIC state for RSS
      virtio-net: Return an error when vhost cannot enable RSS
      virtio-net: Report RSS warning at device realization
      virtio-net: Always set populate_hash
      virtio-net: Do not write hashes to peer buffer
      ebpf: Fix RSS error handling
      ebpf: Use standard section name
      ebpf: Simplify error handling
      ebpf: Return 0 when configuration fails
      ebpf: Refactor tun_rss_steering_prog()
      ebpf: Add a separate target for skeleton

 ebpf/rss.bpf.skeleton.h  | 1557 +++++++++++++++++++++++-----------------------
 include/net/net.h        |    8 -
 net/tap_int.h            |    1 -
 ebpf/ebpf_rss.c          |   12 +-
 hw/net/e1000e.c          |    1 -
 hw/net/igb.c             |    1 -
 hw/net/net_tx_pkt.c      |    4 +-
 hw/net/virtio-net.c      |  308 +++++----
 hw/net/vmxnet3.c         |    2 -
 net/dump.c               |    4 +-
 net/net.c                |   47 +-
 net/netmap.c             |    5 -
 net/tap-bsd.c            |    5 -
 net/tap-linux.c          |   20 -
 net/tap-solaris.c        |    5 -
 net/tap-stub.c           |    5 -
 net/tap.c                |   77 +--
 tools/ebpf/rss.bpf.c     |   46 +-
 tools/ebpf/Makefile.ebpf |   15 +-
 19 files changed, 986 insertions(+), 1137 deletions(-)
---
base-commit: 9c74490bff6c8886a922008d0c9ce6cae70dd17e
change-id: 20231210-rss-e7c98e722253

Best regards,
-- 
Akihiko Odaki <akihiko.odaki@daynix.com>
Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements
Posted by Yuri Benditovich 1 year, 11 months ago
People, I suggest to wait a little and understand what happens with the
previous series from Andrew Melnichenko (support for qemu under libvirt etc)
According to response from Jason from Sept 8 it was queued but I do not see
it in the master branch.

Thanks a lot.

On Sun, Dec 10, 2023 at 7:30 AM Akihiko Odaki <akihiko.odaki@daynix.com>
wrote:

> This series contains fixes and improvements for virtio-net RSS and hash
> reporting feature.
>
> V7 -> V8:
>   Reset author email addresses.
>   Rebased.
>
> V6 -> V7:
>   Dropped patch "virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT".
>   Dropped the changes to remove packet flags.
>   Re-introduced tap_receive() and changed it to call tap_receive_iov().
>   Removed tap_get_vnet_hdr_len().
>   Fixed tap initialization not to call tap_fd_set_vnet_hdr_len() for tap
>   without virtio-net header.
>   Changed to call error_report() instead of warn_report() for
>   programming errors.
>
> V5 -> V6:
>   Corrected the message for patch "virtio-net: Return an error when vhost
>   cannot enable RSS".
>   Removed changes to introduce asserts from "virtio-net: Return an error
>   when vhost cannot enable RSS".
>   Reorganized patches "virtio-net: Return an error when vhost cannot
>   enable RSS" and "virtio-net: Do not clear VIRTIO_NET_F_RSS". This
>   version now contains patches "virtio-net: Return an error when vhost
>   cannot enable RSS" and "virtio-net: Enable software RSS".
>   Rebased.
>
> V4 -> V5:
>   Added patch "virtio-net: Do not write hashes to peer buffer".
>
> V3 -> V4:
>   Extract patches "tap: Remove tap_receive()" and  "net: Remove flag
>   propagation" from "net: Remove receive_raw()".
>   Added patch "virtio-net: Always set populate_hash".
>   Added patch "virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT".
>   Added patch "ebpf: Use standard section name".
>   Added patch "ebpf: Simplify error handling".
>   Added patch "ebpf: Return 0 when configuration fails".
>   Added patch "ebpf: Refactor tun_rss_steering_prog()".
>   Added patch "ebpf: Add a separate target for skeleton".
>
> V2 -> V3:
>   Added patch "tap: Remove tap_probe_vnet_hdr_len()".
>   Added patch "tap: Remove qemu_using_vnet_hdr()".
>   Added patch "net: Move virtio-net header length assertion".
>   Added patch "net: Remove receive_raw()".
>   Added patch "tap: Shrink zeroed virtio-net header".
>   Dropped patch "tap: Fix virtio-net header buffer size".
>
> V1 -> V2:
>   Added patch "ebpf: Fix RSS error handling".
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> Akihiko Odaki (19):
>       tap: Remove tap_probe_vnet_hdr_len()
>       tap: Remove qemu_using_vnet_hdr()
>       net: Move virtio-net header length assertion
>       net: Remove receive_raw()
>       tap: Call tap_receive_iov() from tap_receive()
>       tap: Shrink zeroed virtio-net header
>       virtio-net: Copy header only when necessary
>       virtio-net: Disable RSS on reset
>       virtio-net: Unify the logic to update NIC state for RSS
>       virtio-net: Return an error when vhost cannot enable RSS
>       virtio-net: Report RSS warning at device realization
>       virtio-net: Always set populate_hash
>       virtio-net: Do not write hashes to peer buffer
>       ebpf: Fix RSS error handling
>       ebpf: Use standard section name
>       ebpf: Simplify error handling
>       ebpf: Return 0 when configuration fails
>       ebpf: Refactor tun_rss_steering_prog()
>       ebpf: Add a separate target for skeleton
>
>  ebpf/rss.bpf.skeleton.h  | 1557
> +++++++++++++++++++++++-----------------------
>  include/net/net.h        |    8 -
>  net/tap_int.h            |    1 -
>  ebpf/ebpf_rss.c          |   12 +-
>  hw/net/e1000e.c          |    1 -
>  hw/net/igb.c             |    1 -
>  hw/net/net_tx_pkt.c      |    4 +-
>  hw/net/virtio-net.c      |  308 +++++----
>  hw/net/vmxnet3.c         |    2 -
>  net/dump.c               |    4 +-
>  net/net.c                |   47 +-
>  net/netmap.c             |    5 -
>  net/tap-bsd.c            |    5 -
>  net/tap-linux.c          |   20 -
>  net/tap-solaris.c        |    5 -
>  net/tap-stub.c           |    5 -
>  net/tap.c                |   77 +--
>  tools/ebpf/rss.bpf.c     |   46 +-
>  tools/ebpf/Makefile.ebpf |   15 +-
>  19 files changed, 986 insertions(+), 1137 deletions(-)
> ---
> base-commit: 9c74490bff6c8886a922008d0c9ce6cae70dd17e
> change-id: 20231210-rss-e7c98e722253
>
> Best regards,
> --
> Akihiko Odaki <akihiko.odaki@daynix.com>
>
>
Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements
Posted by Akihiko Odaki 1 year, 11 months ago
On 2023/12/11 20:54, Yuri Benditovich wrote:
> People, I suggest to wait a little and understand what happens with the 
> previous series from Andrew Melnichenko (support for qemu under libvirt etc)

Can you share the link to the series?

> According to response from Jason from Sept 8 it was queued but I do not 
> see it in the master branch.

I didn't see it either.

Regards,
Akihiko Odaki
Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements
Posted by Yuri Benditovich 1 year, 11 months ago
https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg05859.html

On Mon, Dec 11, 2023 at 2:01 PM Akihiko Odaki <akihiko.odaki@daynix.com>
wrote:

> On 2023/12/11 20:54, Yuri Benditovich wrote:
> > People, I suggest to wait a little and understand what happens with the
> > previous series from Andrew Melnichenko (support for qemu under libvirt
> etc)
>
> Can you share the link to the series?
>
> > According to response from Jason from Sept 8 it was queued but I do not
> > see it in the master branch.
>
> I didn't see it either.
>
> Regards,
> Akihiko Odaki
>
Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements
Posted by Michael S. Tsirkin 1 year, 11 months ago
On Mon, Dec 11, 2023 at 02:34:56PM +0200, Yuri Benditovich wrote:
> https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg05859.html

It's from August, I think it's fair to say it's not going upstream
unless there's some activity. Yuri did you review that series then?
Care to ack?

-- 
MST
Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements
Posted by Yuri Benditovich 1 year, 11 months ago
Hi Michael,
Sure, I've reviewed that also, there was a fruitful discussion
till the series rеаched its final form.
At the beginning of September we've got the response from Jason that the
series is queued upstream so we were calm and switched to libvirt part ))

Seems like a misunderstanding, let's wait for Jason response.

Thanks,
Yuri




On Mon, Dec 11, 2023 at 5:43 PM Michael S. Tsirkin <mst@redhat.com> wrote:

> On Mon, Dec 11, 2023 at 02:34:56PM +0200, Yuri Benditovich wrote:
> > https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg05859.html
>
> It's from August, I think it's fair to say it's not going upstream
> unless there's some activity. Yuri did you review that series then?
> Care to ack?
>
> --
> MST
>
>
Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements
Posted by Yuri Benditovich 1 year, 11 months ago
I'm adding also Yan

On Mon, Dec 11, 2023 at 9:51 PM Yuri Benditovich <
yuri.benditovich@daynix.com> wrote:

> Hi Michael,
> Sure, I've reviewed that also, there was a fruitful discussion
> till the series rеаched its final form.
> At the beginning of September we've got the response from Jason that the
> series is queued upstream so we were calm and switched to libvirt part ))
>
> Seems like a misunderstanding, let's wait for Jason response.
>
> Thanks,
> Yuri
>
>
>
>
> On Mon, Dec 11, 2023 at 5:43 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
>> On Mon, Dec 11, 2023 at 02:34:56PM +0200, Yuri Benditovich wrote:
>> > https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg05859.html
>>
>> It's from August, I think it's fair to say it's not going upstream
>> unless there's some activity. Yuri did you review that series then?
>> Care to ack?
>>
>> --
>> MST
>>
>>