DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 10/11] net/sfc: use RSS key size define from base driver
Date: Wed, 30 Aug 2017 19:17:40 +0100	[thread overview]
Message-ID: <1504117061-17906-11-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1504117061-17906-1-git-send-email-arybchenko@solarflare.com>

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc.c        | 2 +-
 drivers/net/sfc/sfc.h        | 4 +---
 drivers/net/sfc/sfc_ethdev.c | 6 +++---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index 08f20dd..cc81fd9 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -501,7 +501,7 @@
  * 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 e41e79e..c170384 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -48,8 +48,6 @@
 #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 18dca0a..44eb6bd 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -148,7 +148,7 @@
 #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
@@ -1205,9 +1205,9 @@
 	 * 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);
 
-- 
1.8.2.3

  parent reply	other threads:[~2017-08-30 18:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 18:17 [dpdk-dev] [PATCH 00/11] net/sfc: support flow API RSS action Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 01/11] net/sfc: fix unused variable warnings in RSS-agnostic build Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 02/11] net/sfc/base: define a handle to denote default RSS context Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 03/11] net/sfc/base: fix default RSS context check on Siena Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 04/11] net/sfc/base: add the max. number of RSS exclusive contexts Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 05/11] net/sfc/base: rename API to check Rx scale and hash support Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 06/11] net/sfc/base: add API to allocate and free RSS contexts Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 07/11] net/sfc/base: update RSS API to take RSS context parameter Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 08/11] net/sfc/base: add API to set an RSS context for a filter Andrew Rybchenko
2017-08-30 18:17 ` [dpdk-dev] [PATCH 09/11] net/sfc/base: add RSS key size define to efx.h Andrew Rybchenko
2017-08-30 18:17 ` Andrew Rybchenko [this message]
2017-08-30 18:17 ` [dpdk-dev] [PATCH 11/11] net/sfc: add support for the flow API RSS action Andrew Rybchenko
2017-09-01 16:27 ` [dpdk-dev] [PATCH 00/11] net/sfc: support " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1504117061-17906-11-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).