Home
last modified time | relevance | path

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

12

/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.c84 struct flow_offload_tunnel tun; member
127 info->tun.src_v6 = path->tun.src_v6; in nft_dev_path_info()
128 info->tun.dst_v6 = path->tun.dst_v6; in nft_dev_path_info()
129 info->tun.l3_proto = path->tun.l3_proto; in nft_dev_path_info()
206 struct flow_offload_tunnel *tun, in nft_flow_tunnel_update_route() argument
216 fl.u.ip4.daddr = tun->dst_v4.s_addr; in nft_flow_tunnel_update_route()
217 fl.u.ip4.saddr = tun->src_v4.s_addr; in nft_flow_tunnel_update_route()
224 fl.u.ip6.daddr = tun->dst_v6; in nft_flow_tunnel_update_route()
225 fl.u.ip6.saddr = tun->src_v6; in nft_flow_tunnel_update_route()
271 !nft_flow_tunnel_update_route(pkt, &info.tun, route, dir)) { in nft_dev_forward_path()
[all …]
H A Dnf_flow_table_ip.c157 } tun; member
197 if (ctx->tun.proto == IPPROTO_IPIP) { in nf_flow_tuple_encap()
198 tuple->tun.dst_v4.s_addr = iph->daddr; in nf_flow_tuple_encap()
199 tuple->tun.src_v4.s_addr = iph->saddr; in nf_flow_tuple_encap()
200 tuple->tun.l3_proto = IPPROTO_IPIP; in nf_flow_tuple_encap()
205 if (ctx->tun.proto == IPPROTO_IPV6) { in nf_flow_tuple_encap()
206 tuple->tun.dst_v6 = ip6h->daddr; in nf_flow_tuple_encap()
207 tuple->tun.src_v6 = ip6h->saddr; in nf_flow_tuple_encap()
208 tuple->tun.l3_proto = IPPROTO_IPV6; in nf_flow_tuple_encap()
338 ctx->tun.proto = IPPROTO_IPIP; in nf_flow_ip4_tunnel_proto()
[all …]
/linux/tools/testing/selftests/net/ovpn/
H A Dtest.sh55 tun${p} $((p + OVPN_ID_OFFSET)) 60 120
157 ip netns exec "${peer_ns}" ${OVPN_CLI} new_key tun${p} \
162 tun${p} $((p + OVPN_ID_OFFSET))
204 ip netns exec "${peer_ns}" ${OVPN_CLI} get_key tun${p} \
207 ip netns exec "${peer_ns}" ${OVPN_CLI} get_key tun${p} \
244 ip netns exec "${peer_ns}" ${OVPN_CLI} del_key tun${p} \
247 ip netns exec "${peer_ns}" ${OVPN_CLI} del_key tun${p} \
266 tun${p} $((p + OVPN_ID_OFFSET)) 0 0
277 tun${p} $((p + OVPN_ID_OFFSET)) 3 3
H A Dtest-close-socket.sh47 tun${p} $((p + OVPN_ID_OFFSET)) 60 120
H A Dtest-mark.sh60 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.c477 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] = NULL; in ice_vc_fdir_rem_prof()
522 fdir->prof_entry_cnt[flow][tun] = 0; in ice_vc_fdir_rem_prof()
[all …]
/linux/tools/testing/selftests/drivers/net/hw/
H A Dtso.py137 def test_builder(name, cfg, outer_ipver, feature, tun=None, inner_ipver=None):
151 if tun:
152 remote_v4, remote_v6 = build_tunnel(cfg, ipver, tun)
174 f.__name__ = name + ((outer_ipver + "_") if tun else "") + "ipv" + inner_ipver
234 # name, v4/v6 ethtool_feature tun:(type, args, inner ip versions)
133 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.c483 FIXTURE(tun) in FIXTURE() argument
489 FIXTURE_SETUP(tun) in FIXTURE_SETUP() argument
500 FIXTURE_TEARDOWN(tun) in FIXTURE_TEARDOWN() argument
508 TEST_F(tun, delete_detach_close) in TEST_F() argument
515 TEST_F(tun, detach_delete_close) in TEST_F() argument
521 TEST_F(tun, detach_close_delete) in TEST_F() argument
529 TEST_F(tun, reattach_delete_close) in TEST_F() argument
536 TEST_F(tun, reattach_close_delete) in TEST_F() argument
H A D.gitignore55 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/tools/testing/selftests/net/netfilter/
H A Dnf_conntrack_packetdrill.sh10 modprobe -q tun
/linux/include/net/netfilter/
H A Dnf_flow_table.h146 struct flow_offload_tunnel tun; member
226 struct flow_offload_tunnel tun; 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 设备。
/linux/drivers/net/
H A DMakefile33 obj-$(CONFIG_TUN) += tun.o
/linux/drivers/net/ethernet/intel/ice/
H A Dice_fdir.h223 u8 *pkt, bool frag, bool tun);

12