Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751673AbdHRQCE (ORCPT ); Fri, 18 Aug 2017 12:02:04 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:35045 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbdHRQCC (ORCPT ); Fri, 18 Aug 2017 12:02:02 -0400 Date: Fri, 18 Aug 2017 18:01:57 +0200 From: Andrew Lunn To: Salil Mehta Cc: "davem@davemloft.net" , "Zhuangyuzeng (Yisen)" , "lipeng (Y)" , "mehta.salil.lnk@gmail.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Linuxarm Subject: Re: [PATCH net-next] net: hns3: Add support to change MTU in hardware & netdev Message-ID: <20170818160157.GB3258@lunn.ch> References: <20170818113558.71928-1-salil.mehta@huawei.com> <20170818133128.GA523@lunn.ch> <20170818150358.GA3258@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 836 Lines: 24 > for example, > file: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c > static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) > > netdev->priv_flags |= IFF_UNICAST_FLT; > > + /* MTU range: 81 - 9600 */ > + netdev->min_mtu = 81; > + netdev->max_mtu = MAX_MTU; In this cause, the driver is not using the default values. So it sets them. Anyway, try it. After your alloc_etherdev_mqs(), print the value of min_mtu. It should already be set to MIN_ETH_MTU. > I see. IMHO HNS3 is currently limited by maximum buffer per descriptor > which is 64k. I am sure such frames would get dropped in the hardware > itself and which I guess should be more preferable than dropping in > driver since it saves you some precious cpu cycles? If you hardware handles this, then you don't need to do anything. Andrew