qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: Andrew Melnychenko <andrew@daynix.com>,
	jasowang@redhat.com, mst@redhat.com, armbru@redhat.com,
	eblake@redhat.com, qemu-devel@nongnu.org, berrange@redhat.com
Cc: yuri.benditovich@daynix.com, yan@daynix.com
Subject: Re: [PATCH v7 2/5] ebpf: Added eBPF initialization by fds.
Date: Mon, 11 Dec 2023 22:07:31 +0900	[thread overview]
Message-ID: <5887d6ce-e985-4b7f-a4a0-3fd3e6840d2f@daynix.com> (raw)
In-Reply-To: <20230831065140.496485-3-andrew@daynix.com>

On 2023/08/31 15:51, Andrew Melnychenko wrote:
> It allows using file descriptors of eBPF provided
> outside of QEMU.
> QEMU may be run without capabilities for eBPF and run
> RSS program provided by management tool(g.e. libvirt).
> 
> Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
> ---
>   ebpf/ebpf_rss-stub.c |  6 ++++++
>   ebpf/ebpf_rss.c      | 27 +++++++++++++++++++++++++++
>   ebpf/ebpf_rss.h      |  5 +++++
>   3 files changed, 38 insertions(+)
> 
> diff --git a/ebpf/ebpf_rss-stub.c b/ebpf/ebpf_rss-stub.c
> index e71e229190..8d7fae2ad9 100644
> --- a/ebpf/ebpf_rss-stub.c
> +++ b/ebpf/ebpf_rss-stub.c
> @@ -28,6 +28,12 @@ bool ebpf_rss_load(struct EBPFRSSContext *ctx)
>       return false;
>   }
>   
> +bool ebpf_rss_load_fds(struct EBPFRSSContext *ctx, int program_fd,
> +                       int config_fd, int toeplitz_fd, int table_fd)
> +{
> +    return false;
> +}
> +
>   bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct EBPFRSSConfig *config,
>                         uint16_t *indirections_table, uint8_t *toeplitz_key)
>   {
> diff --git a/ebpf/ebpf_rss.c b/ebpf/ebpf_rss.c
> index 247f5eee1b..24bc6cc409 100644
> --- a/ebpf/ebpf_rss.c
> +++ b/ebpf/ebpf_rss.c
> @@ -146,6 +146,33 @@ error:
>       return false;
>   }
>   
> +bool ebpf_rss_load_fds(struct EBPFRSSContext *ctx, int program_fd,
> +                       int config_fd, int toeplitz_fd, int table_fd)
> +{
> +    if (ctx == NULL || ebpf_rss_is_loaded(ctx)) {

You can omit ctx == NULL here too.


  reply	other threads:[~2023-12-11 13:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31  6:51 [PATCH v7 0/5] eBPF RSS through QMP support Andrew Melnychenko
2023-08-31  6:51 ` [PATCH v7 1/5] ebpf: Added eBPF map update through mmap Andrew Melnychenko
2023-12-11 13:05   ` Akihiko Odaki
2023-12-11 13:48     ` Yuri Benditovich
2023-12-11 14:07       ` Akihiko Odaki
2023-12-12  3:35         ` Jason Wang
2023-08-31  6:51 ` [PATCH v7 2/5] ebpf: Added eBPF initialization by fds Andrew Melnychenko
2023-12-11 13:07   ` Akihiko Odaki [this message]
2023-08-31  6:51 ` [PATCH v7 3/5] virtio-net: Added property to load eBPF RSS with fds Andrew Melnychenko
2023-12-11 13:17   ` Akihiko Odaki
2023-08-31  6:51 ` [PATCH v7 4/5] qmp: Added new command to retrieve eBPF blob Andrew Melnychenko
2023-12-11 13:30   ` Akihiko Odaki
2023-12-18 12:54   ` Markus Armbruster
2023-12-18 13:24     ` Yuri Benditovich
2023-12-18 13:32       ` Daniel P. Berrangé
2023-08-31  6:51 ` [PATCH v7 5/5] ebpf: Updated eBPF program and skeleton Andrew Melnychenko
2023-09-04 11:22   ` Andrew Melnichenko
2023-09-08  6:42     ` Jason Wang
2023-12-11 11:50       ` Yuri Benditovich
2023-12-12  3:33         ` Jason Wang
2023-12-13  7:23           ` Yuri Benditovich
2023-12-14 10:17             ` Yuri Benditovich
2023-12-18  2:48               ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5887d6ce-e985-4b7f-a4a0-3fd3e6840d2f@daynix.com \
    --to=akihiko.odaki@daynix.com \
    --cc=andrew@daynix.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yan@daynix.com \
    --cc=yuri.benditovich@daynix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).