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); }