Created
November 11, 2013 22:03
-
-
Save neofob/7421273 to your computer and use it in GitHub Desktop.
Tentative patch-formatted text for patch submission.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 6005805794dec4f66a06b8aa8379e6e59120944b Mon Sep 17 00:00:00 2001 | |
From: "Tuan T. Pham" <tuan@vt.edu> | |
Date: Mon, 11 Nov 2013 16:32:26 -0500 | |
Subject: [PATCH] net: mv643xx_eth: add jumbo frame support | |
On Marvell 510 chip and others, hardware TCP TX checksum is only | |
supported for mtu up to 1600. When we set the mtu higher than this, we | |
need to turn this feature off otherwise we cannot set jumbo frame. | |
Without this patch, the iperf throughput on Cubox (Marvell 510) is | |
around 70MB/s inbound and outbound. And, we cannot set the mtu higher | |
than 1600. | |
With this patch, the iperf throughput on Cubox is over 100MB/s and we | |
can set the mtu higher than 1600. | |
Original author: Rabeeh Khoury | |
Signed-off-by: Tuan T. Pham <tuan@vt.edu> | |
--- | |
drivers/net/ethernet/marvell/mv643xx_eth.c | 7 +++++++ | |
1 file changed, 7 insertions(+) | |
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c | |
index 2c210ec..528770b 100644 | |
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c | |
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c | |
@@ -2333,6 +2333,13 @@ static int mv643xx_eth_change_mtu(struct net_device *dev, int new_mtu) | |
dev->mtu = new_mtu; | |
mv643xx_eth_recalc_skb_size(mp); | |
tx_set_rate(mp, 1000000000, 16777216); | |
+ if (dev->mtu > 1600) { | |
+ dev->features &= ~NETIF_F_IP_CSUM; | |
+ dev->vlan_features &= ~NETIF_F_IP_CSUM; | |
+ } else { | |
+ dev->features |= NETIF_F_IP_CSUM; | |
+ dev->vlan_features |= NETIF_F_IP_CSUM; | |
+ } | |
if (!netif_running(dev)) | |
return 0; | |
-- | |
1.7.10.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment