/linux/drivers/net/ |
H A D | tun.c | 6 * $Id: tun.c,v 1.15 2002/03/01 02:44:24 maxk Exp $ 30 #define DRV_NAME "tun" 133 struct tun_struct __rcu *tun; member 159 struct tun_struct *tun; member 224 static void tun_flow_init(struct tun_struct *tun); 225 static void tun_flow_uninit(struct tun_struct *tun); 267 static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile, in tun_napi_init() argument 273 netif_napi_add_tx(tun->dev, &tfile->napi, tun_napi_poll); in tun_napi_init() 317 static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun, in tun_flow_create() argument 324 netif_info(tun, tx_queue in tun_flow_create() 338 tun_flow_delete(struct tun_struct * tun,struct tun_flow_entry * e) tun_flow_delete() argument 347 tun_flow_flush(struct tun_struct * tun) tun_flow_flush() argument 362 tun_flow_delete_by_queue(struct tun_struct * tun,u16 queue_index) tun_flow_delete_by_queue() argument 381 struct tun_struct *tun = timer_container_of(tun, t, flow_gc_timer); tun_flow_cleanup() local 411 tun_flow_update(struct tun_struct * tun,u32 rxhash,struct tun_file * tfile) tun_flow_update() argument 461 tun_automq_select_queue(struct tun_struct * tun,struct sk_buff * skb) tun_automq_select_queue() argument 480 tun_ebpf_select_queue(struct tun_struct * tun,struct sk_buff * skb) tun_ebpf_select_queue() argument 500 struct tun_struct *tun = netdev_priv(dev); tun_select_queue() local 513 tun_not_capable(struct tun_struct * tun) tun_not_capable() argument 523 tun_set_real_num_queues(struct tun_struct * tun) tun_set_real_num_queues() argument 529 tun_disable_queue(struct tun_struct * tun,struct tun_file * tfile) tun_disable_queue() argument 538 struct tun_struct *tun = tfile->detached; tun_enable_queue() local 574 struct tun_struct *tun; __tun_detach() local 631 struct tun_struct *tun; tun_detach() local 648 struct tun_struct *tun = netdev_priv(dev); tun_detach_all() local 690 tun_attach(struct tun_struct * tun,struct file * file,bool skip_filter,bool napi,bool napi_frags,bool publish_tun) tun_attach() argument 787 struct tun_struct *tun; tun_get() local 798 tun_put(struct tun_struct * tun) tun_put() argument 913 struct tun_struct *tun = netdev_priv(dev); tun_net_init() local 972 tun_automq_xmit(struct tun_struct * tun,struct sk_buff * skb) tun_automq_xmit() argument 990 run_ebpf_filter(struct tun_struct * tun,struct sk_buff * skb,int len) run_ebpf_filter() argument 1006 struct tun_struct *tun = netdev_priv(dev); tun_net_xmit() local 1100 struct tun_struct *tun = netdev_priv(dev); tun_net_fix_features() local 1107 struct tun_struct *tun = netdev_priv(dev); tun_set_headroom() local 1118 struct tun_struct *tun = netdev_priv(dev); tun_net_get_stats64() local 1129 struct tun_struct *tun = netdev_priv(dev); tun_xdp_set() local 1169 struct tun_struct *tun = netdev_priv(dev); tun_net_change_carrier() local 1205 struct tun_struct *tun = netdev_priv(dev); tun_xdp_xmit() local 1283 tun_flow_init(struct tun_struct * tun) tun_flow_init() argument 1296 tun_flow_uninit(struct tun_struct * tun) tun_flow_uninit() argument 1308 struct tun_struct *tun = netdev_priv(dev); tun_net_initialize() local 1346 tun_sock_writeable(struct tun_struct * tun,struct tun_file * tfile) tun_sock_writeable() argument 1359 struct tun_struct *tun = tun_get(tfile); tun_chr_poll() local 1474 tun_rx_batched(struct tun_struct * tun,struct tun_file * tfile,struct sk_buff * skb,int more) tun_rx_batched() argument 1514 tun_can_build_skb(struct tun_struct * tun,struct tun_file * tfile,int len,int noblock,bool zerocopy) tun_can_build_skb() argument 1558 tun_xdp_act(struct tun_struct * tun,struct bpf_prog * xdp_prog,struct xdp_buff * xdp,u32 act) tun_xdp_act() argument 1596 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 1693 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 1986 struct tun_struct *tun = tun_get(tfile); tun_chr_write_iter() local 2002 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 2030 tun_put_user(struct tun_struct * tun,struct tun_file * tfile,struct sk_buff * skb,struct iov_iter * iter) tun_put_user() argument 2154 tun_do_read(struct tun_struct * tun,struct tun_file * tfile,struct iov_iter * to,int noblock,void * ptr) tun_do_read() argument 2195 struct tun_struct *tun = tun_get(tfile); tun_chr_read_iter() local 2221 __tun_set_ebpf(struct tun_struct * tun,struct tun_prog __rcu ** prog_p,struct bpf_prog * prog) __tun_set_ebpf() argument 2248 struct tun_struct *tun = netdev_priv(dev); tun_free_netdev() local 2260 struct tun_struct *tun = netdev_priv(dev); tun_setup() local 2303 struct tun_struct *tun = netdev_priv(dev); tun_fill_info() local 2373 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 2510 struct tun_struct *tun = tun_get(tfile); tun_sendmsg() local 2565 struct tun_struct *tun = tun_get(tfile); tun_recvmsg() local 2616 struct tun_struct *tun; tun_peek_len() local 2642 tun_flags(struct tun_struct * tun) tun_flags() argument 2650 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); tun_flags_show() local 2657 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); owner_show() local 2667 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); group_show() local 2691 struct tun_struct *tun; tun_set_iff() local 2830 tun_get_iff(struct tun_struct * tun,struct ifreq * ifr) tun_get_iff() argument 2842 set_offload(struct tun_struct * tun,unsigned long arg) set_offload() argument 2896 tun_detach_filter(struct tun_struct * tun,int n) tun_detach_filter() argument 2911 tun_attach_filter(struct tun_struct * tun) tun_attach_filter() argument 2931 tun_set_sndbuf(struct tun_struct * tun) tun_set_sndbuf() argument 2945 struct tun_struct *tun; tun_set_queue() local 2978 tun_set_ebpf(struct tun_struct * tun,struct tun_prog __rcu ** prog_p,void __user * data) tun_set_ebpf() argument 3042 struct tun_struct *tun; __tun_chr_ioctl() local 3442 struct tun_struct *tun; tun_chr_show_fdinfo() local 3501 struct tun_struct *tun = netdev_priv(dev); tun_get_link_ksettings() local 3510 struct tun_struct *tun = netdev_priv(dev); tun_set_link_ksettings() local 3518 struct tun_struct *tun = netdev_priv(dev); tun_get_drvinfo() local 3535 struct tun_struct *tun = netdev_priv(dev); tun_get_msglevel() local 3542 struct tun_struct *tun = netdev_priv(dev); tun_set_msglevel() local 3552 struct tun_struct *tun = netdev_priv(dev); tun_get_coalesce() local 3564 struct tun_struct *tun = netdev_priv(dev); tun_set_coalesce() local 3577 struct tun_struct *tun = netdev_priv(dev); tun_get_channels() local 3597 tun_queue_resize(struct tun_struct * tun) tun_queue_resize() argument 3628 struct tun_struct *tun = netdev_priv(dev); tun_device_event() local [all...] |
H A D | Makefile | 33 obj-$(CONFIG_TUN) += tun.o
|
/linux/net/qrtr/ |
H A D | tun.c | 21 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(sizeof(*tun), GFP_KERNEL); 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 in qrtr_tun_open() 62 struct qrtr_tun *tun = filp->private_data; qrtr_tun_read_iter() local 88 struct qrtr_tun *tun = filp->private_data; qrtr_tun_write_iter() local 116 struct qrtr_tun *tun = filp->private_data; qrtr_tun_poll() local 129 struct qrtr_tun *tun = filp->private_data; qrtr_tun_release() local [all...] |
H A D | Makefile | 7 obj-$(CONFIG_QRTR_TUN) += qrtr-tun.o 8 qrtr-tun-y := tun.o
|
/linux/drivers/net/ethernet/intel/libie/ |
H A D | rx.c | 23 #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, ve 60 LIBIE_RX_PT_IP_TUN_VER(oip,tun,ver) global() argument 70 LIBIE_RX_PT_IP_TUN(oip,tun) global() argument 75 LIBIE_RX_PT_IP_GRE(oip,tun) global() argument [all...] |
/linux/tools/testing/selftests/net/ovpn/ |
H A D | common.sh | 38 ip netns exec peer${1} ${OVPN_CLI} new_iface tun${1} $MODE 39 ip -n peer${1} addr add ${2} dev tun${1} 42 ip -n peer${1} addr add ${LAN_IP} dev tun${1} 46 ip -n peer${1} link set mtu ${3} dev tun${1} 48 ip -n peer${1} link set tun${1} up 64 ip netns exec peer${1} ${OVPN_CLI} new_peer tun${1} ${1} ${LPORT} \ 66 ip netns exec peer${1} ${OVPN_CLI} new_key tun${1} ${1} 1 0 ${ALG} 1 \ 79 ip netns exec peer${1} ${OVPN_CLI} connect tun${1} ${1} 10.10.${1}.1 1 \ 91 ip -n peer${p} link set tun${p} down 2>/dev/null || true 92 ip netns exec peer${p} ${OVPN_CLI} del_iface tun [all...] |
H A D | test.sh | 30 ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 60 120 61 ip netns exec peer${p} ${OVPN_CLI} new_key tun${p} ${p} 2 1 ${ALG} 1 data64.key 62 ip netns exec peer${p} ${OVPN_CLI} swap_keys tun${p} ${p} 83 ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} ${p} 1 84 ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} ${p} 2 97 ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} ${p} 1 98 ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} ${p} 2 104 ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 0 0 111 ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 3 3
|
H A D | test-close-socket.sh | 30 ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 60 120
|
/linux/drivers/media/tuners/ |
H A D | tuner-simple.c | 115 const struct tunertype *tun; member 239 const struct tunertype *tun = priv->tun; in simple_tuner_params() local 242 for (i = 0; i < tun->count; i++) in simple_tuner_params() 243 if (desired_type == tun->params[i].type) in simple_tuner_params() 247 if (i == tun->count) { in simple_tuner_params() 254 tuner_param_name(tun->params[i].type)); in simple_tuner_params() 256 return &tun->params[i]; in simple_tuner_params() 667 const struct tunertype *tun; in simple_set_radio_freq() local 676 tun in simple_set_radio_freq() 851 const struct tunertype *tun = priv->tun; simple_dvb_configure() local [all...] |
/linux/tools/testing/selftests/net/ |
H A D | tun.c | 47 fd = open("/dev/net/tun", O_RDWR); in tun_alloc() 49 fprintf(stderr, "can't open tun: %s\n", strerror(errno)); in tun_alloc() 105 FIXTURE(tun) in FIXTURE() argument 111 FIXTURE_SETUP(tun) in FIXTURE_SETUP() argument 122 FIXTURE_TEARDOWN(tun) in FIXTURE_TEARDOWN() argument 130 TEST_F(tun, delete_detach_close) { in TEST_F() argument 136 TEST_F(tun, detach_delete_close) { in TEST_F() argument 141 TEST_F(tun, detach_close_delete) { in TEST_F() argument 148 TEST_F(tun, reattach_delete_close) { in TEST_F() argument 154 TEST_F(tun, reattach_close_delet argument [all...] |
H A D | .gitignore | 59 tun
|
H A D | Makefile | 81 TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls tun tap epoll_busy_poll
|
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_ethtool_fdir.c | 271 * @tun: tunneled or non-tunneled packet 275 ice_fdir_remap_entries(struct ice_fd_hw_prof *prof, int tun, int idx) in ice_fdir_remap_entries() argument 277 if (idx != prof->cnt && tun < ICE_FD_HW_SEG_MAX) { in ice_fdir_remap_entries() 283 old_entry_h = prof->entry_h[i + 1][tun]; in ice_fdir_remap_entries() 284 prof->entry_h[i][tun] = old_entry_h; in ice_fdir_remap_entries() 288 prof->entry_h[i][tun] = 0; in ice_fdir_remap_entries() 307 int tun, i; in ice_fdir_rem_adq_chnl() local 312 for (tun = 0; tun < ICE_FD_HW_SEG_MAX; tun in ice_fdir_rem_adq_chnl() 365 int tun; ice_fdir_erase_flow_from_hw() local 400 int tun, i; ice_fdir_rem_flow() local 440 int tun; ice_fdir_replay_flows() local 633 ice_fdir_set_hw_fltr_rule(struct ice_pf * pf,struct ice_flow_seg_info * seg,enum ice_fltr_ptype flow,enum ice_fd_hw_seg tun) ice_fdir_set_hw_fltr_rule() argument 1567 int tun; ice_fdir_write_all_fltr() local [all...] |
H A D | ice_virtchnl_fdir.c | 474 * @tun: 0 implies non-tunnel type filter, 1 implies tunnel type filter 477 ice_vc_fdir_rem_prof(struct ice_vf *vf, enum ice_fltr_ptype flow, int tun) in ice_vc_fdir_rem_prof() argument 494 prof_id = vf_prof->prof_id[tun]; in ice_vc_fdir_rem_prof() 502 if (!fdir->prof_entry_cnt[flow][tun]) in ice_vc_fdir_rem_prof() 505 for (i = 0; i < fdir->prof_entry_cnt[flow][tun]; i++) in ice_vc_fdir_rem_prof() 506 if (vf_prof->entry_h[i][tun]) { in ice_vc_fdir_rem_prof() 511 vf_prof->entry_h[i][tun]); in ice_vc_fdir_rem_prof() 512 vf_prof->entry_h[i][tun] = 0; in ice_vc_fdir_rem_prof() 516 devm_kfree(dev, vf_prof->fdir_seg[tun]); in ice_vc_fdir_rem_prof() 517 vf_prof->fdir_seg[tun] in ice_vc_fdir_rem_prof() 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...] |
H A D | ice_fdir.h | 223 u8 *pkt, bool frag, bool tun);
|
/linux/include/net/tc_act/ |
H A D | tc_tunnel_key.h | 74 struct ip_tunnel_info *tun = tcf_tunnel_info(a); in tcf_tunnel_info_copy() local 76 if (tun) { in tcf_tunnel_info_copy() 77 size_t tun_size = sizeof(*tun) + tun->options_len; in tcf_tunnel_info_copy() 78 struct ip_tunnel_info *tun_copy = kmemdup(tun, tun_size, in tcf_tunnel_info_copy()
|
/linux/Documentation/networking/ |
H A D | tuntap.rst | 27 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 [all...] |
/linux/tools/testing/selftests/drivers/net/hw/ |
H A D | tso.py | 133 def test_builder(name, cfg, outer_ipver, feature, tun=None, inner_ipver=None): argument 147 if tun: 148 remote_v4, remote_v6 = build_tunnel(cfg, ipver, tun) 170 f.__name__ = name + ((outer_ipver + "_") if tun else "") + "ipv" + inner_ipver 230 # name, v4/v6 ethtool_feature tun:(type, args, inner ip versions)
|
/linux/drivers/infiniband/hw/mlx4/ |
H A D | cq.c | 595 wc->pkey_index = be16_to_cpu(hdr->tun.pkey_index); in use_tunnel_data() 596 wc->src_qp = be32_to_cpu(hdr->tun.flags_src_qp) & 0xFFFFFF; in use_tunnel_data() 597 wc->wc_flags |= (hdr->tun.g_ml_path & 0x80) ? (IB_WC_GRH) : 0; in use_tunnel_data() 602 wc->vlan_id = be16_to_cpu(hdr->tun.sl_vid); in use_tunnel_data() 603 memcpy(&(wc->smac[0]), (char *)&hdr->tun.mac_31_0, 4); in use_tunnel_data() 604 memcpy(&(wc->smac[4]), (char *)&hdr->tun.slid_mac_47_32, 2); in use_tunnel_data() 607 wc->slid = be16_to_cpu(hdr->tun.slid_mac_47_32); in use_tunnel_data() 608 wc->sl = (u8) (be16_to_cpu(hdr->tun.sl_vid) >> 12); in use_tunnel_data()
|
H A D | mad.c | 536 tun_ctx = dev->sriov.demux[port-1].tun[slave]; in mlx4_ib_send_to_slave() 1974 if (dev->sriov.demux[port - 1].tun[slave]) { in free_pv_object() 1975 kfree(dev->sriov.demux[port - 1].tun[slave]); in free_pv_object() 1976 dev->sriov.demux[port - 1].tun[slave] = NULL; in free_pv_object() 2131 dev->sriov.demux[port - 1].tun[slave], 1); in mlx4_ib_tunnels_update() 2137 dev->sriov.demux[port - 1].tun[slave]); in mlx4_ib_tunnels_update() 2164 ctx->tun = kcalloc(dev->dev->caps.sqp_demux, in mlx4_ib_alloc_demux_ctx() 2166 if (!ctx->tun) in mlx4_ib_alloc_demux_ctx() 2183 ret = alloc_pv_object(dev, i, port, &ctx->tun[i]); in mlx4_ib_alloc_demux_ctx() 2232 kfree(ctx->tun); in mlx4_ib_alloc_demux_ctx() [all...] |
/linux/tools/testing/selftests/net/netfilter/ |
H A D | nf_conntrack_packetdrill.sh | 10 modprobe -q tun
|
/linux/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | spectrum_ipip.c | 14 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/drivers/net/ethernet/qlogic/qed/ |
H A D | qed_main.c | 380 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 in qed_fill_dev_info() [all...] |
/linux/Documentation/translations/zh_CN/networking/ |
H A D | msg_zerocopy.rst | 208 这包括环回到数据包套接字(例如,tcpdump)和 tun 设备。
|
/linux/arch/arm64/boot/dts/marvell/ |
H A D | armada-3720-espressobin.dtsi | 82 marvell,xenon-tun-count = <9>;
|