Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136585356
D8341.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
D8341.diff
View Options
Index: head/sys/dev/hyperv/netvsc/hv_net_vsc.h
===================================================================
--- head/sys/dev/hyperv/netvsc/hv_net_vsc.h
+++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h
@@ -275,6 +275,11 @@
#define HN_CAP_TSO6 0x0100
#define HN_CAP_HASHVAL 0x0200
+/* Capability description for use with printf(9) %b identifier. */
+#define HN_CAP_BITS \
+ "\020\1VLAN\2MTU\3IPCS\4TCP4CS\5TCP6CS" \
+ "\6UDP4CS\7UDP6CS\10TSO4\11TSO6\12HASHVAL"
+
#define HN_LINK_FLAG_LINKUP 0x0001
#define HN_LINK_FLAG_NETCHG 0x0002
Index: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
===================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -2379,18 +2379,7 @@
HN_LOCK(sc);
caps = sc->hn_caps;
HN_UNLOCK(sc);
- snprintf(caps_str, sizeof(caps_str), "%b", caps,
- "\020"
- "\001VLAN"
- "\002MTU"
- "\003IPCS"
- "\004TCP4CS"
- "\005TCP6CS"
- "\006UDP4CS"
- "\007UDP6CS"
- "\010TSO4"
- "\011TSO6"
- "\012HASHVAL");
+ snprintf(caps_str, sizeof(caps_str), "%b", caps, HN_CAP_BITS);
return sysctl_handle_string(oidp, caps_str, sizeof(caps_str), req);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 19, 11:24 AM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25625684
Default Alt Text
D8341.diff (1 KB)
Attached To
Mode
D8341: hyperv/hn: Move %b format string for capabilities near their definition.
Attached
Detach File
Event Timeline
Log In to Comment