Commit f7bb3d86 authored by David S. Miller's avatar David S. Miller

Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2017-03-02

This series contains fixes to ixgbe only.

Paolo fixes the driver so that you can actually update the RSS key value
via ethtool.

Alex fixes an issue on architectures that have a cache line size larger
than 64 Bytes, where the amount of headroom for the frame starts
shrinking.  To take this into account, Alex adds one small check so that
we compare the max_frame to the amount of actual data we can store, so
we will automatically enable 3K receive buffers as soon as the maximum
frame size we can handle drops below the standard Ethernet MTU.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9f674e48 c74042f3
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
#define IXGBE_MAX_FRAME_BUILD_SKB \ #define IXGBE_MAX_FRAME_BUILD_SKB \
(SKB_WITH_OVERHEAD(IXGBE_RXBUFFER_2K) - IXGBE_SKB_PAD) (SKB_WITH_OVERHEAD(IXGBE_RXBUFFER_2K) - IXGBE_SKB_PAD)
#else #else
#define IGB_MAX_FRAME_BUILD_SKB IXGBE_RXBUFFER_2K #define IXGBE_MAX_FRAME_BUILD_SKB IXGBE_RXBUFFER_2K
#endif #endif
/* /*
...@@ -929,6 +929,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, ...@@ -929,6 +929,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
struct ixgbe_adapter *adapter, struct ixgbe_adapter *adapter,
struct ixgbe_ring *tx_ring); struct ixgbe_ring *tx_ring);
u32 ixgbe_rss_indir_tbl_entries(struct ixgbe_adapter *adapter); u32 ixgbe_rss_indir_tbl_entries(struct ixgbe_adapter *adapter);
void ixgbe_store_key(struct ixgbe_adapter *adapter);
void ixgbe_store_reta(struct ixgbe_adapter *adapter); void ixgbe_store_reta(struct ixgbe_adapter *adapter);
s32 ixgbe_negotiate_fc(struct ixgbe_hw *hw, u32 adv_reg, u32 lp_reg, s32 ixgbe_negotiate_fc(struct ixgbe_hw *hw, u32 adv_reg, u32 lp_reg,
u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm); u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm);
......
...@@ -2998,8 +2998,10 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir, ...@@ -2998,8 +2998,10 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir,
} }
/* Fill out the rss hash key */ /* Fill out the rss hash key */
if (key) if (key) {
memcpy(adapter->rss_key, key, ixgbe_get_rxfh_key_size(netdev)); memcpy(adapter->rss_key, key, ixgbe_get_rxfh_key_size(netdev));
ixgbe_store_key(adapter);
}
ixgbe_store_reta(adapter); ixgbe_store_reta(adapter);
......
...@@ -3473,6 +3473,21 @@ u32 ixgbe_rss_indir_tbl_entries(struct ixgbe_adapter *adapter) ...@@ -3473,6 +3473,21 @@ u32 ixgbe_rss_indir_tbl_entries(struct ixgbe_adapter *adapter)
return 512; return 512;
} }
/**
* ixgbe_store_key - Write the RSS key to HW
* @adapter: device handle
*
* Write the RSS key stored in adapter.rss_key to HW.
*/
void ixgbe_store_key(struct ixgbe_adapter *adapter)
{
struct ixgbe_hw *hw = &adapter->hw;
int i;
for (i = 0; i < 10; i++)
IXGBE_WRITE_REG(hw, IXGBE_RSSRK(i), adapter->rss_key[i]);
}
/** /**
* ixgbe_store_reta - Write the RETA table to HW * ixgbe_store_reta - Write the RETA table to HW
* @adapter: device handle * @adapter: device handle
...@@ -3538,7 +3553,6 @@ static void ixgbe_store_vfreta(struct ixgbe_adapter *adapter) ...@@ -3538,7 +3553,6 @@ static void ixgbe_store_vfreta(struct ixgbe_adapter *adapter)
static void ixgbe_setup_reta(struct ixgbe_adapter *adapter) static void ixgbe_setup_reta(struct ixgbe_adapter *adapter)
{ {
struct ixgbe_hw *hw = &adapter->hw;
u32 i, j; u32 i, j;
u32 reta_entries = ixgbe_rss_indir_tbl_entries(adapter); u32 reta_entries = ixgbe_rss_indir_tbl_entries(adapter);
u16 rss_i = adapter->ring_feature[RING_F_RSS].indices; u16 rss_i = adapter->ring_feature[RING_F_RSS].indices;
...@@ -3551,8 +3565,7 @@ static void ixgbe_setup_reta(struct ixgbe_adapter *adapter) ...@@ -3551,8 +3565,7 @@ static void ixgbe_setup_reta(struct ixgbe_adapter *adapter)
rss_i = 4; rss_i = 4;
/* Fill out hash function seeds */ /* Fill out hash function seeds */
for (i = 0; i < 10; i++) ixgbe_store_key(adapter);
IXGBE_WRITE_REG(hw, IXGBE_RSSRK(i), adapter->rss_key[i]);
/* Fill out redirection table */ /* Fill out redirection table */
memset(adapter->rss_indir_tbl, 0, sizeof(adapter->rss_indir_tbl)); memset(adapter->rss_indir_tbl, 0, sizeof(adapter->rss_indir_tbl));
...@@ -3959,7 +3972,8 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter) ...@@ -3959,7 +3972,8 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter)
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
set_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state); set_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);
if (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)) if ((max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)) ||
(max_frame > IXGBE_MAX_FRAME_BUILD_SKB))
set_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state); set_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment