From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH RFC 5/6] net: dsa: microchip: Update tag_ksz.c to access switch driver Date: Wed, 12 Dec 2018 09:18:41 +0100 Message-ID: <20181212081841.GA28679@lunn.ch> References: <1543880097-7106-1-git-send-email-Tristram.Ha@microchip.com> <1543880097-7106-6-git-send-email-Tristram.Ha@microchip.com> <20181205180038.GG12484@lunn.ch> <20181205181808.GH12484@lunn.ch> <899f4595-eaa1-269d-ca31-36bdf8b64923@gmail.com> <20181209091720.GE7561@amd> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: pavel@ucw.cz, f.fainelli@gmail.com, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org To: Tristram.Ha@microchip.com Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:44011 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbeLLISq (ORCPT ); Wed, 12 Dec 2018 03:18:46 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Dec 11, 2018 at 11:59:34PM +0000, Tristram.Ha@microchip.com wrote: > > I'd be careful about locking. Seems like dsa was designed with "tag > > format is static", and you want to change it dynamically... > > I see there is now a new overhead parameter in the dsa_device_ops structure > and dev_set_mtu is called in master.c. It does not prevent the tag size to > change dynamically though. A bigger size can be used instead to make sure the > MAC controller can support it. > > In practice I do not think it does anything meaningful. Most MAC controllers > can transmit and receive more than 1518 bytes but still only advertise 1500 > MTU. Hi Tristram There are a few MAC devices to do enforce 1518. e1000e is one example. You have to increase the MTU before it will receive DSA tagged frames. I initially had similar problems with the FEC driver when i started using that a few years ago. At that time i did not rallies it was a wide scale problem and just changed the FEC. This should be a more generic solution. Andrew