sc.
- The third test checks if everything works if ingress is active.
Acked-by: Jamal Hadi Salim
Signed-off-by: Pedro Tammela
---
.../tc-testing/tc-tests/infra/qdiscs.json | 98 +++
1 file changed, 98 insertions(+)
create mode 100644
tools/testing/selftests/tc-testing/tc-tes
On 24/06/2024 12:43, Yunseong Kim wrote:
Hi Pedro,
On 6/25/24 12:12 오전, Pedro Tammela wrote:
On 22/06/2024 01:57, ysk...@gmail.com wrote:
From: Yunseong Kim
In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from
qdisc->dev_queue->dev ->name
[ 5301.595872] KASAN: null-
On 22/06/2024 01:57, ysk...@gmail.com wrote:
From: Yunseong Kim
In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from
qdisc->dev_queue->dev ->name
This situation simulated from bunch of veths and Bluetooth dis/reconnection.
During qdisc initialization, qdisc was being set to noop
On 21/06/2024 08:45, ysk...@gmail.com wrote:
From: Yunseong Kim
In the TRACE_EVENT(qdisc_reset) NULL dereference occurred from
qdisc->dev_queue->dev ->name
This situation simulated from bunch of veths and Bluetooth dis/reconnection.
During qdisc initialization, qdisc was being set to noop
Em dom., 18 de abr. de 2021 às 19:56, Alexei Starovoitov
escreveu:
>
> On Sun, Apr 18, 2021 at 1:03 PM Pedro Tammela wrote:
> >
> > ENOTSUPP is not a valid userland errno[1], which is annoying for
> > userland applications that implement a fallback to iterative, report
In older kernels, pre batched ops, it returns EINVAL as the arguments
are not supported in the syscall.
[1] https://lore.kernel.org/netdev/20200511165319.2251678-1-k...@kernel.org/
Signed-off-by: Pedro Tammela
---
kernel/bpf/syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --gi
Signed-off-by: Pedro Tammela
---
tools/testing/selftests/bpf/bpf_util.h| 7 --
.../bpf/map_tests/htab_map_batch_ops.c| 87 +--
.../selftests/bpf/prog_tests/map_init.c | 9 +-
tools/testing/selftests/bpf/test_maps.c | 84 +++---
4 files changed
Follows the same logic as the hashtable tests.
Signed-off-by: Pedro Tammela
---
.../bpf/map_tests/array_map_batch_ops.c | 104 +-
1 file changed, 75 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
b/tools/testing
i Salim
Signed-off-by: Pedro Tammela
---
kernel/bpf/arraymap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 463d25e1e67e..3c4105603f9d 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -698,6 +698,8 @@ const str
pu macros
v1 -> v2:
- Amended a more descriptive commit message
Pedro Tammela (3):
bpf: add batched ops support for percpu array
bpf: selftests: remove percpu macros from bpf_util.h
bpf: selftests: update array map tests for per-cpu batched ops
kernel/bpf/arraymap.c
Signed-off-by: Pedro Tammela
---
tools/testing/selftests/bpf/bpf_util.h| 7 --
.../bpf/map_tests/htab_map_batch_ops.c| 71
.../selftests/bpf/prog_tests/map_init.c | 9 +-
tools/testing/selftests/bpf/test_maps.c | 84 +++
4 files changed, 89
i Salim
Signed-off-by: Pedro Tammela
---
kernel/bpf/arraymap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 463d25e1e67e..3c4105603f9d 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -698,6 +698,8 @@ const str
Follows the same logic as the hashtable tests.
Signed-off-by: Pedro Tammela
---
.../bpf/map_tests/array_map_batch_ops.c | 110 +-
1 file changed, 80 insertions(+), 30 deletions(-)
diff --git a/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
b/tools/testing
v3:
- Remove percpu macros as suggested by Andrii
- Update tests that used the per cpu macros
v1 -> v2:
- Amended a more descriptive commit message
Pedro Tammela (3):
bpf: add batched ops support for percpu array
bpf: selftests: remove percpu macros from bpf_util.h
bpf: selftests: update arr
In 'bpf_ringbuf_reserve()' we require the flag to '0' at the moment.
For 'bpf_ringbuf_{discard,submit,output}' a flag of '0' might send a
notification to the process if needed.
Signed-off-by: Pedro Tammela
---
include/uapi/linux/bpf.h | 16
Em qua., 7 de abr. de 2021 às 16:51, Andrii Nakryiko
escreveu:
>
> On Wed, Apr 7, 2021 at 12:30 PM Pedro Tammela wrote:
> >
> > Em qua., 7 de abr. de 2021 às 15:31, Andrii Nakryiko
> > escreveu:
> > >
> > > On Tue, Apr 6, 2021 at 11:55 AM Pedro Tamm
Em qua., 7 de abr. de 2021 às 16:58, Andrii Nakryiko
escreveu:
>
> On Wed, Apr 7, 2021 at 11:43 AM Joe Stringer wrote:
> >
> > Hi Pedro,
> >
> > On Tue, Apr 6, 2021 at 11:58 AM Pedro Tammela wrote:
> > >
> > > In 'bpf_ringbuf_reserve()'
Em qua., 7 de abr. de 2021 às 15:31, Andrii Nakryiko
escreveu:
>
> On Tue, Apr 6, 2021 at 11:55 AM Pedro Tammela wrote:
> >
> > This macro was refactored out of the bpf selftests.
> >
> > Since percpu values are rounded up to '8' in the kernel, a carele
In 'bpf_ringbuf_reserve()' we require the flag to '0' at the moment.
For 'bpf_ringbuf_{discard,submit,output}' a flag of '0' might send a
notification to the process if needed.
Signed-off-by: Pedro Tammela
---
include/uapi/linux/bpf.h | 7 +++
Follows the same logic as the hashtable tests.
Signed-off-by: Pedro Tammela
---
.../bpf/map_tests/array_map_batch_ops.c | 114 +-
1 file changed, 85 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
b/tools/testing
i Salim
Signed-off-by: Pedro Tammela
---
kernel/bpf/arraymap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 463d25e1e67e..3c4105603f9d 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -698,6 +698,8 @@ const str
ops in the
percpu variant, let's provide a convenient macro to declare percpu map
value types.
Updates the tests to a "reference" usage of the new macro.
Signed-off-by: Pedro Tammela
---
tools/lib/bpf/bpf.h | 10
tools/testing/selftests/bpf/bpf_util.h
refactored
out to libbpf, with some simplifications for reuse.
The tests were updated to reflect all the new changes.
v1 -> v2:
- Amended a more descriptive commit message
Pedro Tammela (3):
bpf: add batched ops support for percpu array
libbpf: selftests: refactor 'BPF_PERCPU_TYPE(
Follows the same logic as the hashtable tests.
Signed-off-by: Pedro Tammela
---
.../bpf/map_tests/array_map_batch_ops.c | 114 +-
1 file changed, 85 insertions(+), 29 deletions(-)
diff --git a/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
b/tools/testing
ops in the
percpu variant, let's provide a convenient macro to declare percpu map
value types.
Updates the tests to a "reference" usage of the new macro.
Signed-off-by: Pedro Tammela
---
tools/lib/bpf/bpf.h | 10
tools/testing/selftests/bpf/bpf_util.h
Suggested-by: Jamal Hadi Salim
Signed-off-by: Pedro Tammela
---
kernel/bpf/arraymap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 463d25e1e67e..3c4105603f9d 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -698,6
refactored
out to libbpf, with some simplifications for reuse.
The tests were updated to reflect all the new changes.
Pedro Tammela (3):
bpf: add batched ops support for percpu array
libbpf: selftests: refactor 'BPF_PERCPU_TYPE()' and 'bpf_percpu()'
macros
bpf: selftes
Em qua., 31 de mar. de 2021 às 03:54, Andrii Nakryiko
escreveu:
>
> On Sun, Mar 28, 2021 at 9:11 AM Pedro Tammela wrote:
> >
> > The current way to provide a no-op flag to 'bpf_ringbuf_submit()',
> > 'bpf_ringbuf_discard()' and 'bpf_ringbuf_outp
Em qua., 31 de mar. de 2021 às 04:02, Andrii Nakryiko
escreveu:
>
> On Tue, Mar 30, 2021 at 4:16 PM Alexei Starovoitov
> wrote:
> >
> > On Tue, Mar 30, 2021 at 3:54 PM Pedro Tammela wrote:
> > >
> > > BPF_CALL_2(bpf_ringbuf_submit, void *, sample
The current code only checks flags in 'bpf_ringbuf_output()'.
Signed-off-by: Pedro Tammela
---
include/uapi/linux/bpf.h | 8
kernel/bpf/ringbuf.c | 13 +++--
tools/include/uapi/linux/bpf.h | 8
3 files changed, 19 insertions(+), 10 deletion
Em seg., 29 de mar. de 2021 às 13:10, Song Liu escreveu:
>
>
>
> > On Mar 28, 2021, at 9:10 AM, Pedro Tammela wrote:
> >
> > The current code only checks flags in 'bpf_ringbuf_output()'.
> >
> > Signed-off-by: Pedro Tammela
> > ---
> >
'bpf_ring_buffer__poll()' abstracts the polling method, so abstract the
constants that make the implementation don't wait or wait indefinetly
for data.
Signed-off-by: Pedro Tammela
---
tools/lib/bpf/libbpf.h | 3 +++
tools/testing/selft
The current code only checks flags in 'bpf_ringbuf_output()'.
Signed-off-by: Pedro Tammela
---
include/uapi/linux/bpf.h | 8
kernel/bpf/ringbuf.c | 13 +++--
tools/include/uapi/linux/bpf.h | 8
3 files changed, 19 insertions(+), 10 deletion
ore descriptive notation for this value.
Signed-off-by: Pedro Tammela
---
include/uapi/linux/bpf.h | 8
tools/include/uapi/linux/bpf.h | 8
tools/testing/selftests/bpf/progs/ima.c| 2 +-
tools/testing/selftes
patch makes positive returns from the callback a no-op.
Signed-off-by: Pedro Tammela
---
tools/lib/bpf/ringbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/ringbuf.c b/tools/lib/bpf/ringbuf.c
index 8caaafe7e312..e7a8d847161f 100644
--- a/tools/lib/bpf/ringbuf.c
From: Pedro Tammela
Uses the already existing infrastructure for testing batched ops.
The testing code is essentially the same, with minor tweaks for this use
case.
Suggested-by: Jamal Hadi Salim
Signed-off-by: Pedro Tammela
---
.../map_tests/lpm_trie_map_batch_ops.c (new) | 158
From: Pedro Tammela
Suggested-by: Jamal Hadi Salim
Signed-off-by: Pedro Tammela
---
kernel/bpf/lpm_trie.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c
index cec792a17e5f..1b7b8a6f34ee 100644
--- a/kernel/bpf/lpm_trie.c
+++ b/kernel/bpf
The patch itself is straightforward thanks to the infrastructure that is
already in-place.
The tests follows the other '*_map_batch_ops' tests with minor tweaks.
v1 -> v2:
Fixes for checkpatch warnings
Pedro Tammela (2):
bpf: add support for batched operations in LPM tr
From: Pedro Tammela
Uses the already existing infrastructure for testing batched ops.
The testing code is essentially the same, with minor tweaks for this use
case.
Suggested-by: Jamal Hadi Salim
Signed-off-by: Pedro Tammela
---
.../map_tests/lpm_trie_map_batch_ops.c (new) | 158
From: Pedro Tammela
Suggested-by: Jamal Hadi Salim
Signed-off-by: Pedro Tammela
---
kernel/bpf/lpm_trie.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c
index cec792a17e5f..1b7b8a6f34ee 100644
--- a/kernel/bpf/lpm_trie.c
+++ b/kernel/bpf
The patch itself is straightforward thanks to the infrastructure that is
already in-place.
The tests follows the other '*_map_batch_ops' tests with minor tweaks.
Pedro Tammela (2):
bpf: add support for batched operations in LPM trie maps
bpf: selftests: add tests for batched ops i
This seems to be a reminiscent from the hashmap tests.
Signed-off-by: Pedro Tammela
---
tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
b/tools/testing/selftests/bpf
t hints inline to clang.
This change now enforces the proper definition for BPF programs
regardless of the include order.
Signed-off-by: Pedro Tammela
---
tools/lib/bpf/bpf_helpers.h | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/bpf_helpers.h b/too
43 matches
Mail list logo