Page MenuHomeFreeBSD

D8954.id23342.diff
No OneTemporary

D8954.id23342.diff

Index: head/sys/dev/sfxge/common/ef10_rx.c
===================================================================
--- head/sys/dev/sfxge/common/ef10_rx.c
+++ head/sys/dev/sfxge/common/ef10_rx.c
@@ -297,13 +297,13 @@
MCDI_IN_POPULATE_DWORD_4(req, RSS_CONTEXT_SET_FLAGS_IN_FLAGS,
RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN,
- (type & (1U << EFX_RX_HASH_IPV4)) ? 1 : 0,
+ (type & EFX_RX_HASH_IPV4) ? 1 : 0,
RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN,
- (type & (1U << EFX_RX_HASH_TCPIPV4)) ? 1 : 0,
+ (type & EFX_RX_HASH_TCPIPV4) ? 1 : 0,
RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN,
- (type & (1U << EFX_RX_HASH_IPV6)) ? 1 : 0,
+ (type & EFX_RX_HASH_IPV6) ? 1 : 0,
RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN,
- (type & (1U << EFX_RX_HASH_TCPIPV6)) ? 1 : 0);
+ (type & EFX_RX_HASH_TCPIPV6) ? 1 : 0);
efx_mcdi_execute(enp, &req);
Index: head/sys/dev/sfxge/common/efx.h
===================================================================
--- head/sys/dev/sfxge/common/efx.h
+++ head/sys/dev/sfxge/common/efx.h
@@ -1833,12 +1833,12 @@
EFX_RX_HASHALG_TOEPLITZ
} efx_rx_hash_alg_t;
-typedef enum efx_rx_hash_type_e {
- EFX_RX_HASH_IPV4 = 0,
- EFX_RX_HASH_TCPIPV4,
- EFX_RX_HASH_IPV6,
- EFX_RX_HASH_TCPIPV6,
-} efx_rx_hash_type_t;
+#define EFX_RX_HASH_IPV4 (1U << 0)
+#define EFX_RX_HASH_TCPIPV4 (1U << 1)
+#define EFX_RX_HASH_IPV6 (1U << 2)
+#define EFX_RX_HASH_TCPIPV6 (1U << 3)
+
+typedef unsigned int efx_rx_hash_type_t;
typedef enum efx_rx_hash_support_e {
EFX_RX_HASH_UNAVAILABLE = 0, /* Hardware hash not inserted */
Index: head/sys/dev/sfxge/common/efx_rx.c
===================================================================
--- head/sys/dev/sfxge/common/efx_rx.c
+++ head/sys/dev/sfxge/common/efx_rx.c
@@ -725,12 +725,12 @@
case EFX_RX_HASHALG_TOEPLITZ:
EFX_RX_TOEPLITZ_IPV4_HASH(enp, insert,
- type & (1 << EFX_RX_HASH_IPV4),
- type & (1 << EFX_RX_HASH_TCPIPV4));
+ type & EFX_RX_HASH_IPV4,
+ type & EFX_RX_HASH_TCPIPV4);
EFX_RX_TOEPLITZ_IPV6_HASH(enp,
- type & (1 << EFX_RX_HASH_IPV6),
- type & (1 << EFX_RX_HASH_TCPIPV6),
+ type & EFX_RX_HASH_IPV6,
+ type & EFX_RX_HASH_TCPIPV6,
rc);
if (rc != 0)
goto fail1;
Index: head/sys/dev/sfxge/sfxge_rx.c
===================================================================
--- head/sys/dev/sfxge/sfxge_rx.c
+++ head/sys/dev/sfxge/sfxge_rx.c
@@ -1139,8 +1139,8 @@
nitems(sc->rx_indir_table))) != 0)
goto fail;
(void)efx_rx_scale_mode_set(sc->enp, EFX_RX_HASHALG_TOEPLITZ,
- (1 << EFX_RX_HASH_IPV4) | (1 << EFX_RX_HASH_TCPIPV4) |
- (1 << EFX_RX_HASH_IPV6) | (1 << EFX_RX_HASH_TCPIPV6), B_TRUE);
+ EFX_RX_HASH_IPV4 | EFX_RX_HASH_TCPIPV4 |
+ EFX_RX_HASH_IPV6 | EFX_RX_HASH_TCPIPV6, B_TRUE);
#ifdef RSS
rss_getkey(toep_key);

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 12, 2:33 AM (2 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25189913
Default Alt Text
D8954.id23342.diff (2 KB)

Event Timeline