Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932692AbcKBUJz (ORCPT ); Wed, 2 Nov 2016 16:09:55 -0400 Received: from einhorn.in-berlin.de ([192.109.42.8]:41941 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755782AbcKBUJy (ORCPT ); Wed, 2 Nov 2016 16:09:54 -0400 X-Envelope-From: stefanr@s5r6.in-berlin.de Date: Wed, 2 Nov 2016 21:09:44 +0100 From: Stefan Richter To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, Eyal Itkin Subject: [PATCH 3/3] firewire: net: max MTU off by one Message-ID: <20161102210944.03be3625@kant> In-Reply-To: <20161102210554.23b24d74@kant> References: <20161102210554.23b24d74@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: 1104 Lines: 35 The latest max_mtu patch missed that datagram_size is actually one less than the datagram's Total Length. Fixes: 357f4aae859b ("firewire: net: really fix maximum possible MTU") Signed-off-by: Stefan Richter --- To be applied after net-next was merged. drivers/firewire/net.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index 5d3640264f2d..655c259e37fd 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -1482,9 +1482,14 @@ static int fwnet_probe(struct fw_unit *unit, goto out; dev->local_fifo = dev->handler.offset; + /* + * default MTU: RFC 2734 cl. 4, RFC 3146 cl. 4 + * maximum MTU: RFC 2734 cl. 4.2, fragment encapsulation header's + * maximum possible datagram_size + 1 = 0xfff + 1 + */ net->mtu = 1500U; net->min_mtu = ETH_MIN_MTU; - net->max_mtu = 0xfff; + net->max_mtu = 4096U; /* Set our hardware address while we're at it */ ha = (union fwnet_hwaddr *)net->dev_addr; -- Stefan Richter -======----- =-== ---=- http://arcgraph.de/sr/