Re: [PATCH net 1/4] net:ethernet:aquantia: Setup max_mtu in ndev to enable jumbo frames

2017-09-22 Thread Igor Russkikh
>> 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. Thanks Andrew, true. >> +self->ndev->max_mtu = self->aq_hw_caps.mtu - ETH_FCS_LEN - ETH_HLEN; >> >> return 0; >> } >> @@ -695,7 +69

Re: [PATCH net 1/4] net:ethernet:aquantia: Setup max_mtu in ndev to enable jumbo frames

2017-09-21 Thread Andrew Lunn
> @@ -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 require

[PATCH net 1/4] net:ethernet:aquantia: Setup max_mtu in ndev to enable jumbo frames

2017-09-21 Thread Igor Russkikh
Although hardware is capable for almost 16K MTU, without max_mtu field correctly set it only allows standard MTU to be used. This patch enables max MTU, calculating it from hardware maximum frame size of 16352 octets (including FCS). Fixes: 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev