From owner-svn-src-head@FreeBSD.ORG Sun Mar 2 07:10:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4681CE8; Sun, 2 Mar 2014 07:10:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A0F171319; Sun, 2 Mar 2014 07:10:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s227Ah7M011752; Sun, 2 Mar 2014 07:10:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s227Ah6A011751; Sun, 2 Mar 2014 07:10:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201403020710.s227Ah6A011751@svn.freebsd.org> From: Adrian Chadd Date: Sun, 2 Mar 2014 07:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262683 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 07:10:43 -0000 Author: adrian Date: Sun Mar 2 07:10:43 2014 New Revision: 262683 URL: http://svnweb.freebsd.org/changeset/base/262683 Log: Set all of the ports into the same vlangroup; there's only one vlangroup (pvid=1) and we already configure them to send to other ports. Setting pvid=portnum would mean that there were separate vlangroups for each ports, but 'leaking' into other ports. The result? All port traffic flooded to all other port traffic. Tested: * DB120, AR9344 + AR8327 switch Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Mar 2 06:36:49 2014 (r262682) +++ head/sys/dev/etherswitch/arswitch/arswitch_8327.c Sun Mar 2 07:10:43 2014 (r262683) @@ -720,9 +720,9 @@ ar8327_reset_vlans(struct arswitch_softc * flows. All ports can see other ports. */ for (i = 0; i < AR8327_NUM_PORTS; i++) { - /* set pvid = i */ - t = i << AR8327_PORT_VLAN0_DEF_SVID_S; - t |= i << AR8327_PORT_VLAN0_DEF_CVID_S; + /* set pvid = 1; there's only one vlangroup */ + t = 1 << AR8327_PORT_VLAN0_DEF_SVID_S; + t |= 1 << AR8327_PORT_VLAN0_DEF_CVID_S; arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_VLAN0(i), t); /* set egress == out_keep */ @@ -732,8 +732,7 @@ ar8327_reset_vlans(struct arswitch_softc t |= mode << AR8327_PORT_VLAN1_OUT_MODE_S; arswitch_writereg(sc->sc_dev, AR8327_REG_PORT_VLAN1(i), t); - /* Set ingress = out_keep; members = 0x3f for all ports */ - + /* Ports can see other ports */ t = (0x3f & ~(1 << i)); /* all ports besides us */ t |= AR8327_PORT_LOOKUP_LEARN;