lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 23 Jun 2008 14:35:37 +0300 (EEST)
From:	Pekka J Enberg <penberg@...helsinki.fi>
To:	romieu@...zoreil.com
cc:	sorbica@...lus.com.tw, jesse@...lus.com.tw, Bircoph@...t.ru,
	shemminger@...tta.com, netdev@...r.kernel.org
Subject: [PATCH 04/08] ipg: remove jumbo frame #ifdef from mtu

From: Pekka Enberg <penberg@...helsinki.fi>

Remove JUMBO_FRAME #ifdef from dev->mtu setting in ipg_nic_open() so that we
can make IPG_TXFRAG_SIZE configurable.

Tested-by: Andrew Savchenko <Bircoph@...t.ru>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
 drivers/net/ipg.c |    6 +++---
 drivers/net/ipg.h |    2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/net/ipg.c
===================================================================
--- linux-2.6.orig/drivers/net/ipg.c
+++ linux-2.6/drivers/net/ipg.c
@@ -1807,9 +1807,9 @@ static int ipg_nic_open(struct net_devic
 	sp->jumbo.found_start = 0;
 	sp->jumbo.current_size = 0;
 	sp->jumbo.skb = NULL;
-#ifdef JUMBO_FRAME
-	dev->mtu = IPG_TXFRAG_SIZE;
-#endif
+
+	if (IPG_TXFRAG_SIZE)
+		dev->mtu = IPG_TXFRAG_SIZE;
 
 	/* Enable transmit and receive operation of the IPG. */
 	ipg_w32((ipg_r32(MAC_CTRL) | IPG_MC_RX_ENABLE | IPG_MC_TX_ENABLE) &
Index: linux-2.6/drivers/net/ipg.h
===================================================================
--- linux-2.6.orig/drivers/net/ipg.h
+++ linux-2.6/drivers/net/ipg.h
@@ -598,6 +598,8 @@ enum ipg_regs {
 #ifdef JUMBO_FRAME
 /* IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash */
 #define		IPG_TXFRAG_SIZE		JUMBO_FRAME_SIZE
+#else
+#define		IPG_TXFRAG_SIZE		0 /* use default MTU */
 #endif
 
 /* Size of allocated received buffers. Nominally 0x0600.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