tunnel           2804 drivers/infiniband/core/uverbs_cmd.c 		ib_spec->tunnel.size = sizeof(struct ib_flow_spec_tunnel);
tunnel           2805 drivers/infiniband/core/uverbs_cmd.c 		memcpy(&ib_spec->tunnel.val, kern_spec_val, actual_filter_sz);
tunnel           2806 drivers/infiniband/core/uverbs_cmd.c 		memcpy(&ib_spec->tunnel.mask, kern_spec_mask, actual_filter_sz);
tunnel           2808 drivers/infiniband/core/uverbs_cmd.c 		if ((ntohl(ib_spec->tunnel.mask.tunnel_id)) >= BIT(24) ||
tunnel           2809 drivers/infiniband/core/uverbs_cmd.c 		    (ntohl(ib_spec->tunnel.val.tunnel_id)) >= BIT(24))
tunnel           1486 drivers/infiniband/hw/mlx4/mad.c 	struct mlx4_tunnel_mad *tunnel = tun_qp->ring[wr_ix].addr;
tunnel           1515 drivers/infiniband/hw/mlx4/mad.c 	switch (tunnel->mad.mad_hdr.method) {
tunnel           1523 drivers/infiniband/hw/mlx4/mad.c 		slave_id = (u8 *) &tunnel->mad.mad_hdr.tid;
tunnel           1527 drivers/infiniband/hw/mlx4/mad.c 				     tunnel->mad.mad_hdr.mgmt_class, slave);
tunnel           1536 drivers/infiniband/hw/mlx4/mad.c 	switch (tunnel->mad.mad_hdr.mgmt_class) {
tunnel           1545 drivers/infiniband/hw/mlx4/mad.c 			      (struct ib_sa_mad *) &tunnel->mad))
tunnel           1550 drivers/infiniband/hw/mlx4/mad.c 			      (struct ib_mad *) &tunnel->mad))
tunnel           1554 drivers/infiniband/hw/mlx4/mad.c 		if (tunnel->mad.mad_hdr.method != IB_MGMT_METHOD_GET &&
tunnel           1555 drivers/infiniband/hw/mlx4/mad.c 		    tunnel->mad.mad_hdr.method != IB_MGMT_METHOD_SET)
tunnel           1562 drivers/infiniband/hw/mlx4/mad.c 				     "for slave:%d\n", tunnel->mad.mad_hdr.mgmt_class, slave);
tunnel           1569 drivers/infiniband/hw/mlx4/mad.c 	memcpy(&ah.av, &tunnel->hdr.av, sizeof (struct mlx4_av));
tunnel           1584 drivers/infiniband/hw/mlx4/mad.c 		memcpy(dmac, tunnel->hdr.mac, ETH_ALEN);
tunnel           1585 drivers/infiniband/hw/mlx4/mad.c 	vlan_id = be16_to_cpu(tunnel->hdr.vlan);
tunnel           1594 drivers/infiniband/hw/mlx4/mad.c 			     be16_to_cpu(tunnel->hdr.pkey_index),
tunnel           1595 drivers/infiniband/hw/mlx4/mad.c 			     be32_to_cpu(tunnel->hdr.remote_qpn),
tunnel           1596 drivers/infiniband/hw/mlx4/mad.c 			     be32_to_cpu(tunnel->hdr.qkey),
tunnel           1597 drivers/infiniband/hw/mlx4/mad.c 			     &ah_attr, wc->smac, vlan_id, &tunnel->mad);
tunnel           2988 drivers/infiniband/hw/mlx5/main.c 		if (FIELDS_NOT_SUPPORTED(ib_spec->tunnel.mask,
tunnel           2993 drivers/infiniband/hw/mlx5/main.c 			 ntohl(ib_spec->tunnel.mask.tunnel_id));
tunnel           2995 drivers/infiniband/hw/mlx5/main.c 			 ntohl(ib_spec->tunnel.val.tunnel_id));
tunnel            101 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c 	const struct ip_tunnel_info *tun_info = act->tunnel;
tunnel           3069 drivers/net/ethernet/intel/i40e/i40e_txrx.c 		u32 tunnel = 0;
tunnel           3072 drivers/net/ethernet/intel/i40e/i40e_txrx.c 			tunnel |= (*tx_flags & I40E_TX_FLAGS_TSO) ?
tunnel           3078 drivers/net/ethernet/intel/i40e/i40e_txrx.c 			tunnel |= I40E_TX_CTX_EXT_IP_IPV6;
tunnel           3090 drivers/net/ethernet/intel/i40e/i40e_txrx.c 			tunnel |= I40E_TXD_CTX_UDP_TUNNELING;
tunnel           3094 drivers/net/ethernet/intel/i40e/i40e_txrx.c 			tunnel |= I40E_TXD_CTX_GRE_TUNNELING;
tunnel           3111 drivers/net/ethernet/intel/i40e/i40e_txrx.c 		tunnel |= ((l4.hdr - ip.hdr) / 4) <<
tunnel           3118 drivers/net/ethernet/intel/i40e/i40e_txrx.c 		tunnel |= ((ip.hdr - l4.hdr) / 2) <<
tunnel           3125 drivers/net/ethernet/intel/i40e/i40e_txrx.c 			tunnel |= I40E_TXD_CTX_QW0_L4T_CS_MASK;
tunnel           3128 drivers/net/ethernet/intel/i40e/i40e_txrx.c 		*cd_tunneling |= tunnel;
tunnel           1991 drivers/net/ethernet/intel/iavf/iavf_txrx.c 		u32 tunnel = 0;
tunnel           1994 drivers/net/ethernet/intel/iavf/iavf_txrx.c 			tunnel |= (*tx_flags & IAVF_TX_FLAGS_TSO) ?
tunnel           2000 drivers/net/ethernet/intel/iavf/iavf_txrx.c 			tunnel |= IAVF_TX_CTX_EXT_IP_IPV6;
tunnel           2012 drivers/net/ethernet/intel/iavf/iavf_txrx.c 			tunnel |= IAVF_TXD_CTX_UDP_TUNNELING;
tunnel           2016 drivers/net/ethernet/intel/iavf/iavf_txrx.c 			tunnel |= IAVF_TXD_CTX_GRE_TUNNELING;
tunnel           2033 drivers/net/ethernet/intel/iavf/iavf_txrx.c 		tunnel |= ((l4.hdr - ip.hdr) / 4) <<
tunnel           2040 drivers/net/ethernet/intel/iavf/iavf_txrx.c 		tunnel |= ((ip.hdr - l4.hdr) / 2) <<
tunnel           2047 drivers/net/ethernet/intel/iavf/iavf_txrx.c 			tunnel |= IAVF_TXD_CTX_QW0_L4T_CS_MASK;
tunnel           2050 drivers/net/ethernet/intel/iavf/iavf_txrx.c 		*cd_tunneling |= tunnel;
tunnel           1370 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c 	bool tunnel;
tunnel           1377 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c 	tunnel = !!(input.formatted.flow_type & IXGBE_ATR_L4TYPE_TUNNEL_MASK);
tunnel           1398 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c 	if (tunnel)
tunnel            176 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	if (!e->tunnel) {
tunnel            181 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	return e->tunnel->generate_ip_tun_hdr(buf, ip_proto, e);
tunnel            237 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 		e->tunnel->calc_hlen(e);
tunnel            356 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 		e->tunnel->calc_hlen(e);
tunnel            449 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(netdev);
tunnel            451 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	if (tunnel && tunnel->can_offload(priv))
tunnel            462 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(tunnel_dev);
tunnel            464 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	if (!tunnel) {
tunnel            469 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	return tunnel->init_encap_attr(tunnel_dev, priv, e, extack);
tunnel            479 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	struct mlx5e_tc_tunnel *tunnel = mlx5e_get_tc_tun(filter_dev);
tunnel            482 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	if (!tunnel) {
tunnel            490 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	*match_level = tunnel->match_level;
tunnel            492 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	if (tunnel->parse_udp_ports) {
tunnel            493 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 		err = tunnel->parse_udp_ports(priv, spec, f,
tunnel            499 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	if (tunnel->parse_tunnel) {
tunnel            500 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 		err = tunnel->parse_tunnel(priv, spec, f,
tunnel             69 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c 	e->tunnel = &geneve_tunnel;
tunnel             22 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c 	e->tunnel = &gre_tunnel;
tunnel             67 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c 	e->tunnel = &vxlan_tunnel;
tunnel            170 drivers/net/ethernet/mellanox/mlx5/core/en_rep.h 	struct mlx5e_tc_tunnel *tunnel;
tunnel           2972 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 		e_key.tc_tunnel = e->tunnel;
tunnel           3347 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 			info = act->tunnel;
tunnel            235 drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c 	struct ip_tunnel *tunnel = netdev_priv(ol_dev);
tunnel            237 drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c 	bool inherit_ttl = tunnel->parms.iph.ttl == 0;
tunnel            238 drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c 	bool inherit_tos = tunnel->parms.iph.tos & 0x1;
tunnel            240 drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c 	return (tunnel->parms.i_flags & ~okflags) == 0 &&
tunnel            241 drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c 	       (tunnel->parms.o_flags & ~okflags) == 0 &&
tunnel            284 drivers/net/ethernet/netronome/nfp/flower/action.c 	const struct ip_tunnel_info *tun = act->tunnel;
tunnel            331 drivers/net/ethernet/netronome/nfp/flower/action.c 	struct ip_tunnel_info *ip_tun = (struct ip_tunnel_info *)act->tunnel;
tunnel            404 drivers/net/ethernet/netronome/nfp/flower/action.c 	const struct ip_tunnel_info *ip_tun = act->tunnel;
tunnel           1017 drivers/net/ethernet/netronome/nfp/flower/action.c 		const struct ip_tunnel_info *ip_tun = act->tunnel;
tunnel            814 drivers/net/ethernet/qlogic/qed/qed.h 	struct qed_tunnel_info		tunnel;
tunnel           2641 drivers/net/ethernet/qlogic/qed/qed_l2.c 		tun = &hwfn->cdev->tunnel;
tunnel            249 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_tunnel_info *tun = &cdev->tunnel;
tunnel            231 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	struct qed_tunnel_info *p_tun = &p_hwfn->cdev->tunnel;
tunnel            293 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	struct qed_tunnel_info *p_tun = &p_hwfn->cdev->tunnel;
tunnel            441 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 					  &p_hwfn->cdev->tunnel);
tunnel            540 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_set_hw_tunn_mode_port(p_hwfn, p_ptt, &p_hwfn->cdev->tunnel);
tunnel           2262 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_tunnel_info *tun = &p_hwfn->cdev->tunnel;
tunnel           2320 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_tunnel_info *p_tun = &p_hwfn->cdev->tunnel;
tunnel            678 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_tunnel_info *p_tun = &p_hwfn->cdev->tunnel;
tunnel             67 drivers/thunderbolt/tb.c 		struct tb_tunnel *tunnel = NULL;
tunnel             72 drivers/thunderbolt/tb.c 			tunnel = tb_tunnel_discover_dp(tb, port);
tunnel             76 drivers/thunderbolt/tb.c 			tunnel = tb_tunnel_discover_pci(tb, port);
tunnel             83 drivers/thunderbolt/tb.c 		if (!tunnel)
tunnel             86 drivers/thunderbolt/tb.c 		if (tb_tunnel_is_pci(tunnel)) {
tunnel             87 drivers/thunderbolt/tb.c 			struct tb_switch *parent = tunnel->dst_port->sw;
tunnel             89 drivers/thunderbolt/tb.c 			while (parent != tunnel->src_port->sw) {
tunnel             95 drivers/thunderbolt/tb.c 		list_add_tail(&tunnel->list, &tcm->tunnel_list);
tunnel            227 drivers/thunderbolt/tb.c 	struct tb_tunnel *tunnel;
tunnel            229 drivers/thunderbolt/tb.c 	list_for_each_entry(tunnel, &tcm->tunnel_list, list) {
tunnel            230 drivers/thunderbolt/tb.c 		if (tunnel->type == type &&
tunnel            231 drivers/thunderbolt/tb.c 		    ((src_port && src_port == tunnel->src_port) ||
tunnel            232 drivers/thunderbolt/tb.c 		     (dst_port && dst_port == tunnel->dst_port))) {
tunnel            233 drivers/thunderbolt/tb.c 			tb_tunnel_deactivate(tunnel);
tunnel            234 drivers/thunderbolt/tb.c 			list_del(&tunnel->list);
tunnel            235 drivers/thunderbolt/tb.c 			tb_tunnel_free(tunnel);
tunnel            249 drivers/thunderbolt/tb.c 	struct tb_tunnel *tunnel;
tunnel            252 drivers/thunderbolt/tb.c 	list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) {
tunnel            253 drivers/thunderbolt/tb.c 		if (tb_tunnel_is_invalid(tunnel)) {
tunnel            254 drivers/thunderbolt/tb.c 			tb_tunnel_deactivate(tunnel);
tunnel            255 drivers/thunderbolt/tb.c 			list_del(&tunnel->list);
tunnel            256 drivers/thunderbolt/tb.c 			tb_tunnel_free(tunnel);
tunnel            365 drivers/thunderbolt/tb.c 	struct tb_tunnel *tunnel;
tunnel            378 drivers/thunderbolt/tb.c 	tunnel = tb_tunnel_alloc_dp(tb, in, out);
tunnel            379 drivers/thunderbolt/tb.c 	if (!tunnel) {
tunnel            384 drivers/thunderbolt/tb.c 	if (tb_tunnel_activate(tunnel)) {
tunnel            386 drivers/thunderbolt/tb.c 		tb_tunnel_free(tunnel);
tunnel            390 drivers/thunderbolt/tb.c 	list_add_tail(&tunnel->list, &tcm->tunnel_list);
tunnel            404 drivers/thunderbolt/tb.c 	struct tb_tunnel *tunnel;
tunnel            420 drivers/thunderbolt/tb.c 	tunnel = tb_tunnel_alloc_pci(tb, up, down);
tunnel            421 drivers/thunderbolt/tb.c 	if (!tunnel)
tunnel            424 drivers/thunderbolt/tb.c 	if (tb_tunnel_activate(tunnel)) {
tunnel            427 drivers/thunderbolt/tb.c 		tb_tunnel_free(tunnel);
tunnel            431 drivers/thunderbolt/tb.c 	list_add_tail(&tunnel->list, &tcm->tunnel_list);
tunnel            439 drivers/thunderbolt/tb.c 	struct tb_tunnel *tunnel;
tunnel            447 drivers/thunderbolt/tb.c 	tunnel = tb_tunnel_alloc_dma(tb, nhi_port, dst_port, xd->transmit_ring,
tunnel            450 drivers/thunderbolt/tb.c 	if (!tunnel) {
tunnel            455 drivers/thunderbolt/tb.c 	if (tb_tunnel_activate(tunnel)) {
tunnel            458 drivers/thunderbolt/tb.c 		tb_tunnel_free(tunnel);
tunnel            463 drivers/thunderbolt/tb.c 	list_add_tail(&tunnel->list, &tcm->tunnel_list);
tunnel            612 drivers/thunderbolt/tb.c 	struct tb_tunnel *tunnel;
tunnel            616 drivers/thunderbolt/tb.c 	list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) {
tunnel            622 drivers/thunderbolt/tb.c 		if (tb_tunnel_is_dma(tunnel))
tunnel            623 drivers/thunderbolt/tb.c 			tb_tunnel_deactivate(tunnel);
tunnel            624 drivers/thunderbolt/tb.c 		tb_tunnel_free(tunnel);
tunnel            708 drivers/thunderbolt/tb.c 	struct tb_tunnel *tunnel, *n;
tunnel            718 drivers/thunderbolt/tb.c 	list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list)
tunnel            719 drivers/thunderbolt/tb.c 		tb_tunnel_restart(tunnel);
tunnel             35 drivers/thunderbolt/tunnel.c #define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...)                   \
tunnel             37 drivers/thunderbolt/tunnel.c 		struct tb_tunnel *__tunnel = (tunnel);                  \
tunnel             47 drivers/thunderbolt/tunnel.c #define tb_tunnel_WARN(tunnel, fmt, arg...) \
tunnel             48 drivers/thunderbolt/tunnel.c 	__TB_TUNNEL_PRINT(tb_WARN, tunnel, fmt, ##arg)
tunnel             49 drivers/thunderbolt/tunnel.c #define tb_tunnel_warn(tunnel, fmt, arg...) \
tunnel             50 drivers/thunderbolt/tunnel.c 	__TB_TUNNEL_PRINT(tb_warn, tunnel, fmt, ##arg)
tunnel             51 drivers/thunderbolt/tunnel.c #define tb_tunnel_info(tunnel, fmt, arg...) \
tunnel             52 drivers/thunderbolt/tunnel.c 	__TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg)
tunnel             53 drivers/thunderbolt/tunnel.c #define tb_tunnel_dbg(tunnel, fmt, arg...) \
tunnel             54 drivers/thunderbolt/tunnel.c 	__TB_TUNNEL_PRINT(tb_dbg, tunnel, fmt, ##arg)
tunnel             59 drivers/thunderbolt/tunnel.c 	struct tb_tunnel *tunnel;
tunnel             61 drivers/thunderbolt/tunnel.c 	tunnel = kzalloc(sizeof(*tunnel), GFP_KERNEL);
tunnel             62 drivers/thunderbolt/tunnel.c 	if (!tunnel)
tunnel             65 drivers/thunderbolt/tunnel.c 	tunnel->paths = kcalloc(npaths, sizeof(tunnel->paths[0]), GFP_KERNEL);
tunnel             66 drivers/thunderbolt/tunnel.c 	if (!tunnel->paths) {
tunnel             67 drivers/thunderbolt/tunnel.c 		tb_tunnel_free(tunnel);
tunnel             71 drivers/thunderbolt/tunnel.c 	INIT_LIST_HEAD(&tunnel->list);
tunnel             72 drivers/thunderbolt/tunnel.c 	tunnel->tb = tb;
tunnel             73 drivers/thunderbolt/tunnel.c 	tunnel->npaths = npaths;
tunnel             74 drivers/thunderbolt/tunnel.c 	tunnel->type = type;
tunnel             76 drivers/thunderbolt/tunnel.c 	return tunnel;
tunnel             79 drivers/thunderbolt/tunnel.c static int tb_pci_activate(struct tb_tunnel *tunnel, bool activate)
tunnel             83 drivers/thunderbolt/tunnel.c 	res = tb_pci_port_enable(tunnel->src_port, activate);
tunnel             87 drivers/thunderbolt/tunnel.c 	if (tb_port_is_pcie_up(tunnel->dst_port))
tunnel             88 drivers/thunderbolt/tunnel.c 		return tb_pci_port_enable(tunnel->dst_port, activate);
tunnel            118 drivers/thunderbolt/tunnel.c 	struct tb_tunnel *tunnel;
tunnel            124 drivers/thunderbolt/tunnel.c 	tunnel = tb_tunnel_alloc(tb, 2, TB_TUNNEL_PCI);
tunnel            125 drivers/thunderbolt/tunnel.c 	if (!tunnel)
tunnel            128 drivers/thunderbolt/tunnel.c 	tunnel->activate = tb_pci_activate;
tunnel            129 drivers/thunderbolt/tunnel.c 	tunnel->src_port = down;
tunnel            137 drivers/thunderbolt/tunnel.c 				&tunnel->dst_port, "PCIe Up");
tunnel            143 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_PCI_PATH_UP] = path;
tunnel            144 drivers/thunderbolt/tunnel.c 	tb_pci_init_path(tunnel->paths[TB_PCI_PATH_UP]);
tunnel            146 drivers/thunderbolt/tunnel.c 	path = tb_path_discover(tunnel->dst_port, -1, down, TB_PCI_HOPID, NULL,
tunnel            150 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_PCI_PATH_DOWN] = path;
tunnel            151 drivers/thunderbolt/tunnel.c 	tb_pci_init_path(tunnel->paths[TB_PCI_PATH_DOWN]);
tunnel            154 drivers/thunderbolt/tunnel.c 	if (!tb_port_is_pcie_up(tunnel->dst_port)) {
tunnel            155 drivers/thunderbolt/tunnel.c 		tb_port_warn(tunnel->dst_port,
tunnel            160 drivers/thunderbolt/tunnel.c 	if (down != tunnel->src_port) {
tunnel            161 drivers/thunderbolt/tunnel.c 		tb_tunnel_warn(tunnel, "path is not complete, cleaning up\n");
tunnel            165 drivers/thunderbolt/tunnel.c 	if (!tb_pci_port_is_enabled(tunnel->dst_port)) {
tunnel            166 drivers/thunderbolt/tunnel.c 		tb_tunnel_warn(tunnel,
tunnel            171 drivers/thunderbolt/tunnel.c 	tb_tunnel_dbg(tunnel, "discovered\n");
tunnel            172 drivers/thunderbolt/tunnel.c 	return tunnel;
tunnel            175 drivers/thunderbolt/tunnel.c 	tb_tunnel_deactivate(tunnel);
tunnel            177 drivers/thunderbolt/tunnel.c 	tb_tunnel_free(tunnel);
tunnel            196 drivers/thunderbolt/tunnel.c 	struct tb_tunnel *tunnel;
tunnel            199 drivers/thunderbolt/tunnel.c 	tunnel = tb_tunnel_alloc(tb, 2, TB_TUNNEL_PCI);
tunnel            200 drivers/thunderbolt/tunnel.c 	if (!tunnel)
tunnel            203 drivers/thunderbolt/tunnel.c 	tunnel->activate = tb_pci_activate;
tunnel            204 drivers/thunderbolt/tunnel.c 	tunnel->src_port = down;
tunnel            205 drivers/thunderbolt/tunnel.c 	tunnel->dst_port = up;
tunnel            210 drivers/thunderbolt/tunnel.c 		tb_tunnel_free(tunnel);
tunnel            214 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_PCI_PATH_DOWN] = path;
tunnel            219 drivers/thunderbolt/tunnel.c 		tb_tunnel_free(tunnel);
tunnel            223 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_PCI_PATH_UP] = path;
tunnel            225 drivers/thunderbolt/tunnel.c 	return tunnel;
tunnel            228 drivers/thunderbolt/tunnel.c static int tb_dp_xchg_caps(struct tb_tunnel *tunnel)
tunnel            230 drivers/thunderbolt/tunnel.c 	struct tb_port *out = tunnel->dst_port;
tunnel            231 drivers/thunderbolt/tunnel.c 	struct tb_port *in = tunnel->src_port;
tunnel            263 drivers/thunderbolt/tunnel.c static int tb_dp_activate(struct tb_tunnel *tunnel, bool active)
tunnel            271 drivers/thunderbolt/tunnel.c 		paths = tunnel->paths;
tunnel            274 drivers/thunderbolt/tunnel.c 		tb_dp_port_set_hops(tunnel->src_port,
tunnel            279 drivers/thunderbolt/tunnel.c 		tb_dp_port_set_hops(tunnel->dst_port,
tunnel            284 drivers/thunderbolt/tunnel.c 		tb_dp_port_hpd_clear(tunnel->src_port);
tunnel            285 drivers/thunderbolt/tunnel.c 		tb_dp_port_set_hops(tunnel->src_port, 0, 0, 0);
tunnel            286 drivers/thunderbolt/tunnel.c 		if (tb_port_is_dpout(tunnel->dst_port))
tunnel            287 drivers/thunderbolt/tunnel.c 			tb_dp_port_set_hops(tunnel->dst_port, 0, 0, 0);
tunnel            290 drivers/thunderbolt/tunnel.c 	ret = tb_dp_port_enable(tunnel->src_port, active);
tunnel            294 drivers/thunderbolt/tunnel.c 	if (tb_port_is_dpout(tunnel->dst_port))
tunnel            295 drivers/thunderbolt/tunnel.c 		return tb_dp_port_enable(tunnel->dst_port, active);
tunnel            351 drivers/thunderbolt/tunnel.c 	struct tb_tunnel *tunnel;
tunnel            358 drivers/thunderbolt/tunnel.c 	tunnel = tb_tunnel_alloc(tb, 3, TB_TUNNEL_DP);
tunnel            359 drivers/thunderbolt/tunnel.c 	if (!tunnel)
tunnel            362 drivers/thunderbolt/tunnel.c 	tunnel->init = tb_dp_xchg_caps;
tunnel            363 drivers/thunderbolt/tunnel.c 	tunnel->activate = tb_dp_activate;
tunnel            364 drivers/thunderbolt/tunnel.c 	tunnel->src_port = in;
tunnel            367 drivers/thunderbolt/tunnel.c 				&tunnel->dst_port, "Video");
tunnel            373 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_DP_VIDEO_PATH_OUT] = path;
tunnel            374 drivers/thunderbolt/tunnel.c 	tb_dp_init_video_path(tunnel->paths[TB_DP_VIDEO_PATH_OUT], true);
tunnel            379 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_DP_AUX_PATH_OUT] = path;
tunnel            380 drivers/thunderbolt/tunnel.c 	tb_dp_init_aux_path(tunnel->paths[TB_DP_AUX_PATH_OUT]);
tunnel            382 drivers/thunderbolt/tunnel.c 	path = tb_path_discover(tunnel->dst_port, -1, in, TB_DP_AUX_RX_HOPID,
tunnel            386 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_DP_AUX_PATH_IN] = path;
tunnel            387 drivers/thunderbolt/tunnel.c 	tb_dp_init_aux_path(tunnel->paths[TB_DP_AUX_PATH_IN]);
tunnel            390 drivers/thunderbolt/tunnel.c 	if (!tb_port_is_dpout(tunnel->dst_port)) {
tunnel            395 drivers/thunderbolt/tunnel.c 	if (!tb_dp_port_is_enabled(tunnel->dst_port))
tunnel            398 drivers/thunderbolt/tunnel.c 	if (!tb_dp_port_hpd_is_active(tunnel->dst_port))
tunnel            401 drivers/thunderbolt/tunnel.c 	if (port != tunnel->src_port) {
tunnel            402 drivers/thunderbolt/tunnel.c 		tb_tunnel_warn(tunnel, "path is not complete, cleaning up\n");
tunnel            406 drivers/thunderbolt/tunnel.c 	tb_tunnel_dbg(tunnel, "discovered\n");
tunnel            407 drivers/thunderbolt/tunnel.c 	return tunnel;
tunnel            410 drivers/thunderbolt/tunnel.c 	tb_tunnel_deactivate(tunnel);
tunnel            412 drivers/thunderbolt/tunnel.c 	tb_tunnel_free(tunnel);
tunnel            431 drivers/thunderbolt/tunnel.c 	struct tb_tunnel *tunnel;
tunnel            438 drivers/thunderbolt/tunnel.c 	tunnel = tb_tunnel_alloc(tb, 3, TB_TUNNEL_DP);
tunnel            439 drivers/thunderbolt/tunnel.c 	if (!tunnel)
tunnel            442 drivers/thunderbolt/tunnel.c 	tunnel->init = tb_dp_xchg_caps;
tunnel            443 drivers/thunderbolt/tunnel.c 	tunnel->activate = tb_dp_activate;
tunnel            444 drivers/thunderbolt/tunnel.c 	tunnel->src_port = in;
tunnel            445 drivers/thunderbolt/tunnel.c 	tunnel->dst_port = out;
tunnel            447 drivers/thunderbolt/tunnel.c 	paths = tunnel->paths;
tunnel            470 drivers/thunderbolt/tunnel.c 	return tunnel;
tunnel            473 drivers/thunderbolt/tunnel.c 	tb_tunnel_free(tunnel);
tunnel            486 drivers/thunderbolt/tunnel.c static int tb_dma_activate(struct tb_tunnel *tunnel, bool active)
tunnel            488 drivers/thunderbolt/tunnel.c 	struct tb_port *nhi = tunnel->src_port;
tunnel            531 drivers/thunderbolt/tunnel.c 	struct tb_tunnel *tunnel;
tunnel            535 drivers/thunderbolt/tunnel.c 	tunnel = tb_tunnel_alloc(tb, 2, TB_TUNNEL_DMA);
tunnel            536 drivers/thunderbolt/tunnel.c 	if (!tunnel)
tunnel            539 drivers/thunderbolt/tunnel.c 	tunnel->activate = tb_dma_activate;
tunnel            540 drivers/thunderbolt/tunnel.c 	tunnel->src_port = nhi;
tunnel            541 drivers/thunderbolt/tunnel.c 	tunnel->dst_port = dst;
tunnel            547 drivers/thunderbolt/tunnel.c 		tb_tunnel_free(tunnel);
tunnel            552 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_DMA_PATH_IN] = path;
tunnel            556 drivers/thunderbolt/tunnel.c 		tb_tunnel_free(tunnel);
tunnel            560 drivers/thunderbolt/tunnel.c 	tunnel->paths[TB_DMA_PATH_OUT] = path;
tunnel            562 drivers/thunderbolt/tunnel.c 	return tunnel;
tunnel            571 drivers/thunderbolt/tunnel.c void tb_tunnel_free(struct tb_tunnel *tunnel)
tunnel            575 drivers/thunderbolt/tunnel.c 	if (!tunnel)
tunnel            578 drivers/thunderbolt/tunnel.c 	for (i = 0; i < tunnel->npaths; i++) {
tunnel            579 drivers/thunderbolt/tunnel.c 		if (tunnel->paths[i])
tunnel            580 drivers/thunderbolt/tunnel.c 			tb_path_free(tunnel->paths[i]);
tunnel            583 drivers/thunderbolt/tunnel.c 	kfree(tunnel->paths);
tunnel            584 drivers/thunderbolt/tunnel.c 	kfree(tunnel);
tunnel            591 drivers/thunderbolt/tunnel.c bool tb_tunnel_is_invalid(struct tb_tunnel *tunnel)
tunnel            595 drivers/thunderbolt/tunnel.c 	for (i = 0; i < tunnel->npaths; i++) {
tunnel            596 drivers/thunderbolt/tunnel.c 		WARN_ON(!tunnel->paths[i]->activated);
tunnel            597 drivers/thunderbolt/tunnel.c 		if (tb_path_is_invalid(tunnel->paths[i]))
tunnel            610 drivers/thunderbolt/tunnel.c int tb_tunnel_restart(struct tb_tunnel *tunnel)
tunnel            614 drivers/thunderbolt/tunnel.c 	tb_tunnel_dbg(tunnel, "activating\n");
tunnel            620 drivers/thunderbolt/tunnel.c 	for (i = 0; i < tunnel->npaths; i++) {
tunnel            621 drivers/thunderbolt/tunnel.c 		if (tunnel->paths[i]->activated) {
tunnel            622 drivers/thunderbolt/tunnel.c 			tb_path_deactivate(tunnel->paths[i]);
tunnel            623 drivers/thunderbolt/tunnel.c 			tunnel->paths[i]->activated = false;
tunnel            627 drivers/thunderbolt/tunnel.c 	if (tunnel->init) {
tunnel            628 drivers/thunderbolt/tunnel.c 		res = tunnel->init(tunnel);
tunnel            633 drivers/thunderbolt/tunnel.c 	for (i = 0; i < tunnel->npaths; i++) {
tunnel            634 drivers/thunderbolt/tunnel.c 		res = tb_path_activate(tunnel->paths[i]);
tunnel            639 drivers/thunderbolt/tunnel.c 	if (tunnel->activate) {
tunnel            640 drivers/thunderbolt/tunnel.c 		res = tunnel->activate(tunnel, true);
tunnel            648 drivers/thunderbolt/tunnel.c 	tb_tunnel_warn(tunnel, "activation failed\n");
tunnel            649 drivers/thunderbolt/tunnel.c 	tb_tunnel_deactivate(tunnel);
tunnel            659 drivers/thunderbolt/tunnel.c int tb_tunnel_activate(struct tb_tunnel *tunnel)
tunnel            663 drivers/thunderbolt/tunnel.c 	for (i = 0; i < tunnel->npaths; i++) {
tunnel            664 drivers/thunderbolt/tunnel.c 		if (tunnel->paths[i]->activated) {
tunnel            665 drivers/thunderbolt/tunnel.c 			tb_tunnel_WARN(tunnel,
tunnel            671 drivers/thunderbolt/tunnel.c 	return tb_tunnel_restart(tunnel);
tunnel            678 drivers/thunderbolt/tunnel.c void tb_tunnel_deactivate(struct tb_tunnel *tunnel)
tunnel            682 drivers/thunderbolt/tunnel.c 	tb_tunnel_dbg(tunnel, "deactivating\n");
tunnel            684 drivers/thunderbolt/tunnel.c 	if (tunnel->activate)
tunnel            685 drivers/thunderbolt/tunnel.c 		tunnel->activate(tunnel, false);
tunnel            687 drivers/thunderbolt/tunnel.c 	for (i = 0; i < tunnel->npaths; i++) {
tunnel            688 drivers/thunderbolt/tunnel.c 		if (tunnel->paths[i] && tunnel->paths[i]->activated)
tunnel            689 drivers/thunderbolt/tunnel.c 			tb_path_deactivate(tunnel->paths[i]);
tunnel             39 drivers/thunderbolt/tunnel.h 	int (*init)(struct tb_tunnel *tunnel);
tunnel             40 drivers/thunderbolt/tunnel.h 	int (*activate)(struct tb_tunnel *tunnel, bool activate);
tunnel             56 drivers/thunderbolt/tunnel.h void tb_tunnel_free(struct tb_tunnel *tunnel);
tunnel             57 drivers/thunderbolt/tunnel.h int tb_tunnel_activate(struct tb_tunnel *tunnel);
tunnel             58 drivers/thunderbolt/tunnel.h int tb_tunnel_restart(struct tb_tunnel *tunnel);
tunnel             59 drivers/thunderbolt/tunnel.h void tb_tunnel_deactivate(struct tb_tunnel *tunnel);
tunnel             60 drivers/thunderbolt/tunnel.h bool tb_tunnel_is_invalid(struct tb_tunnel *tunnel);
tunnel             62 drivers/thunderbolt/tunnel.h static inline bool tb_tunnel_is_pci(const struct tb_tunnel *tunnel)
tunnel             64 drivers/thunderbolt/tunnel.h 	return tunnel->type == TB_TUNNEL_PCI;
tunnel             67 drivers/thunderbolt/tunnel.h static inline bool tb_tunnel_is_dp(const struct tb_tunnel *tunnel)
tunnel             69 drivers/thunderbolt/tunnel.h 	return tunnel->type == TB_TUNNEL_DP;
tunnel             72 drivers/thunderbolt/tunnel.h static inline bool tb_tunnel_is_dma(const struct tb_tunnel *tunnel)
tunnel             74 drivers/thunderbolt/tunnel.h 	return tunnel->type == TB_TUNNEL_DMA;
tunnel            177 include/net/flow_offload.h 		struct ip_tunnel_info	*tunnel;	/* FLOW_ACTION_TUNNEL_ENCAP */
tunnel            139 include/net/ip6_tunnel.h int ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb,
tunnel            283 include/net/ip_tunnels.h int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
tunnel            201 include/net/xfrm.h 	struct xfrm_state	*tunnel;
tunnel            598 include/net/xfrm.h 	} tunnel;
tunnel           1571 include/net/xfrm.h 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL;
tunnel           1981 include/net/xfrm.h 	bool tunnel = false;
tunnel           1985 include/net/xfrm.h 		if (XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4)
tunnel           1986 include/net/xfrm.h 			tunnel = true;
tunnel           1989 include/net/xfrm.h 		if (XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6)
tunnel           1990 include/net/xfrm.h 			tunnel = true;
tunnel           1993 include/net/xfrm.h 	if (tunnel && !(x->outer_mode.flags & XFRM_MODE_FLAG_TUNNEL))
tunnel           2039 include/rdma/ib_verbs.h 	struct ib_flow_spec_tunnel      tunnel;
tunnel             72 net/ipv4/esp4_offload.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL;
tunnel            258 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel;
tunnel            270 net/ipv4/ip_gre.c 	tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex,
tunnel            274 net/ipv4/ip_gre.c 	if (tunnel) {
tunnel            285 net/ipv4/ip_gre.c 		if (tunnel->collect_md) {
tunnel            321 net/ipv4/ip_gre.c 		ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
tunnel            336 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel;
tunnel            339 net/ipv4/ip_gre.c 	tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags,
tunnel            342 net/ipv4/ip_gre.c 	if (tunnel) {
tunnel            347 net/ipv4/ip_gre.c 		if (tunnel->dev->type != ARPHRD_NONE)
tunnel            351 net/ipv4/ip_gre.c 		if (tunnel->collect_md) {
tunnel            362 net/ipv4/ip_gre.c 		ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
tunnel            434 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            436 net/ipv4/ip_gre.c 	if (tunnel->parms.o_flags & TUNNEL_SEQ)
tunnel            437 net/ipv4/ip_gre.c 		tunnel->o_seqno++;
tunnel            440 net/ipv4/ip_gre.c 	gre_build_header(skb, tunnel->tun_hlen,
tunnel            441 net/ipv4/ip_gre.c 			 tunnel->parms.o_flags, proto, tunnel->parms.o_key,
tunnel            442 net/ipv4/ip_gre.c 			 htonl(tunnel->o_seqno));
tunnel            455 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            480 net/ipv4/ip_gre.c 			 (flags & TUNNEL_SEQ) ? htonl(tunnel->o_seqno++) : 0);
tunnel            493 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            557 net/ipv4/ip_gre.c 			 proto, 0, htonl(tunnel->o_seqno++));
tunnel            594 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            600 net/ipv4/ip_gre.c 	if (tunnel->collect_md) {
tunnel            608 net/ipv4/ip_gre.c 				      (tunnel->hlen + sizeof(struct iphdr))))
tunnel            616 net/ipv4/ip_gre.c 		skb_pull(skb, tunnel->hlen + sizeof(struct iphdr));
tunnel            622 net/ipv4/ip_gre.c 		tnl_params = &tunnel->parms.iph;
tunnel            625 net/ipv4/ip_gre.c 	if (gre_handle_offloads(skb, !!(tunnel->parms.o_flags & TUNNEL_CSUM)))
tunnel            640 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            647 net/ipv4/ip_gre.c 	if (tunnel->collect_md) {
tunnel            664 net/ipv4/ip_gre.c 	if (tunnel->erspan_ver == 1) {
tunnel            665 net/ipv4/ip_gre.c 		erspan_build_header(skb, ntohl(tunnel->parms.o_key),
tunnel            666 net/ipv4/ip_gre.c 				    tunnel->index,
tunnel            669 net/ipv4/ip_gre.c 	} else if (tunnel->erspan_ver == 2) {
tunnel            670 net/ipv4/ip_gre.c 		erspan_build_header_v2(skb, ntohl(tunnel->parms.o_key),
tunnel            671 net/ipv4/ip_gre.c 				       tunnel->dir, tunnel->hwid,
tunnel            678 net/ipv4/ip_gre.c 	tunnel->parms.o_flags &= ~TUNNEL_KEY;
tunnel            679 net/ipv4/ip_gre.c 	__gre_xmit(skb, dev, &tunnel->parms.iph, proto);
tunnel            691 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            696 net/ipv4/ip_gre.c 	if (tunnel->collect_md) {
tunnel            701 net/ipv4/ip_gre.c 	if (gre_handle_offloads(skb, !!(tunnel->parms.o_flags & TUNNEL_CSUM)))
tunnel            707 net/ipv4/ip_gre.c 	__gre_xmit(skb, dev, &tunnel->parms.iph, htons(ETH_P_TEB));
tunnel            718 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            721 net/ipv4/ip_gre.c 	len = tunnel->tun_hlen;
tunnel            722 net/ipv4/ip_gre.c 	tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags);
tunnel            723 net/ipv4/ip_gre.c 	len = tunnel->tun_hlen - len;
tunnel            724 net/ipv4/ip_gre.c 	tunnel->hlen = tunnel->hlen + len;
tunnel            730 net/ipv4/ip_gre.c 	if (!(tunnel->parms.o_flags & TUNNEL_SEQ)) {
tunnel            731 net/ipv4/ip_gre.c 		if (!(tunnel->parms.o_flags & TUNNEL_CSUM) ||
tunnel            732 net/ipv4/ip_gre.c 		    tunnel->encap.type == TUNNEL_ENCAP_NONE) {
tunnel            922 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel;
tunnel            924 net/ipv4/ip_gre.c 	tunnel = netdev_priv(dev);
tunnel            925 net/ipv4/ip_gre.c 	tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags);
tunnel            926 net/ipv4/ip_gre.c 	tunnel->parms.iph.protocol = IPPROTO_GRE;
tunnel            928 net/ipv4/ip_gre.c 	tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen;
tunnel            933 net/ipv4/ip_gre.c 	if (!(tunnel->parms.o_flags & TUNNEL_SEQ)) {
tunnel            938 net/ipv4/ip_gre.c 		if (!(tunnel->parms.o_flags & TUNNEL_CSUM) ||
tunnel            939 net/ipv4/ip_gre.c 		    (tunnel->encap.type == TUNNEL_ENCAP_NONE)) {
tunnel            953 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            954 net/ipv4/ip_gre.c 	struct iphdr *iph = &tunnel->parms.iph;
tunnel            965 net/ipv4/ip_gre.c 	if (iph->daddr && !tunnel->collect_md) {
tunnel            974 net/ipv4/ip_gre.c 	} else if (!tunnel->collect_md) {
tunnel           1256 net/ipv4/ip_gre.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1258 net/ipv4/ip_gre.c 	tunnel->tun_hlen = 8;
tunnel           1259 net/ipv4/ip_gre.c 	tunnel->parms.iph.protocol = IPPROTO_GRE;
tunnel           1260 net/ipv4/ip_gre.c 	tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen +
tunnel           1261 net/ipv4/ip_gre.c 		       erspan_hdr_len(tunnel->erspan_ver);
tunnel            235 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel;
tunnel            261 net/ipv4/ip_tunnel.c 	tunnel = netdev_priv(dev);
tunnel            262 net/ipv4/ip_tunnel.c 	tunnel->parms = *parms;
tunnel            263 net/ipv4/ip_tunnel.c 	tunnel->net = net;
tunnel            280 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            284 net/ipv4/ip_tunnel.c 	int t_hlen = tunnel->hlen + sizeof(struct iphdr);
tunnel            286 net/ipv4/ip_tunnel.c 	iph = &tunnel->parms.iph;
tunnel            294 net/ipv4/ip_tunnel.c 				    iph->saddr, tunnel->parms.o_key,
tunnel            295 net/ipv4/ip_tunnel.c 				    RT_TOS(iph->tos), tunnel->parms.link,
tunnel            296 net/ipv4/ip_tunnel.c 				    tunnel->fwmark, 0);
tunnel            297 net/ipv4/ip_tunnel.c 		rt = ip_route_output_key(tunnel->net, &fl4);
tunnel            306 net/ipv4/ip_tunnel.c 		dst_cache_reset(&tunnel->dst_cache);
tunnel            309 net/ipv4/ip_tunnel.c 	if (!tdev && tunnel->parms.link)
tunnel            310 net/ipv4/ip_tunnel.c 		tdev = __dev_get_by_index(tunnel->net, tunnel->parms.link);
tunnel            357 net/ipv4/ip_tunnel.c int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
tunnel            367 net/ipv4/ip_tunnel.c 		tunnel->dev->stats.multicast++;
tunnel            372 net/ipv4/ip_tunnel.c 	if ((!(tpi->flags&TUNNEL_CSUM) &&  (tunnel->parms.i_flags&TUNNEL_CSUM)) ||
tunnel            373 net/ipv4/ip_tunnel.c 	     ((tpi->flags&TUNNEL_CSUM) && !(tunnel->parms.i_flags&TUNNEL_CSUM))) {
tunnel            374 net/ipv4/ip_tunnel.c 		tunnel->dev->stats.rx_crc_errors++;
tunnel            375 net/ipv4/ip_tunnel.c 		tunnel->dev->stats.rx_errors++;
tunnel            379 net/ipv4/ip_tunnel.c 	if (tunnel->parms.i_flags&TUNNEL_SEQ) {
tunnel            381 net/ipv4/ip_tunnel.c 		    (tunnel->i_seqno && (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) {
tunnel            382 net/ipv4/ip_tunnel.c 			tunnel->dev->stats.rx_fifo_errors++;
tunnel            383 net/ipv4/ip_tunnel.c 			tunnel->dev->stats.rx_errors++;
tunnel            386 net/ipv4/ip_tunnel.c 		tunnel->i_seqno = ntohl(tpi->seq) + 1;
tunnel            397 net/ipv4/ip_tunnel.c 			++tunnel->dev->stats.rx_frame_errors;
tunnel            398 net/ipv4/ip_tunnel.c 			++tunnel->dev->stats.rx_errors;
tunnel            403 net/ipv4/ip_tunnel.c 	tstats = this_cpu_ptr(tunnel->dev->tstats);
tunnel            409 net/ipv4/ip_tunnel.c 	skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev)));
tunnel            411 net/ipv4/ip_tunnel.c 	if (tunnel->dev->type == ARPHRD_ETHER) {
tunnel            412 net/ipv4/ip_tunnel.c 		skb->protocol = eth_type_trans(skb, tunnel->dev);
tunnel            415 net/ipv4/ip_tunnel.c 		skb->dev = tunnel->dev;
tunnel            421 net/ipv4/ip_tunnel.c 	gro_cells_receive(&tunnel->gro_cells, skb);
tunnel            490 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            494 net/ipv4/ip_tunnel.c 	tunnel_hlen = md ? tunnel_hlen : tunnel->hlen;
tunnel            522 net/ipv4/ip_tunnel.c 		daddr = md ? dst : tunnel->parms.iph.daddr;
tunnel            546 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            574 net/ipv4/ip_tunnel.c 	if (tunnel->encap.type != TUNNEL_ENCAP_NONE)
tunnel            581 net/ipv4/ip_tunnel.c 		rt = ip_route_output_key(tunnel->net, &fl4);
tunnel            627 net/ipv4/ip_tunnel.c 		      df, !net_eq(tunnel->net, dev_net(dev)));
tunnel            642 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            656 net/ipv4/ip_tunnel.c 	connected = (tunnel->parms.iph.daddr != 0);
tunnel            732 net/ipv4/ip_tunnel.c 			    tunnel->parms.o_key, RT_TOS(tos), tunnel->parms.link,
tunnel            733 net/ipv4/ip_tunnel.c 			    tunnel->fwmark, skb_get_hash(skb));
tunnel            735 net/ipv4/ip_tunnel.c 	if (ip_tunnel_encap(skb, tunnel, &protocol, &fl4) < 0)
tunnel            744 net/ipv4/ip_tunnel.c 		rt = connected ? dst_cache_get_ip4(&tunnel->dst_cache,
tunnel            749 net/ipv4/ip_tunnel.c 		rt = ip_route_output_key(tunnel->net, &fl4);
tunnel            759 net/ipv4/ip_tunnel.c 			dst_cache_set_ip4(&tunnel->dst_cache, &rt->dst,
tunnel            775 net/ipv4/ip_tunnel.c 	if (tunnel->err_count > 0) {
tunnel            777 net/ipv4/ip_tunnel.c 				tunnel->err_time + IPTUNNEL_ERR_TIMEO)) {
tunnel            778 net/ipv4/ip_tunnel.c 			tunnel->err_count--;
tunnel            782 net/ipv4/ip_tunnel.c 			tunnel->err_count = 0;
tunnel            799 net/ipv4/ip_tunnel.c 	if (skb->protocol == htons(ETH_P_IP) && !tunnel->ignore_df)
tunnel            803 net/ipv4/ip_tunnel.c 			+ rt->dst.header_len + ip_encap_hlen(&tunnel->encap);
tunnel            815 net/ipv4/ip_tunnel.c 		      df, !net_eq(tunnel->net, dev_net(dev)));
tunnel            967 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            968 net/ipv4/ip_tunnel.c 	int t_hlen = tunnel->hlen + sizeof(struct iphdr);
tunnel            994 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            996 net/ipv4/ip_tunnel.c 	gro_cells_destroy(&tunnel->gro_cells);
tunnel            997 net/ipv4/ip_tunnel.c 	dst_cache_destroy(&tunnel->dst_cache);
tunnel           1003 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1006 net/ipv4/ip_tunnel.c 	itn = net_generic(tunnel->net, tunnel->ip_tnl_net_id);
tunnel           1017 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1019 net/ipv4/ip_tunnel.c 	return tunnel->net;
tunnel           1025 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1027 net/ipv4/ip_tunnel.c 	return tunnel->parms.link;
tunnel           1170 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1171 net/ipv4/ip_tunnel.c 	struct net *net = tunnel->net;
tunnel           1172 net/ipv4/ip_tunnel.c 	struct ip_tunnel_net *itn = net_generic(net, tunnel->ip_tnl_net_id);
tunnel           1183 net/ipv4/ip_tunnel.c 		t = tunnel;
tunnel           1206 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1207 net/ipv4/ip_tunnel.c 	struct iphdr *iph = &tunnel->parms.iph;
tunnel           1216 net/ipv4/ip_tunnel.c 	err = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
tunnel           1222 net/ipv4/ip_tunnel.c 	err = gro_cells_init(&tunnel->gro_cells, dev);
tunnel           1224 net/ipv4/ip_tunnel.c 		dst_cache_destroy(&tunnel->dst_cache);
tunnel           1229 net/ipv4/ip_tunnel.c 	tunnel->dev = dev;
tunnel           1230 net/ipv4/ip_tunnel.c 	tunnel->net = dev_net(dev);
tunnel           1231 net/ipv4/ip_tunnel.c 	strcpy(tunnel->parms.name, dev->name);
tunnel           1235 net/ipv4/ip_tunnel.c 	if (tunnel->collect_md)
tunnel           1243 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1244 net/ipv4/ip_tunnel.c 	struct net *net = tunnel->net;
tunnel           1247 net/ipv4/ip_tunnel.c 	itn = net_generic(net, tunnel->ip_tnl_net_id);
tunnel           1252 net/ipv4/ip_tunnel.c 	dst_cache_reset(&tunnel->dst_cache);
tunnel           1259 net/ipv4/ip_tunnel.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1260 net/ipv4/ip_tunnel.c 	tunnel->ip_tnl_net_id = net_id;
tunnel             50 net/ipv4/ip_vti.c 	struct ip_tunnel *tunnel;
tunnel             55 net/ipv4/ip_vti.c 	tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
tunnel             57 net/ipv4/ip_vti.c 	if (tunnel) {
tunnel             61 net/ipv4/ip_vti.c 		XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel;
tunnel             64 net/ipv4/ip_vti.c 			skb->dev = tunnel->dev;
tunnel             98 net/ipv4/ip_vti.c 	struct ip_tunnel *tunnel;
tunnel            100 net/ipv4/ip_vti.c 	tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
tunnel            102 net/ipv4/ip_vti.c 	if (tunnel) {
tunnel            111 net/ipv4/ip_vti.c 		return ip_tunnel_rcv(tunnel, skb, &tpi, NULL, false);
tunnel            127 net/ipv4/ip_vti.c 	struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4;
tunnel            131 net/ipv4/ip_vti.c 	if (!tunnel)
tunnel            134 net/ipv4/ip_vti.c 	dev = tunnel->dev;
tunnel            158 net/ipv4/ip_vti.c 	skb->mark = be32_to_cpu(tunnel->parms.i_key);
tunnel            165 net/ipv4/ip_vti.c 	skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(skb->dev)));
tunnel            202 net/ipv4/ip_vti.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            203 net/ipv4/ip_vti.c 	struct ip_tunnel_parm *parms = &tunnel->parms;
tunnel            247 net/ipv4/ip_vti.c 	dst = xfrm_lookup(tunnel->net, dst, fl, NULL, 0);
tunnel            284 net/ipv4/ip_vti.c 	skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(dev)));
tunnel            288 net/ipv4/ip_vti.c 	err = dst_output(tunnel->net, skb->sk, skb);
tunnel            307 net/ipv4/ip_vti.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            329 net/ipv4/ip_vti.c 	fl.flowi_mark = be32_to_cpu(tunnel->parms.o_key);
tunnel            344 net/ipv4/ip_vti.c 	struct ip_tunnel *tunnel;
tunnel            353 net/ipv4/ip_vti.c 	tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
tunnel            355 net/ipv4/ip_vti.c 	if (!tunnel)
tunnel            358 net/ipv4/ip_vti.c 	mark = be32_to_cpu(tunnel->parms.o_key);
tunnel            456 net/ipv4/ip_vti.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            457 net/ipv4/ip_vti.c 	struct iphdr *iph = &tunnel->parms.iph;
tunnel            472 net/ipv4/ip_vti.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            473 net/ipv4/ip_vti.c 	struct iphdr *iph = &tunnel->parms.iph;
tunnel            112 net/ipv4/ipcomp.c 	x->tunnel = t;
tunnel            217 net/ipv4/ipip.c 	struct ip_tunnel *tunnel;
tunnel            221 net/ipv4/ipip.c 	tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
tunnel            223 net/ipv4/ipip.c 	if (tunnel) {
tunnel            226 net/ipv4/ipip.c 		if (tunnel->parms.iph.protocol != ipproto &&
tunnel            227 net/ipv4/ipip.c 		    tunnel->parms.iph.protocol != 0)
tunnel            240 net/ipv4/ipip.c 		if (tunnel->collect_md) {
tunnel            245 net/ipv4/ipip.c 		return ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
tunnel            274 net/ipv4/ipip.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            275 net/ipv4/ipip.c 	const struct iphdr  *tiph = &tunnel->parms.iph;
tunnel            302 net/ipv4/ipip.c 	if (tunnel->collect_md)
tunnel            390 net/ipv4/ipip.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            392 net/ipv4/ipip.c 	memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4);
tunnel            393 net/ipv4/ipip.c 	memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4);
tunnel            395 net/ipv4/ipip.c 	tunnel->tun_hlen = 0;
tunnel            396 net/ipv4/ipip.c 	tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen;
tunnel            576 net/ipv4/ipip.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            577 net/ipv4/ipip.c 	struct ip_tunnel_parm *parm = &tunnel->parms;
tunnel            587 net/ipv4/ipip.c 	    nla_put_u32(skb, IFLA_IPTUN_FWMARK, tunnel->fwmark))
tunnel            591 net/ipv4/ipip.c 			tunnel->encap.type) ||
tunnel            593 net/ipv4/ipip.c 			 tunnel->encap.sport) ||
tunnel            595 net/ipv4/ipip.c 			 tunnel->encap.dport) ||
tunnel            597 net/ipv4/ipip.c 			tunnel->encap.flags))
tunnel            600 net/ipv4/ipip.c 	if (tunnel->collect_md)
tunnel            639 net/ipv4/udp.c 	bool tunnel = false;
tunnel            663 net/ipv4/udp.c 		tunnel = true;
tunnel            706 net/ipv4/udp.c 	if (tunnel) {
tunnel             68 net/ipv4/xfrm4_protocol.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL;
tunnel             92 net/ipv4/xfrm4_protocol.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL;
tunnel            120 net/ipv4/xfrm4_protocol.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL;
tunnel            148 net/ipv4/xfrm4_protocol.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL;
tunnel             99 net/ipv6/esp6_offload.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL;
tunnel            492 net/ipv6/ip6_gre.c 	struct ip6_tnl *tunnel;
tunnel            495 net/ipv6/ip6_gre.c 	tunnel = ip6gre_tunnel_lookup(skb->dev,
tunnel            498 net/ipv6/ip6_gre.c 	if (tunnel) {
tunnel            499 net/ipv6/ip6_gre.c 		if (tunnel->parms.collect_md) {
tunnel            511 net/ipv6/ip6_gre.c 			ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
tunnel            513 net/ipv6/ip6_gre.c 			ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error);
tunnel            529 net/ipv6/ip6_gre.c 	struct ip6_tnl *tunnel;
tunnel            536 net/ipv6/ip6_gre.c 	tunnel = ip6gre_tunnel_lookup(skb->dev,
tunnel            539 net/ipv6/ip6_gre.c 	if (tunnel) {
tunnel            550 net/ipv6/ip6_gre.c 		if (tunnel->parms.collect_md) {
tunnel            584 net/ipv6/ip6_gre.c 			ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
tunnel            587 net/ipv6/ip6_gre.c 			ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error);
tunnel            710 net/ipv6/ip6_gre.c 	struct ip6_tnl *tunnel = netdev_priv(dev);
tunnel            719 net/ipv6/ip6_gre.c 		fl6->daddr = tunnel->parms.raddr;
tunnel            721 net/ipv6/ip6_gre.c 	if (skb_cow_head(skb, dev->needed_headroom ?: tunnel->hlen))
tunnel            727 net/ipv6/ip6_gre.c 	if (tunnel->parms.collect_md) {
tunnel            748 net/ipv6/ip6_gre.c 		tunnel->tun_hlen = gre_calc_hlen(flags);
tunnel            750 net/ipv6/ip6_gre.c 		gre_build_header(skb, tunnel->tun_hlen,
tunnel            753 net/ipv6/ip6_gre.c 				 (flags & TUNNEL_SEQ) ? htonl(tunnel->o_seqno++)
tunnel            757 net/ipv6/ip6_gre.c 		if (tunnel->parms.o_flags & TUNNEL_SEQ)
tunnel            758 net/ipv6/ip6_gre.c 			tunnel->o_seqno++;
tunnel            760 net/ipv6/ip6_gre.c 		gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags,
tunnel            761 net/ipv6/ip6_gre.c 				 protocol, tunnel->parms.o_key,
tunnel            762 net/ipv6/ip6_gre.c 				 htonl(tunnel->o_seqno));
tunnel           1138 net/ipv6/ip6_gre.c static int ip6gre_calc_hlen(struct ip6_tnl *tunnel)
tunnel           1142 net/ipv6/ip6_gre.c 	tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags);
tunnel           1143 net/ipv6/ip6_gre.c 	tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen;
tunnel           1145 net/ipv6/ip6_gre.c 	t_hlen = tunnel->hlen + sizeof(struct ipv6hdr);
tunnel           1146 net/ipv6/ip6_gre.c 	tunnel->dev->needed_headroom = LL_MAX_HEADER + t_hlen;
tunnel           1439 net/ipv6/ip6_gre.c 	struct ip6_tnl *tunnel;
tunnel           1443 net/ipv6/ip6_gre.c 	tunnel = netdev_priv(dev);
tunnel           1445 net/ipv6/ip6_gre.c 	tunnel->dev = dev;
tunnel           1446 net/ipv6/ip6_gre.c 	tunnel->net = dev_net(dev);
tunnel           1447 net/ipv6/ip6_gre.c 	strcpy(tunnel->parms.name, dev->name);
tunnel           1453 net/ipv6/ip6_gre.c 	ret = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
tunnel           1457 net/ipv6/ip6_gre.c 	ret = gro_cells_init(&tunnel->gro_cells, dev);
tunnel           1461 net/ipv6/ip6_gre.c 	t_hlen = ip6gre_calc_hlen(tunnel);
tunnel           1465 net/ipv6/ip6_gre.c 	if (!(tunnel->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
tunnel           1468 net/ipv6/ip6_gre.c 	if (tunnel->parms.collect_md) {
tunnel           1476 net/ipv6/ip6_gre.c 	dst_cache_destroy(&tunnel->dst_cache);
tunnel           1485 net/ipv6/ip6_gre.c 	struct ip6_tnl *tunnel;
tunnel           1492 net/ipv6/ip6_gre.c 	tunnel = netdev_priv(dev);
tunnel           1494 net/ipv6/ip6_gre.c 	if (tunnel->parms.collect_md)
tunnel           1497 net/ipv6/ip6_gre.c 	memcpy(dev->dev_addr, &tunnel->parms.laddr, sizeof(struct in6_addr));
tunnel           1498 net/ipv6/ip6_gre.c 	memcpy(dev->broadcast, &tunnel->parms.raddr, sizeof(struct in6_addr));
tunnel           1500 net/ipv6/ip6_gre.c 	if (ipv6_addr_any(&tunnel->parms.raddr))
tunnel           1508 net/ipv6/ip6_gre.c 	struct ip6_tnl *tunnel = netdev_priv(dev);
tunnel           1510 net/ipv6/ip6_gre.c 	tunnel->dev = dev;
tunnel           1511 net/ipv6/ip6_gre.c 	tunnel->net = dev_net(dev);
tunnel           1512 net/ipv6/ip6_gre.c 	strcpy(tunnel->parms.name, dev->name);
tunnel           1514 net/ipv6/ip6_gre.c 	tunnel->hlen		= sizeof(struct ipv6hdr) + 4;
tunnel           1818 net/ipv6/ip6_gre.c static int ip6erspan_calc_hlen(struct ip6_tnl *tunnel)
tunnel           1822 net/ipv6/ip6_gre.c 	tunnel->tun_hlen = 8;
tunnel           1823 net/ipv6/ip6_gre.c 	tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen +
tunnel           1824 net/ipv6/ip6_gre.c 		       erspan_hdr_len(tunnel->parms.erspan_ver);
tunnel           1826 net/ipv6/ip6_gre.c 	t_hlen = tunnel->hlen + sizeof(struct ipv6hdr);
tunnel           1827 net/ipv6/ip6_gre.c 	tunnel->dev->needed_headroom = LL_MAX_HEADER + t_hlen;
tunnel           1833 net/ipv6/ip6_gre.c 	struct ip6_tnl *tunnel;
tunnel           1837 net/ipv6/ip6_gre.c 	tunnel = netdev_priv(dev);
tunnel           1839 net/ipv6/ip6_gre.c 	tunnel->dev = dev;
tunnel           1840 net/ipv6/ip6_gre.c 	tunnel->net = dev_net(dev);
tunnel           1841 net/ipv6/ip6_gre.c 	strcpy(tunnel->parms.name, dev->name);
tunnel           1847 net/ipv6/ip6_gre.c 	ret = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
tunnel           1851 net/ipv6/ip6_gre.c 	ret = gro_cells_init(&tunnel->gro_cells, dev);
tunnel           1855 net/ipv6/ip6_gre.c 	t_hlen = ip6erspan_calc_hlen(tunnel);
tunnel           1859 net/ipv6/ip6_gre.c 	if (!(tunnel->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
tunnel           1863 net/ipv6/ip6_gre.c 	ip6erspan_tnl_link_config(tunnel, 1);
tunnel           1868 net/ipv6/ip6_gre.c 	dst_cache_destroy(&tunnel->dst_cache);
tunnel            770 net/ipv6/ip6_tunnel.c static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb,
tunnel            783 net/ipv6/ip6_tunnel.c 	     (tunnel->parms.i_flags & TUNNEL_CSUM)) ||
tunnel            785 net/ipv6/ip6_tunnel.c 	     !(tunnel->parms.i_flags & TUNNEL_CSUM))) {
tunnel            786 net/ipv6/ip6_tunnel.c 		tunnel->dev->stats.rx_crc_errors++;
tunnel            787 net/ipv6/ip6_tunnel.c 		tunnel->dev->stats.rx_errors++;
tunnel            791 net/ipv6/ip6_tunnel.c 	if (tunnel->parms.i_flags & TUNNEL_SEQ) {
tunnel            793 net/ipv6/ip6_tunnel.c 		    (tunnel->i_seqno &&
tunnel            794 net/ipv6/ip6_tunnel.c 		     (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) {
tunnel            795 net/ipv6/ip6_tunnel.c 			tunnel->dev->stats.rx_fifo_errors++;
tunnel            796 net/ipv6/ip6_tunnel.c 			tunnel->dev->stats.rx_errors++;
tunnel            799 net/ipv6/ip6_tunnel.c 		tunnel->i_seqno = ntohl(tpi->seq) + 1;
tunnel            805 net/ipv6/ip6_tunnel.c 	if (tunnel->dev->type == ARPHRD_ETHER) {
tunnel            807 net/ipv6/ip6_tunnel.c 			tunnel->dev->stats.rx_length_errors++;
tunnel            808 net/ipv6/ip6_tunnel.c 			tunnel->dev->stats.rx_errors++;
tunnel            813 net/ipv6/ip6_tunnel.c 		skb->protocol = eth_type_trans(skb, tunnel->dev);
tunnel            816 net/ipv6/ip6_tunnel.c 		skb->dev = tunnel->dev;
tunnel            822 net/ipv6/ip6_tunnel.c 	__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
tunnel            824 net/ipv6/ip6_tunnel.c 	err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
tunnel            831 net/ipv6/ip6_tunnel.c 			++tunnel->dev->stats.rx_frame_errors;
tunnel            832 net/ipv6/ip6_tunnel.c 			++tunnel->dev->stats.rx_errors;
tunnel            837 net/ipv6/ip6_tunnel.c 	tstats = this_cpu_ptr(tunnel->dev->tstats);
tunnel            843 net/ipv6/ip6_tunnel.c 	skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev)));
tunnel            848 net/ipv6/ip6_tunnel.c 	gro_cells_receive(&tunnel->gro_cells, skb);
tunnel           2108 net/ipv6/ip6_tunnel.c 	struct ip6_tnl *tunnel = netdev_priv(dev);
tunnel           2109 net/ipv6/ip6_tunnel.c 	struct __ip6_tnl_parm *parm = &tunnel->parms;
tunnel           2122 net/ipv6/ip6_tunnel.c 	if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
tunnel           2123 net/ipv6/ip6_tunnel.c 	    nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
tunnel           2124 net/ipv6/ip6_tunnel.c 	    nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
tunnel           2125 net/ipv6/ip6_tunnel.c 	    nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS, tunnel->encap.flags))
tunnel           2140 net/ipv6/ip6_tunnel.c 	struct ip6_tnl *tunnel = netdev_priv(dev);
tunnel           2142 net/ipv6/ip6_tunnel.c 	return tunnel->net;
tunnel            342 net/ipv6/ip6_vti.c 	struct ip6_tnl *t = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6;
tunnel           1066 net/ipv6/ip6_vti.c 	struct ip6_tnl *tunnel = netdev_priv(dev);
tunnel           1067 net/ipv6/ip6_vti.c 	struct __ip6_tnl_parm *parm = &tunnel->parms;
tunnel            131 net/ipv6/ipcomp6.c 	x->tunnel = t;
tunnel             71 net/ipv6/sit.c static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst,
tunnel            473 net/ipv6/sit.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            474 net/ipv6/sit.c 	struct sit_net *sitn = net_generic(tunnel->net, sit_net_id);
tunnel            479 net/ipv6/sit.c 		ipip6_tunnel_unlink(sitn, tunnel);
tunnel            480 net/ipv6/sit.c 		ipip6_tunnel_del_prl(tunnel, NULL);
tunnel            482 net/ipv6/sit.c 	dst_cache_reset(&tunnel->dst_cache);
tunnel            564 net/ipv6/sit.c static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr,
tunnel            568 net/ipv6/sit.c 	if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed)
tunnel            585 net/ipv6/sit.c static bool only_dnatted(const struct ip_tunnel *tunnel,
tunnel            591 net/ipv6/sit.c 	prefix_len = tunnel->ip6rd.prefixlen + 32
tunnel            592 net/ipv6/sit.c 		- tunnel->ip6rd.relay_prefixlen;
tunnel            596 net/ipv6/sit.c 	return ipv6_chk_custom_prefix(v6dst, prefix_len, tunnel->dev);
tunnel            602 net/ipv6/sit.c 			      struct ip_tunnel *tunnel)
tunnel            606 net/ipv6/sit.c 	if (tunnel->dev->priv_flags & IFF_ISATAP) {
tunnel            607 net/ipv6/sit.c 		if (!isatap_chksrc(skb, iph, tunnel))
tunnel            613 net/ipv6/sit.c 	if (tunnel->dev->flags & IFF_POINTOPOINT)
tunnel            618 net/ipv6/sit.c 	if (unlikely(is_spoofed_6rd(tunnel, iph->saddr, &ipv6h->saddr))) {
tunnel            625 net/ipv6/sit.c 	if (likely(!is_spoofed_6rd(tunnel, iph->daddr, &ipv6h->daddr)))
tunnel            628 net/ipv6/sit.c 	if (only_dnatted(tunnel, &ipv6h->daddr))
tunnel            640 net/ipv6/sit.c 	struct ip_tunnel *tunnel;
tunnel            645 net/ipv6/sit.c 	tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev,
tunnel            647 net/ipv6/sit.c 	if (tunnel) {
tunnel            650 net/ipv6/sit.c 		if (tunnel->parms.iph.protocol != IPPROTO_IPV6 &&
tunnel            651 net/ipv6/sit.c 		    tunnel->parms.iph.protocol != 0)
tunnel            657 net/ipv6/sit.c 		skb->dev = tunnel->dev;
tunnel            659 net/ipv6/sit.c 		if (packet_is_spoofed(skb, iph, tunnel)) {
tunnel            660 net/ipv6/sit.c 			tunnel->dev->stats.rx_errors++;
tunnel            665 net/ipv6/sit.c 		    !net_eq(tunnel->net, dev_net(tunnel->dev))))
tunnel            678 net/ipv6/sit.c 				++tunnel->dev->stats.rx_frame_errors;
tunnel            679 net/ipv6/sit.c 				++tunnel->dev->stats.rx_errors;
tunnel            684 net/ipv6/sit.c 		tstats = this_cpu_ptr(tunnel->dev->tstats);
tunnel            717 net/ipv6/sit.c 	struct ip_tunnel *tunnel;
tunnel            723 net/ipv6/sit.c 	tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev,
tunnel            725 net/ipv6/sit.c 	if (tunnel) {
tunnel            728 net/ipv6/sit.c 		if (tunnel->parms.iph.protocol != ipproto &&
tunnel            729 net/ipv6/sit.c 		    tunnel->parms.iph.protocol != 0)
tunnel            742 net/ipv6/sit.c 		return ip_tunnel_rcv(tunnel, skb, tpi, NULL, log_ecn_error);
tunnel            768 net/ipv6/sit.c static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst,
tunnel            772 net/ipv6/sit.c 	if (ipv6_prefix_equal(v6dst, &tunnel->ip6rd.prefix,
tunnel            773 net/ipv6/sit.c 			      tunnel->ip6rd.prefixlen)) {
tunnel            778 net/ipv6/sit.c 		pbw0 = tunnel->ip6rd.prefixlen >> 5;
tunnel            779 net/ipv6/sit.c 		pbi0 = tunnel->ip6rd.prefixlen & 0x1f;
tunnel            781 net/ipv6/sit.c 		d = tunnel->ip6rd.relay_prefixlen < 32 ?
tunnel            783 net/ipv6/sit.c 		    tunnel->ip6rd.relay_prefixlen : 0;
tunnel            785 net/ipv6/sit.c 		pbi1 = pbi0 - tunnel->ip6rd.relay_prefixlen;
tunnel            790 net/ipv6/sit.c 		*v4dst = tunnel->ip6rd.relay_prefix | htonl(d);
tunnel            803 net/ipv6/sit.c static inline __be32 try_6rd(struct ip_tunnel *tunnel,
tunnel            807 net/ipv6/sit.c 	check_6rd(tunnel, v6dst, &dst);
tunnel            819 net/ipv6/sit.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel            820 net/ipv6/sit.c 	const struct iphdr  *tiph = &tunnel->parms.iph;
tunnel            822 net/ipv6/sit.c 	u8     tos = tunnel->parms.iph.tos;
tunnel            834 net/ipv6/sit.c 	int t_hlen = tunnel->hlen + sizeof(struct iphdr);
tunnel            867 net/ipv6/sit.c 		dst = try_6rd(tunnel, &iph6->daddr);
tunnel            899 net/ipv6/sit.c 	flowi4_init_output(&fl4, tunnel->parms.link, tunnel->fwmark,
tunnel            902 net/ipv6/sit.c 			   sock_net_uid(tunnel->net, NULL));
tunnel            904 net/ipv6/sit.c 	rt = dst_cache_get_ip4(&tunnel->dst_cache, &fl4.saddr);
tunnel            906 net/ipv6/sit.c 		rt = ip_route_output_flow(tunnel->net, &fl4, NULL);
tunnel            911 net/ipv6/sit.c 		dst_cache_set_ip4(&tunnel->dst_cache, &rt->dst, fl4.saddr);
tunnel            946 net/ipv6/sit.c 		if (tunnel->parms.iph.daddr)
tunnel            956 net/ipv6/sit.c 	if (tunnel->err_count > 0) {
tunnel            958 net/ipv6/sit.c 				tunnel->err_time + IPTUNNEL_ERR_TIMEO)) {
tunnel            959 net/ipv6/sit.c 			tunnel->err_count--;
tunnel            962 net/ipv6/sit.c 			tunnel->err_count = 0;
tunnel            990 net/ipv6/sit.c 	if (ip_tunnel_encap(skb, tunnel, &protocol, &fl4) < 0) {
tunnel            998 net/ipv6/sit.c 		      df, !net_eq(tunnel->net, dev_net(dev)));
tunnel           1012 net/ipv6/sit.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1013 net/ipv6/sit.c 	const struct iphdr  *tiph = &tunnel->parms.iph;
tunnel           1062 net/ipv6/sit.c 	struct ip_tunnel *tunnel;
tunnel           1066 net/ipv6/sit.c 	tunnel = netdev_priv(dev);
tunnel           1067 net/ipv6/sit.c 	iph = &tunnel->parms.iph;
tunnel           1070 net/ipv6/sit.c 		struct rtable *rt = ip_route_output_ports(tunnel->net, &fl4,
tunnel           1076 net/ipv6/sit.c 							  tunnel->parms.link);
tunnel           1085 net/ipv6/sit.c 	if (!tdev && tunnel->parms.link)
tunnel           1086 net/ipv6/sit.c 		tdev = __dev_get_by_index(tunnel->net, tunnel->parms.link);
tunnel           1089 net/ipv6/sit.c 		int t_hlen = tunnel->hlen + sizeof(struct iphdr);
tunnel           1359 net/ipv6/sit.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1361 net/ipv6/sit.c 	dst_cache_destroy(&tunnel->dst_cache);
tunnel           1373 net/ipv6/sit.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1374 net/ipv6/sit.c 	int t_hlen = tunnel->hlen + sizeof(struct iphdr);
tunnel           1395 net/ipv6/sit.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1398 net/ipv6/sit.c 	tunnel->dev = dev;
tunnel           1399 net/ipv6/sit.c 	tunnel->net = dev_net(dev);
tunnel           1400 net/ipv6/sit.c 	strcpy(tunnel->parms.name, dev->name);
tunnel           1407 net/ipv6/sit.c 	err = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
tunnel           1419 net/ipv6/sit.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1420 net/ipv6/sit.c 	struct iphdr *iph = &tunnel->parms.iph;
tunnel           1430 net/ipv6/sit.c 	rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
tunnel           1701 net/ipv6/sit.c 	struct ip_tunnel *tunnel = netdev_priv(dev);
tunnel           1702 net/ipv6/sit.c 	struct ip_tunnel_parm *parm = &tunnel->parms;
tunnel           1713 net/ipv6/sit.c 	    nla_put_u32(skb, IFLA_IPTUN_FWMARK, tunnel->fwmark))
tunnel           1718 net/ipv6/sit.c 			     &tunnel->ip6rd.prefix) ||
tunnel           1720 net/ipv6/sit.c 			    tunnel->ip6rd.relay_prefix) ||
tunnel           1722 net/ipv6/sit.c 			tunnel->ip6rd.prefixlen) ||
tunnel           1724 net/ipv6/sit.c 			tunnel->ip6rd.relay_prefixlen))
tunnel           1729 net/ipv6/sit.c 			tunnel->encap.type) ||
tunnel           1731 net/ipv6/sit.c 			tunnel->encap.sport) ||
tunnel           1733 net/ipv6/sit.c 			tunnel->encap.dport) ||
tunnel           1735 net/ipv6/sit.c 			tunnel->encap.flags))
tunnel            500 net/ipv6/udp.c 	bool tunnel = false;
tunnel            525 net/ipv6/udp.c 		tunnel = true;
tunnel            539 net/ipv6/udp.c 		if (tunnel) {
tunnel            549 net/ipv6/udp.c 	if (tunnel)
tunnel             28 net/ipv6/xfrm6_input.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = t;
tunnel             66 net/ipv6/xfrm6_protocol.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL;
tunnel             95 net/ipv6/xfrm6_protocol.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL;
tunnel            124 net/ipv6/xfrm6_protocol.c 	XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL;
tunnel            149 net/l2tp/l2tp_core.c l2tp_session_id_hash(struct l2tp_tunnel *tunnel, u32 session_id)
tunnel            151 net/l2tp/l2tp_core.c 	return &tunnel->session_hlist[hash_32(session_id, L2TP_HASH_BITS)];
tunnel            154 net/l2tp/l2tp_core.c void l2tp_tunnel_free(struct l2tp_tunnel *tunnel)
tunnel            156 net/l2tp/l2tp_core.c 	sock_put(tunnel->sock);
tunnel            165 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel;
tunnel            168 net/l2tp/l2tp_core.c 	list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {
tunnel            169 net/l2tp/l2tp_core.c 		if (tunnel->tunnel_id == tunnel_id &&
tunnel            170 net/l2tp/l2tp_core.c 		    refcount_inc_not_zero(&tunnel->ref_count)) {
tunnel            173 net/l2tp/l2tp_core.c 			return tunnel;
tunnel            185 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel;
tunnel            189 net/l2tp/l2tp_core.c 	list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {
tunnel            191 net/l2tp/l2tp_core.c 		    refcount_inc_not_zero(&tunnel->ref_count)) {
tunnel            193 net/l2tp/l2tp_core.c 			return tunnel;
tunnel            202 net/l2tp/l2tp_core.c struct l2tp_session *l2tp_tunnel_get_session(struct l2tp_tunnel *tunnel,
tunnel            208 net/l2tp/l2tp_core.c 	session_list = l2tp_session_id_hash(tunnel, session_id);
tunnel            210 net/l2tp/l2tp_core.c 	read_lock_bh(&tunnel->hlist_lock);
tunnel            214 net/l2tp/l2tp_core.c 			read_unlock_bh(&tunnel->hlist_lock);
tunnel            218 net/l2tp/l2tp_core.c 	read_unlock_bh(&tunnel->hlist_lock);
tunnel            245 net/l2tp/l2tp_core.c struct l2tp_session *l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth)
tunnel            251 net/l2tp/l2tp_core.c 	read_lock_bh(&tunnel->hlist_lock);
tunnel            253 net/l2tp/l2tp_core.c 		hlist_for_each_entry(session, &tunnel->session_hlist[hash], hlist) {
tunnel            256 net/l2tp/l2tp_core.c 				read_unlock_bh(&tunnel->hlist_lock);
tunnel            262 net/l2tp/l2tp_core.c 	read_unlock_bh(&tunnel->hlist_lock);
tunnel            297 net/l2tp/l2tp_core.c 			  struct l2tp_tunnel *tunnel)
tunnel            305 net/l2tp/l2tp_core.c 	head = l2tp_session_id_hash(tunnel, session->session_id);
tunnel            307 net/l2tp/l2tp_core.c 	write_lock_bh(&tunnel->hlist_lock);
tunnel            308 net/l2tp/l2tp_core.c 	if (!tunnel->acpt_newsess) {
tunnel            319 net/l2tp/l2tp_core.c 	if (tunnel->version == L2TP_HDR_VER_3) {
tunnel            320 net/l2tp/l2tp_core.c 		pn = l2tp_pernet(tunnel->l2tp_net);
tunnel            330 net/l2tp/l2tp_core.c 			    (session_walk->tunnel->encap == L2TP_ENCAPTYPE_IP ||
tunnel            331 net/l2tp/l2tp_core.c 			     tunnel->encap == L2TP_ENCAPTYPE_IP)) {
tunnel            336 net/l2tp/l2tp_core.c 		l2tp_tunnel_inc_refcount(tunnel);
tunnel            341 net/l2tp/l2tp_core.c 		l2tp_tunnel_inc_refcount(tunnel);
tunnel            345 net/l2tp/l2tp_core.c 	write_unlock_bh(&tunnel->hlist_lock);
tunnel            352 net/l2tp/l2tp_core.c 	write_unlock_bh(&tunnel->hlist_lock);
tunnel            394 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel            402 net/l2tp/l2tp_core.c 	atomic_long_inc(&tunnel->stats.rx_packets);
tunnel            403 net/l2tp/l2tp_core.c 	atomic_long_add(length, &tunnel->stats.rx_bytes);
tunnel            625 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel            632 net/l2tp/l2tp_core.c 			l2tp_info(tunnel, L2TP_MSG_DATA,
tunnel            634 net/l2tp/l2tp_core.c 				  tunnel->name, tunnel->tunnel_id,
tunnel            651 net/l2tp/l2tp_core.c 	if (tunnel->version == L2TP_HDR_VER_2) {
tunnel            693 net/l2tp/l2tp_core.c 			l2tp_session_set_header_len(session, tunnel->version);
tunnel            717 net/l2tp/l2tp_core.c 			l2tp_session_set_header_len(session, tunnel->version);
tunnel            730 net/l2tp/l2tp_core.c 	if (tunnel->version == L2TP_HDR_VER_2) {
tunnel            797 net/l2tp/l2tp_core.c static int l2tp_udp_recv_core(struct l2tp_tunnel *tunnel, struct sk_buff *skb)
tunnel            813 net/l2tp/l2tp_core.c 		l2tp_info(tunnel, L2TP_MSG_DATA,
tunnel            815 net/l2tp/l2tp_core.c 			  tunnel->name, skb->len);
tunnel            820 net/l2tp/l2tp_core.c 	if (tunnel->debug & L2TP_MSG_DATA) {
tunnel            825 net/l2tp/l2tp_core.c 		pr_debug("%s: recv\n", tunnel->name);
tunnel            837 net/l2tp/l2tp_core.c 	if (version != tunnel->version) {
tunnel            838 net/l2tp/l2tp_core.c 		l2tp_info(tunnel, L2TP_MSG_DATA,
tunnel            840 net/l2tp/l2tp_core.c 			  tunnel->name, version, tunnel->version);
tunnel            849 net/l2tp/l2tp_core.c 		l2tp_dbg(tunnel, L2TP_MSG_DATA,
tunnel            851 net/l2tp/l2tp_core.c 			 tunnel->name, length);
tunnel            858 net/l2tp/l2tp_core.c 	if (tunnel->version == L2TP_HDR_VER_2) {
tunnel            870 net/l2tp/l2tp_core.c 		tunnel_id = tunnel->tunnel_id;
tunnel            876 net/l2tp/l2tp_core.c 	session = l2tp_tunnel_get_session(tunnel, session_id);
tunnel            882 net/l2tp/l2tp_core.c 		l2tp_info(tunnel, L2TP_MSG_DATA,
tunnel            884 net/l2tp/l2tp_core.c 			  tunnel->name, tunnel_id, session_id);
tunnel            888 net/l2tp/l2tp_core.c 	if (tunnel->version == L2TP_HDR_VER_3 &&
tunnel            912 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel;
tunnel            914 net/l2tp/l2tp_core.c 	tunnel = rcu_dereference_sk_user_data(sk);
tunnel            915 net/l2tp/l2tp_core.c 	if (tunnel == NULL)
tunnel            918 net/l2tp/l2tp_core.c 	l2tp_dbg(tunnel, L2TP_MSG_DATA, "%s: received %d bytes\n",
tunnel            919 net/l2tp/l2tp_core.c 		 tunnel->name, skb->len);
tunnel            921 net/l2tp/l2tp_core.c 	if (l2tp_udp_recv_core(tunnel, skb))
tunnel            939 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel            943 net/l2tp/l2tp_core.c 	u32 tunnel_id = tunnel->peer_tunnel_id;
tunnel            967 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel            974 net/l2tp/l2tp_core.c 	if (tunnel->encap == L2TP_ENCAPTYPE_UDP) {
tunnel           1010 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel           1023 net/l2tp/l2tp_core.c 		int uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0;
tunnel           1034 net/l2tp/l2tp_core.c 	if (l2tp_sk_is_v6(tunnel->sock))
tunnel           1035 net/l2tp/l2tp_core.c 		error = inet6_csk_xmit(tunnel->sock, skb, NULL);
tunnel           1038 net/l2tp/l2tp_core.c 		error = ip_queue_xmit(tunnel->sock, skb, fl);
tunnel           1042 net/l2tp/l2tp_core.c 		atomic_long_inc(&tunnel->stats.tx_packets);
tunnel           1043 net/l2tp/l2tp_core.c 		atomic_long_add(len, &tunnel->stats.tx_bytes);
tunnel           1047 net/l2tp/l2tp_core.c 		atomic_long_inc(&tunnel->stats.tx_errors);
tunnel           1058 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel           1059 net/l2tp/l2tp_core.c 	struct sock *sk = tunnel->sock;
tunnel           1064 net/l2tp/l2tp_core.c 	int uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0;
tunnel           1098 net/l2tp/l2tp_core.c 	if (tunnel->fd >= 0 && sk->sk_state != TCP_ESTABLISHED) {
tunnel           1110 net/l2tp/l2tp_core.c 	switch (tunnel->encap) {
tunnel           1155 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = l2tp_tunnel(sk);
tunnel           1157 net/l2tp/l2tp_core.c 	if (tunnel == NULL)
tunnel           1160 net/l2tp/l2tp_core.c 	l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing...\n", tunnel->name);
tunnel           1163 net/l2tp/l2tp_core.c 	switch (tunnel->encap) {
tunnel           1175 net/l2tp/l2tp_core.c 	sk->sk_destruct = tunnel->old_sk_destruct;
tunnel           1182 net/l2tp/l2tp_core.c 	kfree_rcu(tunnel, rcu);
tunnel           1189 net/l2tp/l2tp_core.c static void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)
tunnel           1196 net/l2tp/l2tp_core.c 	BUG_ON(tunnel == NULL);
tunnel           1198 net/l2tp/l2tp_core.c 	l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n",
tunnel           1199 net/l2tp/l2tp_core.c 		  tunnel->name);
tunnel           1201 net/l2tp/l2tp_core.c 	write_lock_bh(&tunnel->hlist_lock);
tunnel           1202 net/l2tp/l2tp_core.c 	tunnel->acpt_newsess = false;
tunnel           1205 net/l2tp/l2tp_core.c 		hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
tunnel           1216 net/l2tp/l2tp_core.c 			write_unlock_bh(&tunnel->hlist_lock);
tunnel           1226 net/l2tp/l2tp_core.c 			write_lock_bh(&tunnel->hlist_lock);
tunnel           1236 net/l2tp/l2tp_core.c 	write_unlock_bh(&tunnel->hlist_lock);
tunnel           1242 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = l2tp_tunnel(sk);
tunnel           1244 net/l2tp/l2tp_core.c 	if (tunnel)
tunnel           1245 net/l2tp/l2tp_core.c 		l2tp_tunnel_delete(tunnel);
tunnel           1251 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = container_of(work, struct l2tp_tunnel,
tunnel           1253 net/l2tp/l2tp_core.c 	struct sock *sk = tunnel->sock;
tunnel           1257 net/l2tp/l2tp_core.c 	l2tp_tunnel_closeall(tunnel);
tunnel           1262 net/l2tp/l2tp_core.c 	if (tunnel->fd < 0) {
tunnel           1270 net/l2tp/l2tp_core.c 	pn = l2tp_pernet(tunnel->l2tp_net);
tunnel           1272 net/l2tp/l2tp_core.c 	list_del_rcu(&tunnel->list);
tunnel           1276 net/l2tp/l2tp_core.c 	l2tp_tunnel_dec_refcount(tunnel);
tunnel           1279 net/l2tp/l2tp_core.c 	l2tp_tunnel_dec_refcount(tunnel);
tunnel           1409 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = NULL;
tunnel           1416 net/l2tp/l2tp_core.c 	tunnel = kzalloc(sizeof(struct l2tp_tunnel), GFP_KERNEL);
tunnel           1417 net/l2tp/l2tp_core.c 	if (tunnel == NULL) {
tunnel           1422 net/l2tp/l2tp_core.c 	tunnel->version = version;
tunnel           1423 net/l2tp/l2tp_core.c 	tunnel->tunnel_id = tunnel_id;
tunnel           1424 net/l2tp/l2tp_core.c 	tunnel->peer_tunnel_id = peer_tunnel_id;
tunnel           1425 net/l2tp/l2tp_core.c 	tunnel->debug = L2TP_DEFAULT_DEBUG_FLAGS;
tunnel           1427 net/l2tp/l2tp_core.c 	tunnel->magic = L2TP_TUNNEL_MAGIC;
tunnel           1428 net/l2tp/l2tp_core.c 	sprintf(&tunnel->name[0], "tunl %u", tunnel_id);
tunnel           1429 net/l2tp/l2tp_core.c 	rwlock_init(&tunnel->hlist_lock);
tunnel           1430 net/l2tp/l2tp_core.c 	tunnel->acpt_newsess = true;
tunnel           1433 net/l2tp/l2tp_core.c 		tunnel->debug = cfg->debug;
tunnel           1435 net/l2tp/l2tp_core.c 	tunnel->encap = encap;
tunnel           1437 net/l2tp/l2tp_core.c 	refcount_set(&tunnel->ref_count, 1);
tunnel           1438 net/l2tp/l2tp_core.c 	tunnel->fd = fd;
tunnel           1441 net/l2tp/l2tp_core.c 	INIT_WORK(&tunnel->del_work, l2tp_tunnel_del_work);
tunnel           1443 net/l2tp/l2tp_core.c 	INIT_LIST_HEAD(&tunnel->list);
tunnel           1448 net/l2tp/l2tp_core.c 		*tunnelp = tunnel;
tunnel           1476 net/l2tp/l2tp_core.c int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net,
tunnel           1485 net/l2tp/l2tp_core.c 	if (tunnel->fd < 0) {
tunnel           1486 net/l2tp/l2tp_core.c 		ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id,
tunnel           1487 net/l2tp/l2tp_core.c 					      tunnel->peer_tunnel_id, cfg,
tunnel           1492 net/l2tp/l2tp_core.c 		sock = sockfd_lookup(tunnel->fd, &ret);
tunnel           1496 net/l2tp/l2tp_core.c 		ret = l2tp_validate_socket(sock->sk, net, tunnel->encap);
tunnel           1501 net/l2tp/l2tp_core.c 	tunnel->l2tp_net = net;
tunnel           1506 net/l2tp/l2tp_core.c 		if (tunnel_walk->tunnel_id == tunnel->tunnel_id) {
tunnel           1513 net/l2tp/l2tp_core.c 	list_add_rcu(&tunnel->list, &pn->l2tp_tunnel_list);
tunnel           1518 net/l2tp/l2tp_core.c 	tunnel->sock = sk;
tunnel           1520 net/l2tp/l2tp_core.c 	if (tunnel->encap == L2TP_ENCAPTYPE_UDP) {
tunnel           1522 net/l2tp/l2tp_core.c 			.sk_user_data = tunnel,
tunnel           1530 net/l2tp/l2tp_core.c 		sk->sk_user_data = tunnel;
tunnel           1533 net/l2tp/l2tp_core.c 	tunnel->old_sk_destruct = sk->sk_destruct;
tunnel           1539 net/l2tp/l2tp_core.c 	if (tunnel->fd >= 0)
tunnel           1545 net/l2tp/l2tp_core.c 	if (tunnel->fd < 0)
tunnel           1556 net/l2tp/l2tp_core.c void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel)
tunnel           1558 net/l2tp/l2tp_core.c 	if (!test_and_set_bit(0, &tunnel->dead)) {
tunnel           1559 net/l2tp/l2tp_core.c 		l2tp_tunnel_inc_refcount(tunnel);
tunnel           1560 net/l2tp/l2tp_core.c 		queue_work(l2tp_wq, &tunnel->del_work);
tunnel           1569 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel           1573 net/l2tp/l2tp_core.c 	if (tunnel) {
tunnel           1574 net/l2tp/l2tp_core.c 		BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC);
tunnel           1575 net/l2tp/l2tp_core.c 		l2tp_tunnel_dec_refcount(tunnel);
tunnel           1589 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel           1592 net/l2tp/l2tp_core.c 	if (tunnel) {
tunnel           1594 net/l2tp/l2tp_core.c 		write_lock_bh(&tunnel->hlist_lock);
tunnel           1596 net/l2tp/l2tp_core.c 		write_unlock_bh(&tunnel->hlist_lock);
tunnel           1599 net/l2tp/l2tp_core.c 		if (tunnel->version != L2TP_HDR_VER_2) {
tunnel           1600 net/l2tp/l2tp_core.c 			struct l2tp_net *pn = l2tp_pernet(tunnel->l2tp_net);
tunnel           1641 net/l2tp/l2tp_core.c 		if (session->tunnel->encap == L2TP_ENCAPTYPE_UDP)
tunnel           1648 net/l2tp/l2tp_core.c struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg)
tunnel           1655 net/l2tp/l2tp_core.c 		session->tunnel = tunnel;
tunnel           1660 net/l2tp/l2tp_core.c 		if (tunnel->version == L2TP_HDR_VER_2)
tunnel           1671 net/l2tp/l2tp_core.c 			tunnel->tunnel_id, session->session_id);
tunnel           1679 net/l2tp/l2tp_core.c 		session->debug = tunnel->debug;
tunnel           1695 net/l2tp/l2tp_core.c 		if (tunnel->version == L2TP_HDR_VER_2)
tunnel           1700 net/l2tp/l2tp_core.c 		l2tp_session_set_header_len(session, tunnel->version);
tunnel           1734 net/l2tp/l2tp_core.c 	struct l2tp_tunnel *tunnel = NULL;
tunnel           1738 net/l2tp/l2tp_core.c 	list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {
tunnel           1739 net/l2tp/l2tp_core.c 		l2tp_tunnel_delete(tunnel);
tunnel             76 net/l2tp/l2tp_core.h 	struct l2tp_tunnel	*tunnel;	/* back pointer to tunnel
tunnel            181 net/l2tp/l2tp_core.h 	int (*session_create)(struct net *net, struct l2tp_tunnel *tunnel,
tunnel            194 net/l2tp/l2tp_core.h struct l2tp_session *l2tp_tunnel_get_session(struct l2tp_tunnel *tunnel,
tunnel            197 net/l2tp/l2tp_core.h void l2tp_tunnel_free(struct l2tp_tunnel *tunnel);
tunnel            200 net/l2tp/l2tp_core.h struct l2tp_session *l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth);
tunnel            207 net/l2tp/l2tp_core.h int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net,
tunnel            210 net/l2tp/l2tp_core.h void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel);
tunnel            212 net/l2tp/l2tp_core.h 					 struct l2tp_tunnel *tunnel,
tunnel            216 net/l2tp/l2tp_core.h 			  struct l2tp_tunnel *tunnel);
tunnel            235 net/l2tp/l2tp_core.h static inline void l2tp_tunnel_inc_refcount(struct l2tp_tunnel *tunnel)
tunnel            237 net/l2tp/l2tp_core.h 	refcount_inc(&tunnel->ref_count);
tunnel            240 net/l2tp/l2tp_core.h static inline void l2tp_tunnel_dec_refcount(struct l2tp_tunnel *tunnel)
tunnel            242 net/l2tp/l2tp_core.h 	if (refcount_dec_and_test(&tunnel->ref_count))
tunnel            243 net/l2tp/l2tp_core.h 		l2tp_tunnel_free(tunnel);
tunnel            271 net/l2tp/l2tp_core.h static inline u32 l2tp_tunnel_dst_mtu(const struct l2tp_tunnel *tunnel)
tunnel            276 net/l2tp/l2tp_core.h 	dst = sk_dst_get(tunnel->sock);
tunnel            287 net/l2tp/l2tp_core.h static inline bool l2tp_tunnel_uses_xfrm(const struct l2tp_tunnel *tunnel)
tunnel            289 net/l2tp/l2tp_core.h 	struct sock *sk = tunnel->sock;
tunnel            295 net/l2tp/l2tp_core.h static inline bool l2tp_tunnel_uses_xfrm(const struct l2tp_tunnel *tunnel)
tunnel             39 net/l2tp/l2tp_debugfs.c 	struct l2tp_tunnel *tunnel;
tunnel             46 net/l2tp/l2tp_debugfs.c 	if (pd->tunnel)
tunnel             47 net/l2tp/l2tp_debugfs.c 		l2tp_tunnel_dec_refcount(pd->tunnel);
tunnel             49 net/l2tp/l2tp_debugfs.c 	pd->tunnel = l2tp_tunnel_get_nth(pd->net, pd->tunnel_idx);
tunnel             59 net/l2tp/l2tp_debugfs.c 	pd->session = l2tp_session_get_nth(pd->tunnel, pd->session_idx);
tunnel             80 net/l2tp/l2tp_debugfs.c 	if (pd->tunnel == NULL)
tunnel             86 net/l2tp/l2tp_debugfs.c 	if ((pd->tunnel == NULL) && (pd->session == NULL))
tunnel            114 net/l2tp/l2tp_debugfs.c 	if (pd->tunnel) {
tunnel            115 net/l2tp/l2tp_debugfs.c 		l2tp_tunnel_dec_refcount(pd->tunnel);
tunnel            116 net/l2tp/l2tp_debugfs.c 		pd->tunnel = NULL;
tunnel            122 net/l2tp/l2tp_debugfs.c 	struct l2tp_tunnel *tunnel = v;
tunnel            128 net/l2tp/l2tp_debugfs.c 	read_lock_bh(&tunnel->hlist_lock);
tunnel            130 net/l2tp/l2tp_debugfs.c 		hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
tunnel            140 net/l2tp/l2tp_debugfs.c 	read_unlock_bh(&tunnel->hlist_lock);
tunnel            142 net/l2tp/l2tp_debugfs.c 	seq_printf(m, "\nTUNNEL %u peer %u", tunnel->tunnel_id, tunnel->peer_tunnel_id);
tunnel            143 net/l2tp/l2tp_debugfs.c 	if (tunnel->sock) {
tunnel            144 net/l2tp/l2tp_debugfs.c 		struct inet_sock *inet = inet_sk(tunnel->sock);
tunnel            147 net/l2tp/l2tp_debugfs.c 		if (tunnel->sock->sk_family == AF_INET6) {
tunnel            148 net/l2tp/l2tp_debugfs.c 			const struct ipv6_pinfo *np = inet6_sk(tunnel->sock);
tunnel            151 net/l2tp/l2tp_debugfs.c 				&np->saddr, &tunnel->sock->sk_v6_daddr);
tunnel            156 net/l2tp/l2tp_debugfs.c 		if (tunnel->encap == L2TP_ENCAPTYPE_UDP)
tunnel            160 net/l2tp/l2tp_debugfs.c 	seq_printf(m, " L2TPv%d, %s\n", tunnel->version,
tunnel            161 net/l2tp/l2tp_debugfs.c 		   tunnel->encap == L2TP_ENCAPTYPE_UDP ? "UDP" :
tunnel            162 net/l2tp/l2tp_debugfs.c 		   tunnel->encap == L2TP_ENCAPTYPE_IP ? "IP" :
tunnel            165 net/l2tp/l2tp_debugfs.c 		   tunnel->sock ? refcount_read(&tunnel->sock->sk_refcnt) : 0,
tunnel            166 net/l2tp/l2tp_debugfs.c 		   refcount_read(&tunnel->ref_count));
tunnel            168 net/l2tp/l2tp_debugfs.c 		   tunnel->debug,
tunnel            169 net/l2tp/l2tp_debugfs.c 		   atomic_long_read(&tunnel->stats.tx_packets),
tunnel            170 net/l2tp/l2tp_debugfs.c 		   atomic_long_read(&tunnel->stats.tx_bytes),
tunnel            171 net/l2tp/l2tp_debugfs.c 		   atomic_long_read(&tunnel->stats.tx_errors),
tunnel            172 net/l2tp/l2tp_debugfs.c 		   atomic_long_read(&tunnel->stats.rx_packets),
tunnel            173 net/l2tp/l2tp_debugfs.c 		   atomic_long_read(&tunnel->stats.rx_bytes),
tunnel            174 net/l2tp/l2tp_debugfs.c 		   atomic_long_read(&tunnel->stats.rx_errors));
tunnel            252 net/l2tp/l2tp_debugfs.c 		l2tp_dfs_seq_tunnel_show(m, pd->tunnel);
tunnel            217 net/l2tp/l2tp_eth.c static void l2tp_eth_adjust_mtu(struct l2tp_tunnel *tunnel,
tunnel            226 net/l2tp/l2tp_eth.c 	if (tunnel->encap == L2TP_ENCAPTYPE_UDP) {
tunnel            231 net/l2tp/l2tp_eth.c 	lock_sock(tunnel->sock);
tunnel            232 net/l2tp/l2tp_eth.c 	l3_overhead = kernel_sock_ip_overhead(tunnel->sock);
tunnel            233 net/l2tp/l2tp_eth.c 	release_sock(tunnel->sock);
tunnel            248 net/l2tp/l2tp_eth.c 	mtu = l2tp_tunnel_dst_mtu(tunnel) - overhead;
tunnel            257 net/l2tp/l2tp_eth.c static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel,
tunnel            277 net/l2tp/l2tp_eth.c 	session = l2tp_session_create(sizeof(*spriv), tunnel, session_id,
tunnel            294 net/l2tp/l2tp_eth.c 	l2tp_eth_adjust_mtu(tunnel, session, dev);
tunnel            314 net/l2tp/l2tp_eth.c 	rc = l2tp_session_register(session, tunnel);
tunnel            120 net/l2tp/l2tp_ip.c 	struct l2tp_tunnel *tunnel = NULL;
tunnel            146 net/l2tp/l2tp_ip.c 	tunnel = session->tunnel;
tunnel            147 net/l2tp/l2tp_ip.c 	if (!tunnel)
tunnel            151 net/l2tp/l2tp_ip.c 	if (tunnel->debug & L2TP_MSG_DATA) {
tunnel            159 net/l2tp/l2tp_ip.c 		pr_debug("%s: ip recv\n", tunnel->name);
tunnel            251 net/l2tp/l2tp_ip.c 	struct l2tp_tunnel *tunnel = sk->sk_user_data;
tunnel            256 net/l2tp/l2tp_ip.c 	if (tunnel)
tunnel            257 net/l2tp/l2tp_ip.c 		l2tp_tunnel_delete(tunnel);
tunnel            132 net/l2tp/l2tp_ip6.c 	struct l2tp_tunnel *tunnel = NULL;
tunnel            158 net/l2tp/l2tp_ip6.c 	tunnel = session->tunnel;
tunnel            159 net/l2tp/l2tp_ip6.c 	if (!tunnel)
tunnel            163 net/l2tp/l2tp_ip6.c 	if (tunnel->debug & L2TP_MSG_DATA) {
tunnel            171 net/l2tp/l2tp_ip6.c 		pr_debug("%s: ip recv\n", tunnel->name);
tunnel            263 net/l2tp/l2tp_ip6.c 	struct l2tp_tunnel *tunnel = sk->sk_user_data;
tunnel            269 net/l2tp/l2tp_ip6.c 	if (tunnel)
tunnel            270 net/l2tp/l2tp_ip6.c 		l2tp_tunnel_delete(tunnel);
tunnel             40 net/l2tp/l2tp_netlink.c 			       int flags, struct l2tp_tunnel *tunnel, u8 cmd);
tunnel             53 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel;
tunnel             64 net/l2tp/l2tp_netlink.c 		tunnel = l2tp_tunnel_get(net, tunnel_id);
tunnel             65 net/l2tp/l2tp_netlink.c 		if (tunnel) {
tunnel             66 net/l2tp/l2tp_netlink.c 			session = l2tp_tunnel_get_session(tunnel, session_id);
tunnel             67 net/l2tp/l2tp_netlink.c 			l2tp_tunnel_dec_refcount(tunnel);
tunnel            106 net/l2tp/l2tp_netlink.c 			      struct l2tp_tunnel *tunnel,
tunnel            117 net/l2tp/l2tp_netlink.c 				  NLM_F_ACK, tunnel, cmd);
tunnel            168 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel;
tunnel            241 net/l2tp/l2tp_netlink.c 					 peer_tunnel_id, &cfg, &tunnel);
tunnel            248 net/l2tp/l2tp_netlink.c 	l2tp_tunnel_inc_refcount(tunnel);
tunnel            249 net/l2tp/l2tp_netlink.c 	ret = l2tp_tunnel_register(tunnel, net, &cfg);
tunnel            251 net/l2tp/l2tp_netlink.c 		kfree(tunnel);
tunnel            254 net/l2tp/l2tp_netlink.c 	ret = l2tp_tunnel_notify(&l2tp_nl_family, info, tunnel,
tunnel            256 net/l2tp/l2tp_netlink.c 	l2tp_tunnel_dec_refcount(tunnel);
tunnel            264 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel;
tunnel            275 net/l2tp/l2tp_netlink.c 	tunnel = l2tp_tunnel_get(net, tunnel_id);
tunnel            276 net/l2tp/l2tp_netlink.c 	if (!tunnel) {
tunnel            282 net/l2tp/l2tp_netlink.c 			   tunnel, L2TP_CMD_TUNNEL_DELETE);
tunnel            284 net/l2tp/l2tp_netlink.c 	l2tp_tunnel_delete(tunnel);
tunnel            286 net/l2tp/l2tp_netlink.c 	l2tp_tunnel_dec_refcount(tunnel);
tunnel            294 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel;
tunnel            305 net/l2tp/l2tp_netlink.c 	tunnel = l2tp_tunnel_get(net, tunnel_id);
tunnel            306 net/l2tp/l2tp_netlink.c 	if (!tunnel) {
tunnel            312 net/l2tp/l2tp_netlink.c 		tunnel->debug = nla_get_u32(info->attrs[L2TP_ATTR_DEBUG]);
tunnel            315 net/l2tp/l2tp_netlink.c 				 tunnel, L2TP_CMD_TUNNEL_MODIFY);
tunnel            317 net/l2tp/l2tp_netlink.c 	l2tp_tunnel_dec_refcount(tunnel);
tunnel            324 net/l2tp/l2tp_netlink.c 			       struct l2tp_tunnel *tunnel, u8 cmd)
tunnel            338 net/l2tp/l2tp_netlink.c 	if (nla_put_u8(skb, L2TP_ATTR_PROTO_VERSION, tunnel->version) ||
tunnel            339 net/l2tp/l2tp_netlink.c 	    nla_put_u32(skb, L2TP_ATTR_CONN_ID, tunnel->tunnel_id) ||
tunnel            340 net/l2tp/l2tp_netlink.c 	    nla_put_u32(skb, L2TP_ATTR_PEER_CONN_ID, tunnel->peer_tunnel_id) ||
tunnel            341 net/l2tp/l2tp_netlink.c 	    nla_put_u32(skb, L2TP_ATTR_DEBUG, tunnel->debug) ||
tunnel            342 net/l2tp/l2tp_netlink.c 	    nla_put_u16(skb, L2TP_ATTR_ENCAP_TYPE, tunnel->encap))
tunnel            350 net/l2tp/l2tp_netlink.c 			      atomic_long_read(&tunnel->stats.tx_packets),
tunnel            353 net/l2tp/l2tp_netlink.c 			      atomic_long_read(&tunnel->stats.tx_bytes),
tunnel            356 net/l2tp/l2tp_netlink.c 			      atomic_long_read(&tunnel->stats.tx_errors),
tunnel            359 net/l2tp/l2tp_netlink.c 			      atomic_long_read(&tunnel->stats.rx_packets),
tunnel            362 net/l2tp/l2tp_netlink.c 			      atomic_long_read(&tunnel->stats.rx_bytes),
tunnel            365 net/l2tp/l2tp_netlink.c 			      atomic_long_read(&tunnel->stats.rx_seq_discards),
tunnel            368 net/l2tp/l2tp_netlink.c 			      atomic_long_read(&tunnel->stats.rx_oos_packets),
tunnel            371 net/l2tp/l2tp_netlink.c 			      atomic_long_read(&tunnel->stats.rx_errors),
tunnel            376 net/l2tp/l2tp_netlink.c 	sk = tunnel->sock;
tunnel            387 net/l2tp/l2tp_netlink.c 	switch (tunnel->encap) {
tunnel            438 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel;
tunnel            457 net/l2tp/l2tp_netlink.c 	tunnel = l2tp_tunnel_get(net, tunnel_id);
tunnel            458 net/l2tp/l2tp_netlink.c 	if (!tunnel) {
tunnel            464 net/l2tp/l2tp_netlink.c 				  NLM_F_ACK, tunnel, L2TP_CMD_TUNNEL_GET);
tunnel            468 net/l2tp/l2tp_netlink.c 	l2tp_tunnel_dec_refcount(tunnel);
tunnel            473 net/l2tp/l2tp_netlink.c 	l2tp_tunnel_dec_refcount(tunnel);
tunnel            483 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel;
tunnel            487 net/l2tp/l2tp_netlink.c 		tunnel = l2tp_tunnel_get_nth(net, ti);
tunnel            488 net/l2tp/l2tp_netlink.c 		if (tunnel == NULL)
tunnel            493 net/l2tp/l2tp_netlink.c 					tunnel, L2TP_CMD_TUNNEL_GET) < 0) {
tunnel            494 net/l2tp/l2tp_netlink.c 			l2tp_tunnel_dec_refcount(tunnel);
tunnel            497 net/l2tp/l2tp_netlink.c 		l2tp_tunnel_dec_refcount(tunnel);
tunnel            514 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel;
tunnel            525 net/l2tp/l2tp_netlink.c 	tunnel = l2tp_tunnel_get(net, tunnel_id);
tunnel            526 net/l2tp/l2tp_netlink.c 	if (!tunnel) {
tunnel            554 net/l2tp/l2tp_netlink.c 	if (tunnel->version == 2 && cfg.pw_type != L2TP_PWTYPE_PPP) {
tunnel            559 net/l2tp/l2tp_netlink.c 	if (tunnel->version > 2) {
tunnel            621 net/l2tp/l2tp_netlink.c 	ret = l2tp_nl_cmd_ops[cfg.pw_type]->session_create(net, tunnel,
tunnel            627 net/l2tp/l2tp_netlink.c 		session = l2tp_tunnel_get_session(tunnel, session_id);
tunnel            636 net/l2tp/l2tp_netlink.c 	l2tp_tunnel_dec_refcount(tunnel);
tunnel            686 net/l2tp/l2tp_netlink.c 		l2tp_session_set_header_len(session, session->tunnel->version);
tunnel            709 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel            715 net/l2tp/l2tp_netlink.c 	if (nla_put_u32(skb, L2TP_ATTR_CONN_ID, tunnel->tunnel_id) ||
tunnel            717 net/l2tp/l2tp_netlink.c 	    nla_put_u32(skb, L2TP_ATTR_PEER_CONN_ID, tunnel->peer_tunnel_id) ||
tunnel            735 net/l2tp/l2tp_netlink.c 	    (l2tp_tunnel_uses_xfrm(tunnel) &&
tunnel            822 net/l2tp/l2tp_netlink.c 	struct l2tp_tunnel *tunnel = NULL;
tunnel            827 net/l2tp/l2tp_netlink.c 		if (tunnel == NULL) {
tunnel            828 net/l2tp/l2tp_netlink.c 			tunnel = l2tp_tunnel_get_nth(net, ti);
tunnel            829 net/l2tp/l2tp_netlink.c 			if (tunnel == NULL)
tunnel            833 net/l2tp/l2tp_netlink.c 		session = l2tp_session_get_nth(tunnel, si);
tunnel            836 net/l2tp/l2tp_netlink.c 			l2tp_tunnel_dec_refcount(tunnel);
tunnel            837 net/l2tp/l2tp_netlink.c 			tunnel = NULL;
tunnel            846 net/l2tp/l2tp_netlink.c 			l2tp_tunnel_dec_refcount(tunnel);
tunnel            279 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel;
tunnel            292 net/l2tp/l2tp_ppp.c 	tunnel = session->tunnel;
tunnel            294 net/l2tp/l2tp_ppp.c 	uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0;
tunnel            356 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel;
tunnel            367 net/l2tp/l2tp_ppp.c 	tunnel = session->tunnel;
tunnel            369 net/l2tp/l2tp_ppp.c 	uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0;
tunnel            648 net/l2tp/l2tp_ppp.c static int pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel)
tunnel            652 net/l2tp/l2tp_ppp.c 	mtu = l2tp_tunnel_dst_mtu(tunnel);
tunnel            668 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel;
tunnel            698 net/l2tp/l2tp_ppp.c 	tunnel = l2tp_tunnel_get(sock_net(sk), info.tunnel_id);
tunnel            699 net/l2tp/l2tp_ppp.c 	if (tunnel)
tunnel            707 net/l2tp/l2tp_ppp.c 		if (tunnel == NULL) {
tunnel            725 net/l2tp/l2tp_ppp.c 						   &tunnel);
tunnel            729 net/l2tp/l2tp_ppp.c 			l2tp_tunnel_inc_refcount(tunnel);
tunnel            730 net/l2tp/l2tp_ppp.c 			error = l2tp_tunnel_register(tunnel, sock_net(sk),
tunnel            733 net/l2tp/l2tp_ppp.c 				kfree(tunnel);
tunnel            742 net/l2tp/l2tp_ppp.c 		if (tunnel == NULL)
tunnel            746 net/l2tp/l2tp_ppp.c 		if (tunnel->sock == NULL)
tunnel            750 net/l2tp/l2tp_ppp.c 	if (tunnel->peer_tunnel_id == 0)
tunnel            751 net/l2tp/l2tp_ppp.c 		tunnel->peer_tunnel_id = info.peer_tunnel_id;
tunnel            753 net/l2tp/l2tp_ppp.c 	session = l2tp_tunnel_get_session(tunnel, info.session_id);
tunnel            779 net/l2tp/l2tp_ppp.c 					      tunnel, info.session_id,
tunnel            791 net/l2tp/l2tp_ppp.c 		error = l2tp_session_register(session, tunnel);
tunnel            820 net/l2tp/l2tp_ppp.c 	po->chan.mtu	 = pppol2tp_tunnel_mtu(tunnel);
tunnel            849 net/l2tp/l2tp_ppp.c 			l2tp_tunnel_delete(tunnel);
tunnel            854 net/l2tp/l2tp_ppp.c 		l2tp_tunnel_dec_refcount(tunnel);
tunnel            863 net/l2tp/l2tp_ppp.c static int pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel,
tunnel            871 net/l2tp/l2tp_ppp.c 	if (!tunnel->sock) {
tunnel            878 net/l2tp/l2tp_ppp.c 				      tunnel, session_id,
tunnel            887 net/l2tp/l2tp_ppp.c 	error = l2tp_session_register(session, tunnel);
tunnel            909 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel;
tunnel            926 net/l2tp/l2tp_ppp.c 	tunnel = session->tunnel;
tunnel            928 net/l2tp/l2tp_ppp.c 	inet = inet_sk(tunnel->sock);
tunnel            929 net/l2tp/l2tp_ppp.c 	if ((tunnel->version == 2) && (tunnel->sock->sk_family == AF_INET)) {
tunnel            935 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.fd  = tunnel->fd;
tunnel            937 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.s_tunnel = tunnel->tunnel_id;
tunnel            938 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.d_tunnel = tunnel->peer_tunnel_id;
tunnel            946 net/l2tp/l2tp_ppp.c 	} else if ((tunnel->version == 2) &&
tunnel            947 net/l2tp/l2tp_ppp.c 		   (tunnel->sock->sk_family == AF_INET6)) {
tunnel            954 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.fd  = tunnel->fd;
tunnel            956 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.s_tunnel = tunnel->tunnel_id;
tunnel            957 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.d_tunnel = tunnel->peer_tunnel_id;
tunnel            962 net/l2tp/l2tp_ppp.c 		memcpy(&sp.pppol2tp.addr.sin6_addr, &tunnel->sock->sk_v6_daddr,
tunnel            963 net/l2tp/l2tp_ppp.c 		       sizeof(tunnel->sock->sk_v6_daddr));
tunnel            965 net/l2tp/l2tp_ppp.c 	} else if ((tunnel->version == 3) &&
tunnel            966 net/l2tp/l2tp_ppp.c 		   (tunnel->sock->sk_family == AF_INET6)) {
tunnel            973 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.fd  = tunnel->fd;
tunnel            975 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.s_tunnel = tunnel->tunnel_id;
tunnel            976 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.d_tunnel = tunnel->peer_tunnel_id;
tunnel            981 net/l2tp/l2tp_ppp.c 		memcpy(&sp.pppol2tp.addr.sin6_addr, &tunnel->sock->sk_v6_daddr,
tunnel            982 net/l2tp/l2tp_ppp.c 		       sizeof(tunnel->sock->sk_v6_daddr));
tunnel            985 net/l2tp/l2tp_ppp.c 	} else if (tunnel->version == 3) {
tunnel            991 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.fd  = tunnel->fd;
tunnel            993 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.s_tunnel = tunnel->tunnel_id;
tunnel            994 net/l2tp/l2tp_ppp.c 		sp.pppol2tp.d_tunnel = tunnel->peer_tunnel_id;
tunnel           1037 net/l2tp/l2tp_ppp.c 				      struct l2tp_tunnel *tunnel)
tunnel           1042 net/l2tp/l2tp_ppp.c 		pppol2tp_copy_stats(stats, &tunnel->stats);
tunnel           1049 net/l2tp/l2tp_ppp.c 	session = l2tp_tunnel_get_session(tunnel, stats->session_id);
tunnel           1115 net/l2tp/l2tp_ppp.c 							 session->tunnel);
tunnel           1124 net/l2tp/l2tp_ppp.c 		stats.tunnel_id = session->tunnel->tunnel_id;
tunnel           1125 net/l2tp/l2tp_ppp.c 		stats.using_ipsec = l2tp_tunnel_uses_xfrm(session->tunnel);
tunnel           1151 net/l2tp/l2tp_ppp.c 				      struct l2tp_tunnel *tunnel,
tunnel           1158 net/l2tp/l2tp_ppp.c 		tunnel->debug = val;
tunnel           1159 net/l2tp/l2tp_ppp.c 		l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: set debug=%x\n",
tunnel           1160 net/l2tp/l2tp_ppp.c 			  tunnel->name, tunnel->debug);
tunnel           1203 net/l2tp/l2tp_ppp.c 		l2tp_session_set_header_len(session, session->tunnel->version);
tunnel           1251 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel;
tunnel           1278 net/l2tp/l2tp_ppp.c 		tunnel = session->tunnel;
tunnel           1279 net/l2tp/l2tp_ppp.c 		err = pppol2tp_tunnel_setsockopt(sk, tunnel, optname, val);
tunnel           1292 net/l2tp/l2tp_ppp.c 				      struct l2tp_tunnel *tunnel,
tunnel           1299 net/l2tp/l2tp_ppp.c 		*val = tunnel->debug;
tunnel           1300 net/l2tp/l2tp_ppp.c 		l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: get debug=%x\n",
tunnel           1301 net/l2tp/l2tp_ppp.c 			  tunnel->name, tunnel->debug);
tunnel           1368 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel;
tunnel           1396 net/l2tp/l2tp_ppp.c 		tunnel = session->tunnel;
tunnel           1397 net/l2tp/l2tp_ppp.c 		err = pppol2tp_tunnel_getsockopt(sk, tunnel, optname, &val);
tunnel           1435 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel;
tunnel           1442 net/l2tp/l2tp_ppp.c 	if (pd->tunnel)
tunnel           1443 net/l2tp/l2tp_ppp.c 		l2tp_tunnel_dec_refcount(pd->tunnel);
tunnel           1446 net/l2tp/l2tp_ppp.c 		pd->tunnel = l2tp_tunnel_get_nth(net, pd->tunnel_idx);
tunnel           1450 net/l2tp/l2tp_ppp.c 		if (!pd->tunnel || pd->tunnel->version == 2)
tunnel           1453 net/l2tp/l2tp_ppp.c 		l2tp_tunnel_dec_refcount(pd->tunnel);
tunnel           1463 net/l2tp/l2tp_ppp.c 	pd->session = l2tp_session_get_nth(pd->tunnel, pd->session_idx);
tunnel           1485 net/l2tp/l2tp_ppp.c 	if (pd->tunnel == NULL)
tunnel           1491 net/l2tp/l2tp_ppp.c 	if ((pd->tunnel == NULL) && (pd->session == NULL))
tunnel           1518 net/l2tp/l2tp_ppp.c 	if (pd->tunnel) {
tunnel           1519 net/l2tp/l2tp_ppp.c 		l2tp_tunnel_dec_refcount(pd->tunnel);
tunnel           1520 net/l2tp/l2tp_ppp.c 		pd->tunnel = NULL;
tunnel           1526 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel = v;
tunnel           1529 net/l2tp/l2tp_ppp.c 		   tunnel->name,
tunnel           1530 net/l2tp/l2tp_ppp.c 		   (tunnel == tunnel->sock->sk_user_data) ? 'Y' : 'N',
tunnel           1531 net/l2tp/l2tp_ppp.c 		   refcount_read(&tunnel->ref_count) - 1);
tunnel           1533 net/l2tp/l2tp_ppp.c 		   tunnel->debug,
tunnel           1534 net/l2tp/l2tp_ppp.c 		   atomic_long_read(&tunnel->stats.tx_packets),
tunnel           1535 net/l2tp/l2tp_ppp.c 		   atomic_long_read(&tunnel->stats.tx_bytes),
tunnel           1536 net/l2tp/l2tp_ppp.c 		   atomic_long_read(&tunnel->stats.tx_errors),
tunnel           1537 net/l2tp/l2tp_ppp.c 		   atomic_long_read(&tunnel->stats.rx_packets),
tunnel           1538 net/l2tp/l2tp_ppp.c 		   atomic_long_read(&tunnel->stats.rx_bytes),
tunnel           1539 net/l2tp/l2tp_ppp.c 		   atomic_long_read(&tunnel->stats.rx_errors));
tunnel           1545 net/l2tp/l2tp_ppp.c 	struct l2tp_tunnel *tunnel = session->tunnel;
tunnel           1552 net/l2tp/l2tp_ppp.c 	if (tunnel->sock) {
tunnel           1553 net/l2tp/l2tp_ppp.c 		struct inet_sock *inet = inet_sk(tunnel->sock);
tunnel           1570 net/l2tp/l2tp_ppp.c 		   tunnel->tunnel_id,
tunnel           1572 net/l2tp/l2tp_ppp.c 		   tunnel->peer_tunnel_id,
tunnel           1615 net/l2tp/l2tp_ppp.c 		pppol2tp_seq_tunnel_show(m, pd->tunnel);
tunnel           3409 net/sched/cls_api.c 	struct ip_tunnel_info *tunnel = priv;
tunnel           3411 net/sched/cls_api.c 	kfree(tunnel);
tunnel           3417 net/sched/cls_api.c 	entry->tunnel = tcf_tunnel_info_copy(act);
tunnel           3418 net/sched/cls_api.c 	if (!entry->tunnel)
tunnel           3421 net/sched/cls_api.c 	entry->destructor_priv = entry->tunnel;
tunnel            543 net/xfrm/xfrm_input.c 		if (XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4)
tunnel            544 net/xfrm/xfrm_input.c 			mark = be32_to_cpu(XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4->parms.i_key);
tunnel            547 net/xfrm/xfrm_input.c 		if (XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6)
tunnel            548 net/xfrm/xfrm_input.c 			mark = be32_to_cpu(XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6->parms.i_key);
tunnel           2398 net/xfrm/xfrm_state.c 	if (x->tunnel) {
tunnel           2399 net/xfrm/xfrm_state.c 		struct xfrm_state *t = x->tunnel;
tunnel           2405 net/xfrm/xfrm_state.c 		x->tunnel = NULL;