Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147488731
D55055.id170992.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
D55055.id170992.diff
View Options
diff --git a/tools/tools/ifinfo/ifinfo.c b/tools/tools/ifinfo/ifinfo.c
--- a/tools/tools/ifinfo/ifinfo.c
+++ b/tools/tools/ifinfo/ifinfo.c
@@ -149,9 +149,18 @@
return retval;
}
+static const char *csum_bits[] = {"CSUM_IP", "CSUM_IP_UDP", "CSUM_IP_TCP",
+ "CSUM_IP_SCTP", "CSUM_IP_TSO", "CSUM_IP_ISCSI", "CSUM_INNER_IP6_UDP",
+ "CSUM_INNER_IP6_TCP", "CSUM_INNER_IP6_TSO", "CSUM_IP6_UDP", "CSUM_IP6_TCP",
+ "CSUM_IP6_SCTP", "CSUM_IP6_TSO", "CSUM_IP6_ISCSI", "CSUM_INNER_IP",
+ "CSUM_INNER_IP_UDP", "CSUM_INNER_IP_TCP", "CSUM_INNER_IP_TSO",
+ "CSUM_ENCAP_VXLAN", "CSUM_ENCAP_RSVD1"};
+
static void
printit(const struct ifmibdata *ifmd, const char *dname)
{
+ int i, first;
+
printf("Interface %.*s", IFNAMSIZ, ifmd->ifmd_name);
if (dname != NULL)
printf(" (%s)", dname);
@@ -182,8 +191,24 @@
printf("\tinput queue drops: %lu\n", ifmd->ifmd_data.ifi_iqdrops);
printf("\tpackets for unknown protocol: %lu\n",
ifmd->ifmd_data.ifi_noproto);
- printf("\tHW offload capabilities: 0x%lx\n",
+ printf("\tHW offload capabilities: 0x%lx",
ifmd->ifmd_data.ifi_hwassist);
+ first = 1;
+ for (i = 0; i < (int)(sizeof(csum_bits) / sizeof(char *)); i++) {
+ if ((ifmd->ifmd_data.ifi_hwassist & (1 << i)) != 0) {
+ if (first == 1) {
+ printf("<");
+ first = 0;
+ } else {
+ printf(",");
+ }
+ printf("%s", csum_bits[i]);
+ }
+ }
+ if (first == 0) {
+ printf(">");
+ }
+ printf("\n");
printf("\tuptime at attach or stat reset: %lu\n",
ifmd->ifmd_data.ifi_epoch);
#ifdef notdef
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 12, 9:31 AM (10 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28425565
Default Alt Text
D55055.id170992.diff (1 KB)
Attached To
Mode
D55055: ifinfo: Print names of CSUM bits
Attached
Detach File
Event Timeline
Log In to Comment