summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/siena.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2017-01-17 12:01:53 +0000
committerDavid S. Miller <davem@davemloft.net>2017-01-17 15:49:51 -0500
commitf74d1995192cd0834eea13a8287a3e26a7317b6d (patch)
tree83b4bec5e33d50d8393fbc55e3d7b8aeace1edf4 /drivers/net/ethernet/sfc/siena.c
parent96fe11f27b70f6b64f62a2d13ed209aa02e02a48 (diff)
sfc: support setting RSS hash key through ethtool API
Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena.c')
-rw-r--r--drivers/net/ethernet/sfc/siena.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index 118ff5601756..0606aa290879 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -333,11 +333,13 @@ fail1:
}
static int siena_rx_push_rss_config(struct efx_nic *efx, bool user,
- const u32 *rx_indir_table)
+ const u32 *rx_indir_table, const u8 *key)
{
efx_oword_t temp;
/* Set hash key for IPv4 */
+ if (key)
+ memcpy(efx->rx_hash_key, key, sizeof(temp));
memcpy(&temp, efx->rx_hash_key, sizeof(temp));
efx_writeo(efx, &temp, FR_BZ_RX_RSS_TKEY);
@@ -402,7 +404,7 @@ static int siena_init_nic(struct efx_nic *efx)
EFX_RX_USR_BUF_SIZE >> 5);
efx_writeo(efx, &temp, FR_AZ_RX_CFG);
- siena_rx_push_rss_config(efx, false, efx->rx_indir_table);
+ siena_rx_push_rss_config(efx, false, efx->rx_indir_table, NULL);
efx->rss_active = true;
/* Enable event logging */
@@ -1054,4 +1056,5 @@ const struct efx_nic_type siena_a0_nic_type = {
.hwtstamp_filters = (1 << HWTSTAMP_FILTER_NONE |
1 << HWTSTAMP_FILTER_PTP_V1_L4_EVENT |
1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT),
+ .rx_hash_key_size = 16,
};