Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752661AbdHRRB4 convert rfc822-to-8bit (ORCPT ); Fri, 18 Aug 2017 13:01:56 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:33423 "EHLO lhrrgout.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751167AbdHRRBy (ORCPT ); Fri, 18 Aug 2017 13:01:54 -0400 From: Salil Mehta To: Andrew Lunn 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 Thread-Topic: [PATCH net-next] net: hns3: Add support to change MTU in hardware & netdev Thread-Index: AQHTGBZFah6eHY/VdkiM5vNY65v5a6KJ+uMAgAAjiyD///ZNAIAAI2KA///s0YCAACIs0IAAD1eg Date: Fri, 18 Aug 2017 17:01:43 +0000 Message-ID: References: <20170818113558.71928-1-salil.mehta@huawei.com> <20170818133128.GA523@lunn.ch> <20170818150358.GA3258@lunn.ch> <20170818160157.GB3258@lunn.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.203.181.151] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.59971D80.0040,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=169.254.1.205, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: cade5df06c3be32de1b50e4e58098cb0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1315 Lines: 37 Hi Andrew, > > -----Original Message----- > > From: Andrew Lunn [mailto:andrew@lunn.ch] > > Sent: Friday, August 18, 2017 5:02 PM > > 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 > > > > > 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 understand your point. In this case, I would like to keep the > range being set by the driver just to be more explicit. > So for now keep this initialization in the driver? Removed the min_mtu initialization from the driver code and added a comment over it to be explicit. Please have a look at the V2 patch. Thanks Salil