On 12/7/2018 1:14 PM, Stanislav Fomichev wrote:
I get a segfault without it, other fixups always do dereference, and
without dereference I don't understand how it can ever work.
Fixes: 7c85c448e7d74 ("selftests/bpf: test_verifier, check
bpf_map_lookup_elem access in bpf prog")
Fixes: 043d222f93ab ("tuntap: accept an array of XDP buffs through sendmsg()")
Reviewed-by: Toshiaki Makita
Signed-off-by: Prashant Bhole
Acked-by: Jason Wang
---
v1 -> v2:
No change. Reposted due to patchwork status.
drivers/net/tun.c | 3 ++-
1 file changed, 2 insertions(+), 1 dele
Fixes: 043d222f93ab ("tuntap: accept an array of XDP buffs through sendmsg()")
Reviewed-by: Toshiaki Makita
Signed-off-by: Prashant Bhole
---
drivers/net/tun.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index e244f5d7512a..6e3
On 11/28/2018 10:06 PM, Mauricio Vasquez wrote:
On 11/28/18 3:45 AM, Daniel Borkmann wrote:
On 11/28/2018 08:51 AM, Prashant Bhole wrote:
This patch adds tests to check whether bpf verifier prevents lookup
on queue/stack maps
Signed-off-by: Prashant Bhole
---
tools/testing/selftests
Since commit 509db2833e0d ("bpf: error handling when map_lookup_elem
isn't supported") when map lookup isn't supported, the map_lookup_elem
function should return ERR_PTR(-EOPNOTSUPP).
Fixes: f1a2e44a3aec ("bpf: add queue and stack maps")
Signed-off-by: Prashant Bh
This set fixes map_lookup_elem return value for queue/stack map.
Also adds verifier tests to check whether verifier prevents lookup on
these maps.
Note that patch 2 isn't dependant on patch 1. The verifier prevents
lookup on queue/stack map because key size is zero.
Prashant Bhole (2):
bpf
This patch adds tests to check whether bpf verifier prevents lookup
on queue/stack maps
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_verifier.c | 52 +
1 file changed, 52 insertions(+)
diff --git a/tools/testing/selftests/bpf/test_verifier.c
b/tools
On 10/25/2018 5:54 PM, Naresh Kamboju wrote:
On Tue, 9 Oct 2018 at 12:32, Song Liu wrote:
On Mon, Oct 8, 2018 at 6:07 PM Prashant Bhole
wrote:
map_lookup_elem isn't supported by certain map types like:
- BPF_MAP_TYPE_PROG_ARRAY
- BPF_MAP_TYPE_STACK_TRACE
- BPF_MAP_TYPE_XSKMAP
.
Signed-off-by: Prashant Bhole
Acked-by: Alexei Starovoitov
---
tools/testing/selftests/bpf/test_verifier.c | 121 +++-
1 file changed, 120 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_verifier.c
b/tools/testing/selftests/bpf/test_verifier.c
index
id 45
[
"key": ["0x0a","0x00","0x00","0x00"
],
"value": {
"error": "Operation not supported"
},
"key": ["0x0b","0x00","0x00","0x00"
do_dump() function in bpftool/map.c has deep indentations. In order
to reduce deep indent, let's move element printing code out of
do_dump() into dump_map_elem() function.
Signed-off-by: Prashant Bhole
Acked-by: Jakub Kicinski
Acked-by: Alexei Starovoitov
---
tools/bpf/bpftool/map.c | 83
Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below
map types:
- BPF_MAP_TYPE_PROG_ARRAY
- BPF_MAP_TYPE_STACK_TRACE
- BPF_MAP_TYPE_XSKMAP
- BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH
Signed-off-by: Prashant Bhole
Acked-by: Alexei Starovoitov
---
kernel/bpf/arraymap.c | 2
ap2 -> fixup_map_hash_48b
fixup_map3 -> fixup_map_hash_16b
fixup_map4 -> fixup_map_array_48b
Suggested-by: Alexei Starovoitov
Signed-off-by: Prashant Bhole
Acked-by: Alexei Starovoitov
---
tools/testing/selftests/bpf/test_verifier.c | 380 ++--
1 file changed, 190 insertions(+), 1
-EOPNOTSUPP if lookup is not supported.
The errno for bpf syscall for BPF_MAP_LOOKUP_ELEM command will be set
to EOPNOTSUPP if map lookup is not supported.
Signed-off-by: Prashant Bhole
Acked-by: Alexei Starovoitov
---
kernel/bpf/syscall.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions
s to check whether verifier rejects call
to bpf_map_lookup_elem from bpf program. For all map types those
do not support map lookup.
Prashant Bhole (6):
bpf: error handling when map_lookup_elem isn't supported
bpf: return EOPNOTSUPP when map lookup isn't supported
tools/bpf: bpftool, split th
On 10/9/2018 9:43 AM, Daniel Borkmann wrote:
On 10/09/2018 02:02 AM, Prashant Bhole wrote:
On 10/6/2018 3:35 AM, Alexei Starovoitov wrote:
On Fri, Oct 05, 2018 at 12:35:55PM +0900, Prashant Bhole wrote:
Currently when map a lookup fails, user space API can not make any
distinction whether
On 10/6/2018 3:35 AM, Alexei Starovoitov wrote:
On Fri, Oct 05, 2018 at 12:35:55PM +0900, Prashant Bhole wrote:
Currently when map a lookup fails, user space API can not make any
distinction whether given key was not found or lookup is not supported
by particular map.
In this series we
On 10/5/2018 10:51 AM, Alexei Starovoitov wrote:
On Tue, Oct 02, 2018 at 02:35:19PM +0900, Prashant Bhole wrote:
map_lookup_elem isn't supported by certain map types like:
- BPF_MAP_TYPE_PROG_ARRAY
- BPF_MAP_TYPE_STACK_TRACE
- BPF_MAP_TYPE_XSKMAP
- BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH
On 10/5/2018 9:10 AM, Alexei Starovoitov wrote:
On Tue, Oct 02, 2018 at 02:35:16PM +0900, Prashant Bhole wrote:
Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below
map types:
- BPF_MAP_TYPE_PROG_ARRAY
- BPF_MAP_TYPE_STACK_TRACE
- BPF_MAP_TYPE_XSKMAP
- BPF_MAP_TYPE_SOCKMAP
Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below
map types:
- BPF_MAP_TYPE_PROG_ARRAY
- BPF_MAP_TYPE_STACK_TRACE
- BPF_MAP_TYPE_XSKMAP
- BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH
Signed-off-by: Prashant Bhole
---
kernel/bpf/arraymap.c | 2 +-
kernel/bpf/sockmap.c | 2
.
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_verifier.c | 121 +++-
1 file changed, 120 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_verifier.c
b/tools/testing/selftests/bpf/test_verifier.c
index c7d25f23baf9..afa7e67f66e4
id 45
[
"key": ["0x0a","0x00","0x00","0x00"
],
"value": {
"error": "Operation not supported"
},
"key": ["0x0b","0x00","0x00","0x
do_dump() function in bpftool/map.c has deep indentations. In order
to reduce deep indent, let's move element printing code out of
do_dump() into dump_map_elem() function.
Signed-off-by: Prashant Bhole
---
tools/bpf/bpftool/map.c | 83 -
1 file changed
-EOPNOTSUPP if lookup is not supported.
The errno for bpf syscall for BPF_MAP_LOOKUP_ELEM command will be set
to EOPNOTSUPP if map lookup is not supported.
Signed-off-by: Prashant Bhole
---
kernel/bpf/syscall.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf
or all map types those
do not support map lookup.
v2:
- bpftool: all nit-pick fixes pointed out by Jakub
- bpftool: removed usage of error strings. Now using strerror(),
suggested by Jakub
- added tests in verifier_tests, suggested by Alexei
Prashant Bhole (5):
bpf: error handling when map_l
On 9/21/2018 12:59 AM, Jakub Kicinski wrote:
On Thu, 20 Sep 2018 14:04:19 +0900, Prashant Bhole wrote:
On 9/20/2018 12:29 AM, Jakub Kicinski wrote:
On Wed, 19 Sep 2018 16:51:43 +0900, Prashant Bhole wrote:
Let's add a check for EOPNOTSUPP error when map lookup is failed.
Also in case map
resent in
sockex3_kern.c. Hence renaming it in both files sockex3_user.c and
sockex3_kern.c
Signed-off-by: Prashant Bhole
---
samples/bpf/sockex2_kern.c | 11 ++-
samples/bpf/sockex3_kern.c | 8
samples/bpf/sockex3_user.c | 4 ++--
3 files changed, 12 insertions(+), 11 deletions(-)
d
On 9/20/2018 12:29 AM, Jakub Kicinski wrote:
On Wed, 19 Sep 2018 16:51:43 +0900, Prashant Bhole wrote:
Let's add a check for EOPNOTSUPP error when map lookup is failed.
Also in case map doesn't support lookup, the output of map dump is
changed from "can't lookup element"
On 9/20/2018 12:29 AM, Jakub Kicinski wrote:
On Wed, 19 Sep 2018 16:51:43 +0900, Prashant Bhole wrote:
Let's add a check for EOPNOTSUPP error when map lookup is failed.
Also in case map doesn't support lookup, the output of map dump is
changed from "can't lookup element"
On 9/20/2018 12:26 AM, Jakub Kicinski wrote:
On Wed, 19 Sep 2018 16:51:42 +0900, Prashant Bhole wrote:
+static int dump_map_elem(int fd, void *key, void *value,
+struct bpf_map_info *map_info, struct btf *btf,
+json_writer_t *btf_wtr
On 9/20/2018 12:14 AM, Alexei Starovoitov wrote:
On Wed, Sep 19, 2018 at 04:51:41PM +0900, Prashant Bhole wrote:
Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below
map types:
- BPF_MAP_TYPE_PROG_ARRAY
- BPF_MAP_TYPE_STACK_TRACE
- BPF_MAP_TYPE_XSKMAP
- BPF_MAP_TYPE_SOCKMAP
On 9/20/2018 3:40 AM, Mauricio Vasquez wrote:
On 09/19/2018 10:14 AM, Alexei Starovoitov wrote:
On Wed, Sep 19, 2018 at 04:51:41PM +0900, Prashant Bhole wrote:
Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below
map types:
- BPF_MAP_TYPE_PROG_ARRAY
-EOPNOTSUPP if lookup is not supported.
The errno for bpf syscall for BPF_MAP_LOOKUP_ELEM command will be set
to EOPNOTSUPP if map lookup is not supported.
Signed-off-by: Prashant Bhole
---
kernel/bpf/syscall.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf
do_dump() function in bpftool/map.c has deep indentations. In order
to reduce deep indent, let's move element printing code out of
do_dump() into dump_map_elem() function.
Signed-off-by: Prashant Bhole
---
tools/bpf/bpftool/map.c | 83 -
1 file changed
},
"key": ["0x0b","0x00","0x00","0x00"
],
"value": {
"error": "lookup not supported for this map"
}
]
root# bpftool map dump id 45
key:
0a 00 00 00
value:
lookup not supported for this map
key:
0b 00
Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below
map types:
- BPF_MAP_TYPE_PROG_ARRAY
- BPF_MAP_TYPE_STACK_TRACE
- BPF_MAP_TYPE_XSKMAP
- BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH
Signed-off-by: Prashant Bhole
---
kernel/bpf/arraymap.c | 2 +-
kernel/bpf/sockmap.c | 2
: Changes to bpftool to do additional checking for errno when
map lookup is failed. In case of EOPNOTSUPP errno, it prints message
"lookup not supported for this map"
Prashant Bhole (4):
bpf: error handling when map_lookup_elem isn't supported
bpf: return EOPNOTSUPP when map lookup isn't
When listed all maps, bpftool currently shows (null) for xskmap.
Added xskmap type in map_type_name[] to show correct type.
Signed-off-by: Prashant Bhole
---
tools/bpf/bpftool/map.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index
- xsks_map size was fixed to 4, changed it MAX_SOCKS
- Remove redundant definition of MAX_SOCKS in xdpsock_user.c
- In dump_stats(), add NULL check for xsks[i]
Signed-off-by: Prashant Bhole
---
samples/bpf/xdpsock_kern.c | 2 +-
samples/bpf/xdpsock_user.c | 3 +--
2 files changed, 2 insertions
Since xdp_umem_query() was added one assignment of bpf.command was
missed from cleanup. Removing the assignment statement.
Fixes: 84c6b86875e01a0 ("xsk: don't allow umem replace at stack level")
Signed-off-by: Prashant Bhole
---
net/xdp/xdp_umem.c | 2 --
1 file changed, 2 deletion
s/ENOTSUPP/EOPNOTSUPP/ in function umem_assign_dev().
This function's return value is directly returned by xsk_bind().
EOPNOTSUPP is bind()'s possible return value.
Fixes: f734607e819b ("xsk: refactor xdp_umem_assign_dev()")
Signed-off-by: Prashant Bhole
---
net/xdp/xdp_umem.c | 4 ++
On 7/25/2018 8:02 AM, Yonghong Song wrote:
On 7/24/18 3:40 PM, John Fastabend wrote:
On 07/24/2018 08:45 AM, Yonghong Song wrote:
In one of our production machines, tools/testing/selftests/bpf
test_sockmap failed randomly like below:
...
[TEST 78]: (512, 1, 1, sendmsg, pass,apply 1,): rx
uced possibility of this bug.
This patch moves ipv6hdr pointer assignment after skb_cow_head() call.
Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Signed-off-by: Prashant Bhole
---
net/ipv6/ip6_gre.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
On 7/12/2018 7:39 AM, Tyler Hicks wrote:
Starting with the following net-next commit, I see a BUG when starting a
LXD container inside of a KVM guest using virtio-net:
d4546c2509b1 net: Convert GRO SKB handling to list_head.
Recently I encountered KASAN:use-after-free BUG and git bisect
0011 0001
[ 148.529547] page dumped because: kasan: bad access detected
Fixes: d4546c2509b1 ("net: Convert GRO SKB handling to list_head.")
Signed-off-by: Prashant Bhole
Reported-by: Tyler Hicks
---
net/core/dev.c | 6 --
1 file changed, 4 insertions(+), 2 dele
[ 345.432629] ? kasan_report+0xb4/0x410
[ 345.432629] kasan_report.cold.4+0x8f/0x91
[ 345.432629] ? rtnl_newlink+0x400/0x1110
[ 345.432629] rtnl_newlink+0x400/0x1110
[...]
Fixes: ccf8dbcd062a ("rtnetlink: Remove VLA usage")
Signed-off-by: Prashant Bhole
---
net/core/rtnetlink.c | 2
Print values of test options like apply, cork, start, end so that
individual failed tests can be identified for manual run
Acked-by: John Fastabend
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_sockmap.c | 28 +++---
1 file changed, 19 insertions(+), 9
: 16962b2404ac ("bpf: sockmap, add selftests")
Acked-by: John Fastabend
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_sockmap.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testing
as they are expected to timeout
Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_sockmap.c | 27 +-
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_so
and reduce
run time by reducing number of iterations in some tests
Changes in v3:
- Skipped error checking for corked tests
Prashant Bhole (5):
selftests/bpf: test_sockmap, check test failure
selftests/bpf: test_sockmap, join cgroup in selftest mode
selftests/bpf: test_sockmap, timing
("bpf: reduce runtime of test_sockmap tests")
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_sockmap.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testing/selftests/bpf/test_sockm
In case of selftest mode, temporary cgroup environment is created but
cgroup is not joined. It causes test failures. Fixed by joining the
cgroup
Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Acked-by: John Fastabend
Signed-off-by: Prashant Bhole
---
tools/testing/sel
On 5/31/2018 4:59 AM, John Fastabend wrote:
On 05/30/2018 12:29 PM, Alexei Starovoitov wrote:
On Wed, May 30, 2018 at 02:56:09PM +0900, Prashant Bhole wrote:
In order to reduce runtime of tests, recently timout for select() call
was reduced from 1sec to 10usec. This was causing many tests
ntime of test_sockmap tests")
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_sockmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testing/selftests/bpf/test_sockmap.c
index 64f9e25c451f..9d01f5c2a
: 16962b2404ac ("bpf: sockmap, add selftests")
Acked-by: John Fastabend
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_sockmap.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testing
Print values of test options like apply, cork, start, end so that
individual failed tests can be identified for manual run
Acked-by: John Fastabend
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_sockmap.c | 28 +++---
1 file changed, 19 insertions(+), 9
In case of selftest mode, temporary cgroup environment is created but
cgroup is not joined. It causes test failures. Fixed by joining the
cgroup
Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Acked-by: John Fastabend
Signed-off-by: Prashant Bhole
---
tools/testing/sel
that parameters for all tests are displayed.
Changes in v3:
- Skipped error checking for corked tests
Prashant Bhole (5):
selftests/bpf: test_sockmap, check test failure
selftests/bpf: test_sockmap, join cgroup in selftest mode
selftests/bpf: test_sockmap, fix test timeout
selftests/bpf
as they are expected to timeout
Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Signed-off-by: Prashant Bhole
---
tools/testing/selftests/bpf/test_sockmap.c | 25 --
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_so
On 5/30/2018 2:12 PM, John Fastabend wrote:
On 05/29/2018 05:44 PM, Prashant Bhole wrote:
On 5/30/2018 12:48 AM, John Fastabend wrote:
On 05/27/2018 09:37 PM, Prashant Bhole wrote:
This series fixes error handling, timeout and data verification in
test_sockmap. Previously it was not able
On 5/30/2018 12:48 AM, John Fastabend wrote:
On 05/27/2018 09:37 PM, Prashant Bhole wrote:
This series fixes error handling, timeout and data verification in
test_sockmap. Previously it was not able to detect failure/timeout in
RX/TX thread because error was not notified to the main thread
] ? ip_local_deliver_finish+0xfc/0x770
[ 195.716967] ? raw_rcv+0x2b0/0x2b0
[ 195.718856] ? lock_release+0xa00/0xa00
[ 195.720938] ip_local_deliver_finish+0x1b9/0x770
[...]
Fixes: 2c205dd3981f ("netfilter: add struct nf_nat_hook and use it")
Signed-off-by: Prashant Bhole <bhole_prashant...@
Print values of test options like apply, cork, start, end so that
individual failed tests can be identified for manual run
Acked-by: John Fastabend <john.fastab...@gmail.com>
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/bpf/test_so
: 16962b2404ac ("bpf: sockmap, add selftests")
Acked-by: John Fastabend <john.fastab...@gmail.com>
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/bpf/test_sockmap.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(
ntime of test_sockmap tests")
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/bpf/test_sockmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testing/selftests/bpf/test
In case of selftest mode, temporary cgroup environment is created but
cgroup is not joined. It causes test failures. Fixed by joining the
cgroup
Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Acked-by: John Fastabend <john.fastab...@gmail.com>
Signed-off-by: Prashant Bhole
, add selftests")
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/bpf/test_sockmap.c | 25 --
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testi
that parameters for all tests are displayed.
Prashant Bhole (5):
selftests/bpf: test_sockmap, check test failure
selftests/bpf: test_sockmap, join cgroup in selftest mode
selftests/bpf: test_sockmap, fix test timeout
selftests/bpf: test_sockmap, fix data verification
selftests/bpf
On 5/25/2018 11:01 PM, John Fastabend wrote:
On 05/25/2018 01:28 AM, Prashant Bhole wrote:
On 5/24/2018 1:58 PM, John Fastabend wrote:
On 05/23/2018 09:47 PM, Prashant Bhole wrote:
On 5/23/2018 6:44 PM, Prashant Bhole wrote:
On 5/22/2018 2:08 AM, John Fastabend wrote:
On 05/20/2018 10
On 5/24/2018 1:58 PM, John Fastabend wrote:
On 05/23/2018 09:47 PM, Prashant Bhole wrote:
On 5/23/2018 6:44 PM, Prashant Bhole wrote:
On 5/22/2018 2:08 AM, John Fastabend wrote:
On 05/20/2018 10:13 PM, Prashant Bhole wrote:
On 5/19/2018 1:42 AM, John Fastabend wrote:
On 05/18/2018
On 5/23/2018 6:44 PM, Prashant Bhole wrote:
On 5/22/2018 2:08 AM, John Fastabend wrote:
On 05/20/2018 10:13 PM, Prashant Bhole wrote:
On 5/19/2018 1:42 AM, John Fastabend wrote:
On 05/18/2018 12:17 AM, Prashant Bhole wrote:
This series fixes bugs in test_sockmap code. They weren't
On 5/22/2018 2:08 AM, John Fastabend wrote:
On 05/20/2018 10:13 PM, Prashant Bhole wrote:
On 5/19/2018 1:42 AM, John Fastabend wrote:
On 05/18/2018 12:17 AM, Prashant Bhole wrote:
This series fixes bugs in test_sockmap code. They weren't caught
previously because failure in RX/TX thread
On 5/19/2018 1:54 AM, Shuah Khan wrote:
On 05/18/2018 01:17 AM, Prashant Bhole wrote:
This series fixes bugs in test_sockmap code. They weren't caught
previously because failure in RX/TX thread was not notified to the
main thread.
Also fixed data verification logic and slightly improved test
On 5/19/2018 1:42 AM, John Fastabend wrote:
On 05/18/2018 12:17 AM, Prashant Bhole wrote:
This series fixes bugs in test_sockmap code. They weren't caught
previously because failure in RX/TX thread was not notified to the
main thread.
Also fixed data verification logic and slightly improved
On 5/19/2018 1:45 AM, John Fastabend wrote:
On 05/18/2018 12:17 AM, Prashant Bhole wrote:
In case of selftest mode, temporary cgroup environment is created but
cgroup is not joined. It causes test failures. Fixed by joining the
cgroup
Fixes: 16962b2404ac ("bpf: sockmap, add self
On 5/19/2018 1:47 AM, John Fastabend wrote:
On 05/18/2018 12:17 AM, Prashant Bhole wrote:
In order to reduce runtime of tests, recently timout for select() call
was reduced from 1sec to 10usec. This was causing many tests failures.
It was caught with failure handling commits in this series
Print values of test options like apply, cork, start, end so that
individual failed tests can be identified for manual run
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/bpf/test_sockmap.c | 28 +++-
1 file chang
: 16962b2404ac ("bpf: sockmap, add selftests")
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/bpf/test_sockmap.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
, add selftests")
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/bpf/test_sockmap.c | 25 +++--
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testi
In case of selftest mode, temporary cgroup environment is created but
cgroup is not joined. It causes test failures. Fixed by joining the
cgroup
Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testi
ntime of test_sockmap tests")
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/bpf/test_sockmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testing/selftests/bpf/test
seen.
Note: Even after fixing above problems there are issues with tests
which set cork parameter. Tests fail (RX thread timeout) when cork
value is non-zero and overall data sent by TX thread isn't multiples
of cork value.
Prashant Bhole (5):
selftests/bpf: test_sockmap, check test failure
Updated optstring parameter for getopt_long() to accept short options.
Also updated usage() function.
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
samples/bpf/xdp_monitor_user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sampl
On 5/12/2018 1:31 AM, Jesper Dangaard Brouer wrote:
On Fri, 11 May 2018 10:37:51 +0900
Prashant Bhole <bhole_prashant...@lab.ntt.co.jp> wrote:
updated optstring accept short options
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
samples/bpf/xdp_monito
updated optstring accept short options
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
samples/bpf/xdp_monitor_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/xdp_monitor_user.c b/samples/bpf/xdp_monitor_user.c
index 894bc6
sync the header from include/uapi/linux/bpf.h which was updated to add
fib lookup helper function. This fixes selftests/bpf build failure
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/include/uapi/linux/bpf.h | 84 +-
is zeroed out
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
include/linux/scatterlist.h | 18 ++
lib/scatterlist.c | 9 +
2 files changed, 19 insertions(+), 8 deletions(-)
diff --g
.
So Daniel Borkmann suggested to define another static inline function
in scatterlist.h which only initializes sg_magic. Also this function
will be called from sg_init_table. From this suggestion I defined a
function sg_init_marker() which sets sg_magic and calls sg_mark_end()
Prashant Bhole (2
re-initialized.
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
kernel/bpf/sockmap.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 69c5bccabd22..b4f01656c452 100644
--- a/kernel/bpf/sockma
On 3/28/2018 5:51 PM, Daniel Borkmann wrote:
On 03/28/2018 08:18 AM, Prashant Bhole wrote:
On 3/27/2018 6:05 PM, Daniel Borkmann wrote:
On 03/27/2018 10:41 AM, Prashant Bhole wrote:
On 3/27/2018 12:15 PM, John Fastabend wrote:
On 03/25/2018 11:54 PM, Prashant Bhole wrote:
When
On 3/27/2018 6:05 PM, Daniel Borkmann wrote:
On 03/27/2018 10:41 AM, Prashant Bhole wrote:
On 3/27/2018 12:15 PM, John Fastabend wrote:
On 03/25/2018 11:54 PM, Prashant Bhole wrote:
When CONFIG_DEBUG_SG is set, sg->sg_magic is initialized to SG_MAGIC,
when sg table is initialized us
On 3/27/2018 12:15 PM, John Fastabend wrote:
On 03/25/2018 11:54 PM, Prashant Bhole wrote:
When CONFIG_DEBUG_SG is set, sg->sg_magic is initialized to SG_MAGIC,
when sg table is initialized using sg_init_table(). Magic is checked
while navigating the scatterlist. We hit BUG_ON when ma
off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
kernel/bpf/sockmap.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 69c5bccabd22..8a848a99d768 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
execute the subprocess in netns using 'ip netns exec'
Fixes: cc30c93fa020 ("selftests/net: ignore background traffic in psock_fanout")
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/net/in_netns.sh | 2 +-
1 file changed, 1 insertio
This patch removes testns after test failure so that next test can
continue with clean ns
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/net/rtnetlink.sh | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftes
test_cgrp2_sock.sh and test_cgrp2_sock2.sh tests keep the program
attached to cgroup even after completion.
Using detach functionality of test_cgrp2_sock in both scripts.
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
samples/bpf/test_cgrp2_sock.sh | 1 +
sampl
eBPF test fails due to verifier failure because log_buf is too small.
Fixed by increasing log_buf size
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
v2: log_buf is statically allocated
tools/testing/selftests/net/psock_fanout.c | 3 ++-
1 file changed, 2 insertions
eBPF test fails due to verifier failure because log_buf is too small
Fixed by increasing log_buf size
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
tools/testing/selftests/net/psock_fanout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/t
samples/sockops program keeps the sock_ops program attached to cgroup.
Fixed this by detaching program before exit.
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
samples/sockmap/sockmap_user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/samples/s
While building samples/sockmap, undefined reference error is thrown
for `nla_dump_errormsg'.
Linking tools/lib/bpf/nlattr.o as a fix
Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp>
---
samples/sockmap/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
1 - 100 of 143 matches
Mail list logo