Re: [PATCH v2 6/6] ebpf: Updated eBPF program and skeleton.
On Fri, May 12, 2023 at 03:29:02PM +0300, Andrew Melnychenko wrote: > > Updated section name, so libbpf should init/gues proper > program type without specifications during open/load. > > Signed-off-by: Andrew Melnychenko > --- > ebpf/rss.bpf.skeleton.h | 1469 --- > tools/ebpf/rss.bpf.c|2 +- > 2 files changed, 741 insertions(+), 730 deletions(-) > > diff --git a/ebpf/rss.bpf.skeleton.h b/ebpf/rss.bpf.skeleton.h > index 18eb2adb12c..41b84aea44c 100644 > --- a/ebpf/rss.bpf.skeleton.h > +++ b/ebpf/rss.bpf.skeleton.h > @@ -176,162 +176,162 @@ err: > > static inline const void *rss_bpf__elf_bytes(size_t *sz) > { > - *sz = 20440; > + *sz = 20720; > return (const void *)"\ > > \x7f\x45\x4c\x46\x02\x01\x01\0\0\0\0\0\0\0\0\0\x01\0\xf7\0\x01\0\0\0\0\0\0\0\0\ > -\0\0\0\0\0\0\0\0\0\0\0\x98\x4c\0\0\0\0\0\0\0\0\0\0\x40\0\0\0\0\0\x40\0\x0d\0\ Appears to be pre-existing, and looking at the broader context, I see this comment earlier in the file: /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */ but a suggestion to improve things: tweak the comment produced by the generator to also output the name of the source file (not just the bpftool generator), to make it easier to figure out how to map this binary blob of data back to human-readable source and instructions on how to regenerate it should I want to edit those sources. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Re: [PATCH v2 6/6] ebpf: Updated eBPF program and skeleton.
On Fri, May 12, 2023 at 03:29:02PM +0300, Andrew Melnychenko wrote: > Updated section name, so libbpf should init/gues proper > program type without specifications during open/load. > > Signed-off-by: Andrew Melnychenko > --- > ebpf/rss.bpf.skeleton.h | 1469 --- > tools/ebpf/rss.bpf.c|2 +- > 2 files changed, 741 insertions(+), 730 deletions(-) ..snip.. Can't say I've verified the big hex blob, but I'll asume its a faithful compilation of the change below: Reviewed-by: Daniel P. Berrangé > diff --git a/tools/ebpf/rss.bpf.c b/tools/ebpf/rss.bpf.c > index 20f227e2acc..d32b6fb42a4 100644 > --- a/tools/ebpf/rss.bpf.c > +++ b/tools/ebpf/rss.bpf.c > @@ -528,7 +528,7 @@ static inline __u32 calculate_rss_hash(struct __sk_buff > *skb, > return result; > } > > -SEC("tun_rss_steering") > +SEC("socket") > int tun_rss_steering_prog(struct __sk_buff *skb) > { > > -- > 2.39.1 > With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
[PATCH v2 6/6] ebpf: Updated eBPF program and skeleton.
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1469 --- tools/ebpf/rss.bpf.c|2 +- 2 files changed, 741 insertions(+), 730 deletions(-) diff --git a/ebpf/rss.bpf.skeleton.h b/ebpf/rss.bpf.skeleton.h index 18eb2adb12c..41b84aea44c 100644 --- a/ebpf/rss.bpf.skeleton.h +++ b/ebpf/rss.bpf.skeleton.h @@ -176,162 +176,162 @@ err: static inline const void *rss_bpf__elf_bytes(size_t *sz) { - *sz = 20440; + *sz = 20720; return (const void *)"\ \x7f\x45\x4c\x46\x02\x01\x01\0\0\0\0\0\0\0\0\0\x01\0\xf7\0\x01\0\0\0\0\0\0\0\0\ -\0\0\0\0\0\0\0\0\0\0\0\x98\x4c\0\0\0\0\0\0\0\0\0\0\x40\0\0\0\0\0\x40\0\x0d\0\ -\x01\0\xbf\x19\0\0\0\0\0\0\xb7\x01\0\0\0\0\0\0\x63\x1a\x54\xff\0\0\0\0\xbf\xa7\ -\0\0\0\0\0\0\x07\x07\0\0\x54\xff\xff\xff\x18\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ +\0\0\0\0\0\0\0\0\0\0\0\xb0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ff\xff\xbf\x91\0\0\0\0\0\0\xb7\x04\0\0\x02\0\0\0\xb7\x05\0\0\0\0\0\ -\0\x85\0\0\0\x44\0\0\0\x67\0\0\0\x20\0\0\0\x77\0\0\0\x20\0\0\0\x55\0\x32\x02\0\ -\0\0\0\x69\xa1\xd0\xff\0\0\0\0\x15\x01\x30\x02\0\0\0\0\x7b\x7a\x38\xff\0\0\0\0\ -\x7b\x9a\x40\xff\0\0\0\0\x15\x01\x55\0\x86\xdd\0\0\x55\x01\x39\0\x08\0\0\0\xb7\ -\x07\0\0\x01\0\0\0\x73\x7a\x58\xff\0\0\0\0\xb7\x01\0\0\0\0\0\0\x63\x1a\xe0\xff\ -\0\0\0\0\x7b\x1a\xd8\xff\0\0\0\0\x7b\x1a\xd0\xff\0\0\0\0\xbf\xa3\0\0\0\0\0\0\ -\x07\x03\0\0\xd0\xff\xff\xff\x79\xa1\x40\xff\0\0\0\0\xb7\x02\0\0\0\0\0\0\xb7\ +\0\xc8\xff\xff\xff\xbf\x91\0\0\0\0\0\0\xb7\x04\0\0\x02\0\0\0\xb7\x05\0\0\0\0\0\ +\0\x85\0\0\0\x44\0\0\0\x67\0\0\0\x20\0\0\0\x77\0\0\0\x20\0\0\0\x55\0\x2f\x02\0\ +\0\0\0\x69\xa1\xc8\xff\0\0\0\0\x15\x01\x2d\x02\0\0\0\0\x7b\x7a\x30\xff\0\0\0\0\ +\x7b\x9a\x38\xff\0\0\0\0\x15\x01\x55\0\x86\xdd\0\0\x55\x01\x39\0\x08\0\0\0\xb7\ +\x07\0\0\x01\0\0\0\x73\x7a\x50\xff\0\0\0\0\xb7\x01\0\0\0\0\0\0\x63\x1a\xd8\xff\ +\0\0\0\0\x7b\x1a\xd0\xff\0\0\0\0\x7b\x1a\xc8\xff\0\0\0\0\xbf\xa3\0\0\0\0\0\0\ +\x07\x03\0\0\xc8\xff\xff\xff\x79\xa1\x38\xff\0\0\0\0\xb7\x02\0\0\0\0\0\0\xb7\ \x04\0\0\x14\0\0\0\xb7\x05\0\0\x01\0\0\0\x85\0\0\0\x44\0\0\0\x67\0\0\0\x20\0\0\ -\0\x77\0\0\0\x20\0\0\0\x55\0\x1c\x02\0\0\0\0\x69\xa1\xd6\xff\0\0\0\0\x55\x01\ -\x01\0\0\0\0\0\xb7\x07\0\0\0\0\0\0\x61\xa1\xdc\xff\0\0\0\0\x63\x1a\x64\xff\0\0\ -\0\0\x61\xa1\xe0\xff\0\0\0\0\x63\x1a\x68\xff\0\0\0\0\x71\xa9\xd9\xff\0\0\0\0\ -\x73\x7a\x5e\xff\0\0\0\0\x71\xa1\xd0\xff\0\0\0\0\x67\x01\0\0\x02\0\0\0\x57\x01\ -\0\0\x3c\0\0\0\x7b\x1a\x48\xff\0\0\0\0\xbf\x91\0\0\0\0\0\0\x57\x01\0\0\xff\0\0\ +\0\x77\0\0\0\x20\0\0\0\x55\0\x19\x02\0\0\0\0\x69\xa1\xce\xff\0\0\0\0\x55\x01\ +\x01\0\0\0\0\0\xb7\x07\0\0\0\0\0\0\x61\xa1\xd4\xff\0\0\0\0\x63\x1a\x5c\xff\0\0\ +\0\0\x61\xa1\xd8\xff\0\