diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -53,10 +53,8 @@ #include #include -#ifdef RSS #include #include -#endif #include diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2915,24 +2915,7 @@ static void mlx5e_get_rss_key(void *key_ptr) { -#ifdef RSS rss_getkey(key_ptr); -#else - static const u32 rsskey[] = { - cpu_to_be32(0xD181C62C), - cpu_to_be32(0xF7F4DB5B), - cpu_to_be32(0x1983A2FC), - cpu_to_be32(0x943E1ADB), - cpu_to_be32(0xD9389E6B), - cpu_to_be32(0xD1039C2C), - cpu_to_be32(0xA74499AD), - cpu_to_be32(0x593D56D9), - cpu_to_be32(0xF3253C06), - cpu_to_be32(0x2ADC1FFC), - }; - CTASSERT(sizeof(rsskey) == MLX5E_RSS_KEY_SIZE); - memcpy(key_ptr, rsskey, MLX5E_RSS_KEY_SIZE); -#endif } static void @@ -3044,15 +3027,12 @@ CTASSERT(MLX5_FLD_SZ_BYTES(tirc, rx_hash_toeplitz_key) >= MLX5E_RSS_KEY_SIZE); -#ifdef RSS + /* * The FreeBSD RSS implementation does currently not * support symmetric Toeplitz hashes: */ MLX5_SET(tirc, tirc, rx_hash_symmetric, 0); -#else - MLX5_SET(tirc, tirc, rx_hash_symmetric, 1); -#endif mlx5e_get_rss_key(hkey); switch (tt) { @@ -3061,12 +3041,10 @@ MLX5_L3_PROT_TYPE_IPV4); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_TCP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_TCP_IPV4)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3076,12 +3054,10 @@ MLX5_L3_PROT_TYPE_IPV6); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_TCP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_TCP_IPV6)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3091,12 +3067,10 @@ MLX5_L3_PROT_TYPE_IPV4); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_UDP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV4)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3106,12 +3080,10 @@ MLX5_L3_PROT_TYPE_IPV6); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_UDP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV6)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c @@ -358,7 +358,6 @@ /* check if a Toeplitz hash was computed */ if (cqe->rss_hash_type != 0) { mb->m_pkthdr.flowid = be32_to_cpu(cqe->rss_hash_result); -#ifdef RSS /* decode the RSS hash type */ switch (cqe->rss_hash_type & (CQE_RSS_DST_HTYPE_L4 | CQE_RSS_DST_HTYPE_IP)) { @@ -386,9 +385,6 @@ M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE_HASH); break; } -#else - M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE_HASH); -#endif #ifdef M_HASHTYPE_SETINNER if (cqe_is_tunneled(cqe)) M_HASHTYPE_SETINNER(mb);