Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110201403
D37862.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
D37862.diff
View Options
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
@@ -3664,10 +3664,10 @@
}
}
mask = drv_ioctl_data->reqcap2 ^ ifp->if_capenable2;
- if (mask & IFCAP2_RXTLS4)
- ifp->if_capenable2 ^= IFCAP2_RXTLS4;
- if (mask & IFCAP2_RXTLS6)
- ifp->if_capenable2 ^= IFCAP2_RXTLS6;
+ if ((mask & IFCAP2_BIT(IFCAP2_RXTLS4)) != 0)
+ ifp->if_capenable2 ^= IFCAP2_BIT(IFCAP2_RXTLS4);
+ if ((mask & IFCAP2_BIT(IFCAP2_RXTLS6)) != 0)
+ ifp->if_capenable2 ^= IFCAP2_BIT(IFCAP2_RXTLS6);
out:
PRIV_UNLOCK(priv);
break;
@@ -4550,7 +4550,8 @@
ifp->if_capabilities |= IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT;
#endif
ifp->if_capabilities |= IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO;
- ifp->if_capabilities2 |= IFCAP2_RXTLS4 | IFCAP2_RXTLS6;
+ ifp->if_capabilities2 |= IFCAP2_BIT(IFCAP2_RXTLS4) |
+ IFCAP2_BIT(IFCAP2_RXTLS6);
ifp->if_snd_tag_alloc = mlx5e_snd_tag_alloc;
#ifdef RATELIMIT
ifp->if_ratelimit_query = mlx5e_ratelimit_query;
diff --git a/sys/net/if.h b/sys/net/if.h
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -255,8 +255,10 @@
#define IFCAP_TXTLS_RTLMT 0x80000000 /* can do TLS with rate limiting */
/* IFCAP2_* are integers, not bits. */
-#define IFCAP2_RXTLS4 (0x00001ULL << 32)
-#define IFCAP2_RXTLS6 (0x00002ULL << 32)
+#define IFCAP2_RXTLS4 0
+#define IFCAP2_RXTLS6 1
+
+#define IFCAP2_BIT(x) (1UL << (x))
#define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6)
@@ -265,7 +267,6 @@
#define IFCAP_WOL (IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC)
#define IFCAP_TOE (IFCAP_TOE4 | IFCAP_TOE6)
#define IFCAP_TXTLS (IFCAP_TXTLS4 | IFCAP_TXTLS6)
-#define IFCAP2_RXTLS (IFCAP2_RXTLS4 | IFCAP2_RXTLS6)
#define IFCAP_CANTCHANGE (IFCAP_NETMAP | IFCAP_NV)
#define IFCAP_ALLCAPS 0xffffffff
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 16, 12:50 AM (13 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16667198
Default Alt Text
D37862.diff (1 KB)
Attached To
Mode
D37862: ifcapnv: fix IFCAP2 usage
Attached
Detach File
Event Timeline
Log In to Comment