Home
last modified time | relevance | path

Searched refs:ifname (Results 1 – 25 of 79) sorted by relevance

1234

/linux/tools/testing/selftests/net/
H A Dtun.c107 char ifname[IFNAMSIZ]; in FIXTURE() local
113 memset(self->ifname, 0, sizeof(self->ifname)); in FIXTURE_SETUP()
115 self->fd = tun_alloc(self->ifname); in FIXTURE_SETUP()
118 self->fd2 = tun_alloc(self->ifname); in FIXTURE_SETUP()
131 EXPECT_EQ(tun_delete(self->ifname), 0); in TEST_F()
132 EXPECT_EQ(tun_detach(self->fd, self->ifname), -1); in TEST_F()
137 EXPECT_EQ(tun_detach(self->fd, self->ifname), 0); in TEST_F()
138 EXPECT_EQ(tun_delete(self->ifname), 0); in TEST_F()
142 EXPECT_EQ(tun_detach(self->fd, self->ifname), 0); in TEST_F()
145 EXPECT_EQ(tun_delete(self->ifname), 0); in TEST_F()
[all …]
H A Dsrv6_hl2encap_red_l2vpn_test.sh508 local ifname="$4"
513 ip -netns "${nsname}" link set dev "${ifname}" down
516 dev "${ifname}"
521 dev "${ifname}" nodad
523 ip -netns "${nsname}" link set dev "${ifname}" up
/linux/tools/testing/selftests/net/lib/py/
H A Dnsim.py17 def __init__(self, nsimdev, port_index, ifname, ns=None): argument
21 match = nsimnamere.match(ifname)
25 self.ifname = ifname
30 ret = ip("-j link show dev %s" % ifname, ns=ns)
100 def _make_port(self, port_index, ifname): argument
101 return NetdevSim(self, port_index, ifname, self.ns)
107 for ifname in listdir:
108 ifnames.append(ifname)
/linux/tools/testing/selftests/bpf/
H A Dxdping.c99 char *ifname = NULL; in main() local
118 ifname = optarg; in main()
119 ifindex = if_nametoindex(ifname); in main()
122 ifname); in main()
142 if (!ifname) { in main()
198 printf("Setting up XDP for %s, please wait...\n", ifname); in main()
203 fprintf(stderr, "Link set xdp fd failed for %s\n", ifname); in main()
211 ifname); in main()
235 count, ifname, argv[optind]); in main()
H A Dxdp_features.c28 char ifname[IF_NAMESIZE]; member
189 if (!env.ifindex || !if_indextoname(env.ifindex, env.ifname)) { in parse_arg()
215 strcpy(env.ifname, "unknown"); in set_env_default()
261 env.ifname); in dut_run_echo_thread()
270 env.ifname, strerror(-err)); in dut_run_echo_thread()
335 env.ifname); in dut_attach_xdp_prog()
372 "Failed creating control socket on device %s\n", env.ifname); in dut_run()
380 env.ifname); in dut_run()
439 env.ifname); in dut_run()
559 env.ifname); in send_echo_msg()
[all …]
H A Dxdp_hw_metadata.c61 const char *ifname; variable
498 static int rxq_num(const char *ifname) in rxq_num() argument
507 strncpy(ifr.ifr_name, ifname, IF_NAMESIZE - 1); in rxq_num()
523 static void hwtstamp_ioctl(int op, const char *ifname, struct hwtstamp_config *cfg) in hwtstamp_ioctl() argument
528 strncpy(ifr.ifr_name, ifname, IF_NAMESIZE - 1); in hwtstamp_ioctl()
550 static void hwtstamp_enable(const char *ifname) in hwtstamp_enable() argument
556 hwtstamp_ioctl(SIOCGHWTSTAMP, ifname, &saved_hwtstamp_cfg); in hwtstamp_enable()
557 saved_hwtstamp_ifname = strdup(ifname); in hwtstamp_enable()
560 hwtstamp_ioctl(SIOCSHWTSTAMP, ifname, &cfg); in hwtstamp_enable()
652 ifname = argv[optind]; in read_args()
[all …]
H A Dnetwork_helpers.c574 int get_hw_ring_size(char *ifname, struct ethtool_ringparam *ring_param) in get_hw_ring_size() argument
583 memcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in get_hw_ring_size()
598 int set_hw_ring_size(char *ifname, struct ethtool_ringparam *ring_param) in set_hw_ring_size() argument
607 memcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); in set_hw_ring_size()
779 char *ifname, _ifname[IF_NAMESIZE]; in show_transport() local
785 ifname = if_indextoname(ifindex, _ifname); in show_transport()
786 if (!ifname) { in show_transport()
788 ifname = _ifname; in show_transport()
803 ifname, pkt_type_str(pkt_type), src_addr, dst_addr, len, in show_transport()
808 ifname, pkt_type_str(pkt_type), src_addr, dst_addr, len, in show_transport()
[all …]
H A Dxdp_redirect_multi.c47 char ifname[IF_NAMESIZE]; in get_mac_addr() local
55 if (!if_indextoname(ifindex, ifname)) in get_mac_addr()
58 strcpy(ifr.ifr_name, ifname); in get_mac_addr()
91 char ifname[IF_NAMESIZE]; in main() local
133 if (!if_indextoname(ifaces[i], ifname)) { in main()
/linux/tools/testing/selftests/drivers/net/team/
H A Ddev_addr_lists.sh22 local ifname
24 for ifname in "${ifnames[@]}"; do
25 ip link del "$ifname" &>/dev/null
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dvrf_socket_lookup.c84 static int make_server(int sotype, const char *ip, int port, const char *ifname) in make_server() argument
92 if (ifname) { in make_server()
94 ifname, strlen(ifname) + 1); in make_server()
105 static int attach_progs(char *ifname, int tc_prog_fd, int xdp_prog_fd) in attach_progs() argument
112 ifindex = if_nametoindex(ifname); in attach_progs()
/linux/tools/testing/selftests/drivers/net/bonding/
H A Ddev_addr_lists.sh25 local ifname
27 for ifname in "${ifnames[@]}"; do
28 ip link del "$ifname" &>/dev/null
/linux/samples/bpf/
H A Dxdp_fwd_user.c50 static int do_detach(int ifindex, const char *ifname, const char *app_name) in do_detach() argument
67 xdp_flags, ifname); in do_detach()
89 printf("ERROR: %s isn't attached to %s\n", app_name, ifname); in do_detach()
98 ifname, strerror(errno)); in do_detach()
/linux/drivers/net/bonding/
H A Dbond_sysfs.c62 static struct net_device *bond_get_by_name(const struct bond_net *bn, const char *ifname) in bond_get_by_name() argument
67 if (strncmp(bond->dev->name, ifname, IFNAMSIZ) == 0) in bond_get_by_name()
85 char *ifname; in bonding_store_bonds() local
89 ifname = command + 1; in bonding_store_bonds()
91 !dev_valid_name(ifname)) in bonding_store_bonds()
95 pr_info("%s is being created...\n", ifname); in bonding_store_bonds()
96 rv = bond_create(bn->net, ifname); in bonding_store_bonds()
99 pr_info("%s already exists\n", ifname); in bonding_store_bonds()
101 pr_info("%s creation failed\n", ifname); in bonding_store_bonds()
108 bond_dev = bond_get_by_name(bn, ifname); in bonding_store_bonds()
[all …]
/linux/tools/testing/selftests/tc-testing/plugin-lib/
H A DnsPlugin.py130 … ip.link('add', ifname=dev1, kind='veth', peer={'ifname': dev0, 'net_ns_fd':'/proc/1/ns/net'})
131 ip.link('add', ifname=dummy, kind='dummy')
137 dev1_idx = ip.link_lookup(ifname=dev1)[0]
138 dummy_idx = ip.link_lookup(ifname=dummy)[0]
154 dev0_idx = ip.link_lookup(ifname=dev0)[0]
/linux/include/uapi/linux/
H A Datmbr2684.h58 char ifname[IFNAMSIZ]; member
72 char ifname[IFNAMSIZ]; member
/linux/tools/testing/selftests/drivers/net/hw/lib/py/
H A Dlinkconfig.py57 ifname = self.partner_netif
68 ifname = self.cfg.ifname
199 process = ethtool(self.cfg.ifname, json=True)
/linux/drivers/net/can/
H A Dvxcan.c183 char ifname[IFNAMSIZ]; in vxcan_newlink() local
198 nla_strscpy(ifname, tbp[IFLA_IFNAME], IFNAMSIZ); in vxcan_newlink()
201 snprintf(ifname, IFNAMSIZ, DRV_NAME "%%d"); in vxcan_newlink()
205 peer = rtnl_create_link(peer_net, ifname, name_assign_type, in vxcan_newlink()
/linux/tools/testing/selftests/drivers/net/hw/
H A Drss_ctx.py37 stats = ip("-s -s link show dev " + cfg.ifname, json=True)[0]
368 expect_tuples = set([(cfg.ifname, -1)] + [(cfg.ifname, ctx_id) for ctx_id in ids])
374 ctx_tuples = set([ctx for ctx in tuples if ctx[0] == cfg.ifname])
390 ctxs = cfg.ethnl.rss_get({'header': {'dev-name': cfg.ifname}}, dump=True)
397 expect_tuples.remove((cfg.ifname, -1))
402 ctx_tuples = set([ctx for ctx in tuples if ctx[0] == cfg.ifname])
406 ctxs = cfg.ethnl.rss_get({'header': {'dev-name': cfg.ifname}, 'start-context': 1}, dump=True)
/linux/tools/testing/selftests/drivers/net/lib/py/
H A Dload.py49 pkt_start = ip("-s link show dev " + self.env.ifname, json=True)[0]["stats64"]["rx"]["packets"]
52 pkt_now = ip("-s link show dev " + self.env.ifname, json=True)[0]["stats64"]["rx"]["packets"]
/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
H A Dfweh.c159 brcmf_dbg(EVENT, "adding %s (%pM)\n", emsg->ifname, in brcmf_fweh_handle_if_event()
162 is_p2pdev, emsg->ifname, emsg->addr); in brcmf_fweh_handle_if_event()
290 memcpy(emsg.ifname, emsg_be->ifname, sizeof(emsg.ifname)); in brcmf_fweh_event_worker()
/linux/tools/net/ynl/samples/
H A Dnetdev.c21 char ifname[IF_NAMESIZE]; in netdev_print_device() local
27 name = if_indextoname(d->ifindex, ifname); in netdev_print_device()
/linux/net/l2tp/
H A Dl2tp_eth.c237 if (cfg->ifname) { in l2tp_eth_create()
238 strscpy(name, cfg->ifname, IFNAMSIZ); in l2tp_eth_create()
298 strscpy(session->ifname, dev->name, IFNAMSIZ); in l2tp_eth_create()
H A Dl2tp_core.h52 char *ifname; member
96 char ifname[IFNAMSIZ]; member
229 const char *ifname);
/linux/fs/smb/server/
H A Dtransport_tcp.c43 static struct interface *alloc_iface(char *ifname);
602 static struct interface *alloc_iface(char *ifname) in alloc_iface() argument
606 if (!ifname) in alloc_iface()
611 kfree(ifname); in alloc_iface()
615 iface->name = ifname; in alloc_iface()
/linux/tools/bpf/bpftool/
H A Dfeature.c146 char ifname[IF_NAMESIZE], path[64], buf[8]; in get_vendor_id() local
150 if (!if_indextoname(ifindex, ifname)) in get_vendor_id()
153 snprintf(path, sizeof(path), "/sys/class/net/%s/device/vendor", ifname); in get_vendor_id()
1165 char *ifname; in do_probe() local
1188 ifname = GET_ARG(); in do_probe()
1189 ifindex = if_nametoindex(ifname); in do_probe()
1191 p_err("unrecognized netdevice '%s': %s", ifname, in do_probe()

1234