mbox series

[RFC,0/6] Virtio-net: Support RSS

Message ID 20180830142708.14311-1-sameeh@daynix.com (mailing list archive)
Headers show
Series Virtio-net: Support RSS | expand

Message

Sameeh Jubran Aug. 30, 2018, 2:27 p.m. UTC
From: Sameeh Jubran <sjubran@redhat.com>

This series implements the Steering Mode feature which was introduced on the
virtio-dev list a while ago, which can be found here:
* https://lists.oasis-open.org/archives/virtio-dev/201805/msg00024.html

The first three patches add some infrastructure support that is used in
the following three patches.

The ebpf filter doesn't fully work yet as I'm having an issue with the
verifier which needs to be fixed.

The patches still need some love as not all of the cases have been handled
yet most of the functionality has been implemented.

Please share your thoughts and comments so I'll move forward with
sending v1 along with a fully functioning ebpf code.

Sameeh Jubran (6):
  Add bpf support to qemu
  tap: Add support for bpf ioctls
  vhost-net: Expose vhost_net_get_fd
  virtio-net: implement steering mode feature
  virtio-net: steering mode: Implement rss support
  virtio-net: rss: Add bpf filter

 MAINTAINERS                                 |    5 +
 configure                                   |   44 +
 hw/net/rss_bpf_insns.h                      | 3992 +++++++++++++++++++++++++++
 hw/net/rss_tap_bpf.h                        |   37 +
 hw/net/rss_tap_bpf_program.c                |  172 ++
 hw/net/vhost_net.c                          |    2 +-
 hw/net/virtio-net.c                         |  250 +-
 include/hw/virtio/virtio-net.h              |    5 +
 include/net/net.h                           |    3 +-
 include/standard-headers/linux/virtio_net.h |   55 +
 net/tap-bsd.c                               |    5 +
 net/tap-linux.c                             |   29 +-
 net/tap-linux.h                             |    3 +-
 net/tap-solaris.c                           |    5 +
 net/tap-stub.c                              |    5 +
 net/tap.c                                   |    8 +
 net/tap_int.h                               |    1 +
 qapi/net.json                               |   11 +
 scripts/update-linux-headers.sh             |    8 +-
 19 files changed, 4627 insertions(+), 13 deletions(-)
 create mode 100644 hw/net/rss_bpf_insns.h
 create mode 100644 hw/net/rss_tap_bpf.h
 create mode 100644 hw/net/rss_tap_bpf_program.c

Comments

Jason Wang Sept. 3, 2018, 4:15 a.m. UTC | #1
On 2018年08月30日 22:27, Sameeh Jubran wrote:
> From: Sameeh Jubran <sjubran@redhat.com>
>
> This series implements the Steering Mode feature which was introduced on the
> virtio-dev list a while ago, which can be found here:
> * https://lists.oasis-open.org/archives/virtio-dev/201805/msg00024.html
>
> The first three patches add some infrastructure support that is used in
> the following three patches.
>
> The ebpf filter doesn't fully work yet as I'm having an issue with the
> verifier which needs to be fixed.

What issues did you meet? You can attach a trace buffer and get verbose 
debug information from that. Btw, dpdk use cls bpf and we use socket filter.

>
> The patches still need some love as not all of the cases have been handled
> yet most of the functionality has been implemented.

One question is how indirection table is implemented, I thought it 
should be a map but looks not. Please see comment on patch 6.

Thanks

