Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146386686
D12675.id33993.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12675.id33993.diff
View Options
Index: sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
===================================================================
--- sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
+++ sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
@@ -564,37 +564,31 @@
MLX4_CQE_STATUS_IPV6 |
MLX4_CQE_STATUS_TCP |
MLX4_CQE_STATUS_UDP);
- const __be16 status_ipv4_tcp = cpu_to_be16(
- MLX4_CQE_STATUS_IPV4 |
- MLX4_CQE_STATUS_TCP);
- const __be16 status_ipv6_tcp = cpu_to_be16(
- MLX4_CQE_STATUS_IPV6 |
- MLX4_CQE_STATUS_TCP);
- const __be16 status_ipv4_udp = cpu_to_be16(
- MLX4_CQE_STATUS_IPV4 |
- MLX4_CQE_STATUS_UDP);
- const __be16 status_ipv6_udp = cpu_to_be16(
- MLX4_CQE_STATUS_IPV6 |
- MLX4_CQE_STATUS_UDP);
- const __be16 status_ipv4 = cpu_to_be16(MLX4_CQE_STATUS_IPV4);
- const __be16 status_ipv6 = cpu_to_be16(MLX4_CQE_STATUS_IPV6);
status &= status_all;
switch (status) {
- case status_ipv4_tcp:
+ case cpu_to_be16(
+ MLX4_CQE_STATUS_IPV4 |
+ MLX4_CQE_STATUS_TCP):
return (M_HASHTYPE_RSS_TCP_IPV4);
- case status_ipv6_tcp:
+ case cpu_to_be16(
+ MLX4_CQE_STATUS_IPV6 |
+ MLX4_CQE_STATUS_TCP):
return (M_HASHTYPE_RSS_TCP_IPV6);
- case status_ipv4_udp:
+ case cpu_to_be16(
+ MLX4_CQE_STATUS_IPV4 |
+ MLX4_CQE_STATUS_UDP):
return (udp_rss ? M_HASHTYPE_RSS_UDP_IPV4
: M_HASHTYPE_RSS_IPV4);
- case status_ipv6_udp:
+ case cpu_to_be16(
+ MLX4_CQE_STATUS_IPV6 |
+ MLX4_CQE_STATUS_UDP):
return (udp_rss ? M_HASHTYPE_RSS_UDP_IPV6
: M_HASHTYPE_RSS_IPV6);
default:
- if (status & status_ipv4)
+ if (status & cpu_to_be16(MLX4_CQE_STATUS_IPV4))
return (M_HASHTYPE_RSS_IPV4);
- if (status & status_ipv6)
+ if (status & cpu_to_be16(MLX4_CQE_STATUS_IPV6))
return (M_HASHTYPE_RSS_IPV6);
return (M_HASHTYPE_OPAQUE_HASH);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 3, 7:11 AM (6 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29188339
Default Alt Text
D12675.id33993.diff (1 KB)
Attached To
Mode
D12675: mlx4: use enum constants instead of const vars for case exprs
Attached
Detach File
Event Timeline
Log In to Comment