Thread (21 messages) flat view 21 messages, 3 authors, 2021-01-06

Re: [PATCH v2 net-next 01/10] net: switchdev: remove vid_begin -> vid_end range from VLAN objects

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-01-06 17:09:22

On Wed, Jan 06, 2021 at 10:12:39PM +0800, kernel test robot wrote:
static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
				    const struct switchdev_obj_port_vlan *vlan)
{
	struct mv88e6xxx_chip *chip = ds->priv;
	bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
	bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
	bool warn;
	u8 member;
	u16 vid;

	if (!mv88e6xxx_max_vid(chip))
		return;

	if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
		member = MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED;
	else if (untagged)
		member = MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED;
	else
		member = MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED;

	/* net/dsa/slave.c will call dsa_port_vlan_add() for the affected port
	 * and then the CPU port. Do not warn for duplicates for the CPU port.
	 */
	warn = !dsa_is_cpu_port(ds, port) && !dsa_is_dsa_port(ds, port);

	mv88e6xxx_reg_lock(chip);

	if (mv88e6xxx_port_vlan_join(chip, port, vlan->vid, member, warn))
		dev_err(ds->dev, "p%d: failed to add VLAN %d%c\n", port,
			vid, untagged ? 'u' : 't');
s/vid/vlan->vid/

Sorry about this. I'm superseding it with a v3.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help