Added check for qemu virtio-net "ebpf_rss_fds" property.
This property allows to pass eBPF program/map file descriptors for RSS program.
In other patches, libvirt may launch qemu-ebpf-rss-helper and pass fds
to virtio-net qemu.
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 7cd6dab259..f16115226d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -638,6 +638,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"query-display-options",
"s390-pv-guest",
"virtio-net.rss",
+ "virtio-net.ebpf_rss_fds",
);
@@ -1423,6 +1424,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
{ "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
{ "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
{ "rss", QEMU_CAPS_VIRTIO_RSS, NULL },
+ { "ebpf_rss_fds", QEMU_CAPS_VIRTIO_EBPF_RSS_FDS, NULL },
};
static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPCIeRootPort[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 6b2446fe5f..c938b63e91 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -618,6 +618,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp command present */
QEMU_CAPS_S390_PV_GUEST, /* -object s390-pv-guest,... */
QEMU_CAPS_VIRTIO_RSS, /* virtio-net rss feature */
+ QEMU_CAPS_VIRTIO_EBPF_RSS_FDS, /* virtio-net ebpf_rss_fds feature */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
--
2.31.1
On 7/28/21 10:17 AM, Andrew Melnychenko wrote:
> Added check for qemu virtio-net "ebpf_rss_fds" property.
> This property allows to pass eBPF program/map file descriptors for RSS program.
> In other patches, libvirt may launch qemu-ebpf-rss-helper and pass fds
> to virtio-net qemu.
>
> Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
> ---
> src/qemu/qemu_capabilities.c | 2 ++
> src/qemu/qemu_capabilities.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 7cd6dab259..f16115226d 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -638,6 +638,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
> "query-display-options",
> "s390-pv-guest",
> "virtio-net.rss",
> + "virtio-net.ebpf_rss_fds",
> );
>
>
> @@ -1423,6 +1424,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
> { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
> { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
> { "rss", QEMU_CAPS_VIRTIO_RSS, NULL },
> + { "ebpf_rss_fds", QEMU_CAPS_VIRTIO_EBPF_RSS_FDS, NULL },
I haven't found this in QEMU. Looking into qemu-devel list it was
proposed but apparently is not merged yet:
https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg03536.html
> };
>
> static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPCIeRootPort[] = {
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index 6b2446fe5f..c938b63e91 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -618,6 +618,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
> QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp command present */
> QEMU_CAPS_S390_PV_GUEST, /* -object s390-pv-guest,... */
> QEMU_CAPS_VIRTIO_RSS, /* virtio-net rss feature */
> + QEMU_CAPS_VIRTIO_EBPF_RSS_FDS, /* virtio-net ebpf_rss_fds feature */
>
> QEMU_CAPS_LAST /* this must always be the last item */
> } virQEMUCapsFlags;
>
On 8/20/21 2:57 PM, Michal Prívozník wrote:
> On 7/28/21 10:17 AM, Andrew Melnychenko wrote:
>> Added check for qemu virtio-net "ebpf_rss_fds" property.
>> This property allows to pass eBPF program/map file descriptors for RSS program.
>> In other patches, libvirt may launch qemu-ebpf-rss-helper and pass fds
>> to virtio-net qemu.
>>
>> Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
>> ---
>> src/qemu/qemu_capabilities.c | 2 ++
>> src/qemu/qemu_capabilities.h | 1 +
>> 2 files changed, 3 insertions(+)
>>
>> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
>> index 7cd6dab259..f16115226d 100644
>> --- a/src/qemu/qemu_capabilities.c
>> +++ b/src/qemu/qemu_capabilities.c
>> @@ -638,6 +638,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
>> "query-display-options",
>> "s390-pv-guest",
>> "virtio-net.rss",
>> + "virtio-net.ebpf_rss_fds",
>> );
>>
>>
>> @@ -1423,6 +1424,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
>> { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
>> { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
>> { "rss", QEMU_CAPS_VIRTIO_RSS, NULL },
>> + { "ebpf_rss_fds", QEMU_CAPS_VIRTIO_EBPF_RSS_FDS, NULL },
>
> I haven't found this in QEMU. Looking into qemu-devel list it was
> proposed but apparently is not merged yet:
>
> https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg03536.html
Ooops, hit send too early.
What I wanted to say is that it's perfectly okay to send patches before
QEMU part is merged. However, libvirt part won't be merged before QEMU.
We did this mistake too many times before and learned our lesson.
Michal
Hi,
No problem, those patches are RFC.
If there would be issues with the libvirt interface - qemu patches should
not be applied either.
On Fri, Aug 20, 2021 at 3:59 PM Michal Prívozník <mprivozn@redhat.com>
wrote:
> On 8/20/21 2:57 PM, Michal Prívozník wrote:
> > On 7/28/21 10:17 AM, Andrew Melnychenko wrote:
> >> Added check for qemu virtio-net "ebpf_rss_fds" property.
> >> This property allows to pass eBPF program/map file descriptors for RSS
> program.
> >> In other patches, libvirt may launch qemu-ebpf-rss-helper and pass fds
> >> to virtio-net qemu.
> >>
> >> Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
> >> ---
> >> src/qemu/qemu_capabilities.c | 2 ++
> >> src/qemu/qemu_capabilities.h | 1 +
> >> 2 files changed, 3 insertions(+)
> >>
> >> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> >> index 7cd6dab259..f16115226d 100644
> >> --- a/src/qemu/qemu_capabilities.c
> >> +++ b/src/qemu/qemu_capabilities.c
> >> @@ -638,6 +638,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
> >> "query-display-options",
> >> "s390-pv-guest",
> >> "virtio-net.rss",
> >> + "virtio-net.ebpf_rss_fds",
> >> );
> >>
> >>
> >> @@ -1423,6 +1424,7 @@ static struct virQEMUCapsDevicePropsFlags
> virQEMUCapsDevicePropsVirtioNet[] = {
> >> { "packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES, NULL },
> >> { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
> >> { "rss", QEMU_CAPS_VIRTIO_RSS, NULL },
> >> + { "ebpf_rss_fds", QEMU_CAPS_VIRTIO_EBPF_RSS_FDS, NULL },
> >
> > I haven't found this in QEMU. Looking into qemu-devel list it was
> > proposed but apparently is not merged yet:
> >
> > https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg03536.html
>
> Ooops, hit send too early.
>
> What I wanted to say is that it's perfectly okay to send patches before
> QEMU part is merged. However, libvirt part won't be merged before QEMU.
> We did this mistake too many times before and learned our lesson.
>
> Michal
>
>
© 2016 - 2026 Red Hat, Inc.