/linux-6.6.21/tools/testing/selftests/drivers/net/mlxsw/ |
D | sch_red_core.sh | 81 local vlan=$1; shift 83 echo 192.0.2.$((16 * (vlan - 10) + host)) 95 ip link set dev $dev.10 type vlan egress 0:0 98 ip link set dev $dev.11 type vlan egress 0:1 164 local vlan 178 for vlan in 10 11; do 179 vlan_create $intf $vlan 180 ip link set dev $intf.$vlan master br1_$vlan 181 ip link set dev $intf.$vlan up 186 for vlan in 10 11; do [all …]
|
D | rif_mac_profiles_occ.sh | 47 vlan=$(( i*10 )) 51 link add link $h1 name $h1.$vlan \ 52 address 00:$m:$m:$m:$m:$m type vlan id $vlan 53 address add 192.0.$m.1/24 dev $h1.$vlan 108 local vlan=$(( i*10 )) 114 ip link add link $h1 name $h1.$vlan address 00:$m:$m:$m:$m:$m \ 115 type vlan id $vlan 116 ip address add 192.0.$m.1/24 dev $h1.$vlan 121 ip link set $h1.$vlan address 00:$m:$m:$m:$m:$m &> /dev/null 126 ip link del dev $h1.$vlan
|
/linux-6.6.21/drivers/net/ |
D | macvlan.c | 61 struct macvlan_dev *vlan; member 127 struct macvlan_dev *vlan; in macvlan_hash_lookup() local 130 hlist_for_each_entry_rcu(vlan, &port->vlan_hash[idx], hlist, in macvlan_hash_lookup() 132 if (ether_addr_equal_64bits(vlan->dev->dev_addr, addr)) in macvlan_hash_lookup() 133 return vlan; in macvlan_hash_lookup() 139 const struct macvlan_dev *vlan, in macvlan_hash_lookup_source() argument 144 struct hlist_head *h = &vlan->port->vlan_source_hash[idx]; in macvlan_hash_lookup_source() 148 entry->vlan == vlan) in macvlan_hash_lookup_source() 154 static int macvlan_hash_add_source(struct macvlan_dev *vlan, in macvlan_hash_add_source() argument 157 struct macvlan_port *port = vlan->port; in macvlan_hash_add_source() [all …]
|
/linux-6.6.21/net/bridge/ |
D | br_vlan_tunnel.c | 44 static void vlan_tunnel_info_release(struct net_bridge_vlan *vlan) in vlan_tunnel_info_release() argument 46 struct metadata_dst *tdst = rtnl_dereference(vlan->tinfo.tunnel_dst); in vlan_tunnel_info_release() 48 WRITE_ONCE(vlan->tinfo.tunnel_id, 0); in vlan_tunnel_info_release() 49 RCU_INIT_POINTER(vlan->tinfo.tunnel_dst, NULL); in vlan_tunnel_info_release() 54 struct net_bridge_vlan *vlan) in vlan_tunnel_info_del() argument 56 if (!rcu_access_pointer(vlan->tinfo.tunnel_dst)) in vlan_tunnel_info_del() 58 rhashtable_remove_fast(&vg->tunnel_hash, &vlan->tnode, in vlan_tunnel_info_del() 60 vlan_tunnel_info_release(vlan); in vlan_tunnel_info_del() 64 struct net_bridge_vlan *vlan, u32 tun_id) in __vlan_tunnel_info_add() argument 66 struct metadata_dst *metadata = rtnl_dereference(vlan->tinfo.tunnel_dst); in __vlan_tunnel_info_add() [all …]
|
/linux-6.6.21/tools/testing/selftests/net/forwarding/ |
D | sch_tbf_core.sh | 52 local vlan=$1; shift 54 echo 192.0.2.$((16 * (vlan - 10) + host)) 66 ip link set dev $dev.10 type vlan egress 0:0 69 ip link set dev $dev.11 type vlan egress 0:1 112 local vlan 121 for vlan in 10 11; do 122 vlan_create $intf $vlan 123 ip link set dev $intf.$vlan master br$vlan 124 ip link set dev $intf.$vlan up 128 for vlan in 10 11; do [all …]
|
D | bridge_vlan_mcast.sh | 17 ip link add l $h1 $h1.10 up type vlan id 10 29 ip link add l $h2 $h2.10 up type vlan id 10 52 bridge vlan add vid 10-11 dev $swp1 master 53 bridge vlan add vid 10-11 dev $swp2 master 130 local goutput=`bridge -j vlan global show` 144 bridge vlan global set vid 10 dev br0 mcast_snooping 0 199 bridge vlan global set vid 10 dev br0 mcast_snooping 1 mcast_querier 1 214 bridge vlan global set vid 10 dev br0 mcast_snooping 1 mcast_querier 0 223 local goutput=`bridge -j vlan global show` 234 bridge vlan global set vid 10 dev br0 mcast_snooping 1 mcast_querier 1 [all …]
|
D | bridge_locked_port.sh | 127 bridge vlan add vid 100 dev $swp1 128 bridge vlan add vid 100 dev $swp2 137 bridge fdb add `mac_get $h1` dev $swp1 vlan 100 master static 143 bridge fdb del `mac_get $h1` dev $swp1 vlan 100 master static 148 bridge vlan del vid 100 dev $swp1 149 bridge vlan del vid 100 dev $swp2 192 bridge fdb get `mac_get $h1` br br0 vlan 1 &> /dev/null 200 bridge fdb get `mac_get $h1` br br0 vlan 1 | grep "dev $swp1" | grep -q "locked" 208 bridge fdb get `mac_get $h1` br br0 vlan 1 | grep "dev $swp1" | grep -q "locked" 229 bridge fdb get $mac br br0 vlan 1 | grep "dev $swp1" | grep -q "locked" [all …]
|
D | vxlan_symmetric_ipv6.sh | 189 bridge vlan add vid 10 dev vx10 pvid untagged 197 bridge vlan add vid 20 dev vx20 pvid untagged 211 bridge vlan add vid 4001 dev vx4001 pvid untagged 219 ip link add link br1 name vlan10 up master vrf-green type vlan id 10 225 ip link add link br1 name vlan20 up master vrf-green type vlan id 20 232 type vlan id 4001 234 bridge vlan add vid 10 dev br1 self 235 bridge vlan add vid 20 dev br1 self 236 bridge vlan add vid 4001 dev br1 self 238 bridge fdb add 00:00:5e:00:01:01 dev br1 self local vlan 10 [all …]
|
D | vxlan_symmetric.sh | 187 bridge vlan add vid 10 dev vx10 pvid untagged 195 bridge vlan add vid 20 dev vx20 pvid untagged 199 bridge vlan add vid 10 dev $swp1 pvid untagged 203 bridge vlan add vid 20 dev $swp2 pvid untagged 211 bridge vlan add vid 4001 dev vx4001 pvid untagged 219 ip link add link br1 name vlan10 up master vrf-green type vlan id 10 225 ip link add link br1 name vlan20 up master vrf-green type vlan id 20 232 type vlan id 4001 234 bridge vlan add vid 10 dev br1 self 235 bridge vlan add vid 20 dev br1 self [all …]
|
/linux-6.6.21/tools/testing/selftests/drivers/net/dsa/ |
D | bridge_vlan_mcast.sh | 17 ip link add l $h1 $h1.10 up type vlan id 10 29 ip link add l $h2 $h2.10 up type vlan id 10 52 bridge vlan add vid 10-11 dev $swp1 master 53 bridge vlan add vid 10-11 dev $swp2 master 130 local goutput=`bridge -j vlan global show` 144 bridge vlan global set vid 10 dev br0 mcast_snooping 0 199 bridge vlan global set vid 10 dev br0 mcast_snooping 1 mcast_querier 1 214 bridge vlan global set vid 10 dev br0 mcast_snooping 1 mcast_querier 0 223 local goutput=`bridge -j vlan global show` 234 bridge vlan global set vid 10 dev br0 mcast_snooping 1 mcast_querier 1 [all …]
|
D | bridge_locked_port.sh | 127 bridge vlan add vid 100 dev $swp1 128 bridge vlan add vid 100 dev $swp2 137 bridge fdb add `mac_get $h1` dev $swp1 vlan 100 master static 143 bridge fdb del `mac_get $h1` dev $swp1 vlan 100 master static 148 bridge vlan del vid 100 dev $swp1 149 bridge vlan del vid 100 dev $swp2 192 bridge fdb get `mac_get $h1` br br0 vlan 1 &> /dev/null 200 bridge fdb get `mac_get $h1` br br0 vlan 1 | grep "dev $swp1" | grep -q "locked" 208 bridge fdb get `mac_get $h1` br br0 vlan 1 | grep "dev $swp1" | grep -q "locked" 229 bridge fdb get $mac br br0 vlan 1 | grep "dev $swp1" | grep -q "locked" [all …]
|
/linux-6.6.21/net/8021q/ |
D | vlan_dev.c | 50 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_hard_header() local 56 if (!(vlan->flags & VLAN_FLAG_REORDER_HDR)) { in vlan_dev_hard_header() 59 vlan_tci = vlan->vlan_id; in vlan_dev_hard_header() 72 skb->protocol = vlan->vlan_proto; in vlan_dev_hard_header() 73 type = ntohs(vlan->vlan_proto); in vlan_dev_hard_header() 82 dev = vlan->real_dev; in vlan_dev_hard_header() 89 static inline netdev_tx_t vlan_netpoll_send_skb(struct vlan_dev_priv *vlan, struct sk_buff *skb) in vlan_netpoll_send_skb() argument 92 return netpoll_send_skb(vlan->netpoll, skb); in vlan_netpoll_send_skb() 102 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_hard_start_xmit() local 112 if (vlan->flags & VLAN_FLAG_REORDER_HDR || in vlan_dev_hard_start_xmit() [all …]
|
D | vlanproc.c | 138 struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); in vlan_proc_add_dev() local 143 vlan->dent = proc_create_single_data(vlandev->name, S_IFREG | 0600, in vlan_proc_add_dev() 145 if (!vlan->dent) in vlan_proc_add_dev() 233 const struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); in vlan_seq_show() local 236 vlan->vlan_id, vlan->real_dev->name); in vlan_seq_show() 244 const struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev); in vlandev_seq_show() local 256 vlandev->name, vlan->vlan_id, in vlandev_seq_show() 257 (int)(vlan->flags & 1), vlandev->priv_flags); in vlandev_seq_show() 265 seq_printf(seq, "Device: %s", vlan->real_dev->name); in vlandev_seq_show() 269 vlan->ingress_priority_map[0], in vlandev_seq_show() [all …]
|
D | vlan.c | 83 struct vlan_dev_priv *vlan) in vlan_stacked_transfer_operstate() argument 85 if (!(vlan->flags & VLAN_FLAG_BRIDGE_BINDING)) in vlan_stacked_transfer_operstate() 91 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in unregister_vlan_dev() local 92 struct net_device *real_dev = vlan->real_dev; in unregister_vlan_dev() 95 u16 vlan_id = vlan->vlan_id; in unregister_vlan_dev() 106 if (vlan->flags & VLAN_FLAG_MVRP) in unregister_vlan_dev() 108 if (vlan->flags & VLAN_FLAG_GVRP) in unregister_vlan_dev() 111 vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, NULL); in unregister_vlan_dev() 125 vlan_vid_del(real_dev, vlan->vlan_proto, vlan_id); in unregister_vlan_dev() 150 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in register_vlan_dev() local [all …]
|
D | vlan_netlink.c | 144 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_newlink() local 171 vlan->vlan_proto = proto; in vlan_newlink() 172 vlan->vlan_id = nla_get_u16(data[IFLA_VLAN_ID]); in vlan_newlink() 173 vlan->real_dev = real_dev; in vlan_newlink() 175 vlan->flags = VLAN_FLAG_REORDER_HDR; in vlan_newlink() 177 err = vlan_check_real_dev(real_dev, vlan->vlan_proto, vlan->vlan_id, in vlan_newlink() 213 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_get_size() local 218 vlan_qos_map_size(vlan->nr_ingress_mappings) + in vlan_get_size() 219 vlan_qos_map_size(vlan->nr_egress_mappings); in vlan_get_size() 224 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_fill_info() local [all …]
|
D | vlan_gvrp.c | 29 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_gvrp_request_join() local 30 __be16 vlan_id = htons(vlan->vlan_id); in vlan_gvrp_request_join() 32 if (vlan->vlan_proto != htons(ETH_P_8021Q)) in vlan_gvrp_request_join() 34 return garp_request_join(vlan->real_dev, &vlan_gvrp_app, in vlan_gvrp_request_join() 40 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_gvrp_request_leave() local 41 __be16 vlan_id = htons(vlan->vlan_id); in vlan_gvrp_request_leave() 43 if (vlan->vlan_proto != htons(ETH_P_8021Q)) in vlan_gvrp_request_leave() 45 garp_request_leave(vlan->real_dev, &vlan_gvrp_app, in vlan_gvrp_request_leave()
|
D | vlan_mvrp.c | 35 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_mvrp_request_join() local 36 __be16 vlan_id = htons(vlan->vlan_id); in vlan_mvrp_request_join() 38 if (vlan->vlan_proto != htons(ETH_P_8021Q)) in vlan_mvrp_request_join() 40 return mrp_request_join(vlan->real_dev, &vlan_mrp_app, in vlan_mvrp_request_join() 46 const struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_mvrp_request_leave() local 47 __be16 vlan_id = htons(vlan->vlan_id); in vlan_mvrp_request_leave() 49 if (vlan->vlan_proto != htons(ETH_P_8021Q)) in vlan_mvrp_request_leave() 51 mrp_request_leave(vlan->real_dev, &vlan_mrp_app, in vlan_mvrp_request_leave()
|
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/esw/ |
D | bridge.c | 573 struct mlx5_esw_bridge_vlan *vlan, u32 counter_id, in mlx5_esw_bridge_ingress_flow_with_esw_create() argument 605 if (vlan && vlan->pkt_reformat_push) { in mlx5_esw_bridge_ingress_flow_with_esw_create() 608 flow_act.pkt_reformat = vlan->pkt_reformat_push; in mlx5_esw_bridge_ingress_flow_with_esw_create() 609 flow_act.modify_hdr = vlan->pkt_mod_hdr_push_mark; in mlx5_esw_bridge_ingress_flow_with_esw_create() 610 } else if (vlan) { in mlx5_esw_bridge_ingress_flow_with_esw_create() 625 vlan->vid); in mlx5_esw_bridge_ingress_flow_with_esw_create() 642 struct mlx5_esw_bridge_vlan *vlan, u32 counter_id, in mlx5_esw_bridge_ingress_flow_create() argument 645 return mlx5_esw_bridge_ingress_flow_with_esw_create(vport_num, addr, vlan, counter_id, in mlx5_esw_bridge_ingress_flow_create() 652 struct mlx5_esw_bridge_vlan *vlan, u32 counter_id, in mlx5_esw_bridge_ingress_flow_peer_create() argument 674 handle = mlx5_esw_bridge_ingress_flow_with_esw_create(vport_num, addr, vlan, counter_id, in mlx5_esw_bridge_ingress_flow_peer_create() [all …]
|
/linux-6.6.21/net/batman-adv/ |
D | soft-interface.c | 128 struct batadv_softif_vlan *vlan; in batadv_interface_set_mac_addr() local 143 hlist_for_each_entry_rcu(vlan, &bat_priv->softif_vlan_list, list) { in batadv_interface_set_mac_addr() 144 batadv_tt_local_remove(bat_priv, old_addr, vlan->vid, in batadv_interface_set_mac_addr() 146 batadv_tt_local_add(dev, addr->sa_data, vlan->vid, in batadv_interface_set_mac_addr() 508 struct batadv_softif_vlan *vlan; in batadv_softif_vlan_release() local 510 vlan = container_of(ref, struct batadv_softif_vlan, refcount); in batadv_softif_vlan_release() 512 spin_lock_bh(&vlan->bat_priv->softif_vlan_list_lock); in batadv_softif_vlan_release() 513 hlist_del_rcu(&vlan->list); in batadv_softif_vlan_release() 514 spin_unlock_bh(&vlan->bat_priv->softif_vlan_list_lock); in batadv_softif_vlan_release() 516 kfree_rcu(vlan, rcu); in batadv_softif_vlan_release() [all …]
|
/linux-6.6.21/drivers/scsi/qedf/ |
D | qedf_fip.c | 19 struct fip_vlan *vlan; in qedf_fcoe_send_vlan_req() local 33 vlan = (struct fip_vlan *)eth_fr; in qedf_fcoe_send_vlan_req() 35 memset(vlan, 0, sizeof(*vlan)); in qedf_fcoe_send_vlan_req() 36 ether_addr_copy(vlan->eth.h_source, qedf->mac); in qedf_fcoe_send_vlan_req() 37 ether_addr_copy(vlan->eth.h_dest, my_fcoe_all_fcfs); in qedf_fcoe_send_vlan_req() 38 vlan->eth.h_proto = htons(ETH_P_FIP); in qedf_fcoe_send_vlan_req() 40 vlan->fip.fip_ver = FIP_VER_ENCAPS(FIP_VER); in qedf_fcoe_send_vlan_req() 41 vlan->fip.fip_op = htons(FIP_OP_VLAN); in qedf_fcoe_send_vlan_req() 42 vlan->fip.fip_subcode = FIP_SC_VL_REQ; in qedf_fcoe_send_vlan_req() 43 vlan->fip.fip_dl_len = htons(sizeof(vlan->desc) / FIP_BPW); in qedf_fcoe_send_vlan_req() [all …]
|
/linux-6.6.21/drivers/net/ethernet/intel/ice/ |
D | ice_vsi_vlan_lib.c | 24 static bool validate_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in validate_vlan() argument 26 if (vlan->tpid != ETH_P_8021Q && vlan->tpid != ETH_P_8021AD && in validate_vlan() 27 vlan->tpid != ETH_P_QINQ1 && (vlan->tpid || vlan->vid)) { in validate_vlan() 28 print_invalid_tpid(vsi, vlan->tpid); in validate_vlan() 40 int ice_vsi_add_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_add_vlan() argument 44 if (!validate_vlan(vsi, vlan)) in ice_vsi_add_vlan() 47 err = ice_fltr_add_vlan(vsi, vlan); in ice_vsi_add_vlan() 50 vlan->vid, vsi->vsi_num, err); in ice_vsi_add_vlan() 63 int ice_vsi_del_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan) in ice_vsi_del_vlan() argument 69 if (!validate_vlan(vsi, vlan)) in ice_vsi_del_vlan() [all …]
|
D | ice_eswitch_br.c | 115 list[1].h_u.vlan_hdr.vlan = cpu_to_be16(vid & VLAN_VID_MASK); in ice_eswitch_br_add_vlan_lkup() 116 list[1].m_u.vlan_hdr.vlan = cpu_to_be16(0xFFFF); in ice_eswitch_br_add_vlan_lkup() 310 struct ice_esw_br_vlan *vlan; in ice_esw_br_port_vlan_lookup() local 318 vlan = xa_load(&port->vlans, vid); in ice_esw_br_port_vlan_lookup() 319 if (!vlan) { in ice_esw_br_port_vlan_lookup() 325 return vlan; in ice_esw_br_port_vlan_lookup() 398 struct ice_esw_br_vlan *vlan; in ice_eswitch_br_fdb_entry_create() local 408 vlan = ice_esw_br_port_vlan_lookup(bridge, br_port->vsi_idx, in ice_eswitch_br_fdb_entry_create() 410 if (IS_ERR(vlan)) { in ice_eswitch_br_fdb_entry_create() 412 PTR_ERR(vlan)); in ice_eswitch_br_fdb_entry_create() [all …]
|
/linux-6.6.21/drivers/net/ipvlan/ |
D | ipvtap.c | 46 struct ipvl_dev vlan; member 53 struct ipvl_dev *vlan = &vlantap->vlan; in ipvtap_count_tx_dropped() local 55 this_cpu_inc(vlan->pcpu_stats->tx_drps); in ipvtap_count_tx_dropped() 61 struct ipvl_dev *vlan = &vlantap->vlan; in ipvtap_count_rx_dropped() local 63 ipvlan_count_rx(vlan, 0, 0, 0); in ipvtap_count_rx_dropped() 70 struct ipvl_dev *vlan = &vlantap->vlan; in ipvtap_update_features() local 72 vlan->sfeatures = features; in ipvtap_update_features() 73 netdev_update_features(vlan->dev); in ipvtap_update_features() 106 vlantap->tap.dev = vlantap->vlan.dev; in ipvtap_newlink() 114 struct ipvtap_dev *vlan = netdev_priv(dev); in ipvtap_dellink() local [all …]
|
/linux-6.6.21/drivers/scsi/fnic/ |
D | fnic_fcs.c | 365 struct fip_vlan *vlan; in fnic_fcoe_send_vlan_req() local 380 vlan = (struct fip_vlan *)eth_fr; in fnic_fcoe_send_vlan_req() 382 memset(vlan, 0, sizeof(*vlan)); in fnic_fcoe_send_vlan_req() 383 memcpy(vlan->eth.h_source, fip->ctl_src_addr, ETH_ALEN); in fnic_fcoe_send_vlan_req() 384 memcpy(vlan->eth.h_dest, fcoe_all_fcfs, ETH_ALEN); in fnic_fcoe_send_vlan_req() 385 vlan->eth.h_proto = htons(ETH_P_FIP); in fnic_fcoe_send_vlan_req() 387 vlan->fip.fip_ver = FIP_VER_ENCAPS(FIP_VER); in fnic_fcoe_send_vlan_req() 388 vlan->fip.fip_op = htons(FIP_OP_VLAN); in fnic_fcoe_send_vlan_req() 389 vlan->fip.fip_subcode = FIP_SC_VL_REQ; in fnic_fcoe_send_vlan_req() 390 vlan->fip.fip_dl_len = htons(sizeof(vlan->desc) / FIP_BPW); in fnic_fcoe_send_vlan_req() [all …]
|
/linux-6.6.21/drivers/net/ethernet/sfc/ |
D | mcdi_filters.c | 744 struct efx_mcdi_filter_vlan *vlan, in efx_mcdi_filter_insert_addr_list() argument 760 ids = vlan->mc; in efx_mcdi_filter_insert_addr_list() 764 ids = vlan->uc; in efx_mcdi_filter_insert_addr_list() 773 efx_filter_set_eth_local(&spec, vlan->vid, addr_list[i].addr); in efx_mcdi_filter_insert_addr_list() 798 EFX_WARN_ON_PARANOID(vlan->default_filters[EFX_EF10_BCAST] != in efx_mcdi_filter_insert_addr_list() 802 efx_filter_set_eth_local(&spec, vlan->vid, baddr); in efx_mcdi_filter_insert_addr_list() 816 vlan->default_filters[EFX_EF10_BCAST] = in efx_mcdi_filter_insert_addr_list() 825 struct efx_mcdi_filter_vlan *vlan, in efx_mcdi_filter_insert_def() argument 856 if (vlan->vid != EFX_FILTER_VID_UNSPEC) in efx_mcdi_filter_insert_def() 857 efx_filter_set_eth_local(&spec, vlan->vid, NULL); in efx_mcdi_filter_insert_def() [all …]
|