net/sfc: use RSS key size define from base driver
authorAndrew Rybchenko <arybchenko@solarflare.com>
Wed, 30 Aug 2017 18:17:40 +0000 (19:17 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:47 +0000 (02:49 +0200)
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/sfc.c
drivers/net/sfc/sfc.h
drivers/net/sfc/sfc_ethdev.c

index 08f20dd..cc81fd9 100644 (file)
@@ -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,
index e41e79e..c170384 100644 (file)
@@ -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
 
        /*
index d988c81..2b037d8 100644 (file)
@@ -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);