diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-06-23 07:36:56 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-07-04 08:46:54 -0400 |
commit | 532f4aee934cf26f1905fae101ac9f0ba3087f21 (patch) | |
tree | e90f06c06dd86f6168961e09f21655a51d08ed25 /drivers/net/ipg.h | |
parent | da02b23192e8c1dc6830fc38840ea1c5e416a43c (diff) |
ipg: run-time configurable jumbo frame support
Make jumbo frame support configurable via ifconfig mtu option as suggested by
Stephen Hemminger.
Cc: Stephen Hemminger <stephen.hemminger@vyatta.com>
Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ipg.h')
-rw-r--r-- | drivers/net/ipg.h | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index c84902d845f..e0e718ab4c2 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h | |||
@@ -536,91 +536,6 @@ enum ipg_regs { | |||
536 | */ | 536 | */ |
537 | #define IPG_FRAMESBETWEENTXDMACOMPLETES 0x1 | 537 | #define IPG_FRAMESBETWEENTXDMACOMPLETES 0x1 |
538 | 538 | ||
539 | #ifdef JUMBO_FRAME | ||
540 | # define IPG_JUMBO true | ||
541 | #else | ||
542 | # define IPG_JUMBO false | ||
543 | #endif | ||
544 | |||
545 | #ifdef JUMBO_FRAME | ||
546 | |||
547 | # ifdef JUMBO_FRAME_SIZE_2K | ||
548 | # define JUMBO_FRAME_SIZE 2048 | ||
549 | # define __IPG_RXFRAG_SIZE 2048 | ||
550 | # else | ||
551 | # ifdef JUMBO_FRAME_SIZE_3K | ||
552 | # define JUMBO_FRAME_SIZE 3072 | ||
553 | # define __IPG_RXFRAG_SIZE 3072 | ||
554 | # else | ||
555 | # ifdef JUMBO_FRAME_SIZE_4K | ||
556 | # define JUMBO_FRAME_SIZE 4096 | ||
557 | # define __IPG_RXFRAG_SIZE 4088 | ||
558 | # else | ||
559 | # ifdef JUMBO_FRAME_SIZE_5K | ||
560 | # define JUMBO_FRAME_SIZE 5120 | ||
561 | # define __IPG_RXFRAG_SIZE 4088 | ||
562 | # else | ||
563 | # ifdef JUMBO_FRAME_SIZE_6K | ||
564 | # define JUMBO_FRAME_SIZE 6144 | ||
565 | # define __IPG_RXFRAG_SIZE 4088 | ||
566 | # else | ||
567 | # ifdef JUMBO_FRAME_SIZE_7K | ||
568 | # define JUMBO_FRAME_SIZE 7168 | ||
569 | # define __IPG_RXFRAG_SIZE 4088 | ||
570 | # else | ||
571 | # ifdef JUMBO_FRAME_SIZE_8K | ||
572 | # define JUMBO_FRAME_SIZE 8192 | ||
573 | # define __IPG_RXFRAG_SIZE 4088 | ||
574 | # else | ||
575 | # ifdef JUMBO_FRAME_SIZE_9K | ||
576 | # define JUMBO_FRAME_SIZE 9216 | ||
577 | # define __IPG_RXFRAG_SIZE 4088 | ||
578 | # else | ||
579 | # ifdef JUMBO_FRAME_SIZE_10K | ||
580 | # define JUMBO_FRAME_SIZE 10240 | ||
581 | # define __IPG_RXFRAG_SIZE 4088 | ||
582 | # else | ||
583 | # define JUMBO_FRAME_SIZE 4096 | ||
584 | # endif | ||
585 | # endif | ||
586 | # endif | ||
587 | # endif | ||
588 | # endif | ||
589 | # endif | ||
590 | # endif | ||
591 | # endif | ||
592 | # endif | ||
593 | #endif | ||
594 | |||
595 | /* Size of allocated received buffers. Nominally 0x0600. | ||
596 | * Define larger if expecting jumbo frames. | ||
597 | */ | ||
598 | #ifdef JUMBO_FRAME | ||
599 | /* IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash */ | ||
600 | #define IPG_TXFRAG_SIZE JUMBO_FRAME_SIZE | ||
601 | #else | ||
602 | #define IPG_TXFRAG_SIZE 0 /* use default MTU */ | ||
603 | #endif | ||
604 | |||
605 | /* Size of allocated received buffers. Nominally 0x0600. | ||
606 | * Define larger if expecting jumbo frames. | ||
607 | */ | ||
608 | #ifdef JUMBO_FRAME | ||
609 | /* 4088 = 4096 - 8 */ | ||
610 | #define IPG_RXFRAG_SIZE __IPG_RXFRAG_SIZE | ||
611 | #define IPG_RXSUPPORT_SIZE IPG_MAX_RXFRAME_SIZE | ||
612 | #else | ||
613 | #define IPG_RXFRAG_SIZE 0x0600 | ||
614 | #define IPG_RXSUPPORT_SIZE IPG_RXFRAG_SIZE | ||
615 | #endif | ||
616 | |||
617 | /* IPG_MAX_RXFRAME_SIZE <= IPG_RXFRAG_SIZE */ | ||
618 | #ifdef JUMBO_FRAME | ||
619 | #define IPG_MAX_RXFRAME_SIZE JUMBO_FRAME_SIZE | ||
620 | #else | ||
621 | #define IPG_MAX_RXFRAME_SIZE 0x0600 | ||
622 | #endif | ||
623 | |||
624 | #define IPG_RFDLIST_LENGTH 0x100 | 539 | #define IPG_RFDLIST_LENGTH 0x100 |
625 | 540 | ||
626 | /* Maximum number of RFDs to process per interrupt. | 541 | /* Maximum number of RFDs to process per interrupt. |