>
> Please share your thoughts and comments so I'll move forward with
> sending v1 along with a fully functioning ebpf code.
>
> Sameeh Jubran (6):
>    Add bpf support to qemu
>    tap: Add support for bpf ioctls
>    vhost-net: Expose vhost_net_get_fd
>    virtio-net: implement steering mode feature
>    virtio-net: steering mode: Implement rss support
>    virtio-net: rss: Add bpf filter
>
>   MAINTAINERS                                 |    5 +
>   configure                                   |   44 +
>   hw/net/rss_bpf_insns.h                      | 3992 +++++++++++++++++++++++++++
>   hw/net/rss_tap_bpf.h                        |   37 +
>   hw/net/rss_tap_bpf_program.c                |  172 ++
>   hw/net/vhost_net.c                          |    2 +-
>   hw/net/virtio-net.c                         |  250 +-
>   include/hw/virtio/virtio-net.h              |    5 +
>   include/net/net.h                           |    3 +-
>   include/standard-headers/linux/virtio_net.h |   55 +
>   net/tap-bsd.c                               |    5 +
>   net/tap-linux.c                             |   29 +-
>   net/tap-linux.h                             |    3 +-
>   net/tap-solaris.c                           |    5 +
>   net/tap-stub.c                              |    5 +
>   net/tap.c                                   |    8 +
>   net/tap_int.h                               |    1 +
>   qapi/net.json                               |   11 +
>   scripts/update-linux-headers.sh             |    8 +-
>   19 files changed, 4627 insertions(+), 13 deletions(-)
>   create mode 100644 hw/net/rss_bpf_insns.h
>   create mode 100644 hw/net/rss_tap_bpf.h
>   create mode 100644 hw/net/rss_tap_bpf_program.c
>
Sameeh Jubran Sept. 3, 2018, 9:52 a.m. UTC | #2
On Mon, Sep 3, 2018 at 7:15 AM, Jason Wang <jasowang@redhat.com> wrote:
>
>
> On 2018年08月30日 22:27, Sameeh Jubran wrote:
>>
>> From: Sameeh Jubran <sjubran@redhat.com>
>>
>> This series implements the Steering Mode feature which was introduced on
>> the
>> virtio-dev list a while ago, which can be found here:
>> * https://lists.oasis-open.org/archives/virtio-dev/201805/msg00024.html
>>
>> The first three patches add some infrastructure support that is used in
>> the following three patches.
>>
>> The ebpf filter doesn't fully work yet as I'm having an issue with the
>> verifier which needs to be fixed.
>
>
> What issues did you meet? You can attach a trace buffer and get verbose
> debug information from that. Btw, dpdk use cls bpf and we use socket filter.
I am using the buffer for debugging actually, I keep getting back edge
from two consecutive instructions
in the instruction array which I have no idea how to troubleshoot! The
instructions are generated from the
compiled code which compiles okay.
This didn't happen to me earlier and I have actually succeeded in
inserting the bpf instructions with no issues.
>
>>
>> The patches still need some love as not all of the cases have been handled
>> yet most of the functionality has been implemented.
>
>
> One question is how indirection table is implemented, I thought it should be
> a map but looks not. Please see comment on patch 6.
No it is a hash table.
>
> Thanks
>
>
>>
>> Please share your thoughts and comments so I'll move forward with
>> sending v1 along with a fully functioning ebpf code.
>>
>> Sameeh Jubran (6):
>>    Add bpf support to qemu
>>    tap: Add support for bpf ioctls
>>    vhost-net: Expose vhost_net_get_fd
>>    virtio-net: implement steering mode feature
>>    virtio-net: steering mode: Implement rss support
>>    virtio-net: rss: Add bpf filter
>>
>>   MAINTAINERS                                 |    5 +
>>   configure                                   |   44 +
>>   hw/net/rss_bpf_insns.h                      | 3992
>> +++++++++++++++++++++++++++
>>   hw/net/rss_tap_bpf.h                        |   37 +
>>   hw/net/rss_tap_bpf_program.c                |  172 ++
>>   hw/net/vhost_net.c                          |    2 +-
>>   hw/net/virtio-net.c                         |  250 +-
>>   include/hw/virtio/virtio-net.h              |    5 +
>>   include/net/net.h                           |    3 +-
>>   include/standard-headers/linux/virtio_net.h |   55 +
>>   net/tap-bsd.c                               |    5 +
>>   net/tap-linux.c                             |   29 +-
>>   net/tap-linux.h                             |    3 +-
>>   net/tap-solaris.c                           |    5 +
>>   net/tap-stub.c                              |    5 +
>>   net/tap.c                                   |    8 +
>>   net/tap_int.h                               |    1 +
>>   qapi/net.json                               |   11 +
>>   scripts/update-linux-headers.sh             |    8 +-
>>   19 files changed, 4627 insertions(+), 13 deletions(-)
>>   create mode 100644 hw/net/rss_bpf_insns.h
>>   create mode 100644 hw/net/rss_tap_bpf.h
>>   create mode 100644 hw/net/rss_tap_bpf_program.c
>>
>