[dpdk-dev] [PATCH 09/11] net/sfc/base: add RSS key size define to efx.h

Andrew Rybchenko arybchenko at solarflare.com
Wed Aug 30 20:17:39 CEST 2017


From: Ivan Malov <ivan.malov at oktetlabs.ru>

Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
Reviewed-by: Andy Moreton <amoreton at solarflare.com>
---
 drivers/net/sfc/base/ef10_rx.c | 3 +++
 drivers/net/sfc/base/efx.h     | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/sfc/base/ef10_rx.c b/drivers/net/sfc/base/ef10_rx.c
index d34ea4d..849f674 100644
--- a/drivers/net/sfc/base/ef10_rx.c
+++ b/drivers/net/sfc/base/ef10_rx.c
@@ -585,6 +585,9 @@
 {
 	efx_rc_t rc;
 
+	EFX_STATIC_ASSERT(EFX_RSS_KEY_SIZE ==
+	    MC_CMD_RSS_CONTEXT_SET_KEY_IN_TOEPLITZ_KEY_LEN);
+
 	if (rss_context == EFX_RSS_CONTEXT_DEFAULT) {
 		if (enp->en_rss_context_type == EFX_RX_SCALE_UNAVAILABLE) {
 			rc = ENOTSUP;
diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
index 37c9bc4..57fba05 100644
--- a/drivers/net/sfc/base/efx.h
+++ b/drivers/net/sfc/base/efx.h
@@ -1905,6 +1905,7 @@ enum {
 	EFX_RX_HASH_AVAILABLE		/* Insert hash with/without RSS */
 } efx_rx_hash_support_t;
 
+#define	EFX_RSS_KEY_SIZE	40	/* RSS key size (bytes) */
 #define	EFX_RSS_TBL_SIZE	128	/* Rows in RX indirection table */
 #define	EFX_MAXRSS		64	/* RX indirection entry range */
 #define	EFX_MAXRSS_LEGACY	16	/* See bug16611 and bug17213 */
-- 
1.8.2.3



More information about the dev mailing list