Home
last modified time | relevance | path

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

12

/linux/drivers/net/
H A Dtun.c134 struct tun_struct __rcu *tun; member
160 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()
302 static inline bool tun_legacy_is_little_endian(struct tun_struct *tun) in tun_legacy_is_little_endian() argument
304 return tun->flags & TUN_VNET_BE ? false : in tun_legacy_is_little_endian()
308 static long tun_get_vnet_be(struct tun_struct *tun, int __user *argp) in tun_get_vnet_be() argument
310 int be = !!(tun->flags & TUN_VNET_BE); in tun_get_vnet_be()
[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(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->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.c20 #define LIBIE_RX_PT(oip, ofrag, tun, tp, tefr, iprot, pl) { \ argument
23 .tunnel_type = LIBETH_RX_PT_TUNNEL_IP_##tun, \
43 #define LIBIE_RX_PT_IP_L3(oip, tun, teprot, tefr) \ argument
44 LIBIE_RX_PT(IPV##oip, NOT_FRAG, tun, teprot, tefr, NONE, L3)
45 #define LIBIE_RX_PT_IP_L4(oip, tun, teprot, iprot) \ argument
46 LIBIE_RX_PT(IPV##oip, NOT_FRAG, tun, teprot, NOT_FRAG, iprot, L4)
48 #define LIBIE_RX_PT_IP_NOF(oip, tun, ver) \ argument
49 LIBIE_RX_PT_IP_L3(oip, tun, ver, NOT_FRAG), \
50 LIBIE_RX_PT_IP_L4(oip, tun, ver, UDP), \
52 LIBIE_RX_PT_IP_L4(oip, tun, ver, TCP), \
[all …]
/linux/drivers/media/tuners/
H A Dtuner-simple.c115 struct tunertype *tun; member
239 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 struct tunertype *tun; in simple_set_radio_freq() local
676 tun = priv->tun; in simple_set_radio_freq()
678 for (j = tun->count-1; j > 0; j--) in simple_set_radio_freq()
[all …]
/linux/drivers/net/ethernet/netronome/nfp/flower/
H A Dtunnel_conf.c739 app_priv = container_of(nb, struct nfp_flower_priv, tun.neigh_nb); in nfp_tun_neigh_event_handler()
852 mutex_lock(&priv->tun.ipv4_off_lock); in nfp_tun_write_ipv4_list()
854 list_for_each_safe(ptr, storage, &priv->tun.ipv4_off_list) { in nfp_tun_write_ipv4_list()
856 mutex_unlock(&priv->tun.ipv4_off_lock); in nfp_tun_write_ipv4_list()
864 mutex_unlock(&priv->tun.ipv4_off_lock); in nfp_tun_write_ipv4_list()
877 mutex_lock(&priv->tun.ipv4_off_lock); in nfp_tunnel_add_ipv4_off()
878 list_for_each_safe(ptr, storage, &priv->tun.ipv4_off_list) { in nfp_tunnel_add_ipv4_off()
882 mutex_unlock(&priv->tun.ipv4_off_lock); in nfp_tunnel_add_ipv4_off()
889 mutex_unlock(&priv->tun.ipv4_off_lock); in nfp_tunnel_add_ipv4_off()
895 list_add_tail(&entry->list, &priv->tun.ipv4_off_list); in nfp_tunnel_add_ipv4_off()
[all …]
H A Doffload.c856 struct nfp_fl_set_tun *tun; in nfp_fl_push_vlan_after_tun() local
864 tun = (struct nfp_fl_set_tun *)a; in nfp_fl_push_vlan_after_tun()
865 tun->outer_vlan_tpid = vlan->vlan_tpid; in nfp_fl_push_vlan_after_tun()
866 tun->outer_vlan_tci = vlan->vlan_tci; in nfp_fl_push_vlan_after_tun()
/linux/drivers/net/ethernet/intel/ice/
H A Dice_ethtool_fdir.c275 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()
313 u64 prof_id = prof->prof_id[tun]; in ice_fdir_rem_adq_chnl()
319 prof->entry_h[i][tun] = 0; in ice_fdir_rem_adq_chnl()
325 ice_fdir_remap_entries(prof, tun, i); in ice_fdir_rem_adq_chnl()
[all …]
H A Dice_virtchnl_fdir.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 …]
H A Dice_fdir.h223 u8 *pkt, bool frag, bool tun);
H A Dice_fdir.c859 u8 *pkt, bool frag, bool tun) in ice_fdir_get_gen_prgm_pkt() argument
905 if (!tun) { in ice_fdir_get_gen_prgm_pkt()
/linux/tools/testing/selftests/net/
H A Dtun.c105 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_delete) { in TEST_F() argument
H A D.gitignore53 tun
H A DMakefile73 TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict tls tun tap epoll_busy_poll
/linux/include/net/tc_act/
H A Dtc_tunnel_key.h74 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/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/infiniband/hw/mlx4/
H A Dcq.c591 wc->pkey_index = be16_to_cpu(hdr->tun.pkey_index); in use_tunnel_data()
592 wc->src_qp = be32_to_cpu(hdr->tun.flags_src_qp) & 0xFFFFFF; in use_tunnel_data()
593 wc->wc_flags |= (hdr->tun.g_ml_path & 0x80) ? (IB_WC_GRH) : 0; in use_tunnel_data()
598 wc->vlan_id = be16_to_cpu(hdr->tun.sl_vid); in use_tunnel_data()
599 memcpy(&(wc->smac[0]), (char *)&hdr->tun.mac_31_0, 4); in use_tunnel_data()
600 memcpy(&(wc->smac[4]), (char *)&hdr->tun.slid_mac_47_32, 2); in use_tunnel_data()
603 wc->slid = be16_to_cpu(hdr->tun.slid_mac_47_32); in use_tunnel_data()
604 wc->sl = (u8) (be16_to_cpu(hdr->tun.sl_vid) >> 12); in use_tunnel_data()
H A Dmad.c536 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 …]
H A Dmlx4_ib.h270 struct mlx4_rcv_tunnel_hdr tun; member
505 struct mlx4_ib_demux_pv_ctx **tun; member
/linux/tools/testing/selftests/net/netfilter/
H A Dnf_conntrack_packetdrill.sh10 modprobe -q tun
/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/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()
H A Dqed_sriov.c2230 static void qed_pf_validate_tunn_mode(struct qed_tunn_update_type *tun, int *rc) in qed_pf_validate_tunn_mode() argument
2232 if (tun->b_update_mode && !tun->b_mode_enabled) { in qed_pf_validate_tunn_mode()
2233 tun->b_update_mode = false; in qed_pf_validate_tunn_mode()
2244 struct qed_tunnel_info *tun = &p_hwfn->cdev->tunnel; in qed_pf_validate_modify_tunn_config() local
2250 bultn_vxlan_port = tun->vxlan_port.port; in qed_pf_validate_modify_tunn_config()
2251 bultn_geneve_port = tun->geneve_port.port; in qed_pf_validate_modify_tunn_config()
2270 if (tun_src->vxlan_port.port == tun->vxlan_port.port) { in qed_pf_validate_modify_tunn_config()
2279 if (tun_src->geneve_port.port == tun->geneve_port.port) { in qed_pf_validate_modify_tunn_config()
/linux/arch/arm64/boot/dts/marvell/
H A Darmada-3720-espressobin.dtsi82 marvell,xenon-tun-count = <9>;

12