/linux-master/kernel/bpf/ |
H A D | tcx.c | 254 u32 ifindex = 0; local 258 ifindex = tcx->dev->ifindex; 261 seq_printf(seq, "ifindex:\t%u\n", ifindex); 271 u32 ifindex = 0; local 275 ifindex = tcx->dev->ifindex; 278 info->tcx.ifindex = ifindex; [all...] |
/linux-master/samples/bpf/ |
H A D | xdp_sample_user.h | 39 int sample_install_xdp(struct bpf_program *xdp_prog, int ifindex, bool generic, 44 const char *get_driver_name(int ifindex); 45 int get_mac_addr(int ifindex, void *mac_addr);
|
H A D | xdp_router_ipv4.bpf.c | 19 int ifindex; member in struct:trie_value 37 int ifindex; member in struct:direct_map 125 forward_to = direct_entry->ifindex; 141 forward_to = prefix_value->ifindex;
|
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | kfree_skb.c | 7 int ifindex; member in struct:meta 28 if (CHECK(meta->ifindex != 1, "check_meta_ifindex", 29 "meta->ifindex = %d\n", meta->ifindex))
|
H A D | skb_ctx.c | 15 .ifindex = 1, 85 ASSERT_EQ(skb.ifindex, 1, "ctx_out_ifindex");
|
H A D | decap_sanity.c | 40 qdisc_hook.ifindex = if_nametoindex("lo"); 41 if (!ASSERT_GT(qdisc_hook.ifindex, 0, "if_nametoindex lo"))
|
H A D | vrf_socket_lookup.c | 110 int ret, ifindex; local 112 ifindex = if_nametoindex(ifname); 113 if (!ASSERT_NEQ(ifindex, 0, "if_nametoindex")) 115 hook.ifindex = ifindex; 126 ret = bpf_xdp_attach(ifindex, xdp_prog_fd, 0, NULL);
|
H A D | check_mtu.c | 68 CHECK(link_info.xdp.ifindex != IFINDEX_LO, "link_ifindex", 69 "got %u != exp %u\n", link_info.xdp.ifindex, IFINDEX_LO); 104 static void test_check_mtu_xdp(__u32 mtu, __u32 ifindex) argument 115 skel->rodata->GLOBAL_USER_IFINDEX = ifindex; 157 static void test_check_mtu_tc(__u32 mtu, __u32 ifindex) argument 168 skel->rodata->GLOBAL_USER_IFINDEX = ifindex; 198 if (test__start_subtest("bpf_check_mtu XDP-run ifindex-lookup")) 204 if (test__start_subtest("bpf_check_mtu TC-run ifindex-lookup"))
|
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | fexit_bpf2bpf.c | 122 int ifindex = skb->ifindex; local 139 if (ifindex != 1 || val != 3 || var != 1) 142 return 3; /* original get_skb_ifindex() returns val * ifindex * var */
|
H A D | core_kern.c | 47 return randmap(from_dev->ifindex, from_dev); 54 return randmap(dev->ifindex + skb->len, dev); 61 return randmap(dev->ifindex + skb->len, dev);
|
H A D | test_global_func2.c | 41 return skb->ifindex * val * var;
|
H A D | test_global_func1.c | 47 return skb->ifindex * val * var;
|
H A D | setget_sockopt.c | 279 int ifindex, zero = 0; local 285 &ifindex, sizeof(int)) || 286 ifindex != veth_ifindex) 293 &ifindex, sizeof(int)) || 294 ifindex != 0) 301 &ifindex, sizeof(int)) || 302 ifindex != veth_ifindex) 309 &ifindex, sizeof(int)) || 310 ifindex != 0)
|
/linux-master/net/netlabel/ |
H A D | netlabel_unlabeled.c | 83 int ifindex; member in struct:netlbl_unlhsh_iface 177 * @ifindex: the network interface/device to hash 186 static u32 netlbl_unlhsh_hash(int ifindex) argument 188 return ifindex & (netlbl_unlhsh_rcu_deref(netlbl_unlhsh)->size - 1); 193 * @ifindex: the network interface 197 * interface entry which matches @ifindex, otherwise NULL is returned. The 202 static struct netlbl_unlhsh_iface *netlbl_unlhsh_search_iface(int ifindex) argument 208 bkt = netlbl_unlhsh_hash(ifindex); 212 if (iter->valid && iter->ifindex == ifindex) 312 netlbl_unlhsh_add_iface(int ifindex) argument 373 int ifindex; local [all...] |
/linux-master/tools/bpf/bpftool/ |
H A D | netlink_dumper.c | 29 static int do_xdp_dump_one(struct nlattr *attr, unsigned int ifindex, argument 48 NET_DUMP_UINT("ifindex", "(%d)", ifindex); 162 const char *devname, int ifindex) 171 NET_DUMP_UINT("ifindex", "(%u)", ifindex); 161 do_filter_dump(struct tcmsg *info, struct nlattr **tb, const char *kind, const char *devname, int ifindex) argument
|
/linux-master/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ |
H A D | int_port.h | 34 int ifindex,
|
/linux-master/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/ |
H A D | mirred_nic.c | 41 attr->parse_attr->mirred_ifindex[0] = act->dev->ifindex;
|
/linux-master/tools/testing/selftests/bpf/ |
H A D | xdp_features.c | 29 int ifindex; member in struct:env 186 env.ifindex = if_nametoindex(arg); 187 if (!env.ifindex) 188 env.ifindex = strtoul(arg, NULL, 0); 189 if (!env.ifindex || !if_indextoname(env.ifindex, env.ifname)) { 214 env.ifindex = -ENODEV; 287 .ifindex = env.ifindex, 332 err = bpf_xdp_attach(env.ifindex, bpf_program__f [all...] |
H A D | xsk.h | 206 int xsk_attach_xdp_program(struct bpf_program *prog, int ifindex, u32 xdp_flags); 207 void xsk_detach_xdp_program(int ifindex, u32 xdp_flags); 210 bool xsk_is_in_mode(u32 ifindex, int mode); 225 int ifindex, __u32 queue_id, 231 int ifindex, 243 int xsk_set_mtu(int ifindex, int mtu);
|
H A D | xsk.c | 74 int ifindex; member in struct:xsk_ctx 281 bool xsk_is_in_mode(u32 ifindex, int mode) argument 286 ret = bpf_xdp_query(ifindex, mode, &opts); 393 int xsk_set_mtu(int ifindex, int mtu) argument 408 req.msg.ifi_index = ifindex; 426 int xsk_attach_xdp_program(struct bpf_program *prog, int ifindex, u32 xdp_flags) argument 431 return bpf_xdp_attach(ifindex, prog_fd, xdp_flags, NULL); 434 void xsk_detach_xdp_program(int ifindex, u32 xdp_flags) argument 436 bpf_xdp_detach(ifindex, xdp_flags, NULL); 458 static struct xsk_ctx *xsk_get_ctx(struct xsk_umem *umem, int ifindex, argument 502 xsk_create_ctx(struct xsk_socket *xsk, struct xsk_umem *umem, int ifindex, __u32 queue_id, struct xsk_ring_prod *fill, struct xsk_ring_cons *comp) argument 538 xsk_socket__create_shared(struct xsk_socket **xsk_ptr, int ifindex, __u32 queue_id, struct xsk_umem *umem, struct xsk_ring_cons *rx, struct xsk_ring_prod *tx, struct xsk_ring_prod *fill, struct xsk_ring_cons *comp, const struct xsk_socket_config *usr_config) argument 708 xsk_socket__create(struct xsk_socket **xsk_ptr, int ifindex, __u32 queue_id, struct xsk_umem *umem, struct xsk_ring_cons *rx, struct xsk_ring_prod *tx, const struct xsk_socket_config *usr_config) argument [all...] |
/linux-master/tools/testing/selftests/net/ |
H A D | nettest.c | 95 int ifindex; member in struct:sock_args 284 if ((args->ifindex && args->bind_key_ifindex >= 0) || args->bind_key_ifindex >= 1) { 288 md5sig.tcpm_ifindex = args->ifindex; 395 int ifindex = 0; local 401 ifindex = get_ifidx(name); 404 *name ? name : "<none>", ifindex); 409 if (args->expected_ifindex != ifindex) { 411 args->expected_ifindex, ifindex); 416 args->expected_ifindex, ifindex); 469 static int set_unicast_if(int sd, int ifindex, in argument 488 set_multicast_if(int sd, int ifindex) argument 500 set_membership(int sd, uint32_t grp, uint32_t addr, int ifindex) argument 909 int ifindex = 0; local 961 send_msg_cmsg(int sd, void *addr, socklen_t alen, int ifindex, int version) argument 1064 int ifindex; local [all...] |
H A D | tap.c | 179 int ifindex; local 181 ifindex = if_nametoindex(param_dev_dummy_name); 182 if (ifindex == 0) { 183 fprintf(stderr, "%s: ifindex %s\n", __func__, strerror(errno)); 187 rtattr_add_any(nh, IFLA_LINK, &ifindex, sizeof(ifindex)); 195 int ifindex; local 200 ifindex = if_nametoindex(devname); 201 if (ifindex == 0) { 202 fprintf(stderr, "%s: ifindex [all...] |
/linux-master/include/linux/ |
H A D | if_pppox.h | 26 int ifindex; /* ifindex of device associated with socket */ member in struct:pppoe_opt 54 #define pppoe_ifindex proto.pppoe.ifindex
|
/linux-master/net/dcb/ |
H A D | dcbnl.c | 1226 if (itr->ifindex == netdev->ifindex) { 1251 if (itr->ifindex == netdev->ifindex) { 1413 if (itr->ifindex == netdev->ifindex) { 1971 int ifindex, int proto) 1978 itr->ifindex == ifindex && 1987 int ifindex, in 1970 dcb_rewr_lookup(const struct dcb_app *app, int ifindex, int proto) argument 1986 dcb_app_lookup(const struct dcb_app *app, int ifindex, int prio) argument 2002 dcb_app_add(struct list_head *list, const struct dcb_app *app, int ifindex) argument 2241 int ifindex = dev->ifindex; local 2267 int ifindex = dev->ifindex; local 2296 int ifindex = dev->ifindex; local 2326 int ifindex = dev->ifindex; local 2355 int ifindex = dev->ifindex; local [all...] |
/linux-master/net/ipv6/ila/ |
H A D | ila_xlat.c | 14 int ifindex; member in struct:ila_xlat_params 55 struct ila_addr *iaddr, int ifindex) 57 return (ila->xp.ifindex && ila->xp.ifindex != ifindex); 63 return (ila->xp.ifindex != xp->ifindex); 78 if (ila->xp.ifindex) 120 xp->ifindex = nla_get_s32(info->attrs[ILA_ATTR_IFINDEX]); 127 int ifindex, 54 ila_cmp_wildcards(struct ila_map *ila, struct ila_addr *iaddr, int ifindex) argument 126 ila_lookup_wildcards(struct ila_addr *iaddr, int ifindex, struct ila_net *ilan) argument [all...] |