From: Andrew Lunn <andrew@lunn.ch>
To: Salil Mehta <salil.mehta@huawei.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"Zhuangyuzeng (Yisen)" <yisen.zhuang@huawei.com>,
"lipeng (Y)" <lipeng321@huawei.com>,
"mehta.salil.lnk@gmail.com" <mehta.salil.lnk@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH net-next] net: hns3: Add support to change MTU in hardware & netdev
Date: Fri, 18 Aug 2017 18:01:57 +0200 [thread overview]
Message-ID: <20170818160157.GB3258@lunn.ch> (raw)
In-Reply-To: <F4CC6FACFEB3C54C9141D49AD221F7F93B86F9E7@FRAEML521-MBX.china.huawei.com>
> 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
next prev parent reply other threads:[~2017-08-18 16:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 11:35 Salil Mehta
2017-08-18 13:31 ` Andrew Lunn
2017-08-18 14:55 ` Salil Mehta
2017-08-18 15:03 ` Andrew Lunn
2017-08-18 15:34 ` Salil Mehta
2017-08-18 16:01 ` Andrew Lunn [this message]
2017-08-18 16:10 ` Salil Mehta
2017-08-18 17:01 ` Salil Mehta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170818160157.GB3258@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=mehta.salil.lnk@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®