Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1156981 > unrolled thread

Re: [RFC 8/9] net: dsa: mv88e6352: set port 802.1Q mode to Secure

Started byGuenter Roeck <linux@roeck-us.net>
First post2015-06-03 01:30 +0200
Last post2015-06-03 01:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC 8/9] net: dsa: mv88e6352: set port 802.1Q mode to Secure Guenter Roeck <linux@roeck-us.net> - 2015-06-03 01:30 +0200

#1156981 — Re: [RFC 8/9] net: dsa: mv88e6352: set port 802.1Q mode to Secure

FromGuenter Roeck <linux@roeck-us.net>
Date2015-06-03 01:30 +0200
SubjectRe: [RFC 8/9] net: dsa: mv88e6352: set port 802.1Q mode to Secure
Message-ID<px3N8-7Tu-17@gated-at.bofh.it>
On 06/01/2015 06:27 PM, Vivien Didelot wrote:
> This commit changes the 802.1Q mode of each port from Disabled to
> Secure. This enables the VLAN support, by checking the VTU entries on
> ingress.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>   drivers/net/dsa/mv88e6xxx.c | 14 +++++++-------
>   drivers/net/dsa/mv88e6xxx.h |  5 +++++
>   2 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
> index ed49bd8..35243d8 100644
> --- a/drivers/net/dsa/mv88e6xxx.c
> +++ b/drivers/net/dsa/mv88e6xxx.c
> @@ -1723,13 +1723,11 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
>   			goto abort;
>   	}
>
> -	/* Port Control 2: don't force a good FCS, set the maximum
> -	 * frame size to 10240 bytes, don't let the switch add or
> -	 * strip 802.1q tags, don't discard tagged or untagged frames
> -	 * on this port, do a destination address lookup on all
> -	 * received packets as usual, disable ARP mirroring and don't
> -	 * send a copy of all transmitted/received frames on this port
> -	 * to the CPU.
> +	/* Port Control 2: don't force a good FCS, set the maximum frame size to
> +	 * 10240 bytes, enable secure 802.1q tags, don't discard tagged or
> +	 * untagged frames on this port, do a destination address lookup on all
> +	 * received packets as usual, disable ARP mirroring and don't send a
> +	 * copy of all transmitted/received frames on this port to the CPU.
>   	 */
>   	reg = 0;
>   	if (mv88e6xxx_6352_family(ds) || mv88e6xxx_6351_family(ds) ||
> @@ -1751,6 +1749,8 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
>   			reg |= PORT_CONTROL_2_FORWARD_UNKNOWN;
>   	}
>
> +	reg |= PORT_CONTROL_2_8021Q_SECURE;
> +

Vivien,

With this patch, my non-VLAN configuration fails; it appears that untagged
packets are no longer received. I found two possible solutions:
- Use PORT_CONTROL_2_8021Q_FALLBACK
- Explicitly add a VLAN entry for vid=0.

Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web