netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: octeon_mgmt: Account for second possible VLAN header
@ 2019-11-06 15:32 Sverdlin, Alexander (Nokia - DE/Ulm)
  2019-11-07 23:14 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Sverdlin, Alexander (Nokia - DE/Ulm) @ 2019-11-06 15:32 UTC (permalink / raw)
  To: netdev; +Cc: Sverdlin, Alexander (Nokia - DE/Ulm), David S . Miller 

From: Alexander Sverdlin <alexander.sverdlin@nokia.com>

Octeon's input ring-buffer entry has 14 bits-wide size field, so to account
for second possible VLAN header max_mtu must be further reduced.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
---
 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
index 0e5de88..cdd7e5d 100644
--- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
@@ -1499,7 +1499,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev)
 	netdev->ethtool_ops = &octeon_mgmt_ethtool_ops;
 
 	netdev->min_mtu = 64 - OCTEON_MGMT_RX_HEADROOM;
-	netdev->max_mtu = 16383 - OCTEON_MGMT_RX_HEADROOM;
+	netdev->max_mtu = 16383 - OCTEON_MGMT_RX_HEADROOM - VLAN_HLEN;
 
 	mac = of_get_mac_address(pdev->dev.of_node);
 
-- 
2.4.6


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-08 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 15:32 [PATCH] net: ethernet: octeon_mgmt: Account for second possible VLAN header Sverdlin, Alexander (Nokia - DE/Ulm)
2019-11-07 23:14 ` David Miller
2019-11-08 10:00   ` [PATCH v2] " Sverdlin, Alexander (Nokia - DE/Ulm)
2019-11-08 19:09     ` David Miller
2019-11-08 19:19       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).