Home
last modified time | relevance | path

Searched refs:tun (Results 1 – 25 of 45) sorted by relevance

12

/linux/drivers/net/
H A Dtun.c6 * $Id: tun.c,v 1.15 2002/03/01 02:44:24 maxk Exp $
30 #define DRV_NAME "tun"
135 struct tun_struct __rcu *tun;
163 struct tun_struct *tun;
228 static void tun_flow_init(struct tun_struct *tun);
229 static void tun_flow_uninit(struct tun_struct *tun);
282 static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile, in tun_napi_enable()
288 netif_napi_add_tx(tun->dev, &tfile->napi, tun_napi_poll); in tun_napi_disable()
332 static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun, in tun_flow_create()
339 netif_info(tun, tx_queue in tun_flow_create()
134 struct tun_struct __rcu *tun; global() member
162 struct tun_struct *tun; global() member
270 tun_napi_init(struct tun_struct * tun,struct tun_file * tfile,bool napi_en,bool napi_frags) tun_napi_init() argument
320 tun_flow_create(struct tun_struct * tun,struct hlist_head * head,u32 rxhash,u16 queue_index) tun_flow_create() argument
341 tun_flow_delete(struct tun_struct * tun,struct tun_flow_entry * e) tun_flow_delete() argument
350 tun_flow_flush(struct tun_struct * tun) tun_flow_flush() argument
365 tun_flow_delete_by_queue(struct tun_struct * tun,u16 queue_index) tun_flow_delete_by_queue() argument
384 struct tun_struct *tun = timer_container_of(tun, t, flow_gc_timer); tun_flow_cleanup() local
414 tun_flow_update(struct tun_struct * tun,u32 rxhash,struct tun_file * tfile) tun_flow_update() argument
464 tun_automq_select_queue(struct tun_struct * tun,struct sk_buff * skb) tun_automq_select_queue() argument
483 tun_ebpf_select_queue(struct tun_struct * tun,struct sk_buff * skb) tun_ebpf_select_queue() argument
503 struct tun_struct *tun = netdev_priv(dev); tun_select_queue() local
516 tun_not_capable(struct tun_struct * tun) tun_not_capable() argument
526 tun_set_real_num_queues(struct tun_struct * tun) tun_set_real_num_queues() argument
532 tun_disable_queue(struct tun_struct * tun,struct tun_file * tfile) tun_disable_queue() argument
541 struct tun_struct *tun = tfile->detached; tun_enable_queue() local
577 struct tun_struct *tun; __tun_detach() local
647 struct tun_struct *tun; tun_detach() local
664 struct tun_struct *tun = netdev_priv(dev); tun_detach_all() local
706 tun_force_wake_queue(struct tun_struct * tun,struct tun_file * tfile) tun_force_wake_queue() argument
725 tun_attach(struct tun_struct * tun,struct file * file,bool skip_filter,bool napi,bool napi_frags,bool publish_tun) tun_attach() argument
825 struct tun_struct *tun; tun_get() local
836 tun_put(struct tun_struct * tun) tun_put() argument
951 struct tun_struct *tun = netdev_priv(dev); tun_net_init() local
1005 struct tun_struct *tun = netdev_priv(dev); tun_net_close() local
1028 tun_automq_xmit(struct tun_struct * tun,struct sk_buff * skb) tun_automq_xmit() argument
1046 run_ebpf_filter(struct tun_struct * tun,struct sk_buff * skb,int len) run_ebpf_filter() argument
1062 struct tun_struct *tun = netdev_priv(dev); tun_net_xmit() local
1181 struct tun_struct *tun = netdev_priv(dev); tun_net_fix_features() local
1188 struct tun_struct *tun = netdev_priv(dev); tun_set_headroom() local
1204 struct tun_struct *tun = netdev_priv(dev); tun_net_get_stats64() local
1215 struct tun_struct *tun = netdev_priv(dev); tun_xdp_set() local
1255 struct tun_struct *tun = netdev_priv(dev); tun_net_change_carrier() local
1291 struct tun_struct *tun = netdev_priv(dev); tun_xdp_xmit() local
1369 tun_flow_init(struct tun_struct * tun) tun_flow_init() argument
1382 tun_flow_uninit(struct tun_struct * tun) tun_flow_uninit() argument
1394 struct tun_struct *tun = netdev_priv(dev); tun_net_initialize() local
1432 tun_sock_writeable(struct tun_struct * tun,struct tun_file * tfile) tun_sock_writeable() argument
1445 struct tun_struct *tun = tun_get(tfile); tun_chr_poll() local
1560 tun_rx_batched(struct tun_struct * tun,struct tun_file * tfile,struct sk_buff * skb,int more) tun_rx_batched() argument
1600 tun_can_build_skb(struct tun_struct * tun,struct tun_file * tfile,int len,int noblock,bool zerocopy) tun_can_build_skb() argument
1644 tun_xdp_act(struct tun_struct * tun,struct bpf_prog * xdp_prog,struct xdp_buff * xdp,u32 act) tun_xdp_act() argument
1682 tun_build_skb(struct tun_struct * tun,struct tun_file * tfile,struct iov_iter * from,struct virtio_net_hdr * hdr,int len,int * skb_xdp) tun_build_skb() argument
1779 tun_get_user(struct tun_struct * tun,struct tun_file * tfile,void * msg_control,struct iov_iter * from,int noblock,bool more) tun_get_user() argument
2084 struct tun_struct *tun = tun_get(tfile); tun_chr_write_iter() local
2100 tun_put_user_xdp(struct tun_struct * tun,struct tun_file * tfile,struct xdp_frame * xdp_frame,struct iov_iter * iter) tun_put_user_xdp() argument
2128 tun_put_user(struct tun_struct * tun,struct tun_file * tfile,struct sk_buff * skb,struct iov_iter * iter) tun_put_user() argument
2213 __tun_wake_queue(struct tun_struct * tun,struct tun_file * tfile,int consumed) __tun_wake_queue() argument
2246 tun_ring_consume(struct tun_struct * tun,struct tun_file * tfile) tun_ring_consume() argument
2259 tun_ring_recv(struct tun_struct * tun,struct tun_file * tfile,int noblock,int * err) tun_ring_recv() argument
2301 tun_do_read(struct tun_struct * tun,struct tun_file * tfile,struct iov_iter * to,int noblock,void * ptr) tun_do_read() argument
2342 struct tun_struct *tun = tun_get(tfile); tun_chr_read_iter() local
2368 __tun_set_ebpf(struct tun_struct * tun,struct tun_prog __rcu ** prog_p,struct bpf_prog * prog) __tun_set_ebpf() argument
2395 struct tun_struct *tun = netdev_priv(dev); tun_free_netdev() local
2407 struct tun_struct *tun = netdev_priv(dev); tun_setup() local
2450 const struct tun_struct *tun = netdev_priv(dev); tun_fill_info() local
2524 tun_xdp_one(struct tun_struct * tun,struct tun_file * tfile,struct xdp_buff * xdp,int * flush,struct tun_page * tpage) tun_xdp_one() argument
2666 struct tun_struct *tun = tun_get(tfile); tun_sendmsg() local
2721 struct tun_struct *tun = tun_get(tfile); tun_recvmsg() local
2772 struct tun_struct *tun; tun_peek_len() local
2798 tun_flags(struct tun_struct * tun) tun_flags() argument
2806 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); tun_flags_show() local
2813 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); owner_show() local
2823 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); group_show() local
2847 struct tun_struct *tun; tun_set_iff() local
2989 tun_get_iff(struct tun_struct * tun,struct ifreq * ifr) tun_get_iff() argument
3001 set_offload(struct tun_struct * tun,unsigned long arg) set_offload() argument
3055 tun_detach_filter(struct tun_struct * tun,int n) tun_detach_filter() argument
3070 tun_attach_filter(struct tun_struct * tun) tun_attach_filter() argument
3090 tun_set_sndbuf(struct tun_struct * tun) tun_set_sndbuf() argument
3104 struct tun_struct *tun; tun_set_queue() local
3137 tun_set_ebpf(struct tun_struct * tun,struct tun_prog __rcu ** prog_p,void __user * data) tun_set_ebpf() argument
3201 struct tun_struct *tun; __tun_chr_ioctl() local
3601 struct tun_struct *tun; tun_chr_show_fdinfo() local
3660 struct tun_struct *tun = netdev_priv(dev); tun_get_link_ksettings() local
3669 struct tun_struct *tun = netdev_priv(dev); tun_set_link_ksettings() local
3677 struct tun_struct *tun = netdev_priv(dev); tun_get_drvinfo() local
3694 struct tun_struct *tun = netdev_priv(dev); tun_get_msglevel() local
3701 struct tun_struct *tun = netdev_priv(dev); tun_set_msglevel() local
3711 struct tun_struct *tun = netdev_priv(dev); tun_get_coalesce() local
3723 struct tun_struct *tun = netdev_priv(dev); tun_set_coalesce() local
3736 struct tun_struct *tun = netdev_priv(dev); tun_get_channels() local
3756 tun_queue_resize(struct tun_struct * tun) tun_queue_resize() argument
3794 struct tun_struct *tun = netdev_priv(dev); tun_device_event() local
3898 struct tun_struct *tun; tun_wake_queue() local
[all...]
/linux/net/qrtr/
H A Dtun.c21 struct qrtr_tun *tun = container_of(ep, struct qrtr_tun, ep); in qrtr_tun_send() local
23 skb_queue_tail(&tun->queue, skb); in qrtr_tun_send()
26 wake_up_interruptible(&tun->readq); in qrtr_tun_send()
33 struct qrtr_tun *tun; in qrtr_tun_open() local
36 tun = kzalloc_obj(*tun); in qrtr_tun_open()
37 if (!tun) in qrtr_tun_open()
40 skb_queue_head_init(&tun->queue); in qrtr_tun_open()
41 init_waitqueue_head(&tun->readq); in qrtr_tun_open()
43 tun->ep.xmit = qrtr_tun_send; in qrtr_tun_open()
45 filp->private_data = tun; in qrtr_tun_open()
[all …]
H A DMakefile7 obj-$(CONFIG_QRTR_TUN) += qrtr-tun.o
8 qrtr-tun-y := tun.o
/linux/drivers/net/ethernet/intel/libie/
H A Drx.c23 #define LIBIE_RX_PT(oip, ofrag, tun, tp, tefr, iprot, pl) { \ argument
26 .tunnel_type = LIBETH_RX_PT_TUNNEL_IP_##tun, \
46 #define LIBIE_RX_PT_IP_L3(oip, tun, teprot, tefr) \ argument
47 LIBIE_RX_PT(IPV##oip, NOT_FRAG, tun, teprot, tefr, NONE, L3)
48 #define LIBIE_RX_PT_IP_L4(oip, tun, teprot, iprot) \ argument
49 LIBIE_RX_PT(IPV##oip, NOT_FRAG, tun, teprot, NOT_FRAG, iprot, L4)
51 #define LIBIE_RX_PT_IP_NOF(oip, tun, ver) \ argument
52 LIBIE_RX_PT_IP_L3(oip, tun, ver, NOT_FRAG), \
53 LIBIE_RX_PT_IP_L4(oip, tun, ver, UDP), \
55 LIBIE_RX_PT_IP_L4(oip, tun, ver, TCP), \
[all …]
/linux/net/netfilter/
H A Dnf_flow_table_path.c92 struct flow_offload_tunnel tun; member
137 info->tun.src_v6 = path->tun.src_v6; in nft_dev_path_info()
138 info->tun.dst_v6 = path->tun.dst_v6; in nft_dev_path_info()
139 info->tun.inner_proto = path->tun.inner_proto; in nft_dev_path_info()
140 info->tun_dst = path->tun.dst; in nft_dev_path_info()
141 info->tun.encap_proto = path->tun in nft_dev_path_info()
[all...]
H A Dnf_flow_table_ip.c158 } tun; member
192 if (ctx->tun.inner_proto != IPPROTO_IPIP && in nf_flow_tuple_encap()
193 ctx->tun.inner_proto != IPPROTO_IPV6) in nf_flow_tuple_encap()
199 tuple->tun.dst_v4.s_addr = iph->daddr; in nf_flow_tuple_encap()
200 tuple->tun.src_v4.s_addr = iph->saddr; in nf_flow_tuple_encap()
201 tuple->tun.inner_proto = ctx->tun.inner_proto; in nf_flow_tuple_encap()
202 tuple->tun.encap_proto = AF_INET; in nf_flow_tuple_encap()
206 tuple->tun.dst_v6 = ip6h->daddr; in nf_flow_tuple_encap()
207 tuple->tun in nf_flow_tuple_encap()
[all...]
/linux/tools/testing/selftests/net/ovpn/
H A Dcommon.sh178 ip netns exec "${peer}" ${OVPN_CLI} new_iface tun${1} $MODE
179 ip -n "${peer}" addr add ${2} dev tun${1}
182 ip -n "${peer}" addr add ${OVPN_LAN_IP} dev tun${1}
187 ip -n "${peer}" link set mtu ${3} dev tun${1}
189 ip -n "${peer}" link set tun${1} up
252 tun${1} ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} \
254 ip netns exec "${peer_ns}" ${OVPN_CLI} new_key tun${1} \
283 ip netns exec "${peer_ns}" ${OVPN_CLI} connect tun${1} \
395 ip -n "${peer}" link set tun${peer_id} down 2>/dev/null || true
396 ip netns exec "${peer}" ${OVPN_CLI} del_iface tun
[all...]
H A Dtest.sh57 tun${p} $((p + OVPN_ID_OFFSET)) 60 120
229 ip netns exec "${peer_ns}" ${OVPN_CLI} new_key tun${p} \
234 tun${p} $((p + OVPN_ID_OFFSET))
276 ip netns exec "${peer_ns}" ${OVPN_CLI} get_key tun${p} \
279 ip netns exec "${peer_ns}" ${OVPN_CLI} get_key tun${p} \
316 ip netns exec "${peer_ns}" ${OVPN_CLI} del_key tun${p} \
319 ip netns exec "${peer_ns}" ${OVPN_CLI} del_key tun${p} \
338 tun${p} $((p + OVPN_ID_OFFSET)) 0 0
349 tun${p} $((p + OVPN_ID_OFFSET)) 3 3
H A Dtest-close-socket.sh49 tun${p} $((p + OVPN_ID_OFFSET)) 60 120
/linux/tools/testing/selftests/drivers/net/mlxsw/
H A Dmirror_gre_scale.sh58 local tun=gt6-$i
68 tunnel_create $tun ip6gretap \
83 action mirred egress mirror dev $tun
97 local tun=gt6-$i
106 tunnel_destroy $tun
/linux/Documentation/networking/
H A Dtuntap.rst27 In order to use the driver a program has to open /dev/net/tun and issue a
34 IP packets (with tun) or ethernet frames (with tap). Which one is being used
37 The package from http://vtun.sourceforge.net/tun contains two simple examples
38 for how to use tun and tap devices. Both programs work like a bridge between
50 mknod /dev/net/tun c 10 200
54 e.g. chmod 0666 /dev/net/tun
60 unprivileged users, then you need the /dev/net/tun device to be usable by
73 modprobe tun
77 /dev/net/tun is being opened.
86 "tun%d"), but (as far as I can see) this can be any valid network device name.
[all …]
/linux/drivers/net/ethernet/intel/ice/virt/
H A Dfdir.c472 * @tun: 0 implies non-tunnel type filter, 1 implies tunnel type filter
475 ice_vc_fdir_rem_prof(struct ice_vf *vf, enum ice_fltr_ptype flow, int tun)
492 prof_id = vf_prof->prof_id[tun]; in ice_vc_fdir_rem_prof()
500 if (!fdir->prof_entry_cnt[flow][tun]) in ice_vc_fdir_rem_prof()
503 for (i = 0; i < fdir->prof_entry_cnt[flow][tun]; i++) in ice_vc_fdir_rem_prof()
504 if (vf_prof->entry_h[i][tun]) { in ice_vc_fdir_rem_prof()
509 vf_prof->entry_h[i][tun]); in ice_vc_fdir_rem_prof()
510 vf_prof->entry_h[i][tun] = 0; in ice_vc_fdir_rem_prof()
514 devm_kfree(dev, vf_prof->fdir_seg[tun]); in ice_vc_fdir_rem_prof()
515 vf_prof->fdir_seg[tun] in ice_vc_fdir_rem_prof()
477 ice_vc_fdir_rem_prof(struct ice_vf * vf,enum ice_fltr_ptype flow,int tun) ice_vc_fdir_rem_prof() argument
636 ice_vc_fdir_write_flow_prof(struct ice_vf * vf,enum ice_fltr_ptype flow,struct ice_flow_seg_info * seg,int tun) ice_vc_fdir_write_flow_prof() argument
749 ice_vc_fdir_config_input_set(struct ice_vf * vf,struct virtchnl_fdir_add * fltr,struct virtchnl_fdir_fltr_conf * conf,int tun) ice_vc_fdir_config_input_set() argument
[all...]
/linux/tools/testing/selftests/drivers/net/hw/
H A Dtso.py285 def test_builder(name, cfg, outer_ipver, feature, tun=None, inner_ipver=None):
304 if tun:
305 remote_v4, remote_v6 = build_tunnel(cfg, ipver, tun)
333 f.__name__ = name + ((outer_ipver + "_") if tun else "") + "ipv" + inner_ipver
389 # name, v4/v6 ethtool_feature tun:(type, args, inner ip versions)
137 test_builder(name, cfg, outer_ipver, feature, tun=None, inner_ipver=None) global() argument
/linux/tools/testing/selftests/rdma/
H A Drxe_socket_with_netns.sh40 ip tuntap add mode tun tun0
52 ip tuntap add mode tun tun1
H A Drxe_test_NETDEV_UNREGISTER.sh32 ip tuntap add mode tun "$DEV_NAME"
H A Drxe_ipv6.sh24 for mod in tun veth rdma_rxe; do
/linux/tools/testing/selftests/net/
H A Dtun.c154 fd = open("/dev/net/tun", O_RDWR); in tun_alloc()
156 fprintf(stderr, "can't open tun: %s\n", strerror(errno)); in tun_alloc()
185 fd = open("/dev/net/tun", O_RDWR); in tun_open()
485 FIXTURE(tun) in FIXTURE()
491 FIXTURE_SETUP(tun) in FIXTURE_SETUP()
506 FIXTURE_TEARDOWN(tun) in FIXTURE_TEARDOWN()
514 TEST_F(tun, delete_detach_close) in TEST_F()
521 TEST_F(tun, detach_delete_close)
527 TEST_F(tun, detach_close_delete) in TEST_F()
535 TEST_F(tun, reattach_delete_clos in TEST_F()
484 FIXTURE(tun) FIXTURE() argument
490 FIXTURE_SETUP(tun) FIXTURE_SETUP() argument
501 FIXTURE_TEARDOWN(tun) FIXTURE_TEARDOWN() argument
509 TEST_F(tun,delete_detach_close) TEST_F() argument
516 TEST_F(tun,detach_delete_close) TEST_F() argument
522 TEST_F(tun,detach_close_delete) TEST_F() argument
530 TEST_F(tun,reattach_delete_close) TEST_F() argument
537 TEST_F(tun,reattach_close_delete) TEST_F() argument
[all...]
H A D.gitignore58 tun
/linux/drivers/infiniband/hw/mlx4/
H A Dmad.c536 tun_ctx = dev->sriov.demux[port-1].tun[slave]; in mlx4_ib_send_to_slave()
1970 if (dev->sriov.demux[port - 1].tun[slave]) { in free_pv_object()
1971 kfree(dev->sriov.demux[port - 1].tun[slave]); in free_pv_object()
1972 dev->sriov.demux[port - 1].tun[slave] = NULL; in free_pv_object()
2127 dev->sriov.demux[port - 1].tun[slave], 1); in mlx4_ib_tunnels_update()
2133 dev->sriov.demux[port - 1].tun[slave]); in mlx4_ib_tunnels_update()
2160 ctx->tun = kzalloc_objs(struct mlx4_ib_demux_pv_ctx *, in mlx4_ib_alloc_demux_ctx()
2162 if (!ctx->tun) in mlx4_ib_alloc_demux_ctx()
2179 ret = alloc_pv_object(dev, i, port, &ctx->tun[i]); in mlx4_ib_alloc_demux_ctx()
2228 kfree(ctx->tun); in mlx4_ib_alloc_demux_ctx()
[all …]
/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_ipip.c14 struct ip_tunnel *tun = netdev_priv(ol_dev); in mlxsw_sp_ipip_netdev_parms4() local
16 return tun->parms; in mlxsw_sp_ipip_netdev_parms4()
22 struct ip6_tnl *tun = netdev_priv(ol_dev); in mlxsw_sp_ipip_netdev_parms6() local
24 return tun->parms; in mlxsw_sp_ipip_netdev_parms6()
/linux/net/ipv4/
H A Dipip.c379 path->tun.src_v4.s_addr = tiph->saddr; in ipip_fill_forward_path()
380 path->tun.dst_v4.s_addr = tiph->daddr; in ipip_fill_forward_path()
381 path->tun.inner_proto = IPPROTO_IPIP; in ipip_fill_forward_path()
382 path->tun.encap_proto = AF_INET; in ipip_fill_forward_path()
383 path->tun.dst = &rt->dst; in ipip_fill_forward_path()
/linux/tools/testing/selftests/net/netfilter/
H A Dnf_conntrack_packetdrill.sh10 modprobe -q tun
/linux/include/net/netfilter/
H A Dnf_flow_table.h147 struct flow_offload_tunnel tun;
228 struct flow_offload_tunnel tun;
146 struct flow_offload_tunnel tun; global() member
227 struct flow_offload_tunnel tun; global() member
/linux/drivers/net/ethernet/qlogic/qed/
H A Dqed_main.c380 struct qed_tunnel_info *tun = &cdev->tunnel; in qed_fill_dev_info() local
385 if (tun->vxlan.tun_cls == QED_TUNN_CLSS_MAC_VLAN && in qed_fill_dev_info()
386 tun->vxlan.b_mode_enabled) in qed_fill_dev_info()
389 if (tun->l2_gre.b_mode_enabled && tun->ip_gre.b_mode_enabled && in qed_fill_dev_info()
390 tun->l2_gre.tun_cls == QED_TUNN_CLSS_MAC_VLAN && in qed_fill_dev_info()
391 tun->ip_gre.tun_cls == QED_TUNN_CLSS_MAC_VLAN) in qed_fill_dev_info()
394 if (tun->l2_geneve.b_mode_enabled && tun->ip_geneve.b_mode_enabled && in qed_fill_dev_info()
395 tun->l2_geneve.tun_cls == QED_TUNN_CLSS_MAC_VLAN && in qed_fill_dev_info()
396 tun->ip_geneve.tun_cls == QED_TUNN_CLSS_MAC_VLAN) in qed_fill_dev_info()
/linux/Documentation/translations/zh_CN/networking/
H A Dmsg_zerocopy.rst208 这包括环回到数据包套接字(例如,tcpdump)和 tun 设备。

12