From: Andrew Rybchenko Date: Wed, 30 Aug 2017 18:17:40 +0000 (+0100) Subject: net/sfc: use RSS key size define from base driver X-Git-Tag: spdx-start~2059 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=37a42c61c415a6cf3202f2a9cd689be1e9edd0da;p=dpdk.git net/sfc: use RSS key size define from base driver Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c index 08f20dda85..cc81fd9988 100644 --- a/drivers/net/sfc/sfc.c +++ b/drivers/net/sfc/sfc.c @@ -501,7 +501,7 @@ sfc_mem_bar_fini(struct sfc_adapter *sa) * and also known to give a uniform distribution * (a good distribution of traffic between different CPUs) */ -static const uint8_t default_rss_key[SFC_RSS_KEY_SIZE] = { +static const uint8_t default_rss_key[EFX_RSS_KEY_SIZE] = { 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, 0x6d, 0x5a, diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h index e41e79eaa2..c1703841a0 100644 --- a/drivers/net/sfc/sfc.h +++ b/drivers/net/sfc/sfc.h @@ -48,8 +48,6 @@ extern "C" { #endif #if EFSYS_OPT_RX_SCALE -/** RSS key length (bytes) */ -#define SFC_RSS_KEY_SIZE 40 /** RSS hash offloads mask */ #define SFC_RSS_OFFLOADS (ETH_RSS_IP | ETH_RSS_TCP) #endif @@ -229,7 +227,7 @@ struct sfc_adapter { efx_rx_hash_support_t hash_support; efx_rx_hash_type_t rss_hash_types; unsigned int rss_tbl[EFX_RSS_TBL_SIZE]; - uint8_t rss_key[SFC_RSS_KEY_SIZE]; + uint8_t rss_key[EFX_RSS_KEY_SIZE]; #endif /* diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index d988c814a5..2b037d863a 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -148,7 +148,7 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) #if EFSYS_OPT_RX_SCALE if (sa->rss_support != EFX_RX_SCALE_UNAVAILABLE) { dev_info->reta_size = EFX_RSS_TBL_SIZE; - dev_info->hash_key_size = SFC_RSS_KEY_SIZE; + dev_info->hash_key_size = EFX_RSS_KEY_SIZE; dev_info->flow_type_rss_offloads = SFC_RSS_OFFLOADS; } #endif @@ -1223,9 +1223,9 @@ sfc_dev_rss_hash_conf_get(struct rte_eth_dev *dev, * locally in 'sfc_adapter' and kept up-to-date */ rss_conf->rss_hf = sfc_efx_to_rte_hash_type(sa->rss_hash_types); - rss_conf->rss_key_len = SFC_RSS_KEY_SIZE; + rss_conf->rss_key_len = EFX_RSS_KEY_SIZE; if (rss_conf->rss_key != NULL) - rte_memcpy(rss_conf->rss_key, sa->rss_key, SFC_RSS_KEY_SIZE); + rte_memcpy(rss_conf->rss_key, sa->rss_key, EFX_RSS_KEY_SIZE); sfc_adapter_unlock(sa);