Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755088AbcJ2URU (ORCPT ); Sat, 29 Oct 2016 16:17:20 -0400 Received: from einhorn.in-berlin.de ([192.109.42.8]:41349 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752794AbcJ2URT (ORCPT ); Sat, 29 Oct 2016 16:17:19 -0400 X-Envelope-From: stefanr@s5r6.in-berlin.de Date: Sat, 29 Oct 2016 22:16:58 +0200 From: Stefan Richter To: "David S. Miller" Cc: netdev@vger.kernel.org, linux1394-devel@lists.sourceforge.net, Jarod Wilson , linux-kernel@vger.kernel.org Subject: [PATCH net-next] firewire: net: really fix maximum possible MTU Message-ID: <20161029221658.03942ff6@kant> In-Reply-To: <20161023163056.6bc38610@kant> References: <20161019023333.15760-1-jarod@redhat.com> <20161020175524.6184-1-jarod@redhat.com> <20161020175524.6184-8-jarod@redhat.com> <20161022211606.3b5d137d@kant> <20161022212759.228c7642@kant> <20161023011824.GE32569@redhat.com> <20161023162903.4166a35d@kant> <20161023163056.6bc38610@kant> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1182 Lines: 32 The maximum unicast datagram size /without/ link fragmentation is 4096 - 4 = 4092 (max IEEE 1394 async payload size at >= S800 bus speed, minus unfragmented encapssulation header). Max broadcast datagram size without fragmentation is 8 bytes less than that (due to GASP header). The maximum datagram size /with/ link fragmentation is 0xfff = 4095 for unicast and broadcast. This is because the RFC 2734 fragment encapsulation header field for datagram size is only 12 bits wide. Fixes: 5d48f00d836a('firewire: net: fix maximum possible MTU') Signed-off-by: Stefan Richter --- drivers/firewire/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index 03715e7d9d92..363fc5ec1a4e 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -1465,7 +1465,7 @@ static int fwnet_probe(struct fw_unit *unit, net->mtu = 1500U; net->min_mtu = ETH_MIN_MTU; - net->max_mtu = ETH_MAX_MTU; + net->max_mtu = 0xfff; /* Set our hardware address while we're at it */ ha = (union fwnet_hwaddr *)net->dev_addr; -- Stefan Richter -======----- =-=- ===-= http://arcgraph.de/sr/