diff options
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 1 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index c0e56aab5489..2d877da143cf 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -71,6 +71,7 @@ | |||
71 | #define IXGBE_RXBUFFER_128 128 /* Used for packet split */ | 71 | #define IXGBE_RXBUFFER_128 128 /* Used for packet split */ |
72 | #define IXGBE_RXBUFFER_256 256 /* Used for packet split */ | 72 | #define IXGBE_RXBUFFER_256 256 /* Used for packet split */ |
73 | #define IXGBE_RXBUFFER_2048 2048 | 73 | #define IXGBE_RXBUFFER_2048 2048 |
74 | #define IXGBE_MAX_RXBUFFER 16384 /* largest size for a single descriptor */ | ||
74 | 75 | ||
75 | #define IXGBE_RX_HDR_SIZE IXGBE_RXBUFFER_256 | 76 | #define IXGBE_RX_HDR_SIZE IXGBE_RXBUFFER_256 |
76 | 77 | ||
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index e0d736cc245b..65642355a836 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1550,7 +1550,14 @@ static void ixgbe_configure_srrctl(struct ixgbe_adapter *adapter, int index) | |||
1550 | srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK; | 1550 | srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK; |
1551 | 1551 | ||
1552 | if (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED) { | 1552 | if (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED) { |
1553 | srrctl |= IXGBE_RXBUFFER_2048 >> IXGBE_SRRCTL_BSIZEPKT_SHIFT; | 1553 | u16 bufsz = IXGBE_RXBUFFER_2048; |
1554 | /* grow the amount we can receive on large page machines */ | ||
1555 | if (bufsz < (PAGE_SIZE / 2)) | ||
1556 | bufsz = (PAGE_SIZE / 2); | ||
1557 | /* cap the bufsz at our largest descriptor size */ | ||
1558 | bufsz = min((u16)IXGBE_MAX_RXBUFFER, bufsz); | ||
1559 | |||
1560 | srrctl |= bufsz >> IXGBE_SRRCTL_BSIZEPKT_SHIFT; | ||
1554 | srrctl |= IXGBE_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS; | 1561 | srrctl |= IXGBE_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS; |
1555 | srrctl |= ((IXGBE_RX_HDR_SIZE << | 1562 | srrctl |= ((IXGBE_RX_HDR_SIZE << |
1556 | IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT) & | 1563 | IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT) & |