From: Daniel T. Lee <hidden> Date: 2020-09-05 15:41:54
Most of the samples were converted to use the new BTF-defined MAP as
they moved to libbbpf, but some of the samples were missing.
Instead of using the previous BPF MAP definition, this commit refactors
xdp_sample_pkts_kern MAP definition with the new BTF-defined MAP format.
Signed-off-by: Daniel T. Lee <redacted>
---
samples/bpf/xdp_sample_pkts_kern.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
On Sat, Sep 5, 2020 at 8:41 AM Daniel T. Lee [off-list ref] wrote:
quoted hunk
Most of the samples were converted to use the new BTF-defined MAP as
they moved to libbbpf, but some of the samples were missing.
Instead of using the previous BPF MAP definition, this commit refactors
xdp_sample_pkts_kern MAP definition with the new BTF-defined MAP format.
Signed-off-by: Daniel T. Lee <redacted>
---
samples/bpf/xdp_sample_pkts_kern.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
if you drop max_entries property, libbpf will set it to the maximum
configured number of CPUs on the host, which is what you probably
want. Do you might sending v2 without MAX_CPUS (check if macro is
still used anywhere else). Thanks!
+} my_map SEC(".maps");
SEC("xdp_sample")
int xdp_sample_prog(struct xdp_md *ctx)
--
2.25.1
From: Daniel T. Lee <hidden> Date: 2020-09-09 02:39:03
On Wed, Sep 9, 2020 at 8:24 AM Andrii Nakryiko
[off-list ref] wrote:
On Sat, Sep 5, 2020 at 8:41 AM Daniel T. Lee [off-list ref] wrote:
quoted
Most of the samples were converted to use the new BTF-defined MAP as
they moved to libbbpf, but some of the samples were missing.
Instead of using the previous BPF MAP definition, this commit refactors
xdp_sample_pkts_kern MAP definition with the new BTF-defined MAP format.
Signed-off-by: Daniel T. Lee <redacted>
---
samples/bpf/xdp_sample_pkts_kern.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
if you drop max_entries property, libbpf will set it to the maximum
configured number of CPUs on the host, which is what you probably
want. Do you might sending v2 without MAX_CPUS (check if macro is
still used anywhere else). Thanks!
Thanks for your time and effort for the review.
I'll check and send the next version of patch.
quoted
+} my_map SEC(".maps");
SEC("xdp_sample")
int xdp_sample_prog(struct xdp_md *ctx)
--
2.25.1