Lines Matching +full:recv +full:- +full:empty

1 // SPDX-License-Identifier: GPL-2.0-only
55 /* -1 is an invalid flag. */ in test_hashmap()
56 assert(bpf_map_update_elem(fd, &key, &value, -1) < 0 && in test_hashmap()
120 /* Check that map is empty. */ in test_hashmap()
187 /* -1 is an invalid flag. */ in test_hashmap_percpu()
188 assert(bpf_map_update_elem(fd, &key, value, -1) < 0 && in test_hashmap_percpu()
254 /* Check that map is empty. */ in test_hashmap_percpu()
317 assert(value[0] - 1 == key); in test_hashmap_walk()
443 bpf_percpu(values, nr_cpus - 1) == 0); in test_arraymap_percpu()
483 printf("Failed to create per-cpu arraymap '%s'!\n", in test_arraymap_percpu_many_keys()
625 assert(bpf_map_lookup_elem(fd, NULL, &val) == 0 && val == vals[i - 1]); in test_stackmap()
632 for (i = MAP_SIZE + MAP_SIZE/2 - 1; i >= MAP_SIZE/2; i--) in test_stackmap()
716 addr.sin_port = htons(ports[i - 2]); in test_sockmap()
726 sfd[i] = accept(sfd[i - 4], NULL, NULL); in test_sockmap()
773 err = bpf_prog_attach(-1, fd, BPF_SK_SKB_STREAM_PARSER, 0); in test_sockmap()
779 err = bpf_prog_attach(-1, fd, BPF_SK_SKB_STREAM_VERDICT, 0); in test_sockmap()
785 err = bpf_prog_attach(-1, fd, BPF_SK_MSG_VERDICT, 0); in test_sockmap()
791 err = bpf_prog_attach(-1, fd, __MAX_BPF_ATTACH_TYPE, 0); in test_sockmap()
799 printf("Failed empty parser prog detach\n"); in test_sockmap()
805 printf("Failed empty verdict prog detach\n"); in test_sockmap()
811 printf("Failed empty msg verdict prog detach\n"); in test_sockmap()
941 /* Test map delete elem and remove send/recv sockets */ in test_sockmap()
965 /* Test map send/recv */ in test_sockmap()
980 if (s == -1) { in test_sockmap()
989 printf("Failed sockmap select/recv\n"); in test_sockmap()
993 rc = recv(sfd[3], buf, sizeof(buf), 0); in test_sockmap()
995 printf("Failed sockmap recv\n"); in test_sockmap()
1086 } else if (pid[i] == -1) { in test_sockmap()
1117 /* Test map close sockets and empty maps */ in test_sockmap()
1230 fd = -1; in test_map_in_map()
1328 key.c = -1; in test_map_large()
1334 key.c = -1; in test_map_large()
1365 } else if (pid[i] == -1) { in __run_parallel()
1411 return -errno; in map_update_retriable()
1417 attempts--; in map_update_retriable()
1429 return -errno; in map_delete_retriable()
1435 attempts--; in map_delete_retriable()
1501 key = -1; in test_map_parallel()
1508 key = MAP_SIZE - i - 1; in test_map_parallel()
1519 key = -1; in test_map_parallel()
1652 CHECK(fd64 == -1, "socket()", in prepare_reuseport_grp()
1658 CHECK(err == -1, "setsockopt(SO_REUSEPORT)", in prepare_reuseport_grp()
1676 CHECK(err == -1, "bind()", in prepare_reuseport_grp()
1682 CHECK(err == -1, "getsockname()", in prepare_reuseport_grp()
1689 CHECK(err == -1, "getsockopt(SO_COOKIE)", in prepare_reuseport_grp()
1695 * non-listening tcp sk. in prepare_reuseport_grp()
1700 "reuseport array update non-listening sk", in prepare_reuseport_grp()
1704 CHECK(err == -1, "listen()", in prepare_reuseport_grp()
1721 __s64 grpa_fds64[2] = { -1, -1 }, fd64 = -1; in test_reuseport_array()
1750 "reuseport array lookup not-exist elem", in test_reuseport_array()
1754 "reuseport array del not-exist elem", in test_reuseport_array()
1768 "reuseport array update empty elem BPF_EXIST", in test_reuseport_array()
1777 "reuseport array update empty elem BPF_NOEXIST", in test_reuseport_array()
1794 "reuseport array update non-empty elem BPF_NOEXIST", in test_reuseport_array()
1831 "reuseport array re-add with BPF_NOEXIST after del", in test_reuseport_array()
1837 "reuseport array lookup re-added sk", in test_reuseport_array()
1853 CHECK(fd64 == -1, "socket(SOCK_RAW)", "err:%d errno:%d\n", in test_reuseport_array()