/kernel/linux/linux-5.10/samples/bpf/ |
H A D | xdp_tx_iptunnel_kern.c | 69 const struct iptnl_info *tnl, in set_ethhdr() 73 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 81 struct iptnl_info *tnl; in handle_ipv4() local 105 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4() 107 if (!tnl || tnl->family != AF_INET) in handle_ipv4() 127 set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IP)); in handle_ipv4() 136 iph->daddr = tnl->daddr.v4; in handle_ipv4() 137 iph->saddr = tnl->saddr.v4; in handle_ipv4() 156 struct iptnl_info *tnl; in handle_ipv6() local 67 set_ethhdr(struct ethhdr *new_eth, const struct ethhdr *old_eth, const struct iptnl_info *tnl, __be16 h_proto) set_ethhdr() argument [all...] |
H A D | xdp_tx_iptunnel_user.c | 165 struct iptnl_info tnl = {}; in main() local 172 tnl.family = AF_UNSPEC; in main() 204 v6 = tnl.saddr.v6; in main() 206 v6 = tnl.daddr.v6; in main() 211 if (tnl.family == AF_UNSPEC) { in main() 212 tnl.family = family; in main() 213 } else if (tnl.family != family) { in main() 221 (struct ether_addr *)tnl.dmac)) { in main() 290 if (bpf_map_update_elem(vip2tnl_map_fd, &vip, &tnl, in main()
|
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | xdp_tx_iptunnel_kern.c | 69 const struct iptnl_info *tnl, in set_ethhdr() 73 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 81 struct iptnl_info *tnl; in handle_ipv4() local 105 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4() 107 if (!tnl || tnl->family != AF_INET) in handle_ipv4() 127 set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IP)); in handle_ipv4() 136 iph->daddr = tnl->daddr.v4; in handle_ipv4() 137 iph->saddr = tnl->saddr.v4; in handle_ipv4() 156 struct iptnl_info *tnl; in handle_ipv6() local 67 set_ethhdr(struct ethhdr *new_eth, const struct ethhdr *old_eth, const struct iptnl_info *tnl, __be16 h_proto) set_ethhdr() argument [all...] |
H A D | xdp_tx_iptunnel_user.c | 160 struct iptnl_info tnl = {}; in main() local 168 tnl.family = AF_UNSPEC; in main() 200 v6 = tnl.saddr.v6; in main() 202 v6 = tnl.daddr.v6; in main() 207 if (tnl.family == AF_UNSPEC) { in main() 208 tnl.family = family; in main() 209 } else if (tnl.family != family) { in main() 217 (struct ether_addr *)tnl.dmac)) { in main() 286 if (bpf_map_update_elem(vip2tnl_map_fd, &vip, &tnl, in main()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_xdp.c | 72 const struct iptnl_info *tnl, in set_ethhdr() 76 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 84 struct iptnl_info *tnl; in handle_ipv4() local 108 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4() 110 if (!tnl || tnl->family != AF_INET) in handle_ipv4() 128 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4() 137 iph->daddr = tnl->daddr.v4; in handle_ipv4() 138 iph->saddr = tnl->saddr.v4; in handle_ipv4() 157 struct iptnl_info *tnl; in handle_ipv6() local 70 set_ethhdr(struct ethhdr *new_eth, const struct ethhdr *old_eth, const struct iptnl_info *tnl, __be16 h_proto) set_ethhdr() argument [all...] |
H A D | test_xdp_loop.c | 68 const struct iptnl_info *tnl, in set_ethhdr() 72 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 80 struct iptnl_info *tnl; in handle_ipv4() local 104 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4() 106 if (!tnl || tnl->family != AF_INET) in handle_ipv4() 124 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4() 133 iph->daddr = tnl->daddr.v4; in handle_ipv4() 134 iph->saddr = tnl->saddr.v4; in handle_ipv4() 153 struct iptnl_info *tnl; in handle_ipv6() local 66 set_ethhdr(struct ethhdr *new_eth, const struct ethhdr *old_eth, const struct iptnl_info *tnl, __be16 h_proto) set_ethhdr() argument [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_xdp.c | 70 const struct iptnl_info *tnl, in set_ethhdr() 74 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 82 struct iptnl_info *tnl; in handle_ipv4() local 106 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4() 108 if (!tnl || tnl->family != AF_INET) in handle_ipv4() 126 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4() 135 iph->daddr = tnl->daddr.v4; in handle_ipv4() 136 iph->saddr = tnl->saddr.v4; in handle_ipv4() 155 struct iptnl_info *tnl; in handle_ipv6() local 68 set_ethhdr(struct ethhdr *new_eth, const struct ethhdr *old_eth, const struct iptnl_info *tnl, __be16 h_proto) set_ethhdr() argument [all...] |
H A D | test_xdp_dynptr.c | 69 const struct iptnl_info *tnl, in set_ethhdr() 73 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 83 struct iptnl_info *tnl; in handle_ipv4() local 116 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4() 118 if (!tnl || tnl->family != AF_INET) in handle_ipv4() 132 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4() 144 iph->daddr = tnl->daddr.v4; in handle_ipv4() 145 iph->saddr = tnl->saddr.v4; in handle_ipv4() 165 struct iptnl_info *tnl; in handle_ipv6() local 67 set_ethhdr(struct ethhdr *new_eth, const struct ethhdr *old_eth, const struct iptnl_info *tnl, __be16 h_proto) set_ethhdr() argument [all...] |
H A D | test_xdp_loop.c | 66 const struct iptnl_info *tnl, in set_ethhdr() 70 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 78 struct iptnl_info *tnl; in handle_ipv4() local 102 tnl = bpf_map_lookup_elem(&vip2tnl, &vip); in handle_ipv4() 104 if (!tnl || tnl->family != AF_INET) in handle_ipv4() 122 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4() 131 iph->daddr = tnl->daddr.v4; in handle_ipv4() 132 iph->saddr = tnl->saddr.v4; in handle_ipv4() 151 struct iptnl_info *tnl; in handle_ipv6() local 64 set_ethhdr(struct ethhdr *new_eth, const struct ethhdr *old_eth, const struct iptnl_info *tnl, __be16 h_proto) set_ethhdr() argument [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/intel/ice/ |
H A D | ice_ddp.c | 508 if (hw->tnl.count < ICE_TUNNEL_MAX_ENTRIES) { in ice_add_tunnel_hint() 523 hw->tnl.tbl[hw->tnl.count].type = tnls[i].type; in ice_add_tunnel_hint() 524 hw->tnl.tbl[hw->tnl.count].valid = false; in ice_add_tunnel_hint() 525 hw->tnl.tbl[hw->tnl.count].boost_addr = val; in ice_add_tunnel_hint() 526 hw->tnl.tbl[hw->tnl.count].port = 0; in ice_add_tunnel_hint() 527 hw->tnl in ice_add_tunnel_hint() [all...] |
H A D | ice_flex_pipe.c | 310 for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++) in ice_get_open_tunnel_port() 311 if (hw->tnl.tbl[i].valid && hw->tnl.tbl[i].port && in ice_get_open_tunnel_port() 312 (type == TNL_LAST || type == hw->tnl.tbl[i].type)) { in ice_get_open_tunnel_port() 313 *port = hw->tnl.tbl[i].port; in ice_get_open_tunnel_port() 422 for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++) in ice_tunnel_idx_to_entry() 423 if (hw->tnl.tbl[i].valid && in ice_tunnel_idx_to_entry() 424 hw->tnl.tbl[i].type == type && in ice_tunnel_idx_to_entry() 476 memcpy(sect_rx->tcam, hw->tnl.tbl[index].boost_entry, in ice_create_tunnel() 492 hw->tnl in ice_create_tunnel() [all...] |
H A D | ice_type.h | 935 struct ice_tunnel_table tnl; member
|
H A D | ice_main.c | 4601 if (pf->hw.tnl.valid_count[TNL_VXLAN]) { in ice_init_dev() 4603 pf->hw.tnl.valid_count[TNL_VXLAN]; in ice_init_dev() 4607 if (pf->hw.tnl.valid_count[TNL_GENEVE]) { in ice_init_dev() 4609 pf->hw.tnl.valid_count[TNL_GENEVE]; in ice_init_dev()
|
/kernel/linux/linux-6.6/net/tipc/ |
H A D | link.h | 89 void tipc_link_tnl_prepare(struct tipc_link *l, struct tipc_link *tnl, 91 void tipc_link_create_dummy_tnl_msg(struct tipc_link *tnl, 93 void tipc_link_failover_prepare(struct tipc_link *l, struct tipc_link *tnl,
|
H A D | link.c | 1973 void tipc_link_tnl_prepare(struct tipc_link *l, struct tipc_link *tnl, in tipc_link_tnl_prepare() argument 1976 struct sk_buff_head *fdefq = &tnl->failover_deferdq; in tipc_link_tnl_prepare() 1986 if (!tnl) in tipc_link_tnl_prepare() 1995 if (mtyp == SYNCH_MSG && (tnl->peer_caps & TIPC_TUNNEL_ENHANCED)) { in tipc_link_tnl_prepare() 2011 tipc_link_xmit(tnl, &tnlq, xmitq); in tipc_link_tnl_prepare() 2039 tnl: in tipc_link_tnl_prepare() 2055 if (pktlen > tnl->mtu - INT_H_SIZE) { in tipc_link_tnl_prepare() 2057 (tnl->peer_caps & TIPC_TUNNEL_ENHANCED)) { in tipc_link_tnl_prepare() 2058 rc = tipc_msg_fragment(skb, &tnlhdr, tnl->mtu, in tipc_link_tnl_prepare() 2091 goto tnl; in tipc_link_tnl_prepare() 2127 tipc_link_failover_prepare(struct tipc_link *l, struct tipc_link *tnl, struct sk_buff_head *xmitq) tipc_link_failover_prepare() argument [all...] |
H A D | node.c | 957 * @tnl: tunnel link 958 * @xmitq: queue for messages to be xmited on tnl link later 961 struct tipc_link *tnl, in tipc_node_link_failover() 965 if (!tipc_link_is_up(tnl)) in tipc_node_link_failover() 972 tipc_link_fsm_evt(tnl, LINK_SYNCH_END_EVT); in tipc_node_link_failover() 975 n->sync_point = tipc_link_rcv_nxt(tnl) + (U16_MAX / 2 - 1); in tipc_node_link_failover() 976 tipc_link_failover_prepare(l, tnl, xmitq); in tipc_node_link_failover() 998 struct tipc_link *l, *_l, *tnl; in __tipc_node_link_down() local 1051 tnl = n->links[*bearer_id].link; in __tipc_node_link_down() 1052 tipc_link_fsm_evt(tnl, LINK_SYNCH_END_EV in __tipc_node_link_down() 960 tipc_node_link_failover(struct tipc_node *n, struct tipc_link *l, struct tipc_link *tnl, struct sk_buff_head *xmitq) tipc_node_link_failover() argument 1942 struct tipc_link *l, *tnl, *pl = NULL; tipc_node_check_state() local [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/ice/ |
H A D | ice_flex_pipe.c | 468 memset(&hw->tnl, 0, sizeof(hw->tnl)); in ice_init_pkg_hints() 477 while (label_name && hw->tnl.count < ICE_TUNNEL_MAX_ENTRIES) { in ice_init_pkg_hints() 490 hw->tnl.tbl[hw->tnl.count].type = tnls[i].type; in ice_init_pkg_hints() 491 hw->tnl.tbl[hw->tnl.count].valid = false; in ice_init_pkg_hints() 492 hw->tnl.tbl[hw->tnl.count].boost_addr = val; in ice_init_pkg_hints() 493 hw->tnl in ice_init_pkg_hints() [all...] |
H A D | ice_type.h | 680 struct ice_tunnel_table tnl; member
|
H A D | ice_main.c | 4141 if (pf->hw.tnl.valid_count[TNL_VXLAN]) { in ice_probe() 4143 pf->hw.tnl.valid_count[TNL_VXLAN]; in ice_probe() 4148 if (pf->hw.tnl.valid_count[TNL_GENEVE]) { in ice_probe() 4150 pf->hw.tnl.valid_count[TNL_GENEVE]; in ice_probe()
|
/kernel/linux/linux-5.10/net/tipc/ |
H A D | link.h | 89 void tipc_link_tnl_prepare(struct tipc_link *l, struct tipc_link *tnl, 91 void tipc_link_create_dummy_tnl_msg(struct tipc_link *tnl, 93 void tipc_link_failover_prepare(struct tipc_link *l, struct tipc_link *tnl,
|
H A D | link.c | 1937 void tipc_link_tnl_prepare(struct tipc_link *l, struct tipc_link *tnl, in tipc_link_tnl_prepare() argument 1940 struct sk_buff_head *fdefq = &tnl->failover_deferdq; in tipc_link_tnl_prepare() 1950 if (!tnl) in tipc_link_tnl_prepare() 1959 if (mtyp == SYNCH_MSG && (tnl->peer_caps & TIPC_TUNNEL_ENHANCED)) { in tipc_link_tnl_prepare() 1975 tipc_link_xmit(tnl, &tnlq, xmitq); in tipc_link_tnl_prepare() 2003 tnl: in tipc_link_tnl_prepare() 2019 if (pktlen > tnl->mtu - INT_H_SIZE) { in tipc_link_tnl_prepare() 2021 (tnl->peer_caps & TIPC_TUNNEL_ENHANCED)) { in tipc_link_tnl_prepare() 2022 rc = tipc_msg_fragment(skb, &tnlhdr, tnl->mtu, in tipc_link_tnl_prepare() 2055 goto tnl; in tipc_link_tnl_prepare() 2091 tipc_link_failover_prepare(struct tipc_link *l, struct tipc_link *tnl, struct sk_buff_head *xmitq) tipc_link_failover_prepare() argument [all...] |
H A D | node.c | 934 * @tnl: tunnel link 935 * @xmitq: queue for messages to be xmited on tnl link later 938 struct tipc_link *tnl, in tipc_node_link_failover() 942 if (!tipc_link_is_up(tnl)) in tipc_node_link_failover() 949 tipc_link_fsm_evt(tnl, LINK_SYNCH_END_EVT); in tipc_node_link_failover() 952 n->sync_point = tipc_link_rcv_nxt(tnl) + (U16_MAX / 2 - 1); in tipc_node_link_failover() 953 tipc_link_failover_prepare(l, tnl, xmitq); in tipc_node_link_failover() 971 struct tipc_link *l, *_l, *tnl; in __tipc_node_link_down() local 1024 tnl = n->links[*bearer_id].link; in __tipc_node_link_down() 1025 tipc_link_fsm_evt(tnl, LINK_SYNCH_END_EV in __tipc_node_link_down() 937 tipc_node_link_failover(struct tipc_node *n, struct tipc_link *l, struct tipc_link *tnl, struct sk_buff_head *xmitq) tipc_node_link_failover() argument 1911 struct tipc_link *l, *tnl, *pl = NULL; tipc_node_check_state() local [all...] |
/kernel/linux/linux-5.10/net/ipv6/ |
H A D | ip6_tunnel.c | 1760 struct ip6_tnl *tnl = netdev_priv(dev); in ip6_tnl_change_mtu() local 1762 if (tnl->parms.proto == IPPROTO_IPV6) { in ip6_tnl_change_mtu() 1769 if (tnl->parms.proto == IPPROTO_IPV6 || tnl->parms.proto == 0) { in ip6_tnl_change_mtu()
|
/kernel/linux/linux-6.6/net/ipv6/ |
H A D | ip6_tunnel.c | 1734 struct ip6_tnl *tnl = netdev_priv(dev); in ip6_tnl_change_mtu() local 1736 if (tnl->parms.proto == IPPROTO_IPV6) { in ip6_tnl_change_mtu() 1743 if (tnl->parms.proto == IPPROTO_IPV6 || tnl->parms.proto == 0) { in ip6_tnl_change_mtu()
|