From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: DSA support for Marvell 88e6065 switch Date: Wed, 5 Dec 2018 21:46:00 +0100 Message-ID: <20181205204559.GA30830@amd> References: <20181115195111.GA9946@amd> <20181115202618.GF32274@lunn.ch> <20181118180712.GA16507@amd> <20181118182053.GE7446@lunn.ch> <20181118201528.GA18518@amd> <20181119032535.GA15561@lunn.ch> <20181122132123.GA13466@amd> <20181122153343.GF30556@wantstofly.org> <20181122202724.GA23349@amd> <20181203014258.GJ30556@wantstofly.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Cc: Andrew Lunn , netdev@vger.kernel.org, f.fainelli@gmail.com To: Lennert Buytenhek Return-path: Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:34305 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727436AbeLEUqC (ORCPT ); Wed, 5 Dec 2018 15:46:02 -0500 Content-Disposition: inline In-Reply-To: <20181203014258.GJ30556@wantstofly.org> Sender: netdev-owner@vger.kernel.org List-ID: --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > > But I'm running into problems with tagging code, and I guess I'd li= ke > > > > some help understanding. > > > >=20 > > > > tag_trailer: allocates new skb, then copies data around. > > > >=20 > > > > tag_qca: does dev->stats.tx_packets++, and reuses existing skb. > > > >=20 > > > > tag_brcm: reuses existing skb. > >=20 > > Any idea why tag trailer allocates new skb, >=20 > I wrote this code over 10 years ago, so I don't remember all that > well, but I think that it is because you have to do manual checksumming > of the packet, as there's no way to pass down the stack that you don't > want to checksum all the way down to the end of the data area (and you > don't want the tag to be included in the checksum), and so you want to > do that before you add the trailer tag, and you'll probably have to > reallocate the data area to be able to add the tag, and you probably > won't get an exclusive skb here anyway, so you might as well allocate > a new one. Ok, thanks. Whether tag is checksummed or not is indeed an interesting ques= tion. > > and what is going on with dev->stats.tx_packets++? >=20 > trailer_xmit would be the hard_start_xmit function for the virtual > (slave) network interface, so this would be the right thing to do? Some tag_*.c do this and some do not, so I'm still confused. > > 6065 indeed has some kind of "egress tagging mode" (with four > > options), but I have trouble understanding what it really does. >=20 > What are the options? "transmit unmodified", "transmit untagged", "transmit tagged" and "transmit all frames double tagged". Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlwIOQcACgkQMOfwapXb+vJ3/QCgivtt8O7DsSrK7PO7d0kLmpTD WcsAn2AVQC6N6Lmix3wYt3A6C0J7kJB4 =zCGU -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS--