vxlan 1674 drivers/net/ethernet/amd/xgbe/xgbe-dev.c unsigned int csum, tso, vlan, vxlan; vxlan 1692 drivers/net/ethernet/amd/xgbe/xgbe-dev.c vxlan = XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, vxlan 1825 drivers/net/ethernet/amd/xgbe/xgbe-dev.c if (vxlan) { vxlan 186 drivers/net/ethernet/cisco/enic/enic.h struct vxlan_offload vxlan; vxlan 196 drivers/net/ethernet/cisco/enic/enic_main.c if (!(enic->vxlan.flags & ENIC_VXLAN_OUTER_IPV6)) { vxlan 207 drivers/net/ethernet/cisco/enic/enic_main.c if (enic->vxlan.vxlan_udp_port_number) { vxlan 208 drivers/net/ethernet/cisco/enic/enic_main.c if (ntohs(port) == enic->vxlan.vxlan_udp_port_number) vxlan 216 drivers/net/ethernet/cisco/enic/enic_main.c !(enic->vxlan.flags & ENIC_VXLAN_MULTI_WQ)) { vxlan 228 drivers/net/ethernet/cisco/enic/enic_main.c enic->vxlan.patch_level); vxlan 232 drivers/net/ethernet/cisco/enic/enic_main.c enic->vxlan.vxlan_udp_port_number = ntohs(port); vxlan 235 drivers/net/ethernet/cisco/enic/enic_main.c (int)enic->vxlan.patch_level, ntohs(port), ti->sa_family); vxlan 254 drivers/net/ethernet/cisco/enic/enic_main.c if ((ntohs(ti->port) != enic->vxlan.vxlan_udp_port_number) || vxlan 269 drivers/net/ethernet/cisco/enic/enic_main.c enic->vxlan.vxlan_udp_port_number = 0; vxlan 295 drivers/net/ethernet/cisco/enic/enic_main.c if (!(enic->vxlan.flags & ENIC_VXLAN_OUTER_IPV6)) vxlan 308 drivers/net/ethernet/cisco/enic/enic_main.c if (!(enic->vxlan.flags & ENIC_VXLAN_INNER_IPV6)) vxlan 326 drivers/net/ethernet/cisco/enic/enic_main.c if (port != enic->vxlan.vxlan_udp_port_number) vxlan 1408 drivers/net/ethernet/cisco/enic/enic_main.c if (enic->vxlan.vxlan_udp_port_number) { vxlan 1409 drivers/net/ethernet/cisco/enic/enic_main.c switch (enic->vxlan.patch_level) { vxlan 2961 drivers/net/ethernet/cisco/enic/enic_main.c enic->vxlan.flags = (u8)a1; vxlan 2967 drivers/net/ethernet/cisco/enic/enic_main.c enic->vxlan.patch_level = patch_level; vxlan 887 drivers/net/ethernet/mellanox/mlx4/mcg.c rule_hw->vxlan.vni = vxlan 888 drivers/net/ethernet/mellanox/mlx4/mcg.c cpu_to_be32(be32_to_cpu(spec->vxlan.vni) << 8); vxlan 889 drivers/net/ethernet/mellanox/mlx4/mcg.c rule_hw->vxlan.vni_mask = vxlan 890 drivers/net/ethernet/mellanox/mlx4/mcg.c cpu_to_be32(be32_to_cpu(spec->vxlan.vni_mask) << 8); vxlan 961 drivers/net/ethernet/mellanox/mlx4/mcg.c "VNID = %d ", be32_to_cpu(cur->vxlan.vni)); vxlan 32 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c if (!mlx5_vxlan_lookup_port(priv->mdev->vxlan, vxlan 69 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c if (!mlx5_vxlan_lookup_port(priv->mdev->vxlan, dst_port)) { vxlan 3076 drivers/net/ethernet/mellanox/mlx5/core/en_main.c if (mlx5_vxlan_allowed(priv->mdev->vxlan)) vxlan 4202 drivers/net/ethernet/mellanox/mlx5/core/en_main.c mlx5_vxlan_add_port(priv->mdev->vxlan, port); vxlan 4216 drivers/net/ethernet/mellanox/mlx5/core/en_main.c mlx5_vxlan_del_port(priv->mdev->vxlan, port); vxlan 4246 drivers/net/ethernet/mellanox/mlx5/core/en_main.c if (!mlx5_vxlan_allowed(priv->mdev->vxlan)) vxlan 4259 drivers/net/ethernet/mellanox/mlx5/core/en_main.c if (!mlx5_vxlan_allowed(priv->mdev->vxlan)) vxlan 4298 drivers/net/ethernet/mellanox/mlx5/core/en_main.c if (mlx5_vxlan_lookup_port(priv->mdev->vxlan, port)) vxlan 4917 drivers/net/ethernet/mellanox/mlx5/core/en_main.c if (mlx5_vxlan_allowed(mdev->vxlan) || mlx5_geneve_tx_allowed(mdev) || vxlan 4925 drivers/net/ethernet/mellanox/mlx5/core/en_main.c if (mlx5_vxlan_allowed(mdev->vxlan) || mlx5_geneve_tx_allowed(mdev)) { vxlan 84 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mlx5_vxlan_lookup_port_locked(struct mlx5_vxlan *vxlan, u16 port) vxlan 88 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c hash_for_each_possible(vxlan->htable, vxlanp, hlist, port) { vxlan 96 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c struct mlx5_vxlan_port *mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) vxlan 100 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c if (!mlx5_vxlan_allowed(vxlan)) vxlan 103 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c spin_lock_bh(&vxlan->lock); vxlan 104 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c vxlanp = mlx5_vxlan_lookup_port_locked(vxlan, port); vxlan 105 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c spin_unlock_bh(&vxlan->lock); vxlan 110 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port) vxlan 115 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c vxlanp = mlx5_vxlan_lookup_port(vxlan, port); vxlan 121 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mutex_lock(&vxlan->sync_lock); vxlan 122 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c if (vxlan->num_ports >= mlx5_vxlan_max_udp_ports(vxlan->mdev)) { vxlan 123 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mlx5_core_info(vxlan->mdev, vxlan 125 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c port, mlx5_vxlan_max_udp_ports(vxlan->mdev)); vxlan 130 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c ret = mlx5_vxlan_core_add_port_cmd(vxlan->mdev, port); vxlan 143 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c spin_lock_bh(&vxlan->lock); vxlan 144 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c hash_add(vxlan->htable, &vxlanp->hlist, port); vxlan 145 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c spin_unlock_bh(&vxlan->lock); vxlan 147 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c vxlan->num_ports++; vxlan 148 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mutex_unlock(&vxlan->sync_lock); vxlan 152 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mlx5_vxlan_core_del_port_cmd(vxlan->mdev, port); vxlan 155 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mutex_unlock(&vxlan->sync_lock); vxlan 159 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c int mlx5_vxlan_del_port(struct mlx5_vxlan *vxlan, u16 port) vxlan 165 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mutex_lock(&vxlan->sync_lock); vxlan 167 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c spin_lock_bh(&vxlan->lock); vxlan 168 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c vxlanp = mlx5_vxlan_lookup_port_locked(vxlan, port); vxlan 180 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c spin_unlock_bh(&vxlan->lock); vxlan 183 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mlx5_vxlan_core_del_port_cmd(vxlan->mdev, port); vxlan 185 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c vxlan->num_ports--; vxlan 188 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mutex_unlock(&vxlan->sync_lock); vxlan 195 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c struct mlx5_vxlan *vxlan; vxlan 200 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c vxlan = kzalloc(sizeof(*vxlan), GFP_KERNEL); vxlan 201 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c if (!vxlan) vxlan 204 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c vxlan->mdev = mdev; vxlan 205 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mutex_init(&vxlan->sync_lock); vxlan 206 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c spin_lock_init(&vxlan->lock); vxlan 207 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c hash_init(vxlan->htable); vxlan 210 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mlx5_vxlan_add_port(vxlan, IANA_VXLAN_UDP_PORT); vxlan 212 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c return vxlan; vxlan 215 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan) vxlan 221 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c if (!mlx5_vxlan_allowed(vxlan)) vxlan 225 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c hash_for_each_safe(vxlan->htable, bkt, tmp, vxlanp, hlist) { vxlan 227 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c mlx5_vxlan_core_del_port_cmd(vxlan->mdev, vxlanp->udp_port); vxlan 231 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c kfree(vxlan); vxlan 40 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h static inline bool mlx5_vxlan_allowed(struct mlx5_vxlan *vxlan) vxlan 45 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h return !IS_ERR_OR_NULL(vxlan); vxlan 50 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan); vxlan 51 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port); vxlan 52 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h int mlx5_vxlan_del_port(struct mlx5_vxlan *vxlan, u16 port); vxlan 53 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h struct mlx5_vxlan_port *mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port); vxlan 57 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h static inline void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan) { return; } vxlan 58 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h static inline int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port) { return -EOPNOTSUPP; } vxlan 59 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h static inline int mlx5_vxlan_del_port(struct mlx5_vxlan *vxlan, u16 port) { return -EOPNOTSUPP; } vxlan 61 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) { return NULL; } vxlan 851 drivers/net/ethernet/mellanox/mlx5/core/main.c dev->vxlan = mlx5_vxlan_create(dev); vxlan 903 drivers/net/ethernet/mellanox/mlx5/core/main.c mlx5_vxlan_destroy(dev->vxlan); vxlan 929 drivers/net/ethernet/mellanox/mlx5/core/main.c mlx5_vxlan_destroy(dev->vxlan); vxlan 28 drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 29 drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c struct vxlan_config *cfg = &vxlan->cfg; vxlan 93 drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 94 drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c struct vxlan_config *cfg = &vxlan->cfg; vxlan 1974 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_dev *vxlan = netdev_priv(vxlan_dev); vxlan 1977 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c .vni = vxlan->cfg.vni, vxlan 2178 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_dev *vxlan = netdev_priv(vxlan_dev); vxlan 2181 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c .vni = vxlan->cfg.vni, vxlan 2345 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_dev *vxlan = netdev_priv(vxlan_dev); vxlan 2349 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c fid = mlxsw_sp_fid_lookup_by_vni(mlxsw_sp, vxlan->cfg.vni); vxlan 2409 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2415 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c info.remote_port = vxlan->cfg.dst_port; vxlan 2606 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2608 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c if (!(vxlan->cfg.flags & VXLAN_F_LEARN)) vxlan 3080 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_dev *vxlan = netdev_priv(switchdev_work->dev); vxlan 3082 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_config *cfg = &vxlan->cfg; vxlan 3210 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_dev *vxlan = netdev_priv(vxlan_dev); vxlan 3211 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c __be32 vni = vxlan->cfg.vni; vxlan 3296 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c struct vxlan_dev *vxlan = netdev_priv(vxlan_dev); vxlan 3297 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c __be32 vni = vxlan->cfg.vni; vxlan 179 drivers/net/ethernet/qlogic/qed/qed.h struct qed_tunn_update_type vxlan; vxlan 254 drivers/net/ethernet/qlogic/qed/qed_main.c if (tun->vxlan.tun_cls == QED_TUNN_CLSS_MAC_VLAN && vxlan 255 drivers/net/ethernet/qlogic/qed/qed_main.c tun->vxlan.b_mode_enabled) vxlan 1266 drivers/net/ethernet/qlogic/qed/qed_main.c tunn_info.vxlan.b_mode_enabled = true; vxlan 1271 drivers/net/ethernet/qlogic/qed/qed_main.c tunn_info.vxlan.tun_cls = QED_TUNN_CLSS_MAC_VLAN; vxlan 154 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c if (p_src->vxlan.b_update_mode || b_pf_start) vxlan 155 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c p_tun->vxlan.b_mode_enabled = p_src->vxlan.b_mode_enabled; vxlan 180 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c type = qed_tunn_clss_to_fw_clss(p_src->vxlan.tun_cls); vxlan 181 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c p_tun->vxlan.tun_cls = type; vxlan 238 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c &p_tun->vxlan, vxlan 267 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c qed_set_vxlan_enable(p_hwfn, p_ptt, p_tun->vxlan.b_mode_enabled); vxlan 303 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c &p_tun->vxlan, vxlan 2192 drivers/net/ethernet/qlogic/qed/qed_sriov.c p_resp->vxlan_mode = p_tun->vxlan.b_mode_enabled; vxlan 2197 drivers/net/ethernet/qlogic/qed/qed_sriov.c p_resp->vxlan_clss = p_tun->vxlan.tun_cls; vxlan 2270 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_pf_validate_tunn_mode(&tun_src->vxlan, &rc); vxlan 2277 drivers/net/ethernet/qlogic/qed/qed_sriov.c (tun_src->vxlan.tun_cls != QED_TUNN_CLSS_MAC_VLAN || vxlan 2345 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_pf_update_tun_param(p_req, &tunn.vxlan, &tunn.vxlan_port, vxlan 613 drivers/net/ethernet/qlogic/qed/qed_vf.c if (p_tun->vxlan.b_mode_enabled) vxlan 614 drivers/net/ethernet/qlogic/qed/qed_vf.c p_tun->vxlan.b_update_mode = true; vxlan 648 drivers/net/ethernet/qlogic/qed/qed_vf.c __qed_vf_update_tunn_param(&p_tun->vxlan, feat_mask, vxlan 670 drivers/net/ethernet/qlogic/qed/qed_vf.c p_tun->vxlan.b_mode_enabled, p_tun->l2_geneve.b_mode_enabled, vxlan 690 drivers/net/ethernet/qlogic/qed/qed_vf.c qed_vf_prep_tunn_req_tlv(p_req, &p_src->vxlan, QED_MODE_VXLAN_TUNN, vxlan 59 drivers/net/vxlan.c static int vxlan_sock_add(struct vxlan_dev *vxlan); vxlan 61 drivers/net/vxlan.c static void vxlan_vs_del_dev(struct vxlan_dev *vxlan); vxlan 215 drivers/net/vxlan.c if (node->vxlan->default_dst.remote_vni != vni) vxlan 219 drivers/net/vxlan.c const struct vxlan_config *cfg = &node->vxlan->cfg; vxlan 226 drivers/net/vxlan.c return node->vxlan; vxlan 247 drivers/net/vxlan.c static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan, vxlan 274 drivers/net/vxlan.c ndm->ndm_ifindex = vxlan->dev->ifindex; vxlan 280 drivers/net/vxlan.c if (!net_eq(dev_net(vxlan->dev), vxlan->net) && vxlan 282 drivers/net/vxlan.c peernet2id(dev_net(vxlan->dev), vxlan->net))) vxlan 291 drivers/net/vxlan.c if (rdst->remote_port && rdst->remote_port != vxlan->cfg.dst_port && vxlan 294 drivers/net/vxlan.c if (rdst->remote_vni != vxlan->default_dst.remote_vni && vxlan 297 drivers/net/vxlan.c if ((vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA) && fdb->vni && vxlan 333 drivers/net/vxlan.c static void __vxlan_fdb_notify(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb, vxlan 336 drivers/net/vxlan.c struct net *net = dev_net(vxlan->dev); vxlan 344 drivers/net/vxlan.c err = vxlan_fdb_info(skb, vxlan, fdb, 0, 0, type, 0, rd); vxlan 359 drivers/net/vxlan.c static void vxlan_fdb_switchdev_notifier_info(const struct vxlan_dev *vxlan, vxlan 365 drivers/net/vxlan.c fdb_info->info.dev = vxlan->dev; vxlan 377 drivers/net/vxlan.c static int vxlan_fdb_switchdev_call_notifiers(struct vxlan_dev *vxlan, vxlan 392 drivers/net/vxlan.c vxlan_fdb_switchdev_notifier_info(vxlan, fdb, rd, NULL, &info); vxlan 393 drivers/net/vxlan.c ret = call_switchdev_notifiers(notifier_type, vxlan->dev, vxlan 398 drivers/net/vxlan.c static int vxlan_fdb_notify(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb, vxlan 407 drivers/net/vxlan.c err = vxlan_fdb_switchdev_call_notifiers(vxlan, fdb, rd, vxlan 413 drivers/net/vxlan.c vxlan_fdb_switchdev_call_notifiers(vxlan, fdb, rd, vxlan 419 drivers/net/vxlan.c __vxlan_fdb_notify(vxlan, fdb, rd, type); vxlan 425 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 434 drivers/net/vxlan.c vxlan_fdb_notify(vxlan, &f, &remote, RTM_GETNEIGH, true, NULL); vxlan 437 drivers/net/vxlan.c static void vxlan_fdb_miss(struct vxlan_dev *vxlan, const u8 eth_addr[ETH_ALEN]) vxlan 446 drivers/net/vxlan.c vxlan_fdb_notify(vxlan, &f, &remote, RTM_GETNEIGH, true, NULL); vxlan 471 drivers/net/vxlan.c static u32 fdb_head_index(struct vxlan_dev *vxlan, const u8 *mac, __be32 vni) vxlan 473 drivers/net/vxlan.c if (vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA) vxlan 480 drivers/net/vxlan.c static inline struct hlist_head *vxlan_fdb_head(struct vxlan_dev *vxlan, vxlan 483 drivers/net/vxlan.c return &vxlan->fdb_head[fdb_head_index(vxlan, mac, vni)]; vxlan 487 drivers/net/vxlan.c static struct vxlan_fdb *__vxlan_find_mac(struct vxlan_dev *vxlan, vxlan 490 drivers/net/vxlan.c struct hlist_head *head = vxlan_fdb_head(vxlan, mac, vni); vxlan 495 drivers/net/vxlan.c if (vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA) { vxlan 507 drivers/net/vxlan.c static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan, vxlan 512 drivers/net/vxlan.c f = __vxlan_find_mac(vxlan, mac, vni); vxlan 540 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 554 drivers/net/vxlan.c f = __vxlan_find_mac(vxlan, eth_addr, vni); vxlan 561 drivers/net/vxlan.c vxlan_fdb_switchdev_notifier_info(vxlan, f, rdst, NULL, fdb_info); vxlan 570 drivers/net/vxlan.c const struct vxlan_dev *vxlan, vxlan 578 drivers/net/vxlan.c vxlan_fdb_switchdev_notifier_info(vxlan, f, rdst, extack, &fdb_info); vxlan 588 drivers/net/vxlan.c struct vxlan_dev *vxlan; vxlan 596 drivers/net/vxlan.c vxlan = netdev_priv(dev); vxlan 599 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[h]); vxlan 600 drivers/net/vxlan.c hlist_for_each_entry(f, &vxlan->fdb_head[h], hlist) { vxlan 603 drivers/net/vxlan.c rc = vxlan_fdb_notify_one(nb, vxlan, vxlan 611 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[h]); vxlan 616 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[h]); vxlan 623 drivers/net/vxlan.c struct vxlan_dev *vxlan; vxlan 630 drivers/net/vxlan.c vxlan = netdev_priv(dev); vxlan 633 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[h]); vxlan 634 drivers/net/vxlan.c hlist_for_each_entry(f, &vxlan->fdb_head[h], hlist) vxlan 638 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[h]); vxlan 796 drivers/net/vxlan.c static struct vxlan_fdb *vxlan_fdb_alloc(struct vxlan_dev *vxlan, vxlan 815 drivers/net/vxlan.c static void vxlan_fdb_insert(struct vxlan_dev *vxlan, const u8 *mac, vxlan 818 drivers/net/vxlan.c ++vxlan->addrcnt; vxlan 820 drivers/net/vxlan.c vxlan_fdb_head(vxlan, mac, src_vni)); vxlan 823 drivers/net/vxlan.c static int vxlan_fdb_create(struct vxlan_dev *vxlan, vxlan 833 drivers/net/vxlan.c if (vxlan->cfg.addrmax && vxlan 834 drivers/net/vxlan.c vxlan->addrcnt >= vxlan->cfg.addrmax) vxlan 837 drivers/net/vxlan.c netdev_dbg(vxlan->dev, "add %pM -> %pIS\n", mac, ip); vxlan 838 drivers/net/vxlan.c f = vxlan_fdb_alloc(vxlan, mac, state, src_vni, ndm_flags); vxlan 871 drivers/net/vxlan.c static void vxlan_fdb_destroy(struct vxlan_dev *vxlan, struct vxlan_fdb *f, vxlan 876 drivers/net/vxlan.c netdev_dbg(vxlan->dev, "delete %pM\n", f->eth_addr); vxlan 878 drivers/net/vxlan.c --vxlan->addrcnt; vxlan 881 drivers/net/vxlan.c vxlan_fdb_notify(vxlan, f, rd, RTM_DELNEIGH, vxlan 896 drivers/net/vxlan.c static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan, vxlan 957 drivers/net/vxlan.c err = vxlan_fdb_notify(vxlan, f, rd, RTM_NEWNEIGH, vxlan 975 drivers/net/vxlan.c static int vxlan_fdb_update_create(struct vxlan_dev *vxlan, vxlan 992 drivers/net/vxlan.c netdev_dbg(vxlan->dev, "add %pM -> %pIS\n", mac, ip); vxlan 993 drivers/net/vxlan.c rc = vxlan_fdb_create(vxlan, mac, ip, state, port, src_vni, vxlan 998 drivers/net/vxlan.c vxlan_fdb_insert(vxlan, mac, src_vni, f); vxlan 999 drivers/net/vxlan.c rc = vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f), RTM_NEWNEIGH, vxlan 1007 drivers/net/vxlan.c vxlan_fdb_destroy(vxlan, f, false, false); vxlan 1012 drivers/net/vxlan.c static int vxlan_fdb_update(struct vxlan_dev *vxlan, vxlan 1022 drivers/net/vxlan.c f = __vxlan_find_mac(vxlan, mac, src_vni); vxlan 1025 drivers/net/vxlan.c netdev_dbg(vxlan->dev, vxlan 1030 drivers/net/vxlan.c return vxlan_fdb_update_existing(vxlan, ip, state, flags, port, vxlan 1037 drivers/net/vxlan.c return vxlan_fdb_update_create(vxlan, mac, ip, state, flags, vxlan 1043 drivers/net/vxlan.c static void vxlan_fdb_dst_destroy(struct vxlan_dev *vxlan, struct vxlan_fdb *f, vxlan 1047 drivers/net/vxlan.c vxlan_fdb_notify(vxlan, f, rd, RTM_DELNEIGH, swdev_notify, NULL); vxlan 1051 drivers/net/vxlan.c static int vxlan_fdb_parse(struct nlattr *tb[], struct vxlan_dev *vxlan, vxlan 1055 drivers/net/vxlan.c struct net *net = dev_net(vxlan->dev); vxlan 1063 drivers/net/vxlan.c union vxlan_addr *remote = &vxlan->default_dst.remote_ip; vxlan 1080 drivers/net/vxlan.c *port = vxlan->cfg.dst_port; vxlan 1088 drivers/net/vxlan.c *vni = vxlan->default_dst.remote_vni; vxlan 1096 drivers/net/vxlan.c *src_vni = vxlan->default_dst.remote_vni; vxlan 1121 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 1139 drivers/net/vxlan.c err = vxlan_fdb_parse(tb, vxlan, &ip, &port, &src_vni, &vni, &ifindex); vxlan 1143 drivers/net/vxlan.c if (vxlan->default_dst.remote_ip.sa.sa_family != ip.sa.sa_family) vxlan 1146 drivers/net/vxlan.c hash_index = fdb_head_index(vxlan, addr, src_vni); vxlan 1147 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[hash_index]); vxlan 1148 drivers/net/vxlan.c err = vxlan_fdb_update(vxlan, addr, &ip, ndm->ndm_state, flags, vxlan 1152 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[hash_index]); vxlan 1157 drivers/net/vxlan.c static int __vxlan_fdb_delete(struct vxlan_dev *vxlan, vxlan 1166 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, addr, src_vni); vxlan 1180 drivers/net/vxlan.c vxlan_fdb_dst_destroy(vxlan, f, rd, swdev_notify); vxlan 1184 drivers/net/vxlan.c vxlan_fdb_destroy(vxlan, f, true, swdev_notify); vxlan 1195 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 1203 drivers/net/vxlan.c err = vxlan_fdb_parse(tb, vxlan, &ip, &port, &src_vni, &vni, &ifindex); vxlan 1207 drivers/net/vxlan.c hash_index = fdb_head_index(vxlan, addr, src_vni); vxlan 1208 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[hash_index]); vxlan 1209 drivers/net/vxlan.c err = __vxlan_fdb_delete(vxlan, addr, ip, port, src_vni, vni, ifindex, vxlan 1211 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[hash_index]); vxlan 1221 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 1228 drivers/net/vxlan.c hlist_for_each_entry_rcu(f, &vxlan->fdb_head[h], hlist) { vxlan 1235 drivers/net/vxlan.c err = vxlan_fdb_info(skb, vxlan, f, vxlan 1258 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 1266 drivers/net/vxlan.c vni = vxlan->default_dst.remote_vni; vxlan 1270 drivers/net/vxlan.c f = __vxlan_find_mac(vxlan, addr, vni); vxlan 1277 drivers/net/vxlan.c err = vxlan_fdb_info(skb, vxlan, f, portid, seq, vxlan 1292 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 1302 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, src_mac, vni); vxlan 1321 drivers/net/vxlan.c vxlan_fdb_notify(vxlan, f, rdst, RTM_NEWNEIGH, true, NULL); vxlan 1323 drivers/net/vxlan.c u32 hash_index = fdb_head_index(vxlan, src_mac, vni); vxlan 1326 drivers/net/vxlan.c spin_lock(&vxlan->hash_lock[hash_index]); vxlan 1330 drivers/net/vxlan.c vxlan_fdb_update(vxlan, src_mac, src_ip, vxlan 1333 drivers/net/vxlan.c vxlan->cfg.dst_port, vxlan 1335 drivers/net/vxlan.c vxlan->default_dst.remote_vni, vxlan 1337 drivers/net/vxlan.c spin_unlock(&vxlan->hash_lock[hash_index]); vxlan 1346 drivers/net/vxlan.c struct vxlan_dev *vxlan; vxlan 1366 drivers/net/vxlan.c list_for_each_entry(vxlan, &vn->vxlan_list, next) { vxlan 1367 drivers/net/vxlan.c if (!netif_running(vxlan->dev) || vxlan == dev) vxlan 1371 drivers/net/vxlan.c rtnl_dereference(vxlan->vn4_sock) != sock4) vxlan 1375 drivers/net/vxlan.c rtnl_dereference(vxlan->vn6_sock) != sock6) vxlan 1379 drivers/net/vxlan.c if (!vxlan_addr_equal(&vxlan->default_dst.remote_ip, vxlan 1383 drivers/net/vxlan.c if (vxlan->default_dst.remote_ifindex != vxlan 1414 drivers/net/vxlan.c static void vxlan_sock_release(struct vxlan_dev *vxlan) vxlan 1416 drivers/net/vxlan.c struct vxlan_sock *sock4 = rtnl_dereference(vxlan->vn4_sock); vxlan 1418 drivers/net/vxlan.c struct vxlan_sock *sock6 = rtnl_dereference(vxlan->vn6_sock); vxlan 1420 drivers/net/vxlan.c RCU_INIT_POINTER(vxlan->vn6_sock, NULL); vxlan 1423 drivers/net/vxlan.c RCU_INIT_POINTER(vxlan->vn4_sock, NULL); vxlan 1426 drivers/net/vxlan.c vxlan_vs_del_dev(vxlan); vxlan 1444 drivers/net/vxlan.c static int vxlan_igmp_join(struct vxlan_dev *vxlan) vxlan 1447 drivers/net/vxlan.c union vxlan_addr *ip = &vxlan->default_dst.remote_ip; vxlan 1448 drivers/net/vxlan.c int ifindex = vxlan->default_dst.remote_ifindex; vxlan 1452 drivers/net/vxlan.c struct vxlan_sock *sock4 = rtnl_dereference(vxlan->vn4_sock); vxlan 1464 drivers/net/vxlan.c struct vxlan_sock *sock6 = rtnl_dereference(vxlan->vn6_sock); vxlan 1478 drivers/net/vxlan.c static int vxlan_igmp_leave(struct vxlan_dev *vxlan) vxlan 1481 drivers/net/vxlan.c union vxlan_addr *ip = &vxlan->default_dst.remote_ip; vxlan 1482 drivers/net/vxlan.c int ifindex = vxlan->default_dst.remote_ifindex; vxlan 1486 drivers/net/vxlan.c struct vxlan_sock *sock4 = rtnl_dereference(vxlan->vn4_sock); vxlan 1498 drivers/net/vxlan.c struct vxlan_sock *sock6 = rtnl_dereference(vxlan->vn6_sock); vxlan 1592 drivers/net/vxlan.c static bool vxlan_set_mac(struct vxlan_dev *vxlan, vxlan 1600 drivers/net/vxlan.c skb->protocol = eth_type_trans(skb, vxlan->dev); vxlan 1604 drivers/net/vxlan.c if (ether_addr_equal(eth_hdr(skb)->h_source, vxlan->dev->dev_addr)) vxlan 1618 drivers/net/vxlan.c if ((vxlan->cfg.flags & VXLAN_F_LEARN) && vxlan 1653 drivers/net/vxlan.c struct vxlan_dev *vxlan; vxlan 1685 drivers/net/vxlan.c vxlan = vxlan_vs_find_vni(vs, skb->dev->ifindex, vni); vxlan 1686 drivers/net/vxlan.c if (!vxlan) vxlan 1699 drivers/net/vxlan.c !net_eq(vxlan->net, dev_net(vxlan->dev)))) vxlan 1740 drivers/net/vxlan.c if (!vxlan_set_mac(vxlan, vs, skb, vni)) vxlan 1744 drivers/net/vxlan.c skb->dev = vxlan->dev; vxlan 1752 drivers/net/vxlan.c ++vxlan->dev->stats.rx_frame_errors; vxlan 1753 drivers/net/vxlan.c ++vxlan->dev->stats.rx_errors; vxlan 1759 drivers/net/vxlan.c if (unlikely(!(vxlan->dev->flags & IFF_UP))) { vxlan 1761 drivers/net/vxlan.c atomic_long_inc(&vxlan->dev->rx_dropped); vxlan 1765 drivers/net/vxlan.c stats = this_cpu_ptr(vxlan->dev->tstats); vxlan 1771 drivers/net/vxlan.c gro_cells_receive(&vxlan->gro_cells, skb); vxlan 1786 drivers/net/vxlan.c struct vxlan_dev *vxlan; vxlan 1804 drivers/net/vxlan.c vxlan = vxlan_vs_find_vni(vs, skb->dev->ifindex, vni); vxlan 1805 drivers/net/vxlan.c if (!vxlan) vxlan 1813 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 1858 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, n->ha, vni); vxlan 1880 drivers/net/vxlan.c } else if (vxlan->cfg.flags & VXLAN_F_L3MISS) { vxlan 1987 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2017 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, n->ha, vni); vxlan 2035 drivers/net/vxlan.c } else if (vxlan->cfg.flags & VXLAN_F_L3MISS) { vxlan 2052 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2068 drivers/net/vxlan.c if (!n && (vxlan->cfg.flags & VXLAN_F_L3MISS)) { vxlan 2089 drivers/net/vxlan.c if (!n && (vxlan->cfg.flags & VXLAN_F_L3MISS)) { vxlan 2218 drivers/net/vxlan.c static struct rtable *vxlan_get_route(struct vxlan_dev *vxlan, struct net_device *dev, vxlan 2250 drivers/net/vxlan.c rt = ip_route_output_key(vxlan->net, &fl4); vxlan 2269 drivers/net/vxlan.c static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan, vxlan 2305 drivers/net/vxlan.c ndst = ipv6_stub->ipv6_dst_lookup_flow(vxlan->net, sock6->sock->sk, vxlan 2380 drivers/net/vxlan.c struct vxlan_dev *vxlan, vxlan 2399 drivers/net/vxlan.c dst_vxlan = vxlan_find_vni(vxlan->net, dst_ifindex, vni, vxlan 2401 drivers/net/vxlan.c vxlan->cfg.flags); vxlan 2408 drivers/net/vxlan.c vxlan_encap_bypass(skb, vxlan, dst_vxlan, vni); vxlan 2421 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2433 drivers/net/vxlan.c u32 flags = vxlan->cfg.flags; vxlan 2435 drivers/net/vxlan.c bool xnet = !net_eq(vxlan->net, dev_net(vxlan->dev)); vxlan 2444 drivers/net/vxlan.c vxlan_encap_bypass(skb, vxlan, vxlan, default_vni); vxlan 2450 drivers/net/vxlan.c dst_port = rdst->remote_port ? rdst->remote_port : vxlan->cfg.dst_port; vxlan 2453 drivers/net/vxlan.c local_ip = vxlan->cfg.saddr; vxlan 2459 drivers/net/vxlan.c ttl = vxlan->cfg.ttl; vxlan 2464 drivers/net/vxlan.c tos = vxlan->cfg.tos; vxlan 2472 drivers/net/vxlan.c label = vxlan->cfg.label; vxlan 2488 drivers/net/vxlan.c dst_port = info->key.tp_dst ? : vxlan->cfg.dst_port; vxlan 2502 drivers/net/vxlan.c src_port = udp_flow_src_port(dev_net(dev), skb, vxlan->cfg.port_min, vxlan 2503 drivers/net/vxlan.c vxlan->cfg.port_max, true); vxlan 2507 drivers/net/vxlan.c struct vxlan_sock *sock4 = rcu_dereference(vxlan->vn4_sock); vxlan 2514 drivers/net/vxlan.c rt = vxlan_get_route(vxlan, dev, sock4, skb, ifindex, tos, vxlan 2526 drivers/net/vxlan.c err = encap_bypass_if_local(skb, dev, vxlan, dst, vxlan 2532 drivers/net/vxlan.c if (vxlan->cfg.df == VXLAN_DF_SET) { vxlan 2534 drivers/net/vxlan.c } else if (vxlan->cfg.df == VXLAN_DF_INHERIT) { vxlan 2561 drivers/net/vxlan.c struct vxlan_sock *sock6 = rcu_dereference(vxlan->vn6_sock); vxlan 2566 drivers/net/vxlan.c ndst = vxlan6_get_route(vxlan, dev, sock6, skb, ifindex, tos, vxlan 2580 drivers/net/vxlan.c err = encap_bypass_if_local(skb, dev, vxlan, dst, vxlan 2631 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2643 drivers/net/vxlan.c if (vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA) { vxlan 2656 drivers/net/vxlan.c if (vxlan->cfg.flags & VXLAN_F_PROXY) { vxlan 2675 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, eth->h_dest, vni); vxlan 2678 drivers/net/vxlan.c if (f && (f->flags & NTF_ROUTER) && (vxlan->cfg.flags & VXLAN_F_RSC) && vxlan 2683 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, eth->h_dest, vni); vxlan 2687 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, all_zeros_mac, vni); vxlan 2689 drivers/net/vxlan.c if ((vxlan->cfg.flags & VXLAN_F_L2MISS) && vxlan 2691 drivers/net/vxlan.c vxlan_fdb_miss(vxlan, eth->h_dest); vxlan 2721 drivers/net/vxlan.c struct vxlan_dev *vxlan = from_timer(vxlan, t, age_timer); vxlan 2725 drivers/net/vxlan.c if (!netif_running(vxlan->dev)) vxlan 2731 drivers/net/vxlan.c spin_lock(&vxlan->hash_lock[h]); vxlan 2732 drivers/net/vxlan.c hlist_for_each_safe(p, n, &vxlan->fdb_head[h]) { vxlan 2743 drivers/net/vxlan.c timeout = f->used + vxlan->cfg.age_interval * HZ; vxlan 2745 drivers/net/vxlan.c netdev_dbg(vxlan->dev, vxlan 2749 drivers/net/vxlan.c vxlan_fdb_destroy(vxlan, f, true, true); vxlan 2753 drivers/net/vxlan.c spin_unlock(&vxlan->hash_lock[h]); vxlan 2756 drivers/net/vxlan.c mod_timer(&vxlan->age_timer, next_timer); vxlan 2759 drivers/net/vxlan.c static void vxlan_vs_del_dev(struct vxlan_dev *vxlan) vxlan 2761 drivers/net/vxlan.c struct vxlan_net *vn = net_generic(vxlan->net, vxlan_net_id); vxlan 2764 drivers/net/vxlan.c hlist_del_init_rcu(&vxlan->hlist4.hlist); vxlan 2766 drivers/net/vxlan.c hlist_del_init_rcu(&vxlan->hlist6.hlist); vxlan 2771 drivers/net/vxlan.c static void vxlan_vs_add_dev(struct vxlan_sock *vs, struct vxlan_dev *vxlan, vxlan 2774 drivers/net/vxlan.c struct vxlan_net *vn = net_generic(vxlan->net, vxlan_net_id); vxlan 2775 drivers/net/vxlan.c __be32 vni = vxlan->default_dst.remote_vni; vxlan 2777 drivers/net/vxlan.c node->vxlan = vxlan; vxlan 2786 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2793 drivers/net/vxlan.c err = gro_cells_init(&vxlan->gro_cells, dev); vxlan 2802 drivers/net/vxlan.c static void vxlan_fdb_delete_default(struct vxlan_dev *vxlan, __be32 vni) vxlan 2805 drivers/net/vxlan.c u32 hash_index = fdb_head_index(vxlan, all_zeros_mac, vni); vxlan 2807 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[hash_index]); vxlan 2808 drivers/net/vxlan.c f = __vxlan_find_mac(vxlan, all_zeros_mac, vni); vxlan 2810 drivers/net/vxlan.c vxlan_fdb_destroy(vxlan, f, true, true); vxlan 2811 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[hash_index]); vxlan 2816 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2818 drivers/net/vxlan.c gro_cells_destroy(&vxlan->gro_cells); vxlan 2820 drivers/net/vxlan.c vxlan_fdb_delete_default(vxlan, vxlan->cfg.vni); vxlan 2828 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2831 drivers/net/vxlan.c ret = vxlan_sock_add(vxlan); vxlan 2835 drivers/net/vxlan.c if (vxlan_addr_multicast(&vxlan->default_dst.remote_ip)) { vxlan 2836 drivers/net/vxlan.c ret = vxlan_igmp_join(vxlan); vxlan 2840 drivers/net/vxlan.c vxlan_sock_release(vxlan); vxlan 2845 drivers/net/vxlan.c if (vxlan->cfg.age_interval) vxlan 2846 drivers/net/vxlan.c mod_timer(&vxlan->age_timer, jiffies + FDB_AGE_INTERVAL); vxlan 2852 drivers/net/vxlan.c static void vxlan_flush(struct vxlan_dev *vxlan, bool do_all) vxlan 2859 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[h]); vxlan 2860 drivers/net/vxlan.c hlist_for_each_safe(p, n, &vxlan->fdb_head[h]) { vxlan 2867 drivers/net/vxlan.c vxlan_fdb_destroy(vxlan, f, true, true); vxlan 2869 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[h]); vxlan 2876 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2877 drivers/net/vxlan.c struct vxlan_net *vn = net_generic(vxlan->net, vxlan_net_id); vxlan 2880 drivers/net/vxlan.c if (vxlan_addr_multicast(&vxlan->default_dst.remote_ip) && vxlan 2881 drivers/net/vxlan.c !vxlan_group_used(vn, vxlan)) vxlan 2882 drivers/net/vxlan.c ret = vxlan_igmp_leave(vxlan); vxlan 2884 drivers/net/vxlan.c del_timer_sync(&vxlan->age_timer); vxlan 2886 drivers/net/vxlan.c vxlan_flush(vxlan, false); vxlan 2887 drivers/net/vxlan.c vxlan_sock_release(vxlan); vxlan 2899 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2900 drivers/net/vxlan.c struct vxlan_rdst *dst = &vxlan->default_dst; vxlan 2901 drivers/net/vxlan.c struct net_device *lowerdev = __dev_get_by_index(vxlan->net, vxlan 2903 drivers/net/vxlan.c bool use_ipv6 = !!(vxlan->cfg.flags & VXLAN_F_IPV6); vxlan 2921 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 2925 drivers/net/vxlan.c sport = udp_flow_src_port(dev_net(dev), skb, vxlan->cfg.port_min, vxlan 2926 drivers/net/vxlan.c vxlan->cfg.port_max, true); vxlan 2927 drivers/net/vxlan.c dport = info->key.tp_dst ? : vxlan->cfg.dst_port; vxlan 2930 drivers/net/vxlan.c struct vxlan_sock *sock4 = rcu_dereference(vxlan->vn4_sock); vxlan 2933 drivers/net/vxlan.c rt = vxlan_get_route(vxlan, dev, sock4, skb, 0, info->key.tos, vxlan 2942 drivers/net/vxlan.c struct vxlan_sock *sock6 = rcu_dereference(vxlan->vn6_sock); vxlan 2945 drivers/net/vxlan.c ndst = vxlan6_get_route(vxlan, dev, sock6, skb, 0, info->key.tos, vxlan 3029 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 3053 drivers/net/vxlan.c INIT_LIST_HEAD(&vxlan->next); vxlan 3055 drivers/net/vxlan.c timer_setup(&vxlan->age_timer, vxlan_cleanup, TIMER_DEFERRABLE); vxlan 3057 drivers/net/vxlan.c vxlan->dev = dev; vxlan 3060 drivers/net/vxlan.c spin_lock_init(&vxlan->hash_lock[h]); vxlan 3061 drivers/net/vxlan.c INIT_HLIST_HEAD(&vxlan->fdb_head[h]); vxlan 3273 drivers/net/vxlan.c static int __vxlan_sock_add(struct vxlan_dev *vxlan, bool ipv6) vxlan 3275 drivers/net/vxlan.c struct vxlan_net *vn = net_generic(vxlan->net, vxlan_net_id); vxlan 3280 drivers/net/vxlan.c if (vxlan->cfg.remote_ifindex) vxlan 3282 drivers/net/vxlan.c vxlan->net, vxlan->cfg.remote_ifindex); vxlan 3284 drivers/net/vxlan.c if (!vxlan->cfg.no_share) { vxlan 3286 drivers/net/vxlan.c vs = vxlan_find_sock(vxlan->net, ipv6 ? AF_INET6 : AF_INET, vxlan 3287 drivers/net/vxlan.c vxlan->cfg.dst_port, vxlan->cfg.flags, vxlan 3296 drivers/net/vxlan.c vs = vxlan_socket_create(vxlan->net, ipv6, vxlan 3297 drivers/net/vxlan.c vxlan->cfg.dst_port, vxlan->cfg.flags, vxlan 3303 drivers/net/vxlan.c rcu_assign_pointer(vxlan->vn6_sock, vs); vxlan 3304 drivers/net/vxlan.c node = &vxlan->hlist6; vxlan 3308 drivers/net/vxlan.c rcu_assign_pointer(vxlan->vn4_sock, vs); vxlan 3309 drivers/net/vxlan.c node = &vxlan->hlist4; vxlan 3311 drivers/net/vxlan.c vxlan_vs_add_dev(vs, vxlan, node); vxlan 3315 drivers/net/vxlan.c static int vxlan_sock_add(struct vxlan_dev *vxlan) vxlan 3317 drivers/net/vxlan.c bool metadata = vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA; vxlan 3318 drivers/net/vxlan.c bool ipv6 = vxlan->cfg.flags & VXLAN_F_IPV6 || metadata; vxlan 3322 drivers/net/vxlan.c RCU_INIT_POINTER(vxlan->vn4_sock, NULL); vxlan 3324 drivers/net/vxlan.c RCU_INIT_POINTER(vxlan->vn6_sock, NULL); vxlan 3326 drivers/net/vxlan.c ret = __vxlan_sock_add(vxlan, true); vxlan 3332 drivers/net/vxlan.c ret = __vxlan_sock_add(vxlan, false); vxlan 3334 drivers/net/vxlan.c vxlan_sock_release(vxlan); vxlan 3506 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 3507 drivers/net/vxlan.c struct vxlan_rdst *dst = &vxlan->default_dst; vxlan 3521 drivers/net/vxlan.c vxlan->net = src_net; vxlan 3554 drivers/net/vxlan.c memcpy(&vxlan->cfg, conf, sizeof(*conf)); vxlan 3561 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 3565 drivers/net/vxlan.c ret = vxlan_config_validate(src_net, conf, &lowerdev, vxlan, extack); vxlan 3579 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 3586 drivers/net/vxlan.c dst = &vxlan->default_dst; vxlan 3595 drivers/net/vxlan.c err = vxlan_fdb_create(vxlan, all_zeros_mac, vxlan 3598 drivers/net/vxlan.c vxlan->cfg.dst_port, vxlan 3627 drivers/net/vxlan.c vxlan_fdb_insert(vxlan, all_zeros_mac, dst->remote_vni, f); vxlan 3630 drivers/net/vxlan.c err = vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f), vxlan 3633 drivers/net/vxlan.c vxlan_fdb_destroy(vxlan, f, false, false); vxlan 3640 drivers/net/vxlan.c list_add(&vxlan->next, &vn->vxlan_list); vxlan 3692 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 3699 drivers/net/vxlan.c memcpy(conf, &vxlan->cfg, sizeof(*conf)); vxlan 3963 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 3969 drivers/net/vxlan.c dst = &vxlan->default_dst; vxlan 3974 drivers/net/vxlan.c err = vxlan_config_validate(vxlan->net, &conf, &lowerdev, vxlan 3975 drivers/net/vxlan.c vxlan, extack); vxlan 3989 drivers/net/vxlan.c u32 hash_index = fdb_head_index(vxlan, all_zeros_mac, conf.vni); vxlan 3991 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[hash_index]); vxlan 3993 drivers/net/vxlan.c err = vxlan_fdb_update(vxlan, all_zeros_mac, vxlan 3997 drivers/net/vxlan.c vxlan->cfg.dst_port, vxlan 4002 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[hash_index]); vxlan 4009 drivers/net/vxlan.c __vxlan_fdb_delete(vxlan, all_zeros_mac, vxlan 4011 drivers/net/vxlan.c vxlan->cfg.dst_port, vxlan 4016 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[hash_index]); vxlan 4019 drivers/net/vxlan.c if (conf.age_interval != vxlan->cfg.age_interval) vxlan 4020 drivers/net/vxlan.c mod_timer(&vxlan->age_timer, jiffies); vxlan 4027 drivers/net/vxlan.c vxlan_config_apply(dev, &conf, lowerdev, vxlan->net, true); vxlan 4033 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 4035 drivers/net/vxlan.c vxlan_flush(vxlan, true); vxlan 4037 drivers/net/vxlan.c list_del(&vxlan->next); vxlan 4039 drivers/net/vxlan.c if (vxlan->default_dst.remote_dev) vxlan 4040 drivers/net/vxlan.c netdev_upper_dev_unlink(vxlan->default_dst.remote_dev, dev); vxlan 4075 drivers/net/vxlan.c const struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 4076 drivers/net/vxlan.c const struct vxlan_rdst *dst = &vxlan->default_dst; vxlan 4078 drivers/net/vxlan.c .low = htons(vxlan->cfg.port_min), vxlan 4079 drivers/net/vxlan.c .high = htons(vxlan->cfg.port_max), vxlan 4102 drivers/net/vxlan.c if (!vxlan_addr_any(&vxlan->cfg.saddr)) { vxlan 4103 drivers/net/vxlan.c if (vxlan->cfg.saddr.sa.sa_family == AF_INET) { vxlan 4105 drivers/net/vxlan.c vxlan->cfg.saddr.sin.sin_addr.s_addr)) vxlan 4110 drivers/net/vxlan.c &vxlan->cfg.saddr.sin6.sin6_addr)) vxlan 4116 drivers/net/vxlan.c if (nla_put_u8(skb, IFLA_VXLAN_TTL, vxlan->cfg.ttl) || vxlan 4118 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_TTL_INHERIT)) || vxlan 4119 drivers/net/vxlan.c nla_put_u8(skb, IFLA_VXLAN_TOS, vxlan->cfg.tos) || vxlan 4120 drivers/net/vxlan.c nla_put_u8(skb, IFLA_VXLAN_DF, vxlan->cfg.df) || vxlan 4121 drivers/net/vxlan.c nla_put_be32(skb, IFLA_VXLAN_LABEL, vxlan->cfg.label) || vxlan 4123 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_LEARN)) || vxlan 4125 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_PROXY)) || vxlan 4127 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_RSC)) || vxlan 4129 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_L2MISS)) || vxlan 4131 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_L3MISS)) || vxlan 4133 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA)) || vxlan 4134 drivers/net/vxlan.c nla_put_u32(skb, IFLA_VXLAN_AGEING, vxlan->cfg.age_interval) || vxlan 4135 drivers/net/vxlan.c nla_put_u32(skb, IFLA_VXLAN_LIMIT, vxlan->cfg.addrmax) || vxlan 4136 drivers/net/vxlan.c nla_put_be16(skb, IFLA_VXLAN_PORT, vxlan->cfg.dst_port) || vxlan 4138 drivers/net/vxlan.c !(vxlan->cfg.flags & VXLAN_F_UDP_ZERO_CSUM_TX)) || vxlan 4140 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_UDP_ZERO_CSUM6_TX)) || vxlan 4142 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_UDP_ZERO_CSUM6_RX)) || vxlan 4144 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_REMCSUM_TX)) || vxlan 4146 drivers/net/vxlan.c !!(vxlan->cfg.flags & VXLAN_F_REMCSUM_RX))) vxlan 4152 drivers/net/vxlan.c if (vxlan->cfg.flags & VXLAN_F_GBP && vxlan 4156 drivers/net/vxlan.c if (vxlan->cfg.flags & VXLAN_F_GPE && vxlan 4160 drivers/net/vxlan.c if (vxlan->cfg.flags & VXLAN_F_REMCSUM_NOPARTIAL && vxlan 4172 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 4174 drivers/net/vxlan.c return vxlan->net; vxlan 4229 drivers/net/vxlan.c struct vxlan_dev *vxlan, *next; vxlan 4232 drivers/net/vxlan.c list_for_each_entry_safe(vxlan, next, &vn->vxlan_list, next) { vxlan 4233 drivers/net/vxlan.c struct vxlan_rdst *dst = &vxlan->default_dst; vxlan 4242 drivers/net/vxlan.c vxlan_dellink(vxlan->dev, &list_kill); vxlan 4275 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 4280 drivers/net/vxlan.c hash_index = fdb_head_index(vxlan, fdb_info->eth_addr, fdb_info->vni); vxlan 4282 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[hash_index]); vxlan 4284 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, fdb_info->eth_addr, fdb_info->vni); vxlan 4298 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[hash_index]); vxlan 4305 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 4310 drivers/net/vxlan.c hash_index = fdb_head_index(vxlan, fdb_info->eth_addr, fdb_info->vni); vxlan 4313 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[hash_index]); vxlan 4314 drivers/net/vxlan.c err = vxlan_fdb_update(vxlan, fdb_info->eth_addr, &fdb_info->remote_ip, vxlan 4323 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[hash_index]); vxlan 4332 drivers/net/vxlan.c struct vxlan_dev *vxlan = netdev_priv(dev); vxlan 4337 drivers/net/vxlan.c hash_index = fdb_head_index(vxlan, fdb_info->eth_addr, fdb_info->vni); vxlan 4338 drivers/net/vxlan.c spin_lock_bh(&vxlan->hash_lock[hash_index]); vxlan 4340 drivers/net/vxlan.c f = vxlan_find_mac(vxlan, fdb_info->eth_addr, fdb_info->vni); vxlan 4344 drivers/net/vxlan.c err = __vxlan_fdb_delete(vxlan, fdb_info->eth_addr, vxlan 4352 drivers/net/vxlan.c spin_unlock_bh(&vxlan->hash_lock[hash_index]); vxlan 4414 drivers/net/vxlan.c struct vxlan_dev *vxlan, *next; vxlan 4422 drivers/net/vxlan.c list_for_each_entry_safe(vxlan, next, &vn->vxlan_list, next) { vxlan 4426 drivers/net/vxlan.c if (!net_eq(dev_net(vxlan->dev), net)) vxlan 4427 drivers/net/vxlan.c unregister_netdevice_queue(vxlan->dev, head); vxlan 1257 include/linux/mlx4/device.h struct mlx4_spec_vxlan vxlan; vxlan 1364 include/linux/mlx4/device.h struct mlx4_net_trans_rule_hw_vxlan vxlan; vxlan 708 include/linux/mlx5/driver.h struct mlx5_vxlan *vxlan; vxlan 227 include/net/vxlan.h struct vxlan_dev *vxlan; vxlan 145 net/netfilter/nft_tunnel.c struct vxlan_metadata vxlan; vxlan 242 net/netfilter/nft_tunnel.c opts->u.vxlan.gbp = ntohl(nla_get_be32(tb[NFTA_TUNNEL_KEY_VXLAN_GBP])); vxlan 484 net/netfilter/nft_tunnel.c htonl(opts->u.vxlan.gbp))) vxlan 24 net/openvswitch/vport-vxlan.c struct vxlan_dev *vxlan = netdev_priv(vport->dev); vxlan 25 net/openvswitch/vport-vxlan.c __be16 dst_port = vxlan->cfg.dst_port; vxlan 30 net/openvswitch/vport-vxlan.c if (vxlan->cfg.flags & VXLAN_F_GBP) { vxlan 37 net/openvswitch/vport-vxlan.c if (vxlan->cfg.flags & VXLAN_F_GBP &&