From: Andrew Lunn <andrew@lunn.ch>
To: Igor Russkikh <igor.russkikh@aquantia.com>
Cc: "David S . Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, David Arcari <darcari@redhat.com>,
Pavel Belous <Pavel.Belous@aquantia.com>,
Nadezhda Krupnina <Nadezhda.Krupnina@aquantia.com>,
Simon Edelhaus <simon.edelhaus@aquantia.com>
Subject: Re: [PATCH net 1/4] net:ethernet:aquantia: Setup max_mtu in ndev to enable jumbo frames
Date: Thu, 21 Sep 2017 17:36:19 +0200 [thread overview]
Message-ID: <20170921153619.GG27589@lunn.ch> (raw)
In-Reply-To: <1b556b3a2fd12c566912541f3c969d4bdc5dde9c.1505915085.git.igor.russkikh@aquantia.com>
> @@ -283,6 +282,8 @@ int aq_nic_ndev_init(struct aq_nic_s *self)
> self->ndev->features = aq_hw_caps->hw_features;
> self->ndev->priv_flags = aq_hw_caps->hw_priv_flags;
> self->ndev->mtu = aq_nic_cfg->mtu - ETH_HLEN;
> + self->ndev->min_mtu = ETH_MIN_MTU;
This is not required. It will default to ETH_MIN_MTU.
Andrew
> + self->ndev->max_mtu = self->aq_hw_caps.mtu - ETH_FCS_LEN - ETH_HLEN;
>
> return 0;
> }
> @@ -695,7 +696,7 @@ int aq_nic_set_mtu(struct aq_nic_s *self, int new_mtu)
> {
> int err = 0;
>
> - if (new_mtu > self->aq_hw_caps.mtu) {
> + if (new_mtu + ETH_FCS_LEN > self->aq_hw_caps.mtu) {
If you have set max_mtu correctly, this cannot happen. But it seems
odd you don't have ETH_HLEN here, where as when setting max_mtu you
do.
Andrew
next prev parent reply other threads:[~2017-09-21 15:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 10:53 [PATCH net 0/4] net:ethernet:aquantia: Atlantic driver bugfixes and improvements Igor Russkikh
2017-09-21 10:53 ` [PATCH net 1/4] net:ethernet:aquantia: Setup max_mtu in ndev to enable jumbo frames Igor Russkikh
2017-09-21 15:36 ` Andrew Lunn [this message]
2017-09-22 7:24 ` Igor Russkikh
2017-09-21 10:53 ` [PATCH net 2/4] net:ethernet:aquantia: Fix Tx queue hangups Igor Russkikh
2017-09-21 11:19 ` Yunsheng Lin
2017-09-21 14:31 ` Igor Russkikh
2017-09-21 10:53 ` [PATCH net 3/4] net:ethernet:aquantia: Fix transient invalid link down/up indications Igor Russkikh
2017-09-21 15:38 ` Andrew Lunn
2017-09-21 10:53 ` [PATCH net 4/4] net:ethernet:atlantic: fix iommu errors Igor Russkikh
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=20170921153619.GG27589@lunn.ch \
--to=andrew@lunn.ch \
--cc=Nadezhda.Krupnina@aquantia.com \
--cc=Pavel.Belous@aquantia.com \
--cc=darcari@redhat.com \
--cc=davem@davemloft.net \
--cc=igor.russkikh@aquantia.com \
--cc=netdev@vger.kernel.org \
--cc=simon.edelhaus@aquantia.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