* [PATCH] MTU vlan-related patch for tulip (2.4.x)
@ 2001-12-10 19:57 Paul P Komkoff Jr
2001-12-10 20:00 ` Jeff Garzik
0 siblings, 1 reply; 5+ messages in thread
From: Paul P Komkoff Jr @ 2001-12-10 19:57 UTC (permalink / raw)
To: linux-kernel, jgarzik
Tired of patching everytime ... since vlan are now in official kernel
I hope it will not break any things er ? should apply cleanly to latest 2.4
...
diff -urN linux-2.4.9-ac10-novlan/drivers/net/tulip/interrupt.c linux-2.4.9-ac10/drivers/net/tulip/interrupt.c
--- linux-2.4.9-ac10-novlan/drivers/net/tulip/interrupt.c Wed Jun 20 22:15:44 2001
+++ linux-2.4.9-ac10/drivers/net/tulip/interrupt.c Mon Sep 10 18:44:12 2001
@@ -128,8 +128,8 @@
dev->name, entry, status);
if (--rx_work_limit < 0)
break;
- if ((status & 0x38008300) != 0x0300) {
- if ((status & 0x38000300) != 0x0300) {
+ if ((status & (0x38000000 | RxDescFatalErr | RxWholePkt)) != RxWholePkt) {
+ if ((status & (0x38000000 | RxWholePkt)) != RxWholePkt) {
/* Ingore earlier buffers. */
if ((status & 0xffff) != 0x7fff) {
if (tulip_debug > 1)
@@ -155,10 +155,10 @@
struct sk_buff *skb;
#ifndef final_version
- if (pkt_len > 1518) {
+ if (pkt_len > 1522) {
printk(KERN_WARNING "%s: Bogus packet size of %d (%#x).\n",
dev->name, pkt_len, pkt_len);
- pkt_len = 1518;
+ pkt_len = 1522;
tp->stats.rx_length_errors++;
}
#endif
diff -urN linux-2.4.9-ac10-novlan/drivers/net/tulip/tulip.h linux-2.4.9-ac10/drivers/net/tulip/tulip.h
--- linux-2.4.9-ac10-novlan/drivers/net/tulip/tulip.h Wed Jun 20 22:19:02 2001
+++ linux-2.4.9-ac10/drivers/net/tulip/tulip.h Mon Sep 10 18:42:27 2001
@@ -186,7 +186,7 @@
enum desc_status_bits {
DescOwned = 0x80000000,
- RxDescFatalErr = 0x8000,
+ RxDescFatalErr = 0x4842,
RxWholePkt = 0x0300,
};
@@ -264,7 +264,7 @@
#define MEDIA_MASK 31
-#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */
+#define PKT_BUF_SZ 1540 /* Size of each temporary Rx buffer. */
#define TULIP_MIN_CACHE_LINE 8 /* in units of 32-bit words */
diff -urN linux-2.4.9-ac10-novlan/drivers/net/tulip/tulip_core.c linux-2.4.9-ac10/drivers/net/tulip/tulip_core.c
--- linux-2.4.9-ac10-novlan/drivers/net/tulip/tulip_core.c Mon Sep 10 18:50:47 2001
+++ linux-2.4.9-ac10/drivers/net/tulip/tulip_core.c Mon Sep 10 18:39:59 2001
@@ -59,7 +59,7 @@
#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \
|| defined(__sparc_) || defined(__ia64__) \
|| defined(__sh__) || defined(__mips__)
-static int rx_copybreak = 1518;
+static int rx_copybreak = 1522;
#else
static int rx_copybreak = 100;
#endif
--
Paul P 'Stingray' Komkoff 'Greatest' Jr // (icq)23200764 // (irc)Spacebar
PPKJ1-RIPE // (smtp)i@stingr.net // (http)stingr.net // (pgp)0xA4B4ECA4
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] MTU vlan-related patch for tulip (2.4.x)
2001-12-10 19:57 [PATCH] MTU vlan-related patch for tulip (2.4.x) Paul P Komkoff Jr
@ 2001-12-10 20:00 ` Jeff Garzik
2001-12-10 20:07 ` Jeff Garzik
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2001-12-10 20:00 UTC (permalink / raw)
To: Paul P Komkoff Jr; +Cc: linux-kernel
Paul P Komkoff Jr wrote:
> diff -urN linux-2.4.9-ac10-novlan/drivers/net/tulip/tulip.h linux-2.4.9-ac10/drivers/net/tulip/tulip.h
> --- linux-2.4.9-ac10-novlan/drivers/net/tulip/tulip.h Wed Jun 20 22:19:02 2001
> +++ linux-2.4.9-ac10/drivers/net/tulip/tulip.h Mon Sep 10 18:42:27 2001
> @@ -264,7 +264,7 @@
>
> #define MEDIA_MASK 31
>
> -#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */
> +#define PKT_BUF_SZ 1540 /* Size of each temporary Rx buffer. */
>
> #define TULIP_MIN_CACHE_LINE 8 /* in units of 32-bit words */
>
> diff -urN linux-2.4.9-ac10-novlan/drivers/net/tulip/tulip_core.c linux-2.4.9-ac10/drivers/net/tulip/tulip_core.c
> --- linux-2.4.9-ac10-novlan/drivers/net/tulip/tulip_core.c Mon Sep 10 18:50:47 2001
> +++ linux-2.4.9-ac10/drivers/net/tulip/tulip_core.c Mon Sep 10 18:39:59 2001
> @@ -59,7 +59,7 @@
> #if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \
> || defined(__sparc_) || defined(__ia64__) \
> || defined(__sh__) || defined(__mips__)
> -static int rx_copybreak = 1518;
> +static int rx_copybreak = 1522;
> #else
> static int rx_copybreak = 100;
> #endif
I haven't added it to mainline because of these two patches... I want
to fully analyze their affects before potentially shifting allocation
patterns particularly.
Jeff
--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MTU vlan-related patch for tulip (2.4.x)
2001-12-10 20:00 ` Jeff Garzik
@ 2001-12-10 20:07 ` Jeff Garzik
2001-12-10 20:22 ` Ben Greear
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2001-12-10 20:07 UTC (permalink / raw)
To: Paul P Komkoff Jr; +Cc: linux-kernel
To clarify, the patch takes PKT_BUF_SZ from (512*3) to (512*3)+4 which
moves away from the nice multiple of a power-of-2 number.
--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MTU vlan-related patch for tulip (2.4.x)
2001-12-10 20:07 ` Jeff Garzik
@ 2001-12-10 20:22 ` Ben Greear
2001-12-10 22:37 ` Benjamin LaHaise
0 siblings, 1 reply; 5+ messages in thread
From: Ben Greear @ 2001-12-10 20:22 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Paul P Komkoff Jr, linux-kernel
I think Becker once told me that there was no need to increase
the 1536 number (it is already plenty big, and has some extra space
in it already)...
Jeff Garzik wrote:
> To clarify, the patch takes PKT_BUF_SZ from (512*3) to (512*3)+4 which
> moves away from the nice multiple of a power-of-2 number.
>
--
Ben Greear <greearb@candelatech.com> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MTU vlan-related patch for tulip (2.4.x)
2001-12-10 20:22 ` Ben Greear
@ 2001-12-10 22:37 ` Benjamin LaHaise
0 siblings, 0 replies; 5+ messages in thread
From: Benjamin LaHaise @ 2001-12-10 22:37 UTC (permalink / raw)
To: Ben Greear; +Cc: Jeff Garzik, Paul P Komkoff Jr, linux-kernel
On Mon, Dec 10, 2001 at 01:22:20PM -0700, Ben Greear wrote:
> I think Becker once told me that there was no need to increase
> the 1536 number (it is already plenty big, and has some extra space
> in it already)...
You are correct: standard ethernet packet size is 1500 + 6 + 6 + 4 if
the crc is included. Of course, some drivers use part of the memory
in the packet for the rx descriptor....
-ben
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-12-10 22:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-10 19:57 [PATCH] MTU vlan-related patch for tulip (2.4.x) Paul P Komkoff Jr
2001-12-10 20:00 ` Jeff Garzik
2001-12-10 20:07 ` Jeff Garzik
2001-12-10 20:22 ` Ben Greear
2001-12-10 22:37 ` Benjamin LaHaise
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox