nfp: inherit the max_mtu from the PF netdev
authorDirk van der Merwe <dirk.vandermerwe@netronome.com>
Fri, 17 Nov 2017 01:06:41 +0000 (17:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Nov 2017 05:09:36 +0000 (14:09 +0900)
The PF netdev is used for data transfer for reprs, so reprs inherit the
maximum MTU settings of the PF netdev.

Fixes: 5de73ee46704 ("nfp: general representor implementation")
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c

index 1bce8c131bb9c22499da31fc4aa81bae62d62cbd..fa052a929170b2e1e0091d3b6575edf24a00b3ec 100644 (file)
@@ -297,6 +297,8 @@ int nfp_repr_init(struct nfp_app *app, struct net_device *netdev,
        netdev->netdev_ops = &nfp_repr_netdev_ops;
        netdev->ethtool_ops = &nfp_port_ethtool_ops;
 
+       netdev->max_mtu = pf_netdev->max_mtu;
+
        SWITCHDEV_SET_OPS(netdev, &nfp_port_switchdev_ops);
 
        if (nfp_app_has_tc(app)) {