From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [PATCH net 1/2] net/mlx4_en: Change min MTU size to ETH_MIN_MTU Date: Tue, 4 Dec 2018 16:59:17 +0000 Message-ID: <4bcf49b33a8e4ae29ef44351bf5c0bf2@AcuMS.aculab.com> References: <1543754077-18643-1-git-send-email-tariqt@mellanox.com> <1543754077-18643-2-git-send-email-tariqt@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Cc: "netdev@vger.kernel.org" , Eran Ben Elisha To: 'Tariq Toukan' , "David S. Miller" Return-path: Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:53956 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726915AbeLDQ7L (ORCPT ); Tue, 4 Dec 2018 11:59:11 -0500 In-Reply-To: <1543754077-18643-2-git-send-email-tariqt@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: From: Tariq Toukan > Sent: 02 December 2018 12:35 > From: Eran Ben Elisha > > NIC driver minimal MTU size shall be set to ETH_MIN_MTU, as defined in > the RFC791 and in the network stack. Remove old mlx4_en only define for > it, which was set to wrong value. ... > > - /* MTU range: 46 - hw-specific max */ > - dev->min_mtu = MLX4_EN_MIN_MTU; > + /* MTU range: 68 - hw-specific max */ > + dev->min_mtu = ETH_MIN_MTU; > dev->max_mtu = priv->max_mtu; Where does 68 come from? The minimum size of an ethernet packet including the mac addresses and CRC is 64 bytes - but that would never be an 'mtu'. Since 64 - 46 = 18, the 46 probably excludes both MAC addresses, the ethertype/length and the CRC. This is 'sort of' the minimum mtu for an ethernet frame. I'm not sure which values are supposed to be in dev->min/max_mtu. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)