| /linux/tools/testing/selftests/tc-testing/tc-tests/actions/ |
| H A D | vlan.json | 4 "name": "Add vlan pop action with pipe opcode", 7 "vlan" 14 "$TC actions flush action vlan", 20 "cmdUnderTest": "$TC actions add action vlan pop pipe index 8", 22 "verifyCmd": "$TC actions list action vlan", 23 "matchPattern": "action order [0-9]+: vlan.*pop.*pipe.*index 8 ref", 26 "$TC actions flush action vlan" 31 "name": "Add vlan pop action with pass opcode", 34 "vlan" 41 "$TC actions flush action vlan", [all …]
|
| /linux/tools/testing/selftests/net/forwarding/ |
| H A 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 56 check_err $? "Could not enable global vlan multicast snooping" 57 log_test "Vlan multicast snooping enable" 130 local goutput=`bridge -j vlan global show` 132 jq -e ".[].vlans[] | select(.vlan == 10)" &>/dev/null 133 check_err $? "Could not find vlan 10's global options" 134 log_test "Vlan global options existence" [all …]
|
| H A D | bridge_locked_port.sh | 127 bridge vlan add vid 100 dev $swp1 128 bridge vlan add vid 100 dev $swp2 131 check_err $? "Ping through vlan did not work before locking port" 135 check_fail $? "Ping through vlan worked after locking port, but before adding FDB entry" 137 bridge fdb add `mac_get $h1` dev $swp1 vlan 100 master static 140 check_err $? "Ping through vlan did not work after locking port and adding FDB entry" 143 bridge fdb del `mac_get $h1` dev $swp1 vlan 100 master static 146 check_err $? "Ping through vlan did not work after unlocking port and removing FDB entry" 148 bridge vlan del vid 100 dev $swp1 149 bridge vlan del vid 100 dev $swp2 [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | bridge_vlan_dump.sh | 4 # Test bridge VLAN range grouping. VLANs are collapsed into a range entry in 5 # the dump if they have the same per-VLAN options. These tests verify that 6 # VLANs with different per-VLAN option values are not grouped together. 37 bridge -n "$NS" vlan add vid 10 dev dummy0 38 defer bridge -n "$NS" vlan del vid 10 dev dummy0 40 bridge -n "$NS" vlan add vid 11 dev dummy0 41 defer bridge -n "$NS" vlan del vid 11 dev dummy0 44 bridge -n "$NS" vlan set vid 10 dev dummy0 neigh_suppress on 45 check_err $? "Failed to set neigh_suppress for VLAN 10" 47 bridge -n "$NS" vlan set vid 11 dev dummy0 neigh_suppress off [all …]
|
| H A D | test_bridge_neigh_suppress.sh | 173 ip -n $ns link add link eth0 name eth0.10 up type vlan id 10 174 ip -n $ns link add link eth0 name eth0.20 up type vlan id 20 221 ip -n $ns link add link br0 name br0.10 up type vlan id 10 222 bridge -n $ns vlan add vid 10 dev br0 self 224 ip -n $ns link add link br0 name br0.20 up type vlan id 20 225 bridge -n $ns vlan add vid 20 dev br0 self 228 bridge -n $ns vlan add vid 10 dev swp1 229 bridge -n $ns vlan add vid 20 dev swp1 239 bridge -n $ns vlan add vid 10 dev vx0 240 bridge -n $ns vlan ad [all...] |
| H A D | vlan_hw_filter.sh | 44 ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off 45 ip netns exec ${NETNS} ip link add link bond_slave_1 name bond_slave_1.0 type vlan id 0 46 ip netns exec ${NETNS} ip link add link bond0 name bond0.0 type vlan id 0 48 ip netns exec ${NETNS} ip link del veth2 || fail "Please check vlan HW filter function" 56 ip netns exec ${NETNS} ip link add link bond0 name vlan0 type vlan id 0 protocol 802.1q 57 ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off 59 ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on 62 ip netns exec ${NETNS} ip link del vlan0 || fail "Please check vlan HW filter function" 70 ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off 72 ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter on [all …]
|
| /linux/drivers/net/ |
| H A D | macvlan.c | 62 struct macvlan_dev __rcu *vlan; member 128 struct macvlan_dev *vlan; in macvlan_hash_lookup() local 131 hlist_for_each_entry_rcu(vlan, &port->vlan_hash[idx], hlist, in macvlan_hash_lookup() 133 if (ether_addr_equal_64bits(vlan->dev->dev_addr, addr)) in macvlan_hash_lookup() 134 return vlan; in macvlan_hash_lookup() 140 const struct macvlan_dev *vlan, in macvlan_hash_lookup_source() argument 145 struct hlist_head *h = &vlan->port->vlan_source_hash[idx]; in macvlan_hash_lookup_source() 149 rcu_access_pointer(entry->vlan) == vlan) in macvlan_hash_lookup_source() 155 static int macvlan_hash_add_source(struct macvlan_dev *vlan, in macvlan_hash_add_source() argument 158 struct macvlan_port *port = vlan->port; in macvlan_hash_add_source() [all …]
|
| /linux/drivers/net/ethernet/intel/ice/ |
| H A D | ice_vsi_vlan_lib.c | 11 dev_err(ice_pf_to_dev(vsi->back), "%s %d specified invalid VLAN tpid 0x%04x\n", in print_invalid_tpid() 18 * @vlan: ice_vlan structure to validate 20 * Return true if the VLAN TPID is valid or if the VLAN TPID is 0 and the VLAN 21 * VID is 0, which allows for non-zero VLAN filters with the specified VLAN TPID 22 * and untagged VLAN 0 filters to be added to the prune list respectively. 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() 36 * ice_vsi_add_vlan - default add VLAN implementation for all VSI types [all …]
|
| H A D | ice_vf_vsi_vlan_ops.c | 13 struct ice_vlan __always_unused *vlan) in noop_vlan_arg() argument 29 /* setup inner VLAN ops */ in ice_port_vlan_on() 40 /* setup outer VLAN ops */ in ice_port_vlan_on() 49 /* all Rx traffic should be in the domain of the assigned port VLAN, in ice_port_vlan_on() 50 * so prevent disabling Rx VLAN filtering in ice_port_vlan_on() 62 /* setup inner VLAN ops */ in ice_port_vlan_off() 92 * ice_vf_vsi_enable_port_vlan - Set VSI VLAN ops to support port VLAN 95 * The function won't create port VLAN, it only allows to create port VLAN 96 * using VLAN ops on the VF VSI. 107 * ice_vf_vsi_disable_port_vlan - Clear VSI support for creating port VLAN [all …]
|
| H A D | ice_vlan_mode.c | 7 * ice_pkg_get_supported_vlan_mode - determine if DDP supports Double VLAN mode 56 * ice_aq_get_vlan_mode - get the VLAN mode of the device 58 * @get_params: structure FW fills in based on the current VLAN mode config 60 * Get VLAN Mode Parameters (0x020D) 79 * ice_aq_is_dvm_ena - query FW to check if double VLAN mode is enabled 82 * Returns true if the hardware/firmware is configured in double VLAN mode, 84 * single VLAN mode. 96 ice_debug(hw, ICE_DBG_AQ, "Failed to get VLAN mode, status %d\n", in ice_aq_is_dvm_ena() 105 * ice_is_dvm_ena - check if double VLAN mode is enabled 108 * The device is configured in single or double VLAN mode on initialization and [all …]
|
| H A D | ice_vsi_vlan_ops.c | 12 struct ice_vlan * __always_unused vlan) in op_unsupported_vlan_arg() argument 29 /* If any new ops are added to the VSI VLAN ops interface then an unsupported 47 * ice_vsi_init_unsupported_vlan_ops - init all VSI VLAN ops to unsupported 48 * @vsi: VSI to initialize VSI VLAN ops to unsupported for 50 * By default all inner and outer VSI VLAN ops return -EOPNOTSUPP. This was done 52 * an unsupported VSI VLAN op is called it will just return -EOPNOTSUPP. 62 * ice_vsi_init_vlan_ops - initialize type specific VSI VLAN ops 71 /* Initialize all VSI types to have unsupported VSI VLAN ops */ in ice_vsi_init_vlan_ops() 85 dev_dbg(ice_pf_to_dev(vsi->back), "%s does not support VLAN operations\n", in ice_vsi_init_vlan_ops() 92 * ice_get_compat_vsi_vlan_ops - Get VSI VLAN ops based on VLAN mode [all …]
|
| H A 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() 320 dev_info(dev, "Bridge port vlan metadata lookup failed (vsi=%u)\n", 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() [all …]
|
| /linux/net/bridge/ |
| H A D | br_vlan_tunnel.c | 3 * Bridge per vlan tunnel port dst_metadata handling code 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 [all …]
|
| /linux/tools/testing/selftests/drivers/net/mlxsw/ |
| H A D | q_in_q_veto.sh | 56 ip link add name br0.100 link br0 type vlan \ 58 check_fail $? "$netdev_proto vlan upper creation on top of an $bridge_proto bridge not rejected" 60 ip link add name br0.100 link br0 type vlan \ 63 …check_err $? "$netdev_proto vlan upper creation on top of an $bridge_proto bridge rejected without… 65 log_test "create $netdev_proto vlan upper on top $bridge_proto bridge" 74 ip link add name $swp1.100 link $swp1 type vlan \ 76 check_fail $? "802.1ad vlan upper creation on top of a front panel not rejected" 78 ip link add name $swp1.100 link $swp1 type vlan \ 81 check_err $? "802.1ad vlan upper creation on top of a front panel rejected without extack" 83 log_test "create 802.1ad vlan upper on top of a front panel" [all …]
|
| /linux/net/8021q/ |
| H A D | vlan_dev.c | 3 * INET 802.1Q VLAN 8 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html 15 * - Flush MC-list on VLAN destroy. 32 #include "vlan.h" 38 * Create the VLAN header for an arbitrary protocol layer 51 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_hard_header() local 57 if (!(vlan->flags & VLAN_FLAG_REORDER_HDR)) { in vlan_dev_hard_header() 60 vlan_tci = vlan->vlan_id; in vlan_dev_hard_header() 73 skb->protocol = vlan->vlan_proto; in vlan_dev_hard_header() 74 type = ntohs(vlan->vlan_proto); in vlan_dev_hard_header() [all …]
|
| H A D | vlan.c | 3 * INET 802.1Q VLAN 8 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html 14 * Use hash table for VLAN groups - David S. Miller <davem@redhat.com> 35 #include "vlan.h" 40 /* Global VLAN variables */ 44 const char vlan_fullname[] = "802.1Q VLAN Support"; 82 struct vlan_dev_priv *vlan) in vlan_stacked_transfer_operstate() argument 84 if (!(vlan->flags & VLAN_FLAG_BRIDGE_BINDING)) in vlan_stacked_transfer_operstate() 90 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in unregister_vlan_dev() local 91 struct net_device *real_dev = vlan->real_dev; in unregister_vlan_dev() [all …]
|
| H A D | vlan_netlink.c | 3 * VLAN netlink control interface 15 #include "vlan.h" 58 NL_SET_ERR_MSG_MOD(extack, "VLAN properties not specified"); in vlan_validate() 68 NL_SET_ERR_MSG_MOD(extack, "Invalid VLAN protocol"); in vlan_validate() 76 NL_SET_ERR_MSG_MOD(extack, "Invalid VLAN id"); in vlan_validate() 86 NL_SET_ERR_MSG_MOD(extack, "Invalid VLAN flags"); in vlan_validate() 143 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_newlink() local 152 NL_SET_ERR_MSG_MOD(extack, "VLAN id not specified"); in vlan_newlink() 170 vlan->vlan_proto = proto; in vlan_newlink() 171 vlan->vlan_id = nla_get_u16(data[IFLA_VLAN_ID]); in vlan_newlink() [all …]
|
| H A D | vlanproc.c | 3 * vlanproc.c VLAN Module. /proc filesystem interface. 31 #include "vlan.h" 51 static const char name_root[] = "vlan"; 56 * VLAN creates its own directory /proc/net/vlan with the following 63 * Generic /proc/net/vlan/<file> file and inode operations 89 * Clean up /proc/net/vlan entries 108 * Create /proc/net/vlan entries 133 * Add directory entry for VLAN device. 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() [all …]
|
| /linux/drivers/net/dsa/realtek/ |
| H A D | rtl8366-core.c | 40 * rtl8366_obtain_mc() - retrieve or allocate a VLAN member configuration 42 * @vid: the VLAN ID to look up or allocate 58 dev_err(priv->dev, "error searching for VLAN MC %d for VID %d\n", in rtl8366_obtain_mc() 71 dev_err(priv->dev, "error searching for VLAN MC %d for VID %d\n", in rtl8366_obtain_mc() 80 dev_err(priv->dev, "error looking for 4K VLAN MC %d for VID %d\n", in rtl8366_obtain_mc() 91 dev_err(priv->dev, "unable to set/update VLAN MC %d for VID %d\n", in rtl8366_obtain_mc() 122 dev_err(priv->dev, "unable to set/update VLAN MC %d for VID %d\n", in rtl8366_obtain_mc() 132 dev_err(priv->dev, "all VLAN member configurations are in use\n"); in rtl8366_obtain_mc() 148 "setting VLAN%d 4k members: 0x%02x, untagged: 0x%02x\n", in rtl8366_set_vlan() 164 "resulting VLAN%d 4k members: 0x%02x, untagged: 0x%02x\n", in rtl8366_set_vlan() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/esw/ |
| H A D | bridge.c | 125 "Failed to create VLAN(proto=%x) flow group for bridge ingress table (err=%pe)\n", in mlx5_esw_bridge_ingress_vlan_proto_fg_create() 184 "Failed to create bridge ingress table VLAN filter flow group (err=%pe)\n", in mlx5_esw_bridge_ingress_vlan_proto_filter_fg_create() 278 "Failed to create VLAN flow group for bridge egress table (err=%pe)\n", in mlx5_esw_bridge_egress_vlan_proto_fg_create() 574 struct mlx5_esw_bridge_vlan *vlan, in mlx5_esw_bridge_ingress_flow_with_esw_create() argument 607 if (vlan && vlan->pkt_reformat_push) { in mlx5_esw_bridge_ingress_flow_with_esw_create() 610 flow_act.pkt_reformat = vlan->pkt_reformat_push; in mlx5_esw_bridge_ingress_flow_with_esw_create() 611 flow_act.modify_hdr = vlan->pkt_mod_hdr_push_mark; in mlx5_esw_bridge_ingress_flow_with_esw_create() 612 } else if (vlan) { in mlx5_esw_bridge_ingress_flow_with_esw_create() 627 vlan->vid); in mlx5_esw_bridge_ingress_flow_with_esw_create() 644 struct mlx5_esw_bridge_vlan *vlan, in mlx5_esw_bridge_ingress_flow_create() argument [all …]
|
| /linux/drivers/net/ethernet/intel/ice/virt/ |
| H A D | virtchnl.c | 197 * Return 0 if there is no VLAN caps supported, or VLAN caps value 204 /* In switchdev setting VLAN from VF isn't supported */ in ice_vc_get_vlan_caps() 208 /* VLAN offloads based on current device configuration */ in ice_vc_get_vlan_caps() 212 * these two conditions, which amounts to guest VLAN filtering in ice_vc_get_vlan_caps() 213 * and offloads being based on the inner VLAN or the in ice_vc_get_vlan_caps() 214 * inner/single VLAN respectively and don't allow VF to in ice_vc_get_vlan_caps() 223 * configured in SVM, and no port VLAN is configured in ice_vc_get_vlan_caps() 228 /* configure software offloaded VLAN support when DVM in ice_vc_get_vlan_caps() 229 * is enabled, but no port VLAN is enabled in ice_vc_get_vlan_caps() 529 dev_err(dev, "Failed to configure VLAN pruning in promiscuous mode\n"); in ice_vc_cfg_promiscuous_mode_msg() [all …]
|
| /linux/drivers/scsi/qedf/ |
| H A D | qedf_fip.c | 12 * FIP VLAN functions that will eventually move to libfcoe. 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() [all …]
|
| /linux/Documentation/networking/dsa/ |
| H A D | b53.rst | 48 The configuration slightly differ from the :ref:`dsa-vlan-configuration`. 51 VLAN programming would basically change the CPU port's default PVID and make 54 In difference to the configuration described in :ref:`dsa-vlan-configuration` 55 the default VLAN 1 has to be removed from the user interface configuration in 57 VLAN configuration in the bridge showcase. 61 The configuration can only be set up via VLAN tagging and bridge setup. 67 ip link add link eth0 name eth0.1 type vlan id 1 68 ip link add link eth0 name eth0.2 type vlan id 2 69 ip link add link eth0 name eth0.3 type vlan id 3 85 # activate VLAN filtering [all …]
|
| /linux/Documentation/networking/ |
| H A D | switchdev.rst | 173 FDB entry is the {port, MAC, VLAN} tuple forwarding destination. 180 - VLAN flooding of multicast/broadcast and unknown unicast packets 189 bridge fdb add dev DEV ADDRESS [vlan VID] [self] static 202 bridge fdb add dev DEV ADDRESS [vlan VID] master static 221 Note: by default, the bridge does not filter on VLAN and only bridges untagged 222 traffic. To enable VLAN support, turn on VLAN filtering:: 229 The switch device will learn/forget source MAC address/VLAN on ingress packets 230 and notify the switch driver of the mac/vlan/port tuples. The switch driver, 310 For a given L2 VLAN domain, the switch device should flood multicast/broadcast 313 vlan L2 domain, can program the switch device for flooding. The packet may [all …]
|
| /linux/net/batman-adv/ |
| H A D | mesh-interface.c | 115 struct batadv_meshif_vlan *vlan; in batadv_interface_set_mac_addr() local 130 hlist_for_each_entry_rcu(vlan, &bat_priv->meshif_vlan_list, list) { in batadv_interface_set_mac_addr() 131 batadv_tt_local_remove(bat_priv, old_addr, vlan->vid, in batadv_interface_set_mac_addr() 133 batadv_tt_local_add(dev, addr->sa_data, vlan->vid, in batadv_interface_set_mac_addr() 492 * batadv_meshif_vlan_release() - release vlan from lists and queue for free 494 * @ref: kref pointer of the vlan object 498 struct batadv_meshif_vlan *vlan; in batadv_meshif_vlan_release() local 500 vlan = container_of(ref, struct batadv_meshif_vlan, refcount); in batadv_meshif_vlan_release() 502 spin_lock_bh(&vlan->bat_priv->meshif_vlan_list_lock); in batadv_meshif_vlan_release() 503 hlist_del_rcu(&vlan->list); in batadv_meshif_vlan_release() [all …]
|