aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-05-17 08:34:35 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-18 00:04:10 -0400
commit63f39bd17aa700595fa3e34a61c5c07551dd1b7d (patch)
tree8e8e17b25b31271581d88d50ffc23e315906e2fc /drivers/net/ixgbe
parent29ebf6f8c8a99bbda053f1fbdff0570cc5d866b3 (diff)
ixgbe: Enable jumbo frame for FCoE feature in 82599
Enable jumbo frame when FCoE feature is enabled in 82599. Use 3K as the receive queue buffer size for receive queues used by FCoE to address for max Fiber Channel frame size as 2148 bytes (with max 2112 bytes of payload). Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe.h4
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c22
2 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 94b04657576b..3f83a12785db 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -222,6 +222,10 @@ struct ixgbe_q_vector {
222 (&(((struct ixgbe_adv_tx_context_desc *)((R).desc))[i])) 222 (&(((struct ixgbe_adv_tx_context_desc *)((R).desc))[i]))
223 223
224#define IXGBE_MAX_JUMBO_FRAME_SIZE 16128 224#define IXGBE_MAX_JUMBO_FRAME_SIZE 16128
225#ifdef IXGBE_FCOE
226/* Use 3K as the baby jumbo frame size for FCoE */
227#define IXGBE_FCOE_JUMBO_FRAME_SIZE 3072
228#endif /* IXGBE_FCOE */
225 229
226#define OTHER_VECTOR 1 230#define OTHER_VECTOR 1
227#define NON_Q_VECTORS (OTHER_VECTOR) 231#define NON_Q_VECTORS (OTHER_VECTOR)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 68edeab0fbb8..1b4af3f541b7 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1864,6 +1864,10 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
1864 hlreg0 &= ~IXGBE_HLREG0_JUMBOEN; 1864 hlreg0 &= ~IXGBE_HLREG0_JUMBOEN;
1865 else 1865 else
1866 hlreg0 |= IXGBE_HLREG0_JUMBOEN; 1866 hlreg0 |= IXGBE_HLREG0_JUMBOEN;
1867#ifdef IXGBE_FCOE
1868 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
1869 hlreg0 |= IXGBE_HLREG0_JUMBOEN;
1870#endif
1867 IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); 1871 IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);
1868 1872
1869 rdlen = adapter->rx_ring[0].count * sizeof(union ixgbe_adv_rx_desc); 1873 rdlen = adapter->rx_ring[0].count * sizeof(union ixgbe_adv_rx_desc);
@@ -1885,6 +1889,17 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
1885 adapter->rx_ring[i].tail = IXGBE_RDT(j); 1889 adapter->rx_ring[i].tail = IXGBE_RDT(j);
1886 adapter->rx_ring[i].rx_buf_len = rx_buf_len; 1890 adapter->rx_ring[i].rx_buf_len = rx_buf_len;
1887 1891
1892#ifdef IXGBE_FCOE
1893 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) {
1894 struct ixgbe_ring_feature *f;
1895 f = &adapter->ring_feature[RING_F_FCOE];
1896 if ((rx_buf_len < IXGBE_FCOE_JUMBO_FRAME_SIZE) &&
1897 (i >= f->mask) && (i < f->mask + f->indices))
1898 adapter->rx_ring[i].rx_buf_len =
1899 IXGBE_FCOE_JUMBO_FRAME_SIZE;
1900 }
1901
1902#endif /* IXGBE_FCOE */
1888 ixgbe_configure_srrctl(adapter, j); 1903 ixgbe_configure_srrctl(adapter, j);
1889 } 1904 }
1890 1905
@@ -2423,6 +2438,13 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
2423 IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); 2438 IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie);
2424 } 2439 }
2425 2440
2441#ifdef IXGBE_FCOE
2442 /* adjust max frame to be able to do baby jumbo for FCoE */
2443 if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
2444 (max_frame < IXGBE_FCOE_JUMBO_FRAME_SIZE))
2445 max_frame = IXGBE_FCOE_JUMBO_FRAME_SIZE;
2446
2447#endif /* IXGBE_FCOE */
2426 mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); 2448 mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD);
2427 if (max_frame != (mhadd >> IXGBE_MHADD_MFS_SHIFT)) { 2449 if (max_frame != (mhadd >> IXGBE_MHADD_MFS_SHIFT)) {
2428 mhadd &= ~IXGBE_MHADD_MFS_MASK; 2450 mhadd &= ~IXGBE_MHADD_MFS_MASK;