From owner-svn-src-head@freebsd.org Thu May 18 14:09:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98B9CD73CD9; Thu, 18 May 2017 14:09:58 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90]) by mx1.freebsd.org (Postfix) with ESMTP id 5B3EFEFF; Thu, 18 May 2017 14:09:55 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: by lath.rinet.ru (Postfix, from userid 222) id B3BC2B47; Thu, 18 May 2017 17:04:03 +0300 (MSK) Date: Thu, 18 May 2017 17:04:03 +0300 From: Oleg Bulyzhin To: Sepherosa Ziehau Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, araujo@FreeBSD.org, hps@FreeBSD.org Subject: Re: svn commit: r305177 - head/sys/net Message-ID: <20170518140403.GA54405@lath.RINET.ru> References: <201609010632.u816WZUj025186@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609010632.u816WZUj025186@repo.freebsd.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 18 May 2017 14:09:58 -0000 On Thu, Sep 01, 2016 at 06:32:35AM +0000, Sepherosa Ziehau wrote: > Author: sephe > Date: Thu Sep 1 06:32:35 2016 > New Revision: 305177 > URL: https://svnweb.freebsd.org/changeset/base/305177 > > Log: > net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1. > > Reviewed by: araujo, hps > MFC after: 1 week > Sponsored by: Microsoft > Differential Revision: https://reviews.freebsd.org/D7710 > > Modified: > head/sys/net/ethernet.h > > Modified: head/sys/net/ethernet.h > ============================================================================== > --- head/sys/net/ethernet.h Thu Sep 1 06:05:08 2016 (r305176) > +++ head/sys/net/ethernet.h Thu Sep 1 06:32:35 2016 (r305177) > @@ -92,7 +92,7 @@ struct ether_vlan_header { > #define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7) > #define EVL_CFIOFTAG(tag) (((tag) >> 12) & 1) > #define EVL_MAKETAG(vlid, pri, cfi) \ > - ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) > + ((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) > > /* > * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields. Please revert this one. It's just plain wrong and previous one was ok. If you care about readability it should be: ((((pri) & 7) << 13) | (((cfi) & 1) << 12) | ((vlid) & EVL_VLID_MASK)) -- Oleg. ================================================================ === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- oleg@rinet.ru === ================================================================