Index: stable/11/usr.sbin/cxgbetool/Makefile =================================================================== --- stable/11/usr.sbin/cxgbetool/Makefile (revision 339392) +++ stable/11/usr.sbin/cxgbetool/Makefile (revision 339393) @@ -1,8 +1,13 @@ # $FreeBSD$ PROG= cxgbetool MAN= cxgbetool.8 +SRCS= cxgbetool.c +SRCS+= tcb_common.c +SRCS+= tcbinfot4.c tcbshowt4.c +SRCS+= tcbinfot5.c tcbshowt5.c +SRCS+= tcbinfot6.c tcbshowt6.c CFLAGS+= -I${SRCTOP}/sys/dev/cxgbe -I${SRCTOP}/sys -I. WARNS?= 2 .include Index: stable/11/usr.sbin/cxgbetool/cxgbetool.c =================================================================== --- stable/11/usr.sbin/cxgbetool/cxgbetool.c (revision 339392) +++ stable/11/usr.sbin/cxgbetool/cxgbetool.c (revision 339393) @@ -1,3016 +1,3022 @@ /*- * Copyright (c) 2011 Chelsio Communications, Inc. * All rights reserved. * Written by: Navdeep Parhar * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "t4_ioctl.h" +#include "tcb_common.h" #define in_range(val, lo, hi) ( val < 0 || (val <= hi && val >= lo)) #define max(x, y) ((x) > (y) ? (x) : (y)) static const char *progname, *nexus; static int chip_id; /* 4 for T4, 5 for T5 */ struct reg_info { const char *name; uint32_t addr; uint32_t len; }; struct mod_regs { const char *name; const struct reg_info *ri; }; struct field_desc { const char *name; /* Field name */ unsigned short start; /* Start bit position */ unsigned short end; /* End bit position */ unsigned char shift; /* # of low order bits omitted and implicitly 0 */ unsigned char hex; /* Print field in hex instead of decimal */ unsigned char islog2; /* Field contains the base-2 log of the value */ }; #include "reg_defs_t4.c" #include "reg_defs_t5.c" #include "reg_defs_t6.c" #include "reg_defs_t4vf.c" static void usage(FILE *fp) { fprintf(fp, "Usage: %s [operation]\n", progname); fprintf(fp, "\tclearstats clear port statistics\n" "\tcontext show an SGE context\n" "\tdumpstate dump chip state\n" "\tfilter [ ] ... set a filter\n" "\tfilter delete|clear delete a filter\n" "\tfilter list list all filters\n" "\tfilter mode [] ... get/set global filter mode\n" "\ti2c [] read from i2c device\n" "\tloadboot [pf|offset ] install boot image\n" "\tloadboot clear [pf|offset ] remove boot image\n" "\tloadboot-cfg install boot config\n" "\tloadboot-cfg clear remove boot config\n" "\tloadcfg install configuration file\n" "\tloadcfg clear remove configuration file\n" "\tloadfw install firmware\n" "\tmemdump dump a memory range\n" "\tmodinfo [raw] optics/cable information\n" "\treg
[=] read/write register\n" "\treg64
[=] read/write 64 bit register\n" "\tregdump [] ... dump registers\n" "\tsched-class params .. configure TX scheduler class\n" "\tsched-queue bind NIC queues to TX Scheduling class\n" "\tstdio interactive mode\n" "\ttcb read TCB\n" "\ttracer tx|rx set and enable a tracer\n" "\ttracer disable|enable disable or enable a tracer\n" "\ttracer list list all tracers\n" ); } static inline unsigned int get_card_vers(unsigned int version) { return (version & 0x3ff); } static int real_doit(unsigned long cmd, void *data, const char *cmdstr) { static int fd = -1; int rc = 0; if (fd == -1) { char buf[64]; snprintf(buf, sizeof(buf), "/dev/%s", nexus); if ((fd = open(buf, O_RDWR)) < 0) { warn("open(%s)", nexus); rc = errno; return (rc); } chip_id = nexus[1] - '0'; } rc = ioctl(fd, cmd, data); if (rc < 0) { warn("%s", cmdstr); rc = errno; } return (rc); } #define doit(x, y) real_doit(x, y, #x) static char * str_to_number(const char *s, long *val, long long *vall) { char *p; if (vall) *vall = strtoll(s, &p, 0); else if (val) *val = strtol(s, &p, 0); else p = NULL; return (p); } static int read_reg(long addr, int size, long long *val) { struct t4_reg reg; int rc; reg.addr = (uint32_t) addr; reg.size = (uint32_t) size; reg.val = 0; rc = doit(CHELSIO_T4_GETREG, ®); *val = reg.val; return (rc); } static int write_reg(long addr, int size, long long val) { struct t4_reg reg; reg.addr = (uint32_t) addr; reg.size = (uint32_t) size; reg.val = (uint64_t) val; return doit(CHELSIO_T4_SETREG, ®); } static int register_io(int argc, const char *argv[], int size) { char *p, *v; long addr; long long val; int w = 0, rc; if (argc == 1) { /* OR = */ p = str_to_number(argv[0], &addr, NULL); if (*p) { if (*p != '=') { warnx("invalid register \"%s\"", argv[0]); return (EINVAL); } w = 1; v = p + 1; p = str_to_number(v, NULL, &val); if (*p) { warnx("invalid value \"%s\"", v); return (EINVAL); } } } else if (argc == 2) { /* */ w = 1; p = str_to_number(argv[0], &addr, NULL); if (*p) { warnx("invalid register \"%s\"", argv[0]); return (EINVAL); } p = str_to_number(argv[1], NULL, &val); if (*p) { warnx("invalid value \"%s\"", argv[1]); return (EINVAL); } } else { warnx("reg: invalid number of arguments (%d)", argc); return (EINVAL); } if (w) rc = write_reg(addr, size, val); else { rc = read_reg(addr, size, &val); if (rc == 0) printf("0x%llx [%llu]\n", val, val); } return (rc); } static inline uint32_t xtract(uint32_t val, int shift, int len) { return (val >> shift) & ((1 << len) - 1); } static int dump_block_regs(const struct reg_info *reg_array, const uint32_t *regs) { uint32_t reg_val = 0; for ( ; reg_array->name; ++reg_array) if (!reg_array->len) { reg_val = regs[reg_array->addr / 4]; printf("[%#7x] %-47s %#-10x %u\n", reg_array->addr, reg_array->name, reg_val, reg_val); } else { uint32_t v = xtract(reg_val, reg_array->addr, reg_array->len); printf(" %*u:%u %-47s %#-10x %u\n", reg_array->addr < 10 ? 3 : 2, reg_array->addr + reg_array->len - 1, reg_array->addr, reg_array->name, v, v); } return (1); } static int dump_regs_table(int argc, const char *argv[], const uint32_t *regs, const struct mod_regs *modtab, int nmodules) { int i, j, match; for (i = 0; i < argc; i++) { for (j = 0; j < nmodules; j++) { if (!strcmp(argv[i], modtab[j].name)) break; } if (j == nmodules) { warnx("invalid register block \"%s\"", argv[i]); fprintf(stderr, "\nAvailable blocks:"); for ( ; nmodules; nmodules--, modtab++) fprintf(stderr, " %s", modtab->name); fprintf(stderr, "\n"); return (EINVAL); } } for ( ; nmodules; nmodules--, modtab++) { match = argc == 0 ? 1 : 0; for (i = 0; !match && i < argc; i++) { if (!strcmp(argv[i], modtab->name)) match = 1; } if (match) dump_block_regs(modtab->ri, regs); } return (0); } #define T4_MODREGS(name) { #name, t4_##name##_regs } static int dump_regs_t4(int argc, const char *argv[], const uint32_t *regs) { static struct mod_regs t4_mod[] = { T4_MODREGS(sge), { "pci", t4_pcie_regs }, T4_MODREGS(dbg), T4_MODREGS(mc), T4_MODREGS(ma), { "edc0", t4_edc_0_regs }, { "edc1", t4_edc_1_regs }, T4_MODREGS(cim), T4_MODREGS(tp), T4_MODREGS(ulp_rx), T4_MODREGS(ulp_tx), { "pmrx", t4_pm_rx_regs }, { "pmtx", t4_pm_tx_regs }, T4_MODREGS(mps), { "cplsw", t4_cpl_switch_regs }, T4_MODREGS(smb), { "i2c", t4_i2cm_regs }, T4_MODREGS(mi), T4_MODREGS(uart), T4_MODREGS(pmu), T4_MODREGS(sf), T4_MODREGS(pl), T4_MODREGS(le), T4_MODREGS(ncsi), T4_MODREGS(xgmac) }; return dump_regs_table(argc, argv, regs, t4_mod, nitems(t4_mod)); } #undef T4_MODREGS #define T5_MODREGS(name) { #name, t5_##name##_regs } static int dump_regs_t5(int argc, const char *argv[], const uint32_t *regs) { static struct mod_regs t5_mod[] = { T5_MODREGS(sge), { "pci", t5_pcie_regs }, T5_MODREGS(dbg), { "mc0", t5_mc_0_regs }, { "mc1", t5_mc_1_regs }, T5_MODREGS(ma), { "edc0", t5_edc_t50_regs }, { "edc1", t5_edc_t51_regs }, T5_MODREGS(cim), T5_MODREGS(tp), { "ulprx", t5_ulp_rx_regs }, { "ulptx", t5_ulp_tx_regs }, { "pmrx", t5_pm_rx_regs }, { "pmtx", t5_pm_tx_regs }, T5_MODREGS(mps), { "cplsw", t5_cpl_switch_regs }, T5_MODREGS(smb), { "i2c", t5_i2cm_regs }, T5_MODREGS(mi), T5_MODREGS(uart), T5_MODREGS(pmu), T5_MODREGS(sf), T5_MODREGS(pl), T5_MODREGS(le), T5_MODREGS(ncsi), T5_MODREGS(mac), { "hma", t5_hma_t5_regs } }; return dump_regs_table(argc, argv, regs, t5_mod, nitems(t5_mod)); } #undef T5_MODREGS #define T6_MODREGS(name) { #name, t6_##name##_regs } static int dump_regs_t6(int argc, const char *argv[], const uint32_t *regs) { static struct mod_regs t6_mod[] = { T6_MODREGS(sge), { "pci", t6_pcie_regs }, T6_MODREGS(dbg), { "mc0", t6_mc_0_regs }, T6_MODREGS(ma), { "edc0", t6_edc_t60_regs }, { "edc1", t6_edc_t61_regs }, T6_MODREGS(cim), T6_MODREGS(tp), { "ulprx", t6_ulp_rx_regs }, { "ulptx", t6_ulp_tx_regs }, { "pmrx", t6_pm_rx_regs }, { "pmtx", t6_pm_tx_regs }, T6_MODREGS(mps), { "cplsw", t6_cpl_switch_regs }, T6_MODREGS(smb), { "i2c", t6_i2cm_regs }, T6_MODREGS(mi), T6_MODREGS(uart), T6_MODREGS(pmu), T6_MODREGS(sf), T6_MODREGS(pl), T6_MODREGS(le), T6_MODREGS(ncsi), T6_MODREGS(mac), { "hma", t6_hma_t6_regs } }; return dump_regs_table(argc, argv, regs, t6_mod, nitems(t6_mod)); } #undef T6_MODREGS static int dump_regs_t4vf(int argc, const char *argv[], const uint32_t *regs) { static struct mod_regs t4vf_mod[] = { { "sge", t4vf_sge_regs }, { "mps", t4vf_mps_regs }, { "pl", t4vf_pl_regs }, { "mbdata", t4vf_mbdata_regs }, { "cim", t4vf_cim_regs }, }; return dump_regs_table(argc, argv, regs, t4vf_mod, nitems(t4vf_mod)); } static int dump_regs_t5vf(int argc, const char *argv[], const uint32_t *regs) { static struct mod_regs t5vf_mod[] = { { "sge", t5vf_sge_regs }, { "mps", t4vf_mps_regs }, { "pl", t5vf_pl_regs }, { "mbdata", t4vf_mbdata_regs }, { "cim", t4vf_cim_regs }, }; return dump_regs_table(argc, argv, regs, t5vf_mod, nitems(t5vf_mod)); } static int dump_regs_t6vf(int argc, const char *argv[], const uint32_t *regs) { static struct mod_regs t6vf_mod[] = { { "sge", t5vf_sge_regs }, { "mps", t4vf_mps_regs }, { "pl", t6vf_pl_regs }, { "mbdata", t4vf_mbdata_regs }, { "cim", t4vf_cim_regs }, }; return dump_regs_table(argc, argv, regs, t6vf_mod, nitems(t6vf_mod)); } static int dump_regs(int argc, const char *argv[]) { int vers, revision, rc; struct t4_regdump regs; uint32_t len; len = max(T4_REGDUMP_SIZE, T5_REGDUMP_SIZE); regs.data = calloc(1, len); if (regs.data == NULL) { warnc(ENOMEM, "regdump"); return (ENOMEM); } regs.len = len; rc = doit(CHELSIO_T4_REGDUMP, ®s); if (rc != 0) return (rc); vers = get_card_vers(regs.version); revision = (regs.version >> 10) & 0x3f; if (vers == 4) { if (revision == 0x3f) rc = dump_regs_t4vf(argc, argv, regs.data); else rc = dump_regs_t4(argc, argv, regs.data); } else if (vers == 5) { if (revision == 0x3f) rc = dump_regs_t5vf(argc, argv, regs.data); else rc = dump_regs_t5(argc, argv, regs.data); } else if (vers == 6) { if (revision == 0x3f) rc = dump_regs_t6vf(argc, argv, regs.data); else rc = dump_regs_t6(argc, argv, regs.data); } else { warnx("%s (type %d, rev %d) is not a known card.", nexus, vers, revision); return (ENOTSUP); } free(regs.data); return (rc); } static void do_show_info_header(uint32_t mode) { uint32_t i; printf("%4s %8s", "Idx", "Hits"); for (i = T4_FILTER_FCoE; i <= T4_FILTER_IP_FRAGMENT; i <<= 1) { switch (mode & i) { case T4_FILTER_FCoE: printf(" FCoE"); break; case T4_FILTER_PORT: printf(" Port"); break; case T4_FILTER_VNIC: if (mode & T4_FILTER_IC_VNIC) printf(" VFvld:PF:VF"); else printf(" vld:oVLAN"); break; case T4_FILTER_VLAN: printf(" vld:VLAN"); break; case T4_FILTER_IP_TOS: printf(" TOS"); break; case T4_FILTER_IP_PROTO: printf(" Prot"); break; case T4_FILTER_ETH_TYPE: printf(" EthType"); break; case T4_FILTER_MAC_IDX: printf(" MACIdx"); break; case T4_FILTER_MPS_HIT_TYPE: printf(" MPS"); break; case T4_FILTER_IP_FRAGMENT: printf(" Frag"); break; default: /* compressed filter field not enabled */ break; } } printf(" %20s %20s %9s %9s %s\n", "DIP", "SIP", "DPORT", "SPORT", "Action"); } /* * Parse an argument sub-vector as a { [:] } * ordered tuple. If the parameter name in the argument sub-vector does not * match the passed in parameter name, then a zero is returned for the * function and no parsing is performed. If there is a match, then the value * and optional mask are parsed and returned in the provided return value * pointers. If no optional mask is specified, then a default mask of all 1s * will be returned. * * An error in parsing the value[:mask] will result in an error message and * program termination. */ static int parse_val_mask(const char *param, const char *args[], uint32_t *val, uint32_t *mask) { char *p; if (strcmp(param, args[0]) != 0) return (EINVAL); *val = strtoul(args[1], &p, 0); if (p > args[1]) { if (p[0] == 0) { *mask = ~0; return (0); } if (p[0] == ':' && p[1] != 0) { *mask = strtoul(p+1, &p, 0); if (p[0] == 0) return (0); } } warnx("parameter \"%s\" has bad \"value[:mask]\" %s", args[0], args[1]); return (EINVAL); } /* * Parse an argument sub-vector as a { [/] } * ordered tuple. If the parameter name in the argument sub-vector does not * match the passed in parameter name, then a zero is returned for the * function and no parsing is performed. If there is a match, then the value * and optional mask are parsed and returned in the provided return value * pointers. If no optional mask is specified, then a default mask of all 1s * will be returned. * * The value return parameter "afp" is used to specify the expected address * family -- IPv4 or IPv6 -- of the address[/mask] and return its actual * format. A passed in value of AF_UNSPEC indicates that either IPv4 or IPv6 * is acceptable; AF_INET means that only IPv4 addresses are acceptable; and * AF_INET6 means that only IPv6 are acceptable. AF_INET is returned for IPv4 * and AF_INET6 for IPv6 addresses, respectively. IPv4 address/mask pairs are * returned in the first four bytes of the address and mask return values with * the address A.B.C.D returned with { A, B, C, D } returned in addresses { 0, * 1, 2, 3}, respectively. * * An error in parsing the value[:mask] will result in an error message and * program termination. */ static int parse_ipaddr(const char *param, const char *args[], int *afp, uint8_t addr[], uint8_t mask[]) { const char *colon, *afn; char *slash; uint8_t *m; int af, ret; unsigned int masksize; /* * Is this our parameter? */ if (strcmp(param, args[0]) != 0) return (EINVAL); /* * Fundamental IPv4 versus IPv6 selection. */ colon = strchr(args[1], ':'); if (!colon) { afn = "IPv4"; af = AF_INET; masksize = 32; } else { afn = "IPv6"; af = AF_INET6; masksize = 128; } if (*afp == AF_UNSPEC) *afp = af; else if (*afp != af) { warnx("address %s is not of expected family %s", args[1], *afp == AF_INET ? "IP" : "IPv6"); return (EINVAL); } /* * Parse address (temporarily stripping off any "/mask" * specification). */ slash = strchr(args[1], '/'); if (slash) *slash = 0; ret = inet_pton(af, args[1], addr); if (slash) *slash = '/'; if (ret <= 0) { warnx("Cannot parse %s %s address %s", param, afn, args[1]); return (EINVAL); } /* * Parse optional mask specification. */ if (slash) { char *p; unsigned int prefix = strtoul(slash + 1, &p, 10); if (p == slash + 1) { warnx("missing address prefix for %s", param); return (EINVAL); } if (*p) { warnx("%s is not a valid address prefix", slash + 1); return (EINVAL); } if (prefix > masksize) { warnx("prefix %u is too long for an %s address", prefix, afn); return (EINVAL); } memset(mask, 0, masksize / 8); masksize = prefix; } /* * Fill in mask. */ for (m = mask; masksize >= 8; m++, masksize -= 8) *m = ~0; if (masksize) *m = ~0 << (8 - masksize); return (0); } /* * Parse an argument sub-vector as a { } ordered * tuple. If the parameter name in the argument sub-vector does not match the * passed in parameter name, then a zero is returned for the function and no * parsing is performed. If there is a match, then the value is parsed and * returned in the provided return value pointer. */ static int parse_val(const char *param, const char *args[], uint32_t *val) { char *p; if (strcmp(param, args[0]) != 0) return (EINVAL); *val = strtoul(args[1], &p, 0); if (p > args[1] && p[0] == 0) return (0); warnx("parameter \"%s\" has bad \"value\" %s", args[0], args[1]); return (EINVAL); } static void filters_show_ipaddr(int type, uint8_t *addr, uint8_t *addrm) { int noctets, octet; printf(" "); if (type == 0) { noctets = 4; printf("%3s", " "); } else noctets = 16; for (octet = 0; octet < noctets; octet++) printf("%02x", addr[octet]); printf("/"); for (octet = 0; octet < noctets; octet++) printf("%02x", addrm[octet]); } static void do_show_one_filter_info(struct t4_filter *t, uint32_t mode) { uint32_t i; printf("%4d", t->idx); if (t->hits == UINT64_MAX) printf(" %8s", "-"); else printf(" %8ju", t->hits); /* * Compressed header portion of filter. */ for (i = T4_FILTER_FCoE; i <= T4_FILTER_IP_FRAGMENT; i <<= 1) { switch (mode & i) { case T4_FILTER_FCoE: printf(" %1d/%1d", t->fs.val.fcoe, t->fs.mask.fcoe); break; case T4_FILTER_PORT: printf(" %1d/%1d", t->fs.val.iport, t->fs.mask.iport); break; case T4_FILTER_VNIC: if (mode & T4_FILTER_IC_VNIC) { printf(" %1d:%1x:%02x/%1d:%1x:%02x", t->fs.val.pfvf_vld, (t->fs.val.vnic >> 13) & 0x7, t->fs.val.vnic & 0x1fff, t->fs.mask.pfvf_vld, (t->fs.mask.vnic >> 13) & 0x7, t->fs.mask.vnic & 0x1fff); } else { printf(" %1d:%04x/%1d:%04x", t->fs.val.ovlan_vld, t->fs.val.vnic, t->fs.mask.ovlan_vld, t->fs.mask.vnic); } break; case T4_FILTER_VLAN: printf(" %1d:%04x/%1d:%04x", t->fs.val.vlan_vld, t->fs.val.vlan, t->fs.mask.vlan_vld, t->fs.mask.vlan); break; case T4_FILTER_IP_TOS: printf(" %02x/%02x", t->fs.val.tos, t->fs.mask.tos); break; case T4_FILTER_IP_PROTO: printf(" %02x/%02x", t->fs.val.proto, t->fs.mask.proto); break; case T4_FILTER_ETH_TYPE: printf(" %04x/%04x", t->fs.val.ethtype, t->fs.mask.ethtype); break; case T4_FILTER_MAC_IDX: printf(" %03x/%03x", t->fs.val.macidx, t->fs.mask.macidx); break; case T4_FILTER_MPS_HIT_TYPE: printf(" %1x/%1x", t->fs.val.matchtype, t->fs.mask.matchtype); break; case T4_FILTER_IP_FRAGMENT: printf(" %1d/%1d", t->fs.val.frag, t->fs.mask.frag); break; default: /* compressed filter field not enabled */ break; } } /* * Fixed portion of filter. */ filters_show_ipaddr(t->fs.type, t->fs.val.dip, t->fs.mask.dip); filters_show_ipaddr(t->fs.type, t->fs.val.sip, t->fs.mask.sip); printf(" %04x/%04x %04x/%04x", t->fs.val.dport, t->fs.mask.dport, t->fs.val.sport, t->fs.mask.sport); /* * Variable length filter action. */ if (t->fs.action == FILTER_DROP) printf(" Drop"); else if (t->fs.action == FILTER_SWITCH) { printf(" Switch: port=%d", t->fs.eport); if (t->fs.newdmac) printf( ", dmac=%02x:%02x:%02x:%02x:%02x:%02x " ", l2tidx=%d", t->fs.dmac[0], t->fs.dmac[1], t->fs.dmac[2], t->fs.dmac[3], t->fs.dmac[4], t->fs.dmac[5], t->l2tidx); if (t->fs.newsmac) printf( ", smac=%02x:%02x:%02x:%02x:%02x:%02x " ", smtidx=%d", t->fs.smac[0], t->fs.smac[1], t->fs.smac[2], t->fs.smac[3], t->fs.smac[4], t->fs.smac[5], t->smtidx); if (t->fs.newvlan == VLAN_REMOVE) printf(", vlan=none"); else if (t->fs.newvlan == VLAN_INSERT) printf(", vlan=insert(%x)", t->fs.vlan); else if (t->fs.newvlan == VLAN_REWRITE) printf(", vlan=rewrite(%x)", t->fs.vlan); } else { printf(" Pass: Q="); if (t->fs.dirsteer == 0) { printf("RSS"); if (t->fs.maskhash) printf("(TCB=hash)"); } else { printf("%d", t->fs.iq); if (t->fs.dirsteerhash == 0) printf("(QID)"); else printf("(hash)"); } } if (t->fs.prio) printf(" Prio"); if (t->fs.rpttid) printf(" RptTID"); printf("\n"); } static int show_filters(void) { uint32_t mode = 0, header = 0; struct t4_filter t; int rc; /* Get the global filter mode first */ rc = doit(CHELSIO_T4_GET_FILTER_MODE, &mode); if (rc != 0) return (rc); t.idx = 0; for (t.idx = 0; ; t.idx++) { rc = doit(CHELSIO_T4_GET_FILTER, &t); if (rc != 0 || t.idx == 0xffffffff) break; if (!header) { do_show_info_header(mode); header = 1; } do_show_one_filter_info(&t, mode); }; return (rc); } static int get_filter_mode(void) { uint32_t mode = 0; int rc; rc = doit(CHELSIO_T4_GET_FILTER_MODE, &mode); if (rc != 0) return (rc); if (mode & T4_FILTER_IPv4) printf("ipv4 "); if (mode & T4_FILTER_IPv6) printf("ipv6 "); if (mode & T4_FILTER_IP_SADDR) printf("sip "); if (mode & T4_FILTER_IP_DADDR) printf("dip "); if (mode & T4_FILTER_IP_SPORT) printf("sport "); if (mode & T4_FILTER_IP_DPORT) printf("dport "); if (mode & T4_FILTER_IP_FRAGMENT) printf("frag "); if (mode & T4_FILTER_MPS_HIT_TYPE) printf("matchtype "); if (mode & T4_FILTER_MAC_IDX) printf("macidx "); if (mode & T4_FILTER_ETH_TYPE) printf("ethtype "); if (mode & T4_FILTER_IP_PROTO) printf("proto "); if (mode & T4_FILTER_IP_TOS) printf("tos "); if (mode & T4_FILTER_VLAN) printf("vlan "); if (mode & T4_FILTER_VNIC) { if (mode & T4_FILTER_IC_VNIC) printf("vnic_id "); else printf("ovlan "); } if (mode & T4_FILTER_PORT) printf("iport "); if (mode & T4_FILTER_FCoE) printf("fcoe "); printf("\n"); return (0); } static int set_filter_mode(int argc, const char *argv[]) { uint32_t mode = 0; int vnic = 0, ovlan = 0; for (; argc; argc--, argv++) { if (!strcmp(argv[0], "frag")) mode |= T4_FILTER_IP_FRAGMENT; if (!strcmp(argv[0], "matchtype")) mode |= T4_FILTER_MPS_HIT_TYPE; if (!strcmp(argv[0], "macidx")) mode |= T4_FILTER_MAC_IDX; if (!strcmp(argv[0], "ethtype")) mode |= T4_FILTER_ETH_TYPE; if (!strcmp(argv[0], "proto")) mode |= T4_FILTER_IP_PROTO; if (!strcmp(argv[0], "tos")) mode |= T4_FILTER_IP_TOS; if (!strcmp(argv[0], "vlan")) mode |= T4_FILTER_VLAN; if (!strcmp(argv[0], "ovlan")) { mode |= T4_FILTER_VNIC; ovlan++; } if (!strcmp(argv[0], "vnic_id")) { mode |= T4_FILTER_VNIC; mode |= T4_FILTER_IC_VNIC; vnic++; } if (!strcmp(argv[0], "iport")) mode |= T4_FILTER_PORT; if (!strcmp(argv[0], "fcoe")) mode |= T4_FILTER_FCoE; } if (vnic > 0 && ovlan > 0) { warnx("\"vnic_id\" and \"ovlan\" are mutually exclusive."); return (EINVAL); } return doit(CHELSIO_T4_SET_FILTER_MODE, &mode); } static int del_filter(uint32_t idx) { struct t4_filter t; t.idx = idx; return doit(CHELSIO_T4_DEL_FILTER, &t); } static int set_filter(uint32_t idx, int argc, const char *argv[]) { int af = AF_UNSPEC, start_arg = 0; struct t4_filter t; if (argc < 2) { warnc(EINVAL, "%s", __func__); return (EINVAL); }; bzero(&t, sizeof (t)); t.idx = idx; t.fs.hitcnts = 1; for (start_arg = 0; start_arg + 2 <= argc; start_arg += 2) { const char **args = &argv[start_arg]; uint32_t val, mask; if (!strcmp(argv[start_arg], "type")) { int newaf; if (!strcasecmp(argv[start_arg + 1], "ipv4")) newaf = AF_INET; else if (!strcasecmp(argv[start_arg + 1], "ipv6")) newaf = AF_INET6; else { warnx("invalid type \"%s\"; " "must be one of \"ipv4\" or \"ipv6\"", argv[start_arg + 1]); return (EINVAL); } if (af != AF_UNSPEC && af != newaf) { warnx("conflicting IPv4/IPv6 specifications."); return (EINVAL); } af = newaf; } else if (!parse_val_mask("fcoe", args, &val, &mask)) { t.fs.val.fcoe = val; t.fs.mask.fcoe = mask; } else if (!parse_val_mask("iport", args, &val, &mask)) { t.fs.val.iport = val; t.fs.mask.iport = mask; } else if (!parse_val_mask("ovlan", args, &val, &mask)) { t.fs.val.vnic = val; t.fs.mask.vnic = mask; t.fs.val.ovlan_vld = 1; t.fs.mask.ovlan_vld = 1; } else if (!parse_val_mask("ivlan", args, &val, &mask)) { t.fs.val.vlan = val; t.fs.mask.vlan = mask; t.fs.val.vlan_vld = 1; t.fs.mask.vlan_vld = 1; } else if (!parse_val_mask("pf", args, &val, &mask)) { t.fs.val.vnic &= 0x1fff; t.fs.val.vnic |= (val & 0x7) << 13; t.fs.mask.vnic &= 0x1fff; t.fs.mask.vnic |= (mask & 0x7) << 13; t.fs.val.pfvf_vld = 1; t.fs.mask.pfvf_vld = 1; } else if (!parse_val_mask("vf", args, &val, &mask)) { t.fs.val.vnic &= 0xe000; t.fs.val.vnic |= val & 0x1fff; t.fs.mask.vnic &= 0xe000; t.fs.mask.vnic |= mask & 0x1fff; t.fs.val.pfvf_vld = 1; t.fs.mask.pfvf_vld = 1; } else if (!parse_val_mask("tos", args, &val, &mask)) { t.fs.val.tos = val; t.fs.mask.tos = mask; } else if (!parse_val_mask("proto", args, &val, &mask)) { t.fs.val.proto = val; t.fs.mask.proto = mask; } else if (!parse_val_mask("ethtype", args, &val, &mask)) { t.fs.val.ethtype = val; t.fs.mask.ethtype = mask; } else if (!parse_val_mask("macidx", args, &val, &mask)) { t.fs.val.macidx = val; t.fs.mask.macidx = mask; } else if (!parse_val_mask("matchtype", args, &val, &mask)) { t.fs.val.matchtype = val; t.fs.mask.matchtype = mask; } else if (!parse_val_mask("frag", args, &val, &mask)) { t.fs.val.frag = val; t.fs.mask.frag = mask; } else if (!parse_val_mask("dport", args, &val, &mask)) { t.fs.val.dport = val; t.fs.mask.dport = mask; } else if (!parse_val_mask("sport", args, &val, &mask)) { t.fs.val.sport = val; t.fs.mask.sport = mask; } else if (!parse_ipaddr("dip", args, &af, t.fs.val.dip, t.fs.mask.dip)) { /* nada */; } else if (!parse_ipaddr("sip", args, &af, t.fs.val.sip, t.fs.mask.sip)) { /* nada */; } else if (!strcmp(argv[start_arg], "action")) { if (!strcmp(argv[start_arg + 1], "pass")) t.fs.action = FILTER_PASS; else if (!strcmp(argv[start_arg + 1], "drop")) t.fs.action = FILTER_DROP; else if (!strcmp(argv[start_arg + 1], "switch")) t.fs.action = FILTER_SWITCH; else { warnx("invalid action \"%s\"; must be one of" " \"pass\", \"drop\" or \"switch\"", argv[start_arg + 1]); return (EINVAL); } } else if (!parse_val("hitcnts", args, &val)) { t.fs.hitcnts = val; } else if (!parse_val("prio", args, &val)) { t.fs.prio = val; } else if (!parse_val("rpttid", args, &val)) { t.fs.rpttid = 1; } else if (!parse_val("queue", args, &val)) { t.fs.dirsteer = 1; t.fs.iq = val; } else if (!parse_val("tcbhash", args, &val)) { t.fs.maskhash = 1; t.fs.dirsteerhash = 1; } else if (!parse_val("eport", args, &val)) { t.fs.eport = val; } else if (!strcmp(argv[start_arg], "dmac")) { struct ether_addr *daddr; daddr = ether_aton(argv[start_arg + 1]); if (daddr == NULL) { warnx("invalid dmac address \"%s\"", argv[start_arg + 1]); return (EINVAL); } memcpy(t.fs.dmac, daddr, ETHER_ADDR_LEN); t.fs.newdmac = 1; } else if (!strcmp(argv[start_arg], "smac")) { struct ether_addr *saddr; saddr = ether_aton(argv[start_arg + 1]); if (saddr == NULL) { warnx("invalid smac address \"%s\"", argv[start_arg + 1]); return (EINVAL); } memcpy(t.fs.smac, saddr, ETHER_ADDR_LEN); t.fs.newsmac = 1; } else if (!strcmp(argv[start_arg], "vlan")) { char *p; if (!strcmp(argv[start_arg + 1], "none")) { t.fs.newvlan = VLAN_REMOVE; } else if (argv[start_arg + 1][0] == '=') { t.fs.newvlan = VLAN_REWRITE; } else if (argv[start_arg + 1][0] == '+') { t.fs.newvlan = VLAN_INSERT; } else if (isdigit(argv[start_arg + 1][0]) && !parse_val_mask("vlan", args, &val, &mask)) { t.fs.val.vlan = val; t.fs.mask.vlan = mask; t.fs.val.vlan_vld = 1; t.fs.mask.vlan_vld = 1; } else { warnx("unknown vlan parameter \"%s\"; must" " be one of \"none\", \"=\", " " \"+\", or \"\"", argv[start_arg + 1]); return (EINVAL); } if (t.fs.newvlan == VLAN_REWRITE || t.fs.newvlan == VLAN_INSERT) { t.fs.vlan = strtoul(argv[start_arg + 1] + 1, &p, 0); if (p == argv[start_arg + 1] + 1 || p[0] != 0) { warnx("invalid vlan \"%s\"", argv[start_arg + 1]); return (EINVAL); } } } else { warnx("invalid parameter \"%s\"", argv[start_arg]); return (EINVAL); } } if (start_arg != argc) { warnx("no value for \"%s\"", argv[start_arg]); return (EINVAL); } /* * Check basic sanity of option combinations. */ if (t.fs.action != FILTER_SWITCH && (t.fs.eport || t.fs.newdmac || t.fs.newsmac || t.fs.newvlan)) { warnx("prio, port dmac, smac and vlan only make sense with" " \"action switch\""); return (EINVAL); } if (t.fs.action != FILTER_PASS && (t.fs.rpttid || t.fs.dirsteer || t.fs.maskhash)) { warnx("rpttid, queue and tcbhash don't make sense with" " action \"drop\" or \"switch\""); return (EINVAL); } if (t.fs.val.ovlan_vld && t.fs.val.pfvf_vld) { warnx("ovlan and vnic_id (pf/vf) are mutually exclusive"); return (EINVAL); } t.fs.type = (af == AF_INET6 ? 1 : 0); /* default IPv4 */ return doit(CHELSIO_T4_SET_FILTER, &t); } static int filter_cmd(int argc, const char *argv[]) { long long val; uint32_t idx; char *s; if (argc == 0) { warnx("filter: no arguments."); return (EINVAL); }; /* list */ if (strcmp(argv[0], "list") == 0) { if (argc != 1) warnx("trailing arguments after \"list\" ignored."); return show_filters(); } /* mode */ if (argc == 1 && strcmp(argv[0], "mode") == 0) return get_filter_mode(); /* mode */ if (strcmp(argv[0], "mode") == 0) return set_filter_mode(argc - 1, argv + 1); /* ... */ s = str_to_number(argv[0], NULL, &val); if (*s || val > 0xffffffffU) { warnx("\"%s\" is neither an index nor a filter subcommand.", argv[0]); return (EINVAL); } idx = (uint32_t) val; /* delete|clear */ if (argc == 2 && (strcmp(argv[1], "delete") == 0 || strcmp(argv[1], "clear") == 0)) { return del_filter(idx); } /* [ ] ... */ return set_filter(idx, argc - 1, argv + 1); } /* * Shows the fields of a multi-word structure. The structure is considered to * consist of @nwords 32-bit words (i.e, it's an (@nwords * 32)-bit structure) * whose fields are described by @fd. The 32-bit words are given in @words * starting with the least significant 32-bit word. */ static void show_struct(const uint32_t *words, int nwords, const struct field_desc *fd) { unsigned int w = 0; const struct field_desc *p; for (p = fd; p->name; p++) w = max(w, strlen(p->name)); while (fd->name) { unsigned long long data; int first_word = fd->start / 32; int shift = fd->start % 32; int width = fd->end - fd->start + 1; unsigned long long mask = (1ULL << width) - 1; data = (words[first_word] >> shift) | ((uint64_t)words[first_word + 1] << (32 - shift)); if (shift) data |= ((uint64_t)words[first_word + 2] << (64 - shift)); data &= mask; if (fd->islog2) data = 1 << data; printf("%-*s ", w, fd->name); printf(fd->hex ? "%#llx\n" : "%llu\n", data << fd->shift); fd++; } } #define FIELD(name, start, end) { name, start, end, 0, 0, 0 } #define FIELD1(name, start) FIELD(name, start, start) static void show_t5t6_ctxt(const struct t4_sge_context *p, int vers) { static struct field_desc egress_t5[] = { FIELD("DCA_ST:", 181, 191), FIELD1("StatusPgNS:", 180), FIELD1("StatusPgRO:", 179), FIELD1("FetchNS:", 178), FIELD1("FetchRO:", 177), FIELD1("Valid:", 176), FIELD("PCIeDataChannel:", 174, 175), FIELD1("StatusPgTPHintEn:", 173), FIELD("StatusPgTPHint:", 171, 172), FIELD1("FetchTPHintEn:", 170), FIELD("FetchTPHint:", 168, 169), FIELD1("FCThreshOverride:", 167), { "WRLength:", 162, 166, 9, 0, 1 }, FIELD1("WRLengthKnown:", 161), FIELD1("ReschedulePending:", 160), FIELD1("OnChipQueue:", 159), FIELD1("FetchSizeMode:", 158), { "FetchBurstMin:", 156, 157, 4, 0, 1 }, FIELD1("FLMPacking:", 155), FIELD("FetchBurstMax:", 153, 154), FIELD("uPToken:", 133, 152), FIELD1("uPTokenEn:", 132), FIELD1("UserModeIO:", 131), FIELD("uPFLCredits:", 123, 130), FIELD1("uPFLCreditEn:", 122), FIELD("FID:", 111, 121), FIELD("HostFCMode:", 109, 110), FIELD1("HostFCOwner:", 108), { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, FIELD("CIDX:", 89, 104), FIELD("PIDX:", 73, 88), { "BaseAddress:", 18, 72, 9, 1 }, FIELD("QueueSize:", 2, 17), FIELD1("QueueType:", 1), FIELD1("CachePriority:", 0), { NULL } }; static struct field_desc egress_t6[] = { FIELD("DCA_ST:", 181, 191), FIELD1("StatusPgNS:", 180), FIELD1("StatusPgRO:", 179), FIELD1("FetchNS:", 178), FIELD1("FetchRO:", 177), FIELD1("Valid:", 176), FIELD1("ReschedulePending_1:", 175), FIELD1("PCIeDataChannel:", 174), FIELD1("StatusPgTPHintEn:", 173), FIELD("StatusPgTPHint:", 171, 172), FIELD1("FetchTPHintEn:", 170), FIELD("FetchTPHint:", 168, 169), FIELD1("FCThreshOverride:", 167), { "WRLength:", 162, 166, 9, 0, 1 }, FIELD1("WRLengthKnown:", 161), FIELD1("ReschedulePending:", 160), FIELD("TimerIx:", 157, 159), FIELD1("FetchBurstMin:", 156), FIELD1("FLMPacking:", 155), FIELD("FetchBurstMax:", 153, 154), FIELD("uPToken:", 133, 152), FIELD1("uPTokenEn:", 132), FIELD1("UserModeIO:", 131), FIELD("uPFLCredits:", 123, 130), FIELD1("uPFLCreditEn:", 122), FIELD("FID:", 111, 121), FIELD("HostFCMode:", 109, 110), FIELD1("HostFCOwner:", 108), { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, FIELD("CIDX:", 89, 104), FIELD("PIDX:", 73, 88), { "BaseAddress:", 18, 72, 9, 1 }, FIELD("QueueSize:", 2, 17), FIELD1("QueueType:", 1), FIELD1("FetchSizeMode:", 0), { NULL } }; static struct field_desc fl_t5[] = { FIELD("DCA_ST:", 181, 191), FIELD1("StatusPgNS:", 180), FIELD1("StatusPgRO:", 179), FIELD1("FetchNS:", 178), FIELD1("FetchRO:", 177), FIELD1("Valid:", 176), FIELD("PCIeDataChannel:", 174, 175), FIELD1("StatusPgTPHintEn:", 173), FIELD("StatusPgTPHint:", 171, 172), FIELD1("FetchTPHintEn:", 170), FIELD("FetchTPHint:", 168, 169), FIELD1("FCThreshOverride:", 167), FIELD1("ReschedulePending:", 160), FIELD1("OnChipQueue:", 159), FIELD1("FetchSizeMode:", 158), { "FetchBurstMin:", 156, 157, 4, 0, 1 }, FIELD1("FLMPacking:", 155), FIELD("FetchBurstMax:", 153, 154), FIELD1("FLMcongMode:", 152), FIELD("MaxuPFLCredits:", 144, 151), FIELD("FLMcontextID:", 133, 143), FIELD1("uPTokenEn:", 132), FIELD1("UserModeIO:", 131), FIELD("uPFLCredits:", 123, 130), FIELD1("uPFLCreditEn:", 122), FIELD("FID:", 111, 121), FIELD("HostFCMode:", 109, 110), FIELD1("HostFCOwner:", 108), { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, FIELD("CIDX:", 89, 104), FIELD("PIDX:", 73, 88), { "BaseAddress:", 18, 72, 9, 1 }, FIELD("QueueSize:", 2, 17), FIELD1("QueueType:", 1), FIELD1("CachePriority:", 0), { NULL } }; static struct field_desc ingress_t5[] = { FIELD("DCA_ST:", 143, 153), FIELD1("ISCSICoalescing:", 142), FIELD1("Queue_Valid:", 141), FIELD1("TimerPending:", 140), FIELD1("DropRSS:", 139), FIELD("PCIeChannel:", 137, 138), FIELD1("SEInterruptArmed:", 136), FIELD1("CongestionMgtEnable:", 135), FIELD1("NoSnoop:", 134), FIELD1("RelaxedOrdering:", 133), FIELD1("GTSmode:", 132), FIELD1("TPHintEn:", 131), FIELD("TPHint:", 129, 130), FIELD1("UpdateScheduling:", 128), FIELD("UpdateDelivery:", 126, 127), FIELD1("InterruptSent:", 125), FIELD("InterruptIDX:", 114, 124), FIELD1("InterruptDestination:", 113), FIELD1("InterruptArmed:", 112), FIELD("RxIntCounter:", 106, 111), FIELD("RxIntCounterThreshold:", 104, 105), FIELD1("Generation:", 103), { "BaseAddress:", 48, 102, 9, 1 }, FIELD("PIDX:", 32, 47), FIELD("CIDX:", 16, 31), { "QueueSize:", 4, 15, 4, 0 }, { "QueueEntrySize:", 2, 3, 4, 0, 1 }, FIELD1("QueueEntryOverride:", 1), FIELD1("CachePriority:", 0), { NULL } }; static struct field_desc ingress_t6[] = { FIELD1("SP_NS:", 158), FIELD1("SP_RO:", 157), FIELD1("SP_TPHintEn:", 156), FIELD("SP_TPHint:", 154, 155), FIELD("DCA_ST:", 143, 153), FIELD1("ISCSICoalescing:", 142), FIELD1("Queue_Valid:", 141), FIELD1("TimerPending:", 140), FIELD1("DropRSS:", 139), FIELD("PCIeChannel:", 137, 138), FIELD1("SEInterruptArmed:", 136), FIELD1("CongestionMgtEnable:", 135), FIELD1("NoSnoop:", 134), FIELD1("RelaxedOrdering:", 133), FIELD1("GTSmode:", 132), FIELD1("TPHintEn:", 131), FIELD("TPHint:", 129, 130), FIELD1("UpdateScheduling:", 128), FIELD("UpdateDelivery:", 126, 127), FIELD1("InterruptSent:", 125), FIELD("InterruptIDX:", 114, 124), FIELD1("InterruptDestination:", 113), FIELD1("InterruptArmed:", 112), FIELD("RxIntCounter:", 106, 111), FIELD("RxIntCounterThreshold:", 104, 105), FIELD1("Generation:", 103), { "BaseAddress:", 48, 102, 9, 1 }, FIELD("PIDX:", 32, 47), FIELD("CIDX:", 16, 31), { "QueueSize:", 4, 15, 4, 0 }, { "QueueEntrySize:", 2, 3, 4, 0, 1 }, FIELD1("QueueEntryOverride:", 1), FIELD1("CachePriority:", 0), { NULL } }; static struct field_desc flm_t5[] = { FIELD1("Valid:", 89), FIELD("SplitLenMode:", 87, 88), FIELD1("TPHintEn:", 86), FIELD("TPHint:", 84, 85), FIELD1("NoSnoop:", 83), FIELD1("RelaxedOrdering:", 82), FIELD("DCA_ST:", 71, 81), FIELD("EQid:", 54, 70), FIELD("SplitEn:", 52, 53), FIELD1("PadEn:", 51), FIELD1("PackEn:", 50), FIELD1("Cache_Lock :", 49), FIELD1("CongDrop:", 48), FIELD("PackOffset:", 16, 47), FIELD("CIDX:", 8, 15), FIELD("PIDX:", 0, 7), { NULL } }; static struct field_desc flm_t6[] = { FIELD1("Valid:", 89), FIELD("SplitLenMode:", 87, 88), FIELD1("TPHintEn:", 86), FIELD("TPHint:", 84, 85), FIELD1("NoSnoop:", 83), FIELD1("RelaxedOrdering:", 82), FIELD("DCA_ST:", 71, 81), FIELD("EQid:", 54, 70), FIELD("SplitEn:", 52, 53), FIELD1("PadEn:", 51), FIELD1("PackEn:", 50), FIELD1("Cache_Lock :", 49), FIELD1("CongDrop:", 48), FIELD1("Inflight:", 47), FIELD1("CongEn:", 46), FIELD1("CongMode:", 45), FIELD("PackOffset:", 20, 39), FIELD("CIDX:", 8, 15), FIELD("PIDX:", 0, 7), { NULL } }; static struct field_desc conm_t5[] = { FIELD1("CngMPSEnable:", 21), FIELD("CngTPMode:", 19, 20), FIELD1("CngDBPHdr:", 18), FIELD1("CngDBPData:", 17), FIELD1("CngIMSG:", 16), { "CngChMap:", 0, 15, 0, 1, 0 }, { NULL } }; if (p->mem_id == SGE_CONTEXT_EGRESS) { if (p->data[0] & 2) show_struct(p->data, 6, fl_t5); else if (vers == 5) show_struct(p->data, 6, egress_t5); else show_struct(p->data, 6, egress_t6); } else if (p->mem_id == SGE_CONTEXT_FLM) show_struct(p->data, 3, vers == 5 ? flm_t5 : flm_t6); else if (p->mem_id == SGE_CONTEXT_INGRESS) show_struct(p->data, 5, vers == 5 ? ingress_t5 : ingress_t6); else if (p->mem_id == SGE_CONTEXT_CNM) show_struct(p->data, 1, conm_t5); } static void show_t4_ctxt(const struct t4_sge_context *p) { static struct field_desc egress_t4[] = { FIELD1("StatusPgNS:", 180), FIELD1("StatusPgRO:", 179), FIELD1("FetchNS:", 178), FIELD1("FetchRO:", 177), FIELD1("Valid:", 176), FIELD("PCIeDataChannel:", 174, 175), FIELD1("DCAEgrQEn:", 173), FIELD("DCACPUID:", 168, 172), FIELD1("FCThreshOverride:", 167), FIELD("WRLength:", 162, 166), FIELD1("WRLengthKnown:", 161), FIELD1("ReschedulePending:", 160), FIELD1("OnChipQueue:", 159), FIELD1("FetchSizeMode", 158), { "FetchBurstMin:", 156, 157, 4, 0, 1 }, { "FetchBurstMax:", 153, 154, 6, 0, 1 }, FIELD("uPToken:", 133, 152), FIELD1("uPTokenEn:", 132), FIELD1("UserModeIO:", 131), FIELD("uPFLCredits:", 123, 130), FIELD1("uPFLCreditEn:", 122), FIELD("FID:", 111, 121), FIELD("HostFCMode:", 109, 110), FIELD1("HostFCOwner:", 108), { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, FIELD("CIDX:", 89, 104), FIELD("PIDX:", 73, 88), { "BaseAddress:", 18, 72, 9, 1 }, FIELD("QueueSize:", 2, 17), FIELD1("QueueType:", 1), FIELD1("CachePriority:", 0), { NULL } }; static struct field_desc fl_t4[] = { FIELD1("StatusPgNS:", 180), FIELD1("StatusPgRO:", 179), FIELD1("FetchNS:", 178), FIELD1("FetchRO:", 177), FIELD1("Valid:", 176), FIELD("PCIeDataChannel:", 174, 175), FIELD1("DCAEgrQEn:", 173), FIELD("DCACPUID:", 168, 172), FIELD1("FCThreshOverride:", 167), FIELD1("ReschedulePending:", 160), FIELD1("OnChipQueue:", 159), FIELD1("FetchSizeMode", 158), { "FetchBurstMin:", 156, 157, 4, 0, 1 }, { "FetchBurstMax:", 153, 154, 6, 0, 1 }, FIELD1("FLMcongMode:", 152), FIELD("MaxuPFLCredits:", 144, 151), FIELD("FLMcontextID:", 133, 143), FIELD1("uPTokenEn:", 132), FIELD1("UserModeIO:", 131), FIELD("uPFLCredits:", 123, 130), FIELD1("uPFLCreditEn:", 122), FIELD("FID:", 111, 121), FIELD("HostFCMode:", 109, 110), FIELD1("HostFCOwner:", 108), { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, FIELD("CIDX:", 89, 104), FIELD("PIDX:", 73, 88), { "BaseAddress:", 18, 72, 9, 1 }, FIELD("QueueSize:", 2, 17), FIELD1("QueueType:", 1), FIELD1("CachePriority:", 0), { NULL } }; static struct field_desc ingress_t4[] = { FIELD1("NoSnoop:", 145), FIELD1("RelaxedOrdering:", 144), FIELD1("GTSmode:", 143), FIELD1("ISCSICoalescing:", 142), FIELD1("Valid:", 141), FIELD1("TimerPending:", 140), FIELD1("DropRSS:", 139), FIELD("PCIeChannel:", 137, 138), FIELD1("SEInterruptArmed:", 136), FIELD1("CongestionMgtEnable:", 135), FIELD1("DCAIngQEnable:", 134), FIELD("DCACPUID:", 129, 133), FIELD1("UpdateScheduling:", 128), FIELD("UpdateDelivery:", 126, 127), FIELD1("InterruptSent:", 125), FIELD("InterruptIDX:", 114, 124), FIELD1("InterruptDestination:", 113), FIELD1("InterruptArmed:", 112), FIELD("RxIntCounter:", 106, 111), FIELD("RxIntCounterThreshold:", 104, 105), FIELD1("Generation:", 103), { "BaseAddress:", 48, 102, 9, 1 }, FIELD("PIDX:", 32, 47), FIELD("CIDX:", 16, 31), { "QueueSize:", 4, 15, 4, 0 }, { "QueueEntrySize:", 2, 3, 4, 0, 1 }, FIELD1("QueueEntryOverride:", 1), FIELD1("CachePriority:", 0), { NULL } }; static struct field_desc flm_t4[] = { FIELD1("NoSnoop:", 79), FIELD1("RelaxedOrdering:", 78), FIELD1("Valid:", 77), FIELD("DCACPUID:", 72, 76), FIELD1("DCAFLEn:", 71), FIELD("EQid:", 54, 70), FIELD("SplitEn:", 52, 53), FIELD1("PadEn:", 51), FIELD1("PackEn:", 50), FIELD1("DBpriority:", 48), FIELD("PackOffset:", 16, 47), FIELD("CIDX:", 8, 15), FIELD("PIDX:", 0, 7), { NULL } }; static struct field_desc conm_t4[] = { FIELD1("CngDBPHdr:", 6), FIELD1("CngDBPData:", 5), FIELD1("CngIMSG:", 4), { "CngChMap:", 0, 3, 0, 1, 0}, { NULL } }; if (p->mem_id == SGE_CONTEXT_EGRESS) show_struct(p->data, 6, (p->data[0] & 2) ? fl_t4 : egress_t4); else if (p->mem_id == SGE_CONTEXT_FLM) show_struct(p->data, 3, flm_t4); else if (p->mem_id == SGE_CONTEXT_INGRESS) show_struct(p->data, 5, ingress_t4); else if (p->mem_id == SGE_CONTEXT_CNM) show_struct(p->data, 1, conm_t4); } #undef FIELD #undef FIELD1 static int get_sge_context(int argc, const char *argv[]) { int rc; char *p; long cid; struct t4_sge_context cntxt = {0}; if (argc != 2) { warnx("sge_context: incorrect number of arguments."); return (EINVAL); } if (!strcmp(argv[0], "egress")) cntxt.mem_id = SGE_CONTEXT_EGRESS; else if (!strcmp(argv[0], "ingress")) cntxt.mem_id = SGE_CONTEXT_INGRESS; else if (!strcmp(argv[0], "fl")) cntxt.mem_id = SGE_CONTEXT_FLM; else if (!strcmp(argv[0], "cong")) cntxt.mem_id = SGE_CONTEXT_CNM; else { warnx("unknown context type \"%s\"; known types are egress, " "ingress, fl, and cong.", argv[0]); return (EINVAL); } p = str_to_number(argv[1], &cid, NULL); if (*p) { warnx("invalid context id \"%s\"", argv[1]); return (EINVAL); } cntxt.cid = cid; rc = doit(CHELSIO_T4_GET_SGE_CONTEXT, &cntxt); if (rc != 0) return (rc); if (chip_id == 4) show_t4_ctxt(&cntxt); else show_t5t6_ctxt(&cntxt, chip_id); return (0); } static int loadfw(int argc, const char *argv[]) { int rc, fd; struct t4_data data = {0}; const char *fname = argv[0]; struct stat st = {0}; if (argc != 1) { warnx("loadfw: incorrect number of arguments."); return (EINVAL); } fd = open(fname, O_RDONLY); if (fd < 0) { warn("open(%s)", fname); return (errno); } if (fstat(fd, &st) < 0) { warn("fstat"); close(fd); return (errno); } data.len = st.st_size; data.data = mmap(0, data.len, PROT_READ, MAP_PRIVATE, fd, 0); if (data.data == MAP_FAILED) { warn("mmap"); close(fd); return (errno); } rc = doit(CHELSIO_T4_LOAD_FW, &data); munmap(data.data, data.len); close(fd); return (rc); } static int loadcfg(int argc, const char *argv[]) { int rc, fd; struct t4_data data = {0}; const char *fname = argv[0]; struct stat st = {0}; if (argc != 1) { warnx("loadcfg: incorrect number of arguments."); return (EINVAL); } if (strcmp(fname, "clear") == 0) return (doit(CHELSIO_T4_LOAD_CFG, &data)); fd = open(fname, O_RDONLY); if (fd < 0) { warn("open(%s)", fname); return (errno); } if (fstat(fd, &st) < 0) { warn("fstat"); close(fd); return (errno); } data.len = st.st_size; data.len &= ~3; /* Clip off to make it a multiple of 4 */ data.data = mmap(0, data.len, PROT_READ, MAP_PRIVATE, fd, 0); if (data.data == MAP_FAILED) { warn("mmap"); close(fd); return (errno); } rc = doit(CHELSIO_T4_LOAD_CFG, &data); munmap(data.data, data.len); close(fd); return (rc); } static int dumpstate(int argc, const char *argv[]) { int rc, fd; struct t4_cudbg_dump dump = {0}; const char *fname = argv[0]; if (argc != 1) { warnx("dumpstate: incorrect number of arguments."); return (EINVAL); } dump.wr_flash = 0; memset(&dump.bitmap, 0xff, sizeof(dump.bitmap)); dump.len = 8 * 1024 * 1024; dump.data = malloc(dump.len); if (dump.data == NULL) { return (ENOMEM); } rc = doit(CHELSIO_T4_CUDBG_DUMP, &dump); if (rc != 0) goto done; fd = open(fname, O_CREAT | O_TRUNC | O_EXCL | O_WRONLY, S_IRUSR | S_IRGRP | S_IROTH); if (fd < 0) { warn("open(%s)", fname); rc = errno; goto done; } write(fd, dump.data, dump.len); close(fd); done: free(dump.data); return (rc); } static int read_mem(uint32_t addr, uint32_t len, void (*output)(uint32_t *, uint32_t)) { int rc; struct t4_mem_range mr; mr.addr = addr; mr.len = len; mr.data = malloc(mr.len); if (mr.data == 0) { warn("read_mem: malloc"); return (errno); } rc = doit(CHELSIO_T4_GET_MEM, &mr); if (rc != 0) goto done; if (output) (*output)(mr.data, mr.len); done: free(mr.data); return (rc); } static int loadboot(int argc, const char *argv[]) { int rc, fd; long l; char *p; struct t4_bootrom br = {0}; const char *fname = argv[0]; struct stat st = {0}; if (argc == 1) { br.pf_offset = 0; br.pfidx_addr = 0; } else if (argc == 3) { if (!strcmp(argv[1], "pf")) br.pf_offset = 0; else if (!strcmp(argv[1], "offset")) br.pf_offset = 1; else return (EINVAL); p = str_to_number(argv[2], &l, NULL); if (*p) return (EINVAL); br.pfidx_addr = l; } else { warnx("loadboot: incorrect number of arguments."); return (EINVAL); } if (strcmp(fname, "clear") == 0) return (doit(CHELSIO_T4_LOAD_BOOT, &br)); fd = open(fname, O_RDONLY); if (fd < 0) { warn("open(%s)", fname); return (errno); } if (fstat(fd, &st) < 0) { warn("fstat"); close(fd); return (errno); } br.len = st.st_size; br.data = mmap(0, br.len, PROT_READ, MAP_PRIVATE, fd, 0); if (br.data == MAP_FAILED) { warn("mmap"); close(fd); return (errno); } rc = doit(CHELSIO_T4_LOAD_BOOT, &br); munmap(br.data, br.len); close(fd); return (rc); } static int loadbootcfg(int argc, const char *argv[]) { int rc, fd; struct t4_data bc = {0}; const char *fname = argv[0]; struct stat st = {0}; if (argc != 1) { warnx("loadbootcfg: incorrect number of arguments."); return (EINVAL); } if (strcmp(fname, "clear") == 0) return (doit(CHELSIO_T4_LOAD_BOOTCFG, &bc)); fd = open(fname, O_RDONLY); if (fd < 0) { warn("open(%s)", fname); return (errno); } if (fstat(fd, &st) < 0) { warn("fstat"); close(fd); return (errno); } bc.len = st.st_size; bc.data = mmap(0, bc.len, PROT_READ, MAP_PRIVATE, fd, 0); if (bc.data == MAP_FAILED) { warn("mmap"); close(fd); return (errno); } rc = doit(CHELSIO_T4_LOAD_BOOTCFG, &bc); munmap(bc.data, bc.len); close(fd); return (rc); } /* * Display memory as list of 'n' 4-byte values per line. */ static void show_mem(uint32_t *buf, uint32_t len) { const char *s; int i, n = 8; while (len) { for (i = 0; len && i < n; i++, buf++, len -= 4) { s = i ? " " : ""; printf("%s%08x", s, htonl(*buf)); } printf("\n"); } } static int memdump(int argc, const char *argv[]) { char *p; long l; uint32_t addr, len; if (argc != 2) { warnx("incorrect number of arguments."); return (EINVAL); } p = str_to_number(argv[0], &l, NULL); if (*p) { warnx("invalid address \"%s\"", argv[0]); return (EINVAL); } addr = l; p = str_to_number(argv[1], &l, NULL); if (*p) { warnx("memdump: invalid length \"%s\"", argv[1]); return (EINVAL); } len = l; return (read_mem(addr, len, show_mem)); } /* * Display TCB as list of 'n' 4-byte values per line. */ static void show_tcb(uint32_t *buf, uint32_t len) { + unsigned char *tcb = (unsigned char *)buf; const char *s; int i, n = 8; while (len) { for (i = 0; len && i < n; i++, buf++, len -= 4) { s = i ? " " : ""; printf("%s%08x", s, htonl(*buf)); } printf("\n"); } + set_tcb_info(TIDTYPE_TCB, chip_id); + set_print_style(PRNTSTYL_COMP); + swizzle_tcb(tcb); + parse_n_display_xcb(tcb); } #define A_TP_CMM_TCB_BASE 0x7d10 #define TCB_SIZE 128 static int read_tcb(int argc, const char *argv[]) { char *p; long l; long long val; unsigned int tid; uint32_t addr; int rc; if (argc != 1) { warnx("incorrect number of arguments."); return (EINVAL); } p = str_to_number(argv[0], &l, NULL); if (*p) { warnx("invalid tid \"%s\"", argv[0]); return (EINVAL); } tid = l; rc = read_reg(A_TP_CMM_TCB_BASE, 4, &val); if (rc != 0) return (rc); addr = val + tid * TCB_SIZE; return (read_mem(addr, TCB_SIZE, show_tcb)); } static int read_i2c(int argc, const char *argv[]) { char *p; long l; struct t4_i2c_data i2cd; int rc, i; if (argc < 3 || argc > 4) { warnx("incorrect number of arguments."); return (EINVAL); } p = str_to_number(argv[0], &l, NULL); if (*p || l > UCHAR_MAX) { warnx("invalid port id \"%s\"", argv[0]); return (EINVAL); } i2cd.port_id = l; p = str_to_number(argv[1], &l, NULL); if (*p || l > UCHAR_MAX) { warnx("invalid i2c device address \"%s\"", argv[1]); return (EINVAL); } i2cd.dev_addr = l; p = str_to_number(argv[2], &l, NULL); if (*p || l > UCHAR_MAX) { warnx("invalid byte offset \"%s\"", argv[2]); return (EINVAL); } i2cd.offset = l; if (argc == 4) { p = str_to_number(argv[3], &l, NULL); if (*p || l > sizeof(i2cd.data)) { warnx("invalid number of bytes \"%s\"", argv[3]); return (EINVAL); } i2cd.len = l; } else i2cd.len = 1; rc = doit(CHELSIO_T4_GET_I2C, &i2cd); if (rc != 0) return (rc); for (i = 0; i < i2cd.len; i++) printf("0x%x [%u]\n", i2cd.data[i], i2cd.data[i]); return (0); } static int clearstats(int argc, const char *argv[]) { char *p; long l; uint32_t port; if (argc != 1) { warnx("incorrect number of arguments."); return (EINVAL); } p = str_to_number(argv[0], &l, NULL); if (*p) { warnx("invalid port id \"%s\"", argv[0]); return (EINVAL); } port = l; return doit(CHELSIO_T4_CLEAR_STATS, &port); } static int show_tracers(void) { struct t4_tracer t; char *s; int rc, port_idx, i; long long val; /* Magic values: MPS_TRC_CFG = 0x9800. MPS_TRC_CFG[1:1] = TrcEn */ rc = read_reg(0x9800, 4, &val); if (rc != 0) return (rc); printf("tracing is %s\n", val & 2 ? "ENABLED" : "DISABLED"); t.idx = 0; for (t.idx = 0; ; t.idx++) { rc = doit(CHELSIO_T4_GET_TRACER, &t); if (rc != 0 || t.idx == 0xff) break; if (t.tp.port < 4) { s = "Rx"; port_idx = t.tp.port; } else if (t.tp.port < 8) { s = "Tx"; port_idx = t.tp.port - 4; } else if (t.tp.port < 12) { s = "loopback"; port_idx = t.tp.port - 8; } else if (t.tp.port < 16) { s = "MPS Rx"; port_idx = t.tp.port - 12; } else if (t.tp.port < 20) { s = "MPS Tx"; port_idx = t.tp.port - 16; } else { s = "unknown"; port_idx = t.tp.port; } printf("\ntracer %u (currently %s) captures ", t.idx, t.enabled ? "ENABLED" : "DISABLED"); if (t.tp.port < 8) printf("port %u %s, ", port_idx, s); else printf("%s %u, ", s, port_idx); printf("snap length: %u, min length: %u\n", t.tp.snap_len, t.tp.min_len); printf("packets captured %smatch filter\n", t.tp.invert ? "do not " : ""); if (t.tp.skip_ofst) { printf("filter pattern: "); for (i = 0; i < t.tp.skip_ofst * 2; i += 2) printf("%08x%08x", t.tp.data[i], t.tp.data[i + 1]); printf("/"); for (i = 0; i < t.tp.skip_ofst * 2; i += 2) printf("%08x%08x", t.tp.mask[i], t.tp.mask[i + 1]); printf("@0\n"); } printf("filter pattern: "); for (i = t.tp.skip_ofst * 2; i < T4_TRACE_LEN / 4; i += 2) printf("%08x%08x", t.tp.data[i], t.tp.data[i + 1]); printf("/"); for (i = t.tp.skip_ofst * 2; i < T4_TRACE_LEN / 4; i += 2) printf("%08x%08x", t.tp.mask[i], t.tp.mask[i + 1]); printf("@%u\n", (t.tp.skip_ofst + t.tp.skip_len) * 8); } return (rc); } static int tracer_onoff(uint8_t idx, int enabled) { struct t4_tracer t; t.idx = idx; t.enabled = enabled; t.valid = 0; return doit(CHELSIO_T4_SET_TRACER, &t); } static void create_tracing_ifnet() { char *cmd[] = { "/sbin/ifconfig", __DECONST(char *, nexus), "create", NULL }; char *env[] = {NULL}; if (vfork() == 0) { close(STDERR_FILENO); execve(cmd[0], cmd, env); _exit(0); } } /* * XXX: Allow user to specify snaplen, minlen, and pattern (including inverted * matching). Right now this is a quick-n-dirty implementation that traces the * first 128B of all tx or rx on a port */ static int set_tracer(uint8_t idx, int argc, const char *argv[]) { struct t4_tracer t; int len, port; bzero(&t, sizeof (t)); t.idx = idx; t.enabled = 1; t.valid = 1; if (argc != 1) { warnx("must specify tx or rx."); return (EINVAL); } len = strlen(argv[0]); if (len != 3) { warnx("argument must be 3 characters (tx or rx)"); return (EINVAL); } if (strncmp(argv[0], "tx", 2) == 0) { port = argv[0][2] - '0'; if (port < 0 || port > 3) { warnx("'%c' in %s is invalid", argv[0][2], argv[0]); return (EINVAL); } port += 4; } else if (strncmp(argv[0], "rx", 2) == 0) { port = argv[0][2] - '0'; if (port < 0 || port > 3) { warnx("'%c' in %s is invalid", argv[0][2], argv[0]); return (EINVAL); } } else { warnx("argument '%s' isn't tx or rx", argv[0]); return (EINVAL); } t.tp.snap_len = 128; t.tp.min_len = 0; t.tp.skip_ofst = 0; t.tp.skip_len = 0; t.tp.invert = 0; t.tp.port = port; create_tracing_ifnet(); return doit(CHELSIO_T4_SET_TRACER, &t); } static int tracer_cmd(int argc, const char *argv[]) { long long val; uint8_t idx; char *s; if (argc == 0) { warnx("tracer: no arguments."); return (EINVAL); }; /* list */ if (strcmp(argv[0], "list") == 0) { if (argc != 1) warnx("trailing arguments after \"list\" ignored."); return show_tracers(); } /* ... */ s = str_to_number(argv[0], NULL, &val); if (*s || val > 0xff) { warnx("\"%s\" is neither an index nor a tracer subcommand.", argv[0]); return (EINVAL); } idx = (int8_t)val; /* disable */ if (argc == 2 && strcmp(argv[1], "disable") == 0) return tracer_onoff(idx, 0); /* enable */ if (argc == 2 && strcmp(argv[1], "enable") == 0) return tracer_onoff(idx, 1); /* ... */ return set_tracer(idx, argc - 1, argv + 1); } static int modinfo_raw(int port_id) { uint8_t offset; struct t4_i2c_data i2cd; int rc; for (offset = 0; offset < 96; offset += sizeof(i2cd.data)) { bzero(&i2cd, sizeof(i2cd)); i2cd.port_id = port_id; i2cd.dev_addr = 0xa0; i2cd.offset = offset; i2cd.len = sizeof(i2cd.data); rc = doit(CHELSIO_T4_GET_I2C, &i2cd); if (rc != 0) return (rc); printf("%02x: %02x %02x %02x %02x %02x %02x %02x %02x", offset, i2cd.data[0], i2cd.data[1], i2cd.data[2], i2cd.data[3], i2cd.data[4], i2cd.data[5], i2cd.data[6], i2cd.data[7]); printf(" %c%c%c%c %c%c%c%c\n", isprint(i2cd.data[0]) ? i2cd.data[0] : '.', isprint(i2cd.data[1]) ? i2cd.data[1] : '.', isprint(i2cd.data[2]) ? i2cd.data[2] : '.', isprint(i2cd.data[3]) ? i2cd.data[3] : '.', isprint(i2cd.data[4]) ? i2cd.data[4] : '.', isprint(i2cd.data[5]) ? i2cd.data[5] : '.', isprint(i2cd.data[6]) ? i2cd.data[6] : '.', isprint(i2cd.data[7]) ? i2cd.data[7] : '.'); } return (0); } static int modinfo(int argc, const char *argv[]) { long port; char string[16], *p; struct t4_i2c_data i2cd; int rc, i; uint16_t temp, vcc, tx_bias, tx_power, rx_power; if (argc < 1) { warnx("must supply a port"); return (EINVAL); } if (argc > 2) { warnx("too many arguments"); return (EINVAL); } p = str_to_number(argv[0], &port, NULL); if (*p || port > UCHAR_MAX) { warnx("invalid port id \"%s\"", argv[0]); return (EINVAL); } if (argc == 2) { if (!strcmp(argv[1], "raw")) return (modinfo_raw(port)); else { warnx("second argument can only be \"raw\""); return (EINVAL); } } bzero(&i2cd, sizeof(i2cd)); i2cd.len = 1; i2cd.port_id = port; i2cd.dev_addr = SFF_8472_BASE; i2cd.offset = SFF_8472_ID; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; if (i2cd.data[0] > SFF_8472_ID_LAST) printf("Unknown ID\n"); else printf("ID: %s\n", sff_8472_id[i2cd.data[0]]); bzero(&string, sizeof(string)); for (i = SFF_8472_VENDOR_START; i < SFF_8472_VENDOR_END; i++) { i2cd.offset = i; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; string[i - SFF_8472_VENDOR_START] = i2cd.data[0]; } printf("Vendor %s\n", string); bzero(&string, sizeof(string)); for (i = SFF_8472_SN_START; i < SFF_8472_SN_END; i++) { i2cd.offset = i; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; string[i - SFF_8472_SN_START] = i2cd.data[0]; } printf("SN %s\n", string); bzero(&string, sizeof(string)); for (i = SFF_8472_PN_START; i < SFF_8472_PN_END; i++) { i2cd.offset = i; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; string[i - SFF_8472_PN_START] = i2cd.data[0]; } printf("PN %s\n", string); bzero(&string, sizeof(string)); for (i = SFF_8472_REV_START; i < SFF_8472_REV_END; i++) { i2cd.offset = i; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; string[i - SFF_8472_REV_START] = i2cd.data[0]; } printf("Rev %s\n", string); i2cd.offset = SFF_8472_DIAG_TYPE; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; if ((char )i2cd.data[0] & (SFF_8472_DIAG_IMPL | SFF_8472_DIAG_INTERNAL)) { /* Switch to reading from the Diagnostic address. */ i2cd.dev_addr = SFF_8472_DIAG; i2cd.len = 1; i2cd.offset = SFF_8472_TEMP; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; temp = i2cd.data[0] << 8; printf("Temp: "); if ((temp & SFF_8472_TEMP_SIGN) == SFF_8472_TEMP_SIGN) printf("-"); else printf("+"); printf("%dC\n", (temp & SFF_8472_TEMP_MSK) >> SFF_8472_TEMP_SHIFT); i2cd.offset = SFF_8472_VCC; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; vcc = i2cd.data[0] << 8; printf("Vcc %fV\n", vcc / SFF_8472_VCC_FACTOR); i2cd.offset = SFF_8472_TX_BIAS; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; tx_bias = i2cd.data[0] << 8; printf("TX Bias %fuA\n", tx_bias / SFF_8472_BIAS_FACTOR); i2cd.offset = SFF_8472_TX_POWER; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; tx_power = i2cd.data[0] << 8; printf("TX Power %fmW\n", tx_power / SFF_8472_POWER_FACTOR); i2cd.offset = SFF_8472_RX_POWER; if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) goto fail; rx_power = i2cd.data[0] << 8; printf("RX Power %fmW\n", rx_power / SFF_8472_POWER_FACTOR); } else printf("Diagnostics not supported.\n"); return(0); fail: if (rc == EPERM) warnx("No module/cable in port %ld", port); return (rc); } /* XXX: pass in a low/high and do range checks as well */ static int get_sched_param(const char *param, const char *args[], long *val) { char *p; if (strcmp(param, args[0]) != 0) return (EINVAL); p = str_to_number(args[1], val, NULL); if (*p) { warnx("parameter \"%s\" has bad value \"%s\"", args[0], args[1]); return (EINVAL); } return (0); } static int sched_class(int argc, const char *argv[]) { struct t4_sched_params op; int errs, i; memset(&op, 0xff, sizeof(op)); op.subcmd = -1; op.type = -1; if (argc == 0) { warnx("missing scheduling sub-command"); return (EINVAL); } if (!strcmp(argv[0], "config")) { op.subcmd = SCHED_CLASS_SUBCMD_CONFIG; op.u.config.minmax = -1; } else if (!strcmp(argv[0], "params")) { op.subcmd = SCHED_CLASS_SUBCMD_PARAMS; op.u.params.level = op.u.params.mode = op.u.params.rateunit = op.u.params.ratemode = op.u.params.channel = op.u.params.cl = op.u.params.minrate = op.u.params.maxrate = op.u.params.weight = op.u.params.pktsize = -1; } else { warnx("invalid scheduling sub-command \"%s\"", argv[0]); return (EINVAL); } /* Decode remaining arguments ... */ errs = 0; for (i = 1; i < argc; i += 2) { const char **args = &argv[i]; long l; if (i + 1 == argc) { warnx("missing argument for \"%s\"", args[0]); errs++; break; } if (!strcmp(args[0], "type")) { if (!strcmp(args[1], "packet")) op.type = SCHED_CLASS_TYPE_PACKET; else { warnx("invalid type parameter \"%s\"", args[1]); errs++; } continue; } if (op.subcmd == SCHED_CLASS_SUBCMD_CONFIG) { if(!get_sched_param("minmax", args, &l)) op.u.config.minmax = (int8_t)l; else { warnx("unknown scheduler config parameter " "\"%s\"", args[0]); errs++; } continue; } /* Rest applies only to SUBCMD_PARAMS */ if (op.subcmd != SCHED_CLASS_SUBCMD_PARAMS) continue; if (!strcmp(args[0], "level")) { if (!strcmp(args[1], "cl-rl")) op.u.params.level = SCHED_CLASS_LEVEL_CL_RL; else if (!strcmp(args[1], "cl-wrr")) op.u.params.level = SCHED_CLASS_LEVEL_CL_WRR; else if (!strcmp(args[1], "ch-rl")) op.u.params.level = SCHED_CLASS_LEVEL_CH_RL; else { warnx("invalid level parameter \"%s\"", args[1]); errs++; } } else if (!strcmp(args[0], "mode")) { if (!strcmp(args[1], "class")) op.u.params.mode = SCHED_CLASS_MODE_CLASS; else if (!strcmp(args[1], "flow")) op.u.params.mode = SCHED_CLASS_MODE_FLOW; else { warnx("invalid mode parameter \"%s\"", args[1]); errs++; } } else if (!strcmp(args[0], "rate-unit")) { if (!strcmp(args[1], "bits")) op.u.params.rateunit = SCHED_CLASS_RATEUNIT_BITS; else if (!strcmp(args[1], "pkts")) op.u.params.rateunit = SCHED_CLASS_RATEUNIT_PKTS; else { warnx("invalid rate-unit parameter \"%s\"", args[1]); errs++; } } else if (!strcmp(args[0], "rate-mode")) { if (!strcmp(args[1], "relative")) op.u.params.ratemode = SCHED_CLASS_RATEMODE_REL; else if (!strcmp(args[1], "absolute")) op.u.params.ratemode = SCHED_CLASS_RATEMODE_ABS; else { warnx("invalid rate-mode parameter \"%s\"", args[1]); errs++; } } else if (!get_sched_param("channel", args, &l)) op.u.params.channel = (int8_t)l; else if (!get_sched_param("class", args, &l)) op.u.params.cl = (int8_t)l; else if (!get_sched_param("min-rate", args, &l)) op.u.params.minrate = (int32_t)l; else if (!get_sched_param("max-rate", args, &l)) op.u.params.maxrate = (int32_t)l; else if (!get_sched_param("weight", args, &l)) op.u.params.weight = (int16_t)l; else if (!get_sched_param("pkt-size", args, &l)) op.u.params.pktsize = (int16_t)l; else { warnx("unknown scheduler parameter \"%s\"", args[0]); errs++; } } /* * Catch some logical fallacies in terms of argument combinations here * so we can offer more than just the EINVAL return from the driver. * The driver will be able to catch a lot more issues since it knows * the specifics of the device hardware capabilities like how many * channels, classes, etc. the device supports. */ if (op.type < 0) { warnx("sched \"type\" parameter missing"); errs++; } if (op.subcmd == SCHED_CLASS_SUBCMD_CONFIG) { if (op.u.config.minmax < 0) { warnx("sched config \"minmax\" parameter missing"); errs++; } } if (op.subcmd == SCHED_CLASS_SUBCMD_PARAMS) { if (op.u.params.level < 0) { warnx("sched params \"level\" parameter missing"); errs++; } if (op.u.params.mode < 0) { warnx("sched params \"mode\" parameter missing"); errs++; } if (op.u.params.rateunit < 0) { warnx("sched params \"rate-unit\" parameter missing"); errs++; } if (op.u.params.ratemode < 0) { warnx("sched params \"rate-mode\" parameter missing"); errs++; } if (op.u.params.channel < 0) { warnx("sched params \"channel\" missing"); errs++; } if (op.u.params.cl < 0) { warnx("sched params \"class\" missing"); errs++; } if (op.u.params.maxrate < 0 && (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { warnx("sched params \"max-rate\" missing for " "rate-limit level"); errs++; } if (op.u.params.weight < 0 && op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR) { warnx("sched params \"weight\" missing for " "weighted-round-robin level"); errs++; } if (op.u.params.pktsize < 0 && (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { warnx("sched params \"pkt-size\" missing for " "rate-limit level"); errs++; } if (op.u.params.mode == SCHED_CLASS_MODE_FLOW && op.u.params.ratemode != SCHED_CLASS_RATEMODE_ABS) { warnx("sched params mode flow needs rate-mode absolute"); errs++; } if (op.u.params.ratemode == SCHED_CLASS_RATEMODE_REL && !in_range(op.u.params.maxrate, 1, 100)) { warnx("sched params \"max-rate\" takes " "percentage value(1-100) for rate-mode relative"); errs++; } if (op.u.params.ratemode == SCHED_CLASS_RATEMODE_ABS && !in_range(op.u.params.maxrate, 1, 100000000)) { warnx("sched params \"max-rate\" takes " "value(1-100000000) for rate-mode absolute"); errs++; } if (op.u.params.maxrate > 0 && op.u.params.maxrate < op.u.params.minrate) { warnx("sched params \"max-rate\" is less than " "\"min-rate\""); errs++; } } if (errs > 0) { warnx("%d error%s in sched-class command", errs, errs == 1 ? "" : "s"); return (EINVAL); } return doit(CHELSIO_T4_SCHED_CLASS, &op); } static int sched_queue(int argc, const char *argv[]) { struct t4_sched_queue op = {0}; char *p; long val; if (argc != 3) { /* need " */ warnx("incorrect number of arguments."); return (EINVAL); } p = str_to_number(argv[0], &val, NULL); if (*p || val > UCHAR_MAX) { warnx("invalid port id \"%s\"", argv[0]); return (EINVAL); } op.port = (uint8_t)val; if (!strcmp(argv[1], "all") || !strcmp(argv[1], "*")) op.queue = -1; else { p = str_to_number(argv[1], &val, NULL); if (*p || val < -1) { warnx("invalid queue \"%s\"", argv[1]); return (EINVAL); } op.queue = (int8_t)val; } if (!strcmp(argv[2], "unbind") || !strcmp(argv[2], "clear")) op.cl = -1; else { p = str_to_number(argv[2], &val, NULL); if (*p || val < -1) { warnx("invalid class \"%s\"", argv[2]); return (EINVAL); } op.cl = (int8_t)val; } return doit(CHELSIO_T4_SCHED_QUEUE, &op); } static int run_cmd(int argc, const char *argv[]) { int rc = -1; const char *cmd = argv[0]; /* command */ argc--; argv++; if (!strcmp(cmd, "reg") || !strcmp(cmd, "reg32")) rc = register_io(argc, argv, 4); else if (!strcmp(cmd, "reg64")) rc = register_io(argc, argv, 8); else if (!strcmp(cmd, "regdump")) rc = dump_regs(argc, argv); else if (!strcmp(cmd, "filter")) rc = filter_cmd(argc, argv); else if (!strcmp(cmd, "context")) rc = get_sge_context(argc, argv); else if (!strcmp(cmd, "loadfw")) rc = loadfw(argc, argv); else if (!strcmp(cmd, "memdump")) rc = memdump(argc, argv); else if (!strcmp(cmd, "tcb")) rc = read_tcb(argc, argv); else if (!strcmp(cmd, "i2c")) rc = read_i2c(argc, argv); else if (!strcmp(cmd, "clearstats")) rc = clearstats(argc, argv); else if (!strcmp(cmd, "tracer")) rc = tracer_cmd(argc, argv); else if (!strcmp(cmd, "modinfo")) rc = modinfo(argc, argv); else if (!strcmp(cmd, "sched-class")) rc = sched_class(argc, argv); else if (!strcmp(cmd, "sched-queue")) rc = sched_queue(argc, argv); else if (!strcmp(cmd, "loadcfg")) rc = loadcfg(argc, argv); else if (!strcmp(cmd, "loadboot")) rc = loadboot(argc, argv); else if (!strcmp(cmd, "loadboot-cfg")) rc = loadbootcfg(argc, argv); else if (!strcmp(cmd, "dumpstate")) rc = dumpstate(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); } return (rc); } #define MAX_ARGS 15 static int run_cmd_loop(void) { int i, rc = 0; char buffer[128], *buf; const char *args[MAX_ARGS + 1]; /* * Simple loop: displays a "> " prompt and processes any input as a * cxgbetool command. You're supposed to enter only the part after * "cxgbetool t4nexX". Use "quit" or "exit" to exit. */ for (;;) { fprintf(stdout, "> "); fflush(stdout); buf = fgets(buffer, sizeof(buffer), stdin); if (buf == NULL) { if (ferror(stdin)) { warn("stdin error"); rc = errno; /* errno from fgets */ } break; } i = 0; while ((args[i] = strsep(&buf, " \t\n")) != NULL) { if (args[i][0] != 0 && ++i == MAX_ARGS) break; } args[i] = 0; if (i == 0) continue; /* skip empty line */ if (!strcmp(args[0], "quit") || !strcmp(args[0], "exit")) break; rc = run_cmd(i, args); } /* rc normally comes from the last command (not including quit/exit) */ return (rc); } int main(int argc, const char *argv[]) { int rc = -1; progname = argv[0]; if (argc == 2) { if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")) { usage(stdout); exit(0); } } if (argc < 3) { usage(stderr); exit(EINVAL); } nexus = argv[1]; /* progname and nexus */ argc -= 2; argv += 2; if (argc == 1 && !strcmp(argv[0], "stdio")) rc = run_cmd_loop(); else rc = run_cmd(argc, argv); return (rc); } Index: stable/11/usr.sbin/cxgbetool/reg_defs_t5.c =================================================================== --- stable/11/usr.sbin/cxgbetool/reg_defs_t5.c (revision 339392) +++ stable/11/usr.sbin/cxgbetool/reg_defs_t5.c (revision 339393) Property changes on: stable/11/usr.sbin/cxgbetool/reg_defs_t5.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.sbin/cxgbetool/reg_defs_t6.c =================================================================== --- stable/11/usr.sbin/cxgbetool/reg_defs_t6.c (revision 339392) +++ stable/11/usr.sbin/cxgbetool/reg_defs_t6.c (revision 339393) Property changes on: stable/11/usr.sbin/cxgbetool/reg_defs_t6.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.sbin/cxgbetool/tcb_common.c =================================================================== --- stable/11/usr.sbin/cxgbetool/tcb_common.c (nonexistent) +++ stable/11/usr.sbin/cxgbetool/tcb_common.c (revision 339393) @@ -0,0 +1,703 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "tcb_common.h" + +/***:----------------------------------------------------------------------- + ***: externals + ***:----------------------------------------------------------------------- + */ + +extern _TCBVAR g_tcb_info4[]; +extern _TCBVAR g_scb_info4[]; +extern _TCBVAR g_fcb_info4[]; +extern void t4_display_tcb_aux_0(_TCBVAR *tvp,int aux); +extern void t4_display_tcb_aux_1(_TCBVAR *tvp,int aux); +extern void t4_display_tcb_aux_2(_TCBVAR *tvp,int aux); +extern void t4_display_tcb_aux_3(_TCBVAR *tvp,int aux); + +extern _TCBVAR g_tcb_info5[]; +extern _TCBVAR g_scb_info5[]; +extern _TCBVAR g_fcb_info5[]; +extern void t5_display_tcb_aux_0(_TCBVAR *tvp,int aux); +extern void t5_display_tcb_aux_1(_TCBVAR *tvp,int aux); +extern void t5_display_tcb_aux_2(_TCBVAR *tvp,int aux); +extern void t5_display_tcb_aux_3(_TCBVAR *tvp,int aux); + +extern _TCBVAR g_tcb_info6[]; +extern _TCBVAR g_scb_info6[]; +extern _TCBVAR g_fcb_info6[]; +extern void t6_display_tcb_aux_0(_TCBVAR *tvp,int aux); +extern void t6_display_tcb_aux_1(_TCBVAR *tvp,int aux); +extern void t6_display_tcb_aux_2(_TCBVAR *tvp,int aux); +extern void t6_display_tcb_aux_3(_TCBVAR *tvp,int aux); +extern void t6_display_tcb_aux_4(_TCBVAR *tvp,int aux); + +/***:----------------------------------------------------------------------- + ***: globals + ***:----------------------------------------------------------------------- + */ + +_TCBVAR *g_tcb_info=g_tcb_info5; +_TCBVAR *g_scb_info=g_scb_info5; +_TCBVAR *g_fcb_info=g_fcb_info5; +static int g_tN=0; + +static int g_prntstyl=PRNTSTYL_COMP; + +static int g_got_scb=0; +static int g_got_fcb=0; + + +/***:----------------------------------------------------------------------- +***: error exit functions +***:----------------------------------------------------------------------- +*/ + +/**: err_exit functions +*: ------------------ +*/ + +void tcb_prflush(void) +{ + fflush(stdout); + fflush(stderr); +} + + +void tcb_code_err_exit(char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + printf("Coding Error in: "); + vprintf(fmt, args); + printf("\n"); + tcb_prflush(); + va_end(args); + exit(1); +} + +/***:----------------------------------------------------------------------- +***: tcb_hexdump functions +***:----------------------------------------------------------------------- +*/ + +void +tcb_hexdump(unsigned base, unsigned char *buf, unsigned int size) +{ + unsigned offset; + + for (offset = 0; offset < size; ++offset) { + if (!(offset % 16)) printf("\n0x%4.4x: ", base + offset); + else if (!(offset % 8)) printf(" "); + printf("%2.2x ", (unsigned char)buf[offset]); + } +} + +int tcb_strmatch_nc(char *cs, char *ct) { + while (*cs) + if (tolower(*cs++) != tolower(*ct++)) return (FALSE); + return (!(*ct)); /*return TRUE if *ct NULL at same time as *cs==NULL*/ +} + + +/*: ------------------------------------------------------------------------- +string functions +tcb_strmatch_nc: Similar to exact match, but case insensitive. +*/ + + +int +tcb_strncmp_nc(char *cs, char *ct, int n) +{ + /*case insensitive version of the standard strncmp() function */ + int i = 0; + int ret; + + + ret = 0; + for (i = 0; i < n && 0 == ret && !(EOS == *cs && EOS == *ct); ++i) { + /* this is weird, but it matched GCC linux when strings don't + * have any upper case characters. + */ + ret = tolower(*cs++) - tolower(*ct++); + } + return ret; +} + +int +tcb_startswith_nc(char *cs, char *ct) +{ /* return true if cs start with ct */ + return (0 == tcb_strncmp_nc(cs, ct, (int)strlen(ct))); +} + + + + +/***:----------------------------------------------------------------------- + ***: START OF WINDOWS FUNCTIONS + ***:----------------------------------------------------------------------- + */ + + +/***:----------------------------------------------------------------------- + ***: print utilties + ***:----------------------------------------------------------------------- + */ + +static int g_PR_indent=1; + +void PR(char *fmt, ...) +{ + int fmt_len; + va_list args; + va_start(args,fmt); + + if (g_PR_indent) printf(" "); + g_PR_indent=0; + fmt_len=(int) strlen(fmt); + if (fmt_len>0 && fmt[fmt_len-1]=='\n') g_PR_indent=1; + + vprintf(fmt,args); + tcb_prflush(); + va_end(args); +} + + +/***:----------------------------------------------------------------------- + ***: val() + ***:----------------------------------------------------------------------- + */ + +_TCBVAR * +lu_tcbvar(char *name) +{ + _TCBVAR *tvp=g_tcb_info; + + while (tvp->name!=NULL) { + if (tcb_strmatch_nc(name,tvp->name)) return tvp; + else if (tcb_strmatch_nc(name,tvp->aka )) return tvp; + tvp+=1; + } + tcb_code_err_exit("lu_tcbvar: bad name %s\n",name); + return NULL; +} + +unsigned +val(char *name) +{ + _TCBVAR *tvp; + + tvp=lu_tcbvar(name); + return tvp->val; +} + +ui64 +val64(char *name) +{ + _TCBVAR *tvp; + + tvp=lu_tcbvar(name); + return tvp->rawval; +} + + + +/***:----------------------------------------------------------------------- + ***: get_tcb_bits + ***:----------------------------------------------------------------------- + */ + + +static int +get_tcb_bit(unsigned char *A, int bit) +{ + int ret=0; + int ix,shift; + + ix = 127 - (bit>>3); + shift=bit&0x7; + /* prdbg(" ix: %u, shift=%u\n",ix,shift); */ + ret=(A[ix] >> shift) & 1; + return ret; +} + +static ui64 +get_tcb_bits (unsigned char *A, int hi, int lo) +{ + ui64 ret=0; + + if (lo>hi) { + int temp=lo; + lo=hi; + hi=temp; + } + + while (hi>=lo) { + ret = (ret<<1) | get_tcb_bit(A,hi); + --hi; + } + + return ret; +} + + +void +decompress_val(_TCBVAR *tvp,unsigned ulp_type,unsigned tx_max, + unsigned rcv_nxt,unsigned rx_frag0_start_idx_raw) +{ + unsigned rawval=(unsigned) tvp->rawval; + + switch(tvp->comp) { + case COMP_NONE: tvp->val=rawval; break; + case COMP_ULP: tvp->val=rawval; break; + case COMP_TX_MAX: + tvp->val=(tx_max - rawval) & 0xFFFFFFFF; + break; + case COMP_RCV_NXT: + if (tcb_startswith_nc(tvp->name,"rx_frag")) { + unsigned fragx=0; + if (!tcb_strmatch_nc(tvp->name,"rx_frag0_start_idx_raw")) + fragx=rawval; + tvp->val=(rcv_nxt+rx_frag0_start_idx_raw+fragx) & 0xFFFFFFFF; + } else { + tvp->val=(rcv_nxt - rawval) & 0xFFFFFFFF; + } + break; + case COMP_PTR: tvp->val=rawval; break; + case COMP_LEN: + { + tvp->val=rawval; + if (PM_MODE_RDDP==ulp_type || PM_MODE_DDP==ulp_type || + PM_MODE_IANDP==ulp_type) { + /* TP does this internally. Not sure if I should show the + * unaltered value or the raw value. For now I + * will diplay the raw value. For now I've added the code + * mainly to stop windows compiler from warning about ulp_type + * being an unreferenced parameter. + */ + tvp->val=0; + tvp->val=rawval; /* comment this out to display altered value */ + } + } + break; + default: + tcb_code_err_exit("decompress_val, bad switch: %d",tvp->comp); + break; + } + + + +} + + +void +get_tcb_field(_TCBVAR *tvp,unsigned char *buf) +{ + assert(tvp->hi-tvp->lo+1<=64); + assert(tvp->hi>=tvp->lo); + + tvp->rawval=get_tcb_bits(buf,tvp->lo,tvp->hi); + /* assume no compression and 32-bit value for now */ + tvp->val=(unsigned) (tvp->rawval & 0xFFFFFFFF); + + +} + + +/***:----------------------------------------------------------------------- + ***: spr_* functions + ***:----------------------------------------------------------------------- + */ + +char * +spr_tcp_state (unsigned state) +{ + char *ret="UNKNOWN"; + + if ( 0 == state) {ret = "CLOSED";} + else if ( 1 == state) {ret = "LISTEN";} + else if ( 2 == state) {ret = "SYN_SENT";} + else if ( 3 == state) {ret = "SYN_RCVD";} + else if ( 4 == state) {ret = "ESTABLISHED";} + else if ( 5 == state) {ret = "CLOSE_WAIT";} + else if ( 6 == state) {ret = "FIN_WAIT_1";} + else if ( 7 == state) {ret = "CLOSING";} + else if ( 8 == state) {ret = "LAST_ACK";} + else if ( 9 == state) {ret = "FIN_WAIT_2";} + else if (10 == state) {ret = "TIME_WAIT";} + else if (11 == state) {ret = "ESTABLISHED_RX";} + else if (12 == state) {ret = "ESTABLISHED_TX";} + else if (13 == state) {ret = "SYN_PEND";} + else if (14 == state) {ret = "ESC_1_STATE";} + else if (15 == state) {ret = "ESC_2_STATE";} + + return ret; +} + +char * +spr_cctrl_sel(unsigned sel0,unsigned sel1) +{ + unsigned sel=(sel1<<1) | sel0; + char *ret="UNKNOWN"; + + if ( 0 == sel) {ret = "Reno";} + else if ( 1 == sel) {ret = "Tahoe";} + else if ( 2 == sel) {ret = "NewReno";} + else if ( 3 == sel) {ret = "HighSpeed";} + + return ret; +} + + +char * +spr_ulp_type(unsigned ulp_type) +{ + char *ret="UNKNOWN"; + + /*The tp.h PM_MODE_XXX call 1 DDP and 5 IANDP, but external + * documentation (tcb.h" calls 5 ddp, and doesn't mention 1 or 3. + */ + + if ( PM_MODE_PASS == ulp_type) {ret = "TOE";} + else if ( PM_MODE_DDP == ulp_type) {ret = "DDP";} + else if ( PM_MODE_ISCSI == ulp_type) {ret = "ISCSI";} + else if ( PM_MODE_IWARP == ulp_type) {ret = "IWARP";} + else if ( PM_MODE_RDDP == ulp_type) {ret = "RDMA";} + else if ( PM_MODE_IANDP == ulp_type) {ret = "IANDP_DDP";} + else if ( PM_MODE_FCOE == ulp_type) {ret = "FCoE";} + else if ( PM_MODE_USER == ulp_type) {ret = "USER";} + else if ( PM_MODE_TLS == ulp_type) {ret = "TLS";} + else if ( PM_MODE_DTLS == ulp_type) {ret = "DTLS";} + + return ret; +} + +char * +spr_ip_version(unsigned ip_version) +{ + char *ret="UNKNOWN"; + + if ( 0 == ip_version) {ret = "IPv4";} + else if ( 1 == ip_version) {ret = "IPv6";} + + return ret; +} + + + +/***:----------------------------------------------------------------------- + ***: display_tcb() + ***:----------------------------------------------------------------------- + */ + +void +display_tcb_compressed(_TCBVAR *tvp,int aux) +{ + + if (g_tN==4) { + t4_display_tcb_aux_0(tvp,aux); + if (1==aux) t4_display_tcb_aux_1(tvp,aux); + else if (2==aux) t4_display_tcb_aux_2(tvp,aux); + else if (3==aux) t4_display_tcb_aux_3(tvp,aux); + + } else if (g_tN==5) { + t5_display_tcb_aux_0(tvp,aux); + if (1==aux) t5_display_tcb_aux_1(tvp,aux); + else if (2==aux) t5_display_tcb_aux_2(tvp,aux); + else if (3==aux) t5_display_tcb_aux_3(tvp,aux); + } else if (g_tN==6) { + t6_display_tcb_aux_0(tvp,aux); + if (1==aux) t6_display_tcb_aux_1(tvp,aux); + else if (2==aux) t6_display_tcb_aux_2(tvp,aux); + else if (3==aux) t6_display_tcb_aux_3(tvp,aux); + else if (4==aux) t6_display_tcb_aux_4(tvp,aux); + } +} + + + + +/***:----------------------------------------------------------------------- + ***: parse_n_decode_tcb + ***:----------------------------------------------------------------------- + */ + + +unsigned +parse_tcb( _TCBVAR *base_tvp, unsigned char *buf) +{ /* parse the TCB */ + _TCBVAR *tvp=base_tvp; + unsigned ulp_type; + int aux=1; /* assume TOE or iSCSI */ + unsigned tx_max=0, rcv_nxt=0, rx_frag0_start_idx_raw=0; + int got_tx_max=0, got_rcv_nxt=0, got_rx_frag0_start_idx_raw=0; + + + /* parse the TCB */ + while (tvp->name!=NULL) { + get_tcb_field(tvp,buf); + if (!got_tx_max && tcb_strmatch_nc("tx_max",tvp->name)) { + tx_max=tvp->val; + got_tx_max=1; + } + if (!got_rcv_nxt && tcb_strmatch_nc("rcv_nxt",tvp->name)) { + rcv_nxt=tvp->val; + got_rcv_nxt=1; + } + if (!got_rx_frag0_start_idx_raw && + tcb_strmatch_nc("rx_frag0_start_idx_raw",tvp->name)) { + rx_frag0_start_idx_raw=tvp->val; + got_rx_frag0_start_idx_raw=1; + } + tvp+=1; + } + + tvp=base_tvp; + ulp_type=tvp->val; /* ULP type is always first variable in TCB */ + if (PM_MODE_IANDP==ulp_type || PM_MODE_FCOE==ulp_type) aux=3; + else if (PM_MODE_RDDP==ulp_type) aux=2; + else if (6==g_tN && (PM_MODE_TLS==ulp_type || PM_MODE_DTLS==ulp_type)) aux=4; + else aux=1; + + assert(got_tx_max && got_rcv_nxt && got_rx_frag0_start_idx_raw); + + /* decompress the compressed values */ + tvp=base_tvp; + while (tvp->name!=NULL) { + decompress_val(tvp,ulp_type,tx_max,rcv_nxt,rx_frag0_start_idx_raw); + tvp+=1; + } + + return aux; +} + + + +void +parse_scb( _TCBVAR *base_tvp, unsigned char *buf) +{ /* parse the SCB */ + _TCBVAR *tvp=base_tvp; + + while (tvp->name!=NULL) { + if (tcb_strmatch_nc("scb_slush",tvp->name)) { + /* the scb_slush field is all of remaining memory */ + tvp->rawval=0; + tvp->val=0; + } else { + get_tcb_field(tvp,buf); + } + tvp+=1; + } +} + + +void +parse_fcb( _TCBVAR *base_tvp, unsigned char *buf) +{ /* parse the FCB */ + _TCBVAR *tvp=base_tvp; + + while (tvp->name!=NULL) { + get_tcb_field(tvp,buf); + tvp+=1; + } +} + + +void +display_list_tcb(_TCBVAR *base_tvp,int aux) +{ + _TCBVAR *tvp=base_tvp; + while (tvp->name!=NULL) { + if (tvp->aux==0 || tvp->aux==aux) { + if (tvp->hi-tvp->lo+1<=32) { + printf(" %4d:%4d %31s: %10u (0x%1x)",tvp->lo,tvp->hi,tvp->name, + (unsigned) tvp->rawval,(unsigned) tvp->rawval); + if (COMP_TX_MAX==tvp->comp || COMP_RCV_NXT==tvp->comp) + printf(" -> %1u (0x%x)", tvp->val,tvp->val); + } else { + printf(" %4d:%4d %31s: 0x%1llx",tvp->lo,tvp->hi,tvp->name, + tvp->rawval); + } + printf("\n"); + } + tvp+=1; + } +} + +void +display_tcb(_TCBVAR *tvp,unsigned char *buf,int aux) +{ + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_RAW) { + tcb_hexdump(0,buf,128); + printf("\n"); + } + + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_LIST) { + display_list_tcb(tvp,aux); + } + + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_COMP) { + display_tcb_compressed(tvp,aux); + } + +} + +void +parse_n_display_tcb(unsigned char *buf) +{ + _TCBVAR *tvp=g_tcb_info; + int aux; + + aux=parse_tcb(tvp,buf); + display_tcb(tvp,buf,aux); +} + +void +parse_n_display_scb(unsigned char *buf) +{ + _TCBVAR *tvp=g_scb_info; + + parse_scb(tvp,buf); + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_RAW) { + tcb_hexdump(0,buf,128); + printf("\n"); + } + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_LIST || + g_prntstyl==PRNTSTYL_COMP) { + display_list_tcb(tvp,0); + } +} + +void +parse_n_display_fcb(unsigned char *buf) +{ + _TCBVAR *tvp=g_fcb_info; + + parse_fcb(tvp,buf); + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_RAW) { + tcb_hexdump(0,buf,128); + printf("\n"); + } + + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_LIST || + g_prntstyl==PRNTSTYL_COMP) { + display_list_tcb(tvp,0); + } +} + +void +parse_n_display_xcb(unsigned char *buf) +{ + if (g_got_scb) parse_n_display_scb(buf); + else if (g_got_fcb) parse_n_display_fcb(buf); + else parse_n_display_tcb(buf); +} + +/***:----------------------------------------------------------------------- + ***: swizzle_tcb + ***:----------------------------------------------------------------------- + */ + +void +swizzle_tcb(unsigned char *buf) +{ + int i,j,k; + + for (i=0, j=128-16 ; i +#include +#include +#include +#include +#include + + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef EOS +#define EOS '\0' +#endif + +#ifndef __variable_sizes + +/* windows has _UI64_MAX. C99 has ULLONG_MAX, but I don't compile +with C99 for portability with windows, so the ui64 is a guess. +I'll add an assert to cl_main to confirm these sizes are accurate. +*/ +#ifdef _UI64_MAX /* windows */ +#if (_UI64_MAX == 0xFFFFFFFFFFFFFFFF) +typedef __int64 si64; +typedef unsigned __int64 ui64; +#endif +#else /*else of #ifdef _UI64_MAX */ +typedef long long int si64; +typedef unsigned long long int ui64; +#endif /*endif of #ifdef _UI64_MAX */ +#endif /* endif of #ifndef __variable_sizes */ + + + + +typedef struct tcb_var { + char *name; + int aux; + int lo; + int hi; + + char *faka; + int flo; + int fhi; + + char *aka; + + int comp; + + char *desc; + char *akadesc; + + ui64 rawval; + unsigned val; + +} _TCBVAR; + + +enum comp_types { + + COMP_NONE=0, + COMP_ULP, + COMP_TX_MAX, + COMP_RCV_NXT, + COMP_PTR, + COMP_LEN, + +}; + + +enum tidtypes { + TIDTYPE_TCB=0, + TIDTYPE_SCB=1, + TIDTYPE_FCB=2, + +}; + + +enum prntstyls { + PRNTSTYL_VERBOSE=0, + PRNTSTYL_LIST=1, + PRNTSTYL_COMP=2, + PRNTSTYL_RAW=3, + +}; + + +/* from tp/src/tp.h */ +#define PM_MODE_PASS 0 +#define PM_MODE_DDP 1 +#define PM_MODE_ISCSI 2 +#define PM_MODE_IWARP 3 +#define PM_MODE_RDDP 4 +#define PM_MODE_IANDP 5 +#define PM_MODE_FCOE 6 +#define PM_MODE_USER 7 +#define PM_MODE_TLS 8 +#define PM_MODE_DTLS 9 + + + +#define SEQ_ADD(a,b) (((a)+(b)) & 0xFFFFFFFF) +#define SEQ_SUB(a,b) (((a)-(b)) & 0xFFFFFFFF) + +///* functions needed by the tcbshowtN.c code */ +extern unsigned val(char *name); +extern ui64 val64(char *name); +extern void PR(char *fmt, ...); +extern char *spr_tcp_state(unsigned state); +extern char *spr_ip_version(unsigned ipver); +extern char *spr_cctrl_sel(unsigned cctrl_sel0,unsigned cctrl_sel1); +extern char *spr_ulp_type(unsigned ulp_type); + + +extern unsigned parse_tcb( _TCBVAR *base_tvp, unsigned char *buf); +extern void display_tcb(_TCBVAR *tvp,unsigned char *buf,int aux); +extern void parse_n_display_xcb(unsigned char *buf); + +extern void swizzle_tcb(unsigned char *buf); +extern void set_tidtype(unsigned int tidtype); +extern void set_tcb_info(unsigned int tidtype, unsigned int cardtype); +extern void set_print_style(unsigned int prntstyl); + +#endif /* __tcb_common_h */ Property changes on: stable/11/usr.sbin/cxgbetool/tcb_common.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.sbin/cxgbetool/tcbinfot4.c =================================================================== --- stable/11/usr.sbin/cxgbetool/tcbinfot4.c (nonexistent) +++ stable/11/usr.sbin/cxgbetool/tcbinfot4.c (revision 339393) @@ -0,0 +1,1423 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* Auto-generated file. Avoid direct editing. */ +/* Edits will be lost when file regenerated. */ +#include +#include "tcb_common.h" +_TCBVAR g_tcb_info4[]={ + {"ulp_type" , 0, 0, 3, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp_type" , /* aka */ + COMP_NONE , /* comp */ + "ULP mode: 0 =toe, 2=iscsi, 4=rdma, 5=ddp, remaining values are reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"ulp_raw" , 0, 4, 11, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp" , /* aka */ + COMP_ULP , /* comp */ + "ULP subtype", /*desc*/ + NULL, /*akadesc */ + }, + {"l2t_ix" , 0, 12, 23, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "l2t_ix" , /* aka */ + COMP_NONE , /* comp */ + "Destination MAC address index", /*desc*/ + NULL, /*akadesc */ + }, + {"smac_sel" , 0, 24, 31, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "smac_sel" , /* aka */ + COMP_NONE , /* comp */ + "Source MAC address index", /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MIGRATING" , 0, 32, 32, /* name,aux,lo,hi */ + "t_flags" , 0, 0, /* faka,flo,fhi */ + "migrating" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_NON_OFFLOAD" , 0, 33, 33, /* name,aux,lo,hi */ + "t_flags" , 1, 1, /* faka,flo,fhi */ + "non_offload" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_LOCK_TID" , 0, 34, 34, /* name,aux,lo,hi */ + "t_flags" , 2, 2, /* faka,flo,fhi */ + "lock_tid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_KEEPALIVE" , 0, 35, 35, /* name,aux,lo,hi */ + "t_flags" , 3, 3, /* faka,flo,fhi */ + "keepalive" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK" , 0, 36, 36, /* name,aux,lo,hi */ + "t_flags" , 4, 4, /* faka,flo,fhi */ + "dack" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_MSS" , 0, 37, 37, /* name,aux,lo,hi */ + "t_flags" , 5, 5, /* faka,flo,fhi */ + "dack_mss" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_NOT_ACKED" , 0, 38, 38, /* name,aux,lo,hi */ + "t_flags" , 6, 6, /* faka,flo,fhi */ + "dack_not_acked" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_NAGLE" , 0, 39, 39, /* name,aux,lo,hi */ + "t_flags" , 7, 7, /* faka,flo,fhi */ + "nagle" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_SSWS_DISABLED" , 0, 40, 40, /* name,aux,lo,hi */ + "t_flags" , 8, 8, /* faka,flo,fhi */ + "ssws_disabled" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_FLOW_CONTROL_DDP" , 0, 41, 41, /* name,aux,lo,hi */ + "t_flags" , 9, 9, /* faka,flo,fhi */ + "rx_flow_control_ddp" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_FLOW_CONTROL_DISABLE" , 0, 42, 42, /* name,aux,lo,hi */ + "t_flags" , 10, 10, /* faka,flo,fhi */ + "rx_flow_control_disable" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_CHANNEL" , 0, 43, 43, /* name,aux,lo,hi */ + "t_flags" , 11, 11, /* faka,flo,fhi */ + "rx_channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_CHANNEL" , 0, 44, 45, /* name,aux,lo,hi */ + "t_flags" , 12, 13, /* faka,flo,fhi */ + "tx_channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_QUIESCE" , 0, 46, 46, /* name,aux,lo,hi */ + "t_flags" , 14, 14, /* faka,flo,fhi */ + "tx_quiesce" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_QUIESCE" , 0, 47, 47, /* name,aux,lo,hi */ + "t_flags" , 15, 15, /* faka,flo,fhi */ + "rx_quiesce" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PACE_AUTO" , 0, 48, 48, /* name,aux,lo,hi */ + "t_flags" , 16, 16, /* faka,flo,fhi */ + "tx_pace_auto" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PACE_FIXED" , 0, 49, 49, /* name,aux,lo,hi */ + "t_flags" , 17, 17, /* faka,flo,fhi */ + "tx_pace_fixed" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_QUEUE" , 0, 50, 52, /* name,aux,lo,hi */ + "t_flags" , 18, 20, /* faka,flo,fhi */ + "tx_queue" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TURBO" , 0, 53, 53, /* name,aux,lo,hi */ + "t_flags" , 21, 21, /* faka,flo,fhi */ + "turbo" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_SEL0" , 0, 54, 54, /* name,aux,lo,hi */ + "t_flags" , 22, 22, /* faka,flo,fhi */ + "cctrl_sel0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_SEL1" , 0, 55, 55, /* name,aux,lo,hi */ + "t_flags" , 23, 23, /* faka,flo,fhi */ + "cctrl_sel1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_FIN" , 0, 56, 56, /* name,aux,lo,hi */ + "t_flags" , 24, 24, /* faka,flo,fhi */ + "core_fin" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_URG" , 0, 57, 57, /* name,aux,lo,hi */ + "t_flags" , 25, 25, /* faka,flo,fhi */ + "core_urg" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_MORE" , 0, 58, 58, /* name,aux,lo,hi */ + "t_flags" , 26, 26, /* faka,flo,fhi */ + "core_more" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_PUSH" , 0, 59, 59, /* name,aux,lo,hi */ + "t_flags" , 27, 27, /* faka,flo,fhi */ + "core_push" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_FLUSH" , 0, 60, 60, /* name,aux,lo,hi */ + "t_flags" , 28, 28, /* faka,flo,fhi */ + "core_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_ENABLE" , 0, 61, 61, /* name,aux,lo,hi */ + "t_flags" , 29, 29, /* faka,flo,fhi */ + "rcv_coalesce_enable" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_PUSH" , 0, 62, 62, /* name,aux,lo,hi */ + "t_flags" , 30, 30, /* faka,flo,fhi */ + "rcv_coalesce_push" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_LAST_PSH" , 0, 63, 63, /* name,aux,lo,hi */ + "t_flags" , 31, 31, /* faka,flo,fhi */ + "rcv_coalesce_last_psh" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_HEARTBEAT" , 0, 64, 64, /* name,aux,lo,hi */ + "t_flags" , 32, 32, /* faka,flo,fhi */ + "rcv_coalesce_heartbeat" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_INIT" , 0, 65, 65, /* name,aux,lo,hi */ + "t_flags" , 33, 33, /* faka,flo,fhi */ + "init" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_ACTIVE_OPEN" , 0, 66, 66, /* name,aux,lo,hi */ + "t_flags" , 34, 34, /* faka,flo,fhi */ + "active_open" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_ASK_MODE" , 0, 67, 67, /* name,aux,lo,hi */ + "t_flags" , 35, 35, /* faka,flo,fhi */ + "ask_mode" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON0" , 0, 68, 68, /* name,aux,lo,hi */ + "t_flags" , 36, 36, /* faka,flo,fhi */ + "mod_schd_reason0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON1" , 0, 69, 69, /* name,aux,lo,hi */ + "t_flags" , 37, 37, /* faka,flo,fhi */ + "mod_schd_reason1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON2" , 0, 70, 70, /* name,aux,lo,hi */ + "t_flags" , 38, 38, /* faka,flo,fhi */ + "mod_schd_reason2" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_TX" , 0, 71, 71, /* name,aux,lo,hi */ + "t_flags" , 39, 39, /* faka,flo,fhi */ + "mod_schd_tx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_RX" , 0, 72, 72, /* name,aux,lo,hi */ + "t_flags" , 40, 40, /* faka,flo,fhi */ + "mod_schd_rx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TIMER" , 0, 73, 73, /* name,aux,lo,hi */ + "t_flags" , 41, 41, /* faka,flo,fhi */ + "timer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_TIMER" , 0, 74, 74, /* name,aux,lo,hi */ + "t_flags" , 42, 42, /* faka,flo,fhi */ + "dack_timer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEER_FIN" , 0, 75, 75, /* name,aux,lo,hi */ + "t_flags" , 43, 43, /* faka,flo,fhi */ + "peer_fin" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_COMPACT" , 0, 76, 76, /* name,aux,lo,hi */ + "t_flags" , 44, 44, /* faka,flo,fhi */ + "tx_compact" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_COMPACT" , 0, 77, 77, /* name,aux,lo,hi */ + "t_flags" , 45, 45, /* faka,flo,fhi */ + "rx_compact" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RDMA_ERROR" , 0, 78, 78, /* name,aux,lo,hi */ + "t_flags" , 46, 46, /* faka,flo,fhi */ + "rdma_error" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RDMA_FLM_ERROR" , 0, 79, 79, /* name,aux,lo,hi */ + "t_flags" , 47, 47, /* faka,flo,fhi */ + "rdma_flm_error" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PDU_OUT" , 0, 80, 80, /* name,aux,lo,hi */ + "t_flags" , 48, 48, /* faka,flo,fhi */ + "tx_pdu_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_PDU_OUT" , 0, 81, 81, /* name,aux,lo,hi */ + "t_flags" , 49, 49, /* faka,flo,fhi */ + "rx_pdu_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DUPACK_COUNT_ODD" , 0, 82, 82, /* name,aux,lo,hi */ + "t_flags" , 50, 50, /* faka,flo,fhi */ + "dupack_count_odd" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_FAST_RECOVERY" , 0, 83, 83, /* name,aux,lo,hi */ + "t_flags" , 51, 51, /* faka,flo,fhi */ + "fast_recovery" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_SCALE" , 0, 84, 84, /* name,aux,lo,hi */ + "t_flags" , 52, 52, /* faka,flo,fhi */ + "recv_scale" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_TSTMP" , 0, 85, 85, /* name,aux,lo,hi */ + "t_flags" , 53, 53, /* faka,flo,fhi */ + "recv_tstmp" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_SACK" , 0, 86, 86, /* name,aux,lo,hi */ + "t_flags" , 54, 54, /* faka,flo,fhi */ + "recv_sack" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL0" , 0, 87, 87, /* name,aux,lo,hi */ + "t_flags" , 55, 55, /* faka,flo,fhi */ + "pend_ctl0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL1" , 0, 88, 88, /* name,aux,lo,hi */ + "t_flags" , 56, 56, /* faka,flo,fhi */ + "pend_ctl1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL2" , 0, 89, 89, /* name,aux,lo,hi */ + "t_flags" , 57, 57, /* faka,flo,fhi */ + "pend_ctl2" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_IP_VERSION" , 0, 90, 90, /* name,aux,lo,hi */ + "t_flags" , 58, 58, /* faka,flo,fhi */ + "ip_version" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_ECN" , 0, 91, 91, /* name,aux,lo,hi */ + "t_flags" , 59, 59, /* faka,flo,fhi */ + "cctrl_ecn" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_ECE" , 0, 92, 92, /* name,aux,lo,hi */ + "t_flags" , 60, 60, /* faka,flo,fhi */ + "cctrl_ece" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_CWR" , 0, 93, 93, /* name,aux,lo,hi */ + "t_flags" , 61, 61, /* faka,flo,fhi */ + "cctrl_cwr" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_RFR" , 0, 94, 94, /* name,aux,lo,hi */ + "t_flags" , 62, 62, /* faka,flo,fhi */ + "cctrl_rfr" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_UNUSED" , 0, 95, 95, /* name,aux,lo,hi */ + "t_flags" , 63, 63, /* faka,flo,fhi */ + "unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"rss_info" , 0, 96, 105, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rss_info" , /* aka */ + COMP_NONE , /* comp */ + "RSS field", /*desc*/ + NULL, /*akadesc */ + }, + {"tos" , 0, 106, 111, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tos" , /* aka */ + COMP_NONE , /* comp */ + "TOS field for IP header", /*desc*/ + NULL, /*akadesc */ + }, + {"t_state" , 0, 112, 115, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_state" , /* aka */ + COMP_NONE , /* comp */ + "Connection TCP state (see TCP state table)", /*desc*/ + NULL, /*akadesc */ + }, + {"max_rt" , 0, 116, 119, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "max_rt" , /* aka */ + COMP_NONE , /* comp */ + "Maximum re-transmissions", /*desc*/ + NULL, /*akadesc */ + }, + {"t_maxseg" , 0, 120, 123, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_maxseg" , /* aka */ + COMP_NONE , /* comp */ + "MTU table index", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_scale" , 0, 124, 127, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_scale" , /* aka */ + COMP_NONE , /* comp */ + "Scaling for receive window (0-14). Note: this is reverse of common definition.", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_scale" , 0, 128, 131, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_scale" , /* aka */ + COMP_NONE , /* comp */ + "Scaling for send window (0-14). Note: this is reverse of common definition.", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rxtshift" , 0, 132, 135, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rxtshift" , /* aka */ + COMP_NONE , /* comp */ + "Retransmit exponential backoff", /*desc*/ + NULL, /*akadesc */ + }, + {"t_dupacks" , 0, 136, 139, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_dupacks" , /* aka */ + COMP_NONE , /* comp */ + "Number of duplicate ACKs received", /*desc*/ + NULL, /*akadesc */ + }, + {"timestamp_offset" , 0, 140, 143, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "timestamp_offset" , /* aka */ + COMP_NONE , /* comp */ + "Timestamp offset from running clock", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_adv" , 0, 144, 159, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_adv" , /* aka */ + COMP_NONE , /* comp */ + "Peer advertised window", /*desc*/ + NULL, /*akadesc */ + }, + {"timestamp" , 0, 160, 191, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "timestamp" , /* aka */ + COMP_NONE , /* comp */ + "Timer accounting field", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rtt_ts_recent_age" , 0, 192, 223, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rtt_ts_recent_age" , /* aka */ + COMP_NONE , /* comp */ + "Round-trip time; timestamps: ts_recent_age", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rtseq_recent" , 0, 224, 255, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rtseq_recent" , /* aka */ + COMP_NONE , /* comp */ + "Sequence number being timed t_rtseq; timestamps t_recent", /*desc*/ + NULL, /*akadesc */ + }, + {"t_srtt" , 0, 256, 271, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_srtt" , /* aka */ + COMP_NONE , /* comp */ + "Smoothed round-trip time", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rttvar" , 0, 272, 287, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rttvar" , /* aka */ + COMP_NONE , /* comp */ + "Variance in round-trip time", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_max" , 0, 288, 319, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_max" , /* aka */ + COMP_NONE , /* comp */ + "Highest sequence number in transmit buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_una_raw" , 0, 320, 347, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_una" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_una from tx_max", /*desc*/ + "Send unacknowledged", /*akadesc */ + }, + {"snd_nxt_raw" , 0, 348, 375, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_nxt" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_nxt from tx_max", /*desc*/ + "Send next", /*akadesc */ + }, + {"snd_max_raw" , 0, 376, 403, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_max" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_max from tx_max", /*desc*/ + "Highest sequence number sent", /*akadesc */ + }, + {"snd_rec_raw" , 0, 404, 431, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_rec" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of NewReno fast recovery end sequence from tx_max", /*desc*/ + "NewReno fast recovery end sequence number", /*akadesc */ + }, + {"snd_cwnd" , 0, 432, 459, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_cwnd" , /* aka */ + COMP_NONE , /* comp */ + "Congestion-control window", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_ssthresh" , 0, 460, 487, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_ssthresh" , /* aka */ + COMP_NONE , /* comp */ + "Slow Start threshold", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_hdr_ptr_raw" , 0, 488, 504, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_hdr_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for first byte in send buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_last_ptr_raw" , 0, 505, 521, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_last_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for last byte in send buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_nxt" , 0, 522, 553, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_nxt" , /* aka */ + COMP_NONE , /* comp */ + "TCP receive next", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_wnd" , 0, 554, 581, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_wnd" , /* aka */ + COMP_NONE , /* comp */ + "Receive credits (advertised to peer in receive window)", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_hdr_offset" , 0, 582, 609, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_hdr_offset" , /* aka */ + COMP_NONE , /* comp */ + "Receive in-order buffered data", /*desc*/ + NULL, /*akadesc */ + }, + {"ts_last_ack_sent_raw" , 0, 610, 637, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ts_last_ack_sent" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of highest sequence acked from rcv_nxt", /*desc*/ + "Highest sequence number acked", /*akadesc */ + }, + {"rx_frag0_start_idx_raw" , 0, 638, 665, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag0_start_idx" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 0 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_start_idx_offset" , 0, 666, 693, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 1 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag0_len" , 0, 694, 721, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag0_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive re-order fragment 0 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_len" , 0, 722, 749, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive re-order fragment 1 length", /*desc*/ + NULL, /*akadesc */ + }, + {"pdu_len" , 0, 750, 765, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pdu_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive recovered PDU length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ptr_raw" , 0, 766, 782, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for in-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_ptr_raw" , 0, 783, 799, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"main_slush" , 0, 800, 831, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "main_slush" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"aux1_slush0" , 1, 832, 846, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux1_slush0" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_start_idx_offset_raw", 1, 847, 874, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 2 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_ptr_raw" , 1, 875, 891, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_len_raw" , 1, 892, 919, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_len" , /* aka */ + COMP_LEN , /* comp */ + "Receive re-order fragment 2 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_ptr_raw" , 1, 920, 936, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_len_raw" , 1, 937, 964, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_len" , /* aka */ + COMP_LEN , /* comp */ + "Receive re-order fragment 3 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_start_idx_offset_raw", 1, 965, 992, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 3 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"pdu_hdr_len" , 1, 993, 1000, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pdu_hdr_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive recovered PDU header length", /*desc*/ + NULL, /*akadesc */ + }, + {"aux1_slush1" , 1, 1001, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux1_slush1" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + + {"irs_ulp" , 2, 832, 840, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "irs_ulp" , /* aka */ + COMP_NONE , /* comp */ + "IRS modulo marker_interval when enterring iWARP mode", /*desc*/ + NULL, /*akadesc */ + }, + {"iss_ulp" , 2, 841, 849, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "iss_ulp" , /* aka */ + COMP_NONE , /* comp */ + "ISS modulo marker_interval when entering iWARP mode", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_pdu_len" , 2, 850, 863, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_pdu_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of Tx FPDU", /*desc*/ + NULL, /*akadesc */ + }, + {"cq_idx_sq" , 2, 864, 879, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "cq_idx_sq" , /* aka */ + COMP_NONE , /* comp */ + "CQ index of CQ for SQ", /*desc*/ + NULL, /*akadesc */ + }, + {"cq_idx_rq" , 2, 880, 895, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "cq_idx_rq" , /* aka */ + COMP_NONE , /* comp */ + "CQ index of CQ for RQ", /*desc*/ + NULL, /*akadesc */ + }, + {"qp_id" , 2, 896, 911, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "qp_id" , /* aka */ + COMP_NONE , /* comp */ + "QP index", /*desc*/ + NULL, /*akadesc */ + }, + {"pd_id" , 2, 912, 927, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pd_id" , /* aka */ + COMP_NONE , /* comp */ + "PD index", /*desc*/ + NULL, /*akadesc */ + }, + {"STAG" , 2, 928, 959, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "stag" , /* aka */ + COMP_NONE , /* comp */ + "PDU response STAG", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_start" , 2, 960, 985, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_start" , /* aka */ + COMP_NONE , /* comp */ + "DW aligned starting addres of RQ", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_MSN" , 2, 986, 998, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_msn" , /* aka */ + COMP_NONE , /* comp */ + "Current MSN (modulo 8K, further check in ULP_RX)", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_max_offset" , 2, 999, 1002, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_max_offset" , /* aka */ + COMP_NONE , /* comp */ + "Log size RQ (the size in hardware is rounded up to a power of 2)", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_write_ptr" , 2, 1003, 1015, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_write_ptr" , /* aka */ + COMP_NONE , /* comp */ + "Host RQ write pointer", /*desc*/ + NULL, /*akadesc */ + }, + {"RDMAP_opcode" , 2, 1016, 1019, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rdmap_opcode" , /* aka */ + COMP_NONE , /* comp */ + "Current FPDU command", /*desc*/ + NULL, /*akadesc */ + }, + {"ord_L_bit_vld" , 2, 1020, 1020, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ord_l_bit_vld" , /* aka */ + COMP_NONE , /* comp */ + "Current FPDU has L-bit set", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_flush" , 2, 1021, 1021, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_flush" , /* aka */ + COMP_NONE , /* comp */ + "1 = flush CPL_TX_DATA", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_oos_rxmt" , 2, 1022, 1022, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_oos_rxmt" , /* aka */ + COMP_NONE , /* comp */ + "Retransmit is out of FPDU sync", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_oos_txmt" , 2, 1023, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_oos_txmt" , /* aka */ + COMP_NONE , /* comp */ + "Transmit is out of FPDU sync, or disable aligned transmission", /*desc*/ + NULL, /*akadesc */ + }, + + {"rx_ddp_buf0_offset" , 3, 832, 855, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_offset" , /* aka */ + COMP_NONE , /* comp */ + "Current offset into DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf0_len" , 3, 856, 879, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_INDICATE_OUT" , 3, 880, 880, /* name,aux,lo,hi */ + "rx_ddp_flags" , 0, 0, /* faka,flo,fhi */ + "ddp_indicate_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_ACTIVE_BUF" , 3, 881, 881, /* name,aux,lo,hi */ + "rx_ddp_flags" , 1, 1, /* faka,flo,fhi */ + "ddp_active_buf" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_OFF" , 3, 882, 882, /* name,aux,lo,hi */ + "rx_ddp_flags" , 2, 2, /* faka,flo,fhi */ + "ddp_off" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_WAIT_FRAG" , 3, 883, 883, /* name,aux,lo,hi */ + "rx_ddp_flags" , 3, 3, /* faka,flo,fhi */ + "ddp_wait_frag" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF_INF" , 3, 884, 884, /* name,aux,lo,hi */ + "rx_ddp_flags" , 4, 4, /* faka,flo,fhi */ + "ddp_buf_inf" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_RX2TX" , 3, 885, 885, /* name,aux,lo,hi */ + "rx_ddp_flags" , 5, 5, /* faka,flo,fhi */ + "ddp_rx2tx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_MAIN_UNUSED" , 3, 886, 887, /* name,aux,lo,hi */ + "rx_ddp_flags" , 6, 7, /* faka,flo,fhi */ + "ddp_main_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_VALID" , 3, 888, 888, /* name,aux,lo,hi */ + "rx_ddp_flags" , 8, 8, /* faka,flo,fhi */ + "ddp_buf0_valid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_INDICATE" , 3, 889, 889, /* name,aux,lo,hi */ + "rx_ddp_flags" , 9, 9, /* faka,flo,fhi */ + "ddp_buf0_indicate" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_FLUSH" , 3, 890, 890, /* name,aux,lo,hi */ + "rx_ddp_flags" , 10, 10, /* faka,flo,fhi */ + "ddp_buf0_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSHF_ENABLE_0" , 3, 891, 891, /* name,aux,lo,hi */ + "rx_ddp_flags" , 11, 11, /* faka,flo,fhi */ + "ddp_pshf_enable_0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PUSH_DISABLE_0" , 3, 892, 892, /* name,aux,lo,hi */ + "rx_ddp_flags" , 12, 12, /* faka,flo,fhi */ + "ddp_push_disable_0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSH_NO_INVALIDATE0" , 3, 893, 893, /* name,aux,lo,hi */ + "rx_ddp_flags" , 13, 13, /* faka,flo,fhi */ + "ddp_psh_no_invalidate0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_UNUSED" , 3, 894, 895, /* name,aux,lo,hi */ + "rx_ddp_flags" , 14, 15, /* faka,flo,fhi */ + "ddp_buf0_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_VALID" , 3, 896, 896, /* name,aux,lo,hi */ + "rx_ddp_flags" , 16, 16, /* faka,flo,fhi */ + "ddp_buf1_valid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_INDICATE" , 3, 897, 897, /* name,aux,lo,hi */ + "rx_ddp_flags" , 17, 17, /* faka,flo,fhi */ + "ddp_buf1_indicate" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_FLUSH" , 3, 898, 898, /* name,aux,lo,hi */ + "rx_ddp_flags" , 18, 18, /* faka,flo,fhi */ + "ddp_buf1_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSHF_ENABLE_1" , 3, 899, 899, /* name,aux,lo,hi */ + "rx_ddp_flags" , 19, 19, /* faka,flo,fhi */ + "ddp_pshf_enable_1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PUSH_DISABLE_1" , 3, 900, 900, /* name,aux,lo,hi */ + "rx_ddp_flags" , 20, 20, /* faka,flo,fhi */ + "ddp_push_disable_1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSH_NO_INVALIDATE1" , 3, 901, 901, /* name,aux,lo,hi */ + "rx_ddp_flags" , 21, 21, /* faka,flo,fhi */ + "ddp_psh_no_invalidate1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_UNUSED" , 3, 902, 903, /* name,aux,lo,hi */ + "rx_ddp_flags" , 22, 23, /* faka,flo,fhi */ + "ddp_buf1_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_offset" , 3, 904, 927, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_offset" , /* aka */ + COMP_NONE , /* comp */ + "Current offset into DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_len" , 3, 928, 951, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {"aux3_slush" , 3, 952, 959, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux3_slush" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf0_tag" , 3, 960, 991, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_tag" , /* aka */ + COMP_NONE , /* comp */ + "Tag for DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_tag" , 3, 992, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_tag" , /* aka */ + COMP_NONE , /* comp */ + "Tag for DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + +/* ====================================================== */ +_TCBVAR g_scb_info4[]={ + {"OPT_1_RSS_INFO" , 0, 0, 11, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_RSS_INFO" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_LISTEN_INTERFACE" , 0, 12, 19, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_LISTEN_INTERFACE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_LISTEN_FILTER" , 0, 20, 20, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_LISTEN_FILTER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_SYN_DEFENSE" , 0, 21, 21, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_SYN_DEFENSE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_CONNECTION_POLICY" , 0, 22, 23, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_CONNECTION_POLICY" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_FLT_INFO" , 0, 28, 63, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_FLT_INFO" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_ACCEPT_MODE" , 0, 64, 65, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_ACCEPT_MODE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TX_CHANNEL" , 0, 66, 67, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TX_CHANNEL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NO_CONGESTION_CONTROL" , 0, 68, 68, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NO_CONGESTION_CONTROL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_DELAYED_ACK" , 0, 69, 69, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_DELAYED_ACK" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_INJECT_TIMER" , 0, 70, 70, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_INJECT_TIMER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NON_OFFLOAD" , 0, 71, 71, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NON_OFFLOAD" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_ULP_MODE" , 0, 72, 75, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_ULP_MODE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAX_RCV_BUFFER" , 0, 76, 85, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAX_RCV_BUFFER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TOS" , 0, 86, 91, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TOS" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_SM_SEL" , 0, 92, 99, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_SM_SEL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_L2T_IX" , 0, 100, 111, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_L2T_IX" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TCAM_BYPASS" , 0, 112, 112, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TCAM_BYPASS" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NAGLE" , 0, 113, 113, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NAGLE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_WSF" , 0, 114, 117, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_WSF" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_KEEPALIVE" , 0, 118, 118, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_KEEPALIVE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_CONN_MAXRT" , 0, 119, 122, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_CONN_MAXRT" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAXRT_OVERRIDE" , 0, 123, 123, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAXRT_OVERRIDE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAX_SEG" , 0, 124, 127, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAX_SEG" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"scb_slush" , 0, 128, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "scb_slush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + +/* ====================================================== */ +_TCBVAR g_fcb_info4[]={ + {"filter" , 0, 33, 33, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "filter" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Report_TID" , 0, 53, 53, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Report_TID" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Drop" , 0, 54, 54, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Drop" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Direct_Steer" , 0, 55, 55, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Direct_Steer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Mask_Hash" , 0, 48, 48, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Mask_Hash" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Direct_Steer_Hash" , 0, 49, 49, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Direct_Steer_Hash" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Loopback" , 0, 91, 91, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Loopback" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Loopback_TX_Channel" , 0, 44, 45, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Loopback_TX_Channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Rewrite_DMAC" , 0, 92, 92, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Rewrite_DMAC" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Rewrite_SMAC" , 0, 93, 93, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Rewrite_SMAC" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Insert_VLAN" , 0, 94, 94, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Insert_VLAN" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Remove_VLAN" , 0, 39, 39, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Remove_VLAN" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Count_Hits" , 0, 36, 36, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Count_Hits" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Hits_high" , 0, 224, 255, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Hits_high" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Hits_low" , 0, 192, 223, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Hits_low" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + Property changes on: stable/11/usr.sbin/cxgbetool/tcbinfot4.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.sbin/cxgbetool/tcbinfot5.c =================================================================== --- stable/11/usr.sbin/cxgbetool/tcbinfot5.c (nonexistent) +++ stable/11/usr.sbin/cxgbetool/tcbinfot5.c (revision 339393) @@ -0,0 +1,1465 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* Auto-generated file. Avoid direct editing. */ +/* Edits will be lost when file regenerated. */ +#include +#include "tcb_common.h" +_TCBVAR g_tcb_info5[]={ + {"ulp_type" , 0, 0, 3, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp_type" , /* aka */ + COMP_NONE , /* comp */ + "ULP mode: 0 =toe, 2=iscsi, 4=rdma, 5=ddp, 6=fcoe, 7=user, remaining values reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"ulp_raw" , 0, 4, 11, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp" , /* aka */ + COMP_ULP , /* comp */ + "ULP subtype", /*desc*/ + NULL, /*akadesc */ + }, + {"l2t_ix" , 0, 12, 23, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "l2t_ix" , /* aka */ + COMP_NONE , /* comp */ + "Destination MAC address index", /*desc*/ + NULL, /*akadesc */ + }, + {"smac_sel" , 0, 24, 31, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "smac_sel" , /* aka */ + COMP_NONE , /* comp */ + "Source MAC address index", /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MIGRATING" , 0, 32, 32, /* name,aux,lo,hi */ + "t_flags" , 0, 0, /* faka,flo,fhi */ + "migrating" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_NON_OFFLOAD" , 0, 33, 33, /* name,aux,lo,hi */ + "t_flags" , 1, 1, /* faka,flo,fhi */ + "non_offload" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_LOCK_TID" , 0, 34, 34, /* name,aux,lo,hi */ + "t_flags" , 2, 2, /* faka,flo,fhi */ + "lock_tid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_KEEPALIVE" , 0, 35, 35, /* name,aux,lo,hi */ + "t_flags" , 3, 3, /* faka,flo,fhi */ + "keepalive" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK" , 0, 36, 36, /* name,aux,lo,hi */ + "t_flags" , 4, 4, /* faka,flo,fhi */ + "dack" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_MSS" , 0, 37, 37, /* name,aux,lo,hi */ + "t_flags" , 5, 5, /* faka,flo,fhi */ + "dack_mss" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_NOT_ACKED" , 0, 38, 38, /* name,aux,lo,hi */ + "t_flags" , 6, 6, /* faka,flo,fhi */ + "dack_not_acked" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_NAGLE" , 0, 39, 39, /* name,aux,lo,hi */ + "t_flags" , 7, 7, /* faka,flo,fhi */ + "nagle" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_SSWS_DISABLED" , 0, 40, 40, /* name,aux,lo,hi */ + "t_flags" , 8, 8, /* faka,flo,fhi */ + "ssws_disabled" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_FLOW_CONTROL_DDP" , 0, 41, 41, /* name,aux,lo,hi */ + "t_flags" , 9, 9, /* faka,flo,fhi */ + "rx_flow_control_ddp" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_FLOW_CONTROL_DISABLE" , 0, 42, 42, /* name,aux,lo,hi */ + "t_flags" , 10, 10, /* faka,flo,fhi */ + "rx_flow_control_disable" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_CHANNEL" , 0, 43, 43, /* name,aux,lo,hi */ + "t_flags" , 11, 11, /* faka,flo,fhi */ + "rx_channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_CHANNEL" , 0, 44, 45, /* name,aux,lo,hi */ + "t_flags" , 12, 13, /* faka,flo,fhi */ + "tx_channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_QUIESCE" , 0, 46, 46, /* name,aux,lo,hi */ + "t_flags" , 14, 14, /* faka,flo,fhi */ + "tx_quiesce" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_QUIESCE" , 0, 47, 47, /* name,aux,lo,hi */ + "t_flags" , 15, 15, /* faka,flo,fhi */ + "rx_quiesce" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PACE_AUTO" , 0, 48, 48, /* name,aux,lo,hi */ + "t_flags" , 16, 16, /* faka,flo,fhi */ + "tx_pace_auto" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PACE_FIXED" , 0, 49, 49, /* name,aux,lo,hi */ + "t_flags" , 17, 17, /* faka,flo,fhi */ + "tx_pace_fixed" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_QUEUE" , 0, 50, 52, /* name,aux,lo,hi */ + "t_flags" , 18, 20, /* faka,flo,fhi */ + "tx_queue" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TURBO" , 0, 53, 53, /* name,aux,lo,hi */ + "t_flags" , 21, 21, /* faka,flo,fhi */ + "turbo" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_SEL0" , 0, 54, 54, /* name,aux,lo,hi */ + "t_flags" , 22, 22, /* faka,flo,fhi */ + "cctrl_sel0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_SEL1" , 0, 55, 55, /* name,aux,lo,hi */ + "t_flags" , 23, 23, /* faka,flo,fhi */ + "cctrl_sel1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_FIN" , 0, 56, 56, /* name,aux,lo,hi */ + "t_flags" , 24, 24, /* faka,flo,fhi */ + "core_fin" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_URG" , 0, 57, 57, /* name,aux,lo,hi */ + "t_flags" , 25, 25, /* faka,flo,fhi */ + "core_urg" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_MORE" , 0, 58, 58, /* name,aux,lo,hi */ + "t_flags" , 26, 26, /* faka,flo,fhi */ + "core_more" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_PUSH" , 0, 59, 59, /* name,aux,lo,hi */ + "t_flags" , 27, 27, /* faka,flo,fhi */ + "core_push" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_FLUSH" , 0, 60, 60, /* name,aux,lo,hi */ + "t_flags" , 28, 28, /* faka,flo,fhi */ + "core_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_ENABLE" , 0, 61, 61, /* name,aux,lo,hi */ + "t_flags" , 29, 29, /* faka,flo,fhi */ + "rcv_coalesce_enable" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_PUSH" , 0, 62, 62, /* name,aux,lo,hi */ + "t_flags" , 30, 30, /* faka,flo,fhi */ + "rcv_coalesce_push" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_LAST_PSH" , 0, 63, 63, /* name,aux,lo,hi */ + "t_flags" , 31, 31, /* faka,flo,fhi */ + "rcv_coalesce_last_psh" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_HEARTBEAT" , 0, 64, 64, /* name,aux,lo,hi */ + "t_flags" , 32, 32, /* faka,flo,fhi */ + "rcv_coalesce_heartbeat" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RSS_FW" , 0, 65, 65, /* name,aux,lo,hi */ + "t_flags" , 33, 33, /* faka,flo,fhi */ + "rss_fw" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_ACTIVE_OPEN" , 0, 66, 66, /* name,aux,lo,hi */ + "t_flags" , 34, 34, /* faka,flo,fhi */ + "active_open" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_ASK_MODE" , 0, 67, 67, /* name,aux,lo,hi */ + "t_flags" , 35, 35, /* faka,flo,fhi */ + "ask_mode" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON0" , 0, 68, 68, /* name,aux,lo,hi */ + "t_flags" , 36, 36, /* faka,flo,fhi */ + "mod_schd_reason0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON1" , 0, 69, 69, /* name,aux,lo,hi */ + "t_flags" , 37, 37, /* faka,flo,fhi */ + "mod_schd_reason1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON2" , 0, 70, 70, /* name,aux,lo,hi */ + "t_flags" , 38, 38, /* faka,flo,fhi */ + "mod_schd_reason2" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_TX" , 0, 71, 71, /* name,aux,lo,hi */ + "t_flags" , 39, 39, /* faka,flo,fhi */ + "mod_schd_tx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_RX" , 0, 72, 72, /* name,aux,lo,hi */ + "t_flags" , 40, 40, /* faka,flo,fhi */ + "mod_schd_rx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TIMER" , 0, 73, 73, /* name,aux,lo,hi */ + "t_flags" , 41, 41, /* faka,flo,fhi */ + "timer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_TIMER" , 0, 74, 74, /* name,aux,lo,hi */ + "t_flags" , 42, 42, /* faka,flo,fhi */ + "dack_timer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEER_FIN" , 0, 75, 75, /* name,aux,lo,hi */ + "t_flags" , 43, 43, /* faka,flo,fhi */ + "peer_fin" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_COMPACT" , 0, 76, 76, /* name,aux,lo,hi */ + "t_flags" , 44, 44, /* faka,flo,fhi */ + "tx_compact" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_COMPACT" , 0, 77, 77, /* name,aux,lo,hi */ + "t_flags" , 45, 45, /* faka,flo,fhi */ + "rx_compact" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RDMA_ERROR" , 0, 78, 78, /* name,aux,lo,hi */ + "t_flags" , 46, 46, /* faka,flo,fhi */ + "rdma_error" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RDMA_FLM_ERROR" , 0, 79, 79, /* name,aux,lo,hi */ + "t_flags" , 47, 47, /* faka,flo,fhi */ + "rdma_flm_error" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PDU_OUT" , 0, 80, 80, /* name,aux,lo,hi */ + "t_flags" , 48, 48, /* faka,flo,fhi */ + "tx_pdu_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_PDU_OUT" , 0, 81, 81, /* name,aux,lo,hi */ + "t_flags" , 49, 49, /* faka,flo,fhi */ + "rx_pdu_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DUPACK_COUNT_ODD" , 0, 82, 82, /* name,aux,lo,hi */ + "t_flags" , 50, 50, /* faka,flo,fhi */ + "dupack_count_odd" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_FAST_RECOVERY" , 0, 83, 83, /* name,aux,lo,hi */ + "t_flags" , 51, 51, /* faka,flo,fhi */ + "fast_recovery" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_SCALE" , 0, 84, 84, /* name,aux,lo,hi */ + "t_flags" , 52, 52, /* faka,flo,fhi */ + "recv_scale" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_TSTMP" , 0, 85, 85, /* name,aux,lo,hi */ + "t_flags" , 53, 53, /* faka,flo,fhi */ + "recv_tstmp" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_SACK" , 0, 86, 86, /* name,aux,lo,hi */ + "t_flags" , 54, 54, /* faka,flo,fhi */ + "recv_sack" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL0" , 0, 87, 87, /* name,aux,lo,hi */ + "t_flags" , 55, 55, /* faka,flo,fhi */ + "pend_ctl0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL1" , 0, 88, 88, /* name,aux,lo,hi */ + "t_flags" , 56, 56, /* faka,flo,fhi */ + "pend_ctl1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL2" , 0, 89, 89, /* name,aux,lo,hi */ + "t_flags" , 57, 57, /* faka,flo,fhi */ + "pend_ctl2" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_IP_VERSION" , 0, 90, 90, /* name,aux,lo,hi */ + "t_flags" , 58, 58, /* faka,flo,fhi */ + "ip_version" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_ECN" , 0, 91, 91, /* name,aux,lo,hi */ + "t_flags" , 59, 59, /* faka,flo,fhi */ + "cctrl_ecn" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_ECE" , 0, 92, 92, /* name,aux,lo,hi */ + "t_flags" , 60, 60, /* faka,flo,fhi */ + "cctrl_ece" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_CWR" , 0, 93, 93, /* name,aux,lo,hi */ + "t_flags" , 61, 61, /* faka,flo,fhi */ + "cctrl_cwr" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_RFR" , 0, 94, 94, /* name,aux,lo,hi */ + "t_flags" , 62, 62, /* faka,flo,fhi */ + "cctrl_rfr" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_UNUSED" , 0, 95, 95, /* name,aux,lo,hi */ + "t_flags" , 63, 63, /* faka,flo,fhi */ + "unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"rss_info" , 0, 96, 105, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rss_info" , /* aka */ + COMP_NONE , /* comp */ + "RSS field", /*desc*/ + NULL, /*akadesc */ + }, + {"tos" , 0, 106, 111, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tos" , /* aka */ + COMP_NONE , /* comp */ + "TOS field for IP header", /*desc*/ + NULL, /*akadesc */ + }, + {"t_state" , 0, 112, 115, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_state" , /* aka */ + COMP_NONE , /* comp */ + "Connection TCP state (see TCP state table)", /*desc*/ + NULL, /*akadesc */ + }, + {"max_rt" , 0, 116, 119, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "max_rt" , /* aka */ + COMP_NONE , /* comp */ + "Maximum re-transmissions", /*desc*/ + NULL, /*akadesc */ + }, + {"t_maxseg" , 0, 120, 123, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_maxseg" , /* aka */ + COMP_NONE , /* comp */ + "MTU table index", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_scale" , 0, 124, 127, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_scale" , /* aka */ + COMP_NONE , /* comp */ + "Scaling for receive window (0-14). Note: this is reverse of common definition.", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_scale" , 0, 128, 131, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_scale" , /* aka */ + COMP_NONE , /* comp */ + "Scaling for send window (0-14). Note: this is reverse of common definition.", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rxtshift" , 0, 132, 135, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rxtshift" , /* aka */ + COMP_NONE , /* comp */ + "Retransmit exponential backoff", /*desc*/ + NULL, /*akadesc */ + }, + {"t_dupacks" , 0, 136, 139, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_dupacks" , /* aka */ + COMP_NONE , /* comp */ + "Number of duplicate ACKs received", /*desc*/ + NULL, /*akadesc */ + }, + {"timestamp_offset" , 0, 140, 143, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "timestamp_offset" , /* aka */ + COMP_NONE , /* comp */ + "Timestamp offset from running clock", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_adv" , 0, 144, 159, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_adv" , /* aka */ + COMP_NONE , /* comp */ + "Peer advertised window", /*desc*/ + NULL, /*akadesc */ + }, + {"timestamp" , 0, 160, 191, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "timestamp" , /* aka */ + COMP_NONE , /* comp */ + "Timer accounting field", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rtt_ts_recent_age" , 0, 192, 223, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rtt_ts_recent_age" , /* aka */ + COMP_NONE , /* comp */ + "Round-trip time; timestamps: ts_recent_age", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rtseq_recent" , 0, 224, 255, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rtseq_recent" , /* aka */ + COMP_NONE , /* comp */ + "Sequence number being timed t_rtseq; timestamps t_recent", /*desc*/ + NULL, /*akadesc */ + }, + {"t_srtt" , 0, 256, 271, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_srtt" , /* aka */ + COMP_NONE , /* comp */ + "Smoothed round-trip time", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rttvar" , 0, 272, 287, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rttvar" , /* aka */ + COMP_NONE , /* comp */ + "Variance in round-trip time", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_max" , 0, 288, 319, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_max" , /* aka */ + COMP_NONE , /* comp */ + "Highest sequence number in transmit buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_una_raw" , 0, 320, 347, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_una" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_una from tx_max", /*desc*/ + "Send unacknowledged", /*akadesc */ + }, + {"snd_nxt_raw" , 0, 348, 375, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_nxt" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_nxt from tx_max", /*desc*/ + "Send next", /*akadesc */ + }, + {"snd_max_raw" , 0, 376, 403, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_max" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_max from tx_max", /*desc*/ + "Highest sequence number sent", /*akadesc */ + }, + {"snd_rec_raw" , 0, 404, 431, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_rec" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of NewReno fast recovery end sequence from tx_max", /*desc*/ + "NewReno fast recovery end sequence number", /*akadesc */ + }, + {"snd_cwnd" , 0, 432, 459, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_cwnd" , /* aka */ + COMP_NONE , /* comp */ + "Congestion-control window", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_ssthresh" , 0, 460, 487, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_ssthresh" , /* aka */ + COMP_NONE , /* comp */ + "Slow Start threshold", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_hdr_ptr_raw" , 0, 488, 504, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_hdr_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for first byte in send buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_last_ptr_raw" , 0, 505, 521, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_last_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for last byte in send buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_nxt" , 0, 522, 553, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_nxt" , /* aka */ + COMP_NONE , /* comp */ + "TCP receive next", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_wnd" , 0, 554, 581, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_wnd" , /* aka */ + COMP_NONE , /* comp */ + "Receive credits (advertised to peer in receive window)", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_hdr_offset" , 0, 582, 609, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_hdr_offset" , /* aka */ + COMP_NONE , /* comp */ + "Receive in-order buffered data", /*desc*/ + NULL, /*akadesc */ + }, + {"ts_last_ack_sent_raw" , 0, 610, 637, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ts_last_ack_sent" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of highest sequence acked from rcv_nxt", /*desc*/ + "Highest sequence number acked", /*akadesc */ + }, + {"rx_frag0_start_idx_raw" , 0, 638, 665, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag0_start_idx" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 0 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_start_idx_offset" , 0, 666, 693, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 1 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag0_len" , 0, 694, 721, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag0_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive re-order fragment 0 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_len" , 0, 722, 749, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive re-order fragment 1 length", /*desc*/ + NULL, /*akadesc */ + }, + {"pdu_len" , 0, 750, 765, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pdu_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive recovered PDU length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ptr_raw" , 0, 766, 782, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for in-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_ptr_raw" , 0, 783, 799, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"main_slush" , 0, 800, 831, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "main_slush" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"aux1_slush0" , 1, 832, 846, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux1_slush0" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_start_idx_offset_raw", 1, 847, 874, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 2 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_ptr_raw" , 1, 875, 891, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_len_raw" , 1, 892, 919, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_len" , /* aka */ + COMP_LEN , /* comp */ + "Receive re-order fragment 2 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_ptr_raw" , 1, 920, 936, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_len_raw" , 1, 937, 964, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_len" , /* aka */ + COMP_LEN , /* comp */ + "Receive re-order fragment 3 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_start_idx_offset_raw", 1, 965, 992, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 3 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"pdu_hdr_len" , 1, 993, 1000, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pdu_hdr_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive recovered PDU header length", /*desc*/ + NULL, /*akadesc */ + }, + {"aux1_slush1" , 1, 1001, 1019, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux1_slush1" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"ulp_ext" , 1, 1020, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp_ext" , /* aka */ + COMP_NONE , /* comp */ + "Extension of ulp_raw for PI configuration", /*desc*/ + NULL, /*akadesc */ + }, + + {"irs_ulp" , 2, 832, 840, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "irs_ulp" , /* aka */ + COMP_NONE , /* comp */ + "IRS modulo marker_interval when enterring iWARP mode", /*desc*/ + NULL, /*akadesc */ + }, + {"iss_ulp" , 2, 841, 849, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "iss_ulp" , /* aka */ + COMP_NONE , /* comp */ + "ISS modulo marker_interval when entering iWARP mode", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_pdu_len" , 2, 850, 863, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_pdu_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of Tx FPDU", /*desc*/ + NULL, /*akadesc */ + }, + {"cq_idx_sq" , 2, 864, 879, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "cq_idx_sq" , /* aka */ + COMP_NONE , /* comp */ + "CQ index of CQ for SQ", /*desc*/ + NULL, /*akadesc */ + }, + {"cq_idx_rq" , 2, 880, 895, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "cq_idx_rq" , /* aka */ + COMP_NONE , /* comp */ + "CQ index of CQ for RQ", /*desc*/ + NULL, /*akadesc */ + }, + {"qp_id" , 2, 896, 911, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "qp_id" , /* aka */ + COMP_NONE , /* comp */ + "QP index", /*desc*/ + NULL, /*akadesc */ + }, + {"pd_id" , 2, 912, 927, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pd_id" , /* aka */ + COMP_NONE , /* comp */ + "PD index", /*desc*/ + NULL, /*akadesc */ + }, + {"STAG" , 2, 928, 959, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "stag" , /* aka */ + COMP_NONE , /* comp */ + "PDU response STAG", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_start" , 2, 960, 985, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_start" , /* aka */ + COMP_NONE , /* comp */ + "DW aligned starting addres of RQ", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_MSN" , 2, 986, 998, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_msn" , /* aka */ + COMP_NONE , /* comp */ + "Current MSN (modulo 8K, further check in ULP_RX)", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_max_offset" , 2, 999, 1002, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_max_offset" , /* aka */ + COMP_NONE , /* comp */ + "Log size RQ (the size in hardware is rounded up to a power of 2)", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_write_ptr" , 2, 1003, 1015, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_write_ptr" , /* aka */ + COMP_NONE , /* comp */ + "Host RQ write pointer", /*desc*/ + NULL, /*akadesc */ + }, + {"RDMAP_opcode" , 2, 1016, 1019, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rdmap_opcode" , /* aka */ + COMP_NONE , /* comp */ + "Current FPDU command", /*desc*/ + NULL, /*akadesc */ + }, + {"ord_L_bit_vld" , 2, 1020, 1020, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ord_l_bit_vld" , /* aka */ + COMP_NONE , /* comp */ + "Current FPDU has L-bit set", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_flush" , 2, 1021, 1021, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_flush" , /* aka */ + COMP_NONE , /* comp */ + "1 = flush CPL_TX_DATA", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_oos_rxmt" , 2, 1022, 1022, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_oos_rxmt" , /* aka */ + COMP_NONE , /* comp */ + "Retransmit is out of FPDU sync", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_oos_txmt" , 2, 1023, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_oos_txmt" , /* aka */ + COMP_NONE , /* comp */ + "Transmit is out of FPDU sync, or disable aligned transmission", /*desc*/ + NULL, /*akadesc */ + }, + + {"rx_ddp_buf0_offset" , 3, 832, 855, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_offset" , /* aka */ + COMP_NONE , /* comp */ + "Current offset into DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf0_len" , 3, 856, 879, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_INDICATE_OUT" , 3, 880, 880, /* name,aux,lo,hi */ + "rx_ddp_flags" , 0, 0, /* faka,flo,fhi */ + "ddp_indicate_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_ACTIVE_BUF" , 3, 881, 881, /* name,aux,lo,hi */ + "rx_ddp_flags" , 1, 1, /* faka,flo,fhi */ + "ddp_active_buf" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_OFF" , 3, 882, 882, /* name,aux,lo,hi */ + "rx_ddp_flags" , 2, 2, /* faka,flo,fhi */ + "ddp_off" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_WAIT_FRAG" , 3, 883, 883, /* name,aux,lo,hi */ + "rx_ddp_flags" , 3, 3, /* faka,flo,fhi */ + "ddp_wait_frag" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF_INF" , 3, 884, 884, /* name,aux,lo,hi */ + "rx_ddp_flags" , 4, 4, /* faka,flo,fhi */ + "ddp_buf_inf" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_RX2TX" , 3, 885, 885, /* name,aux,lo,hi */ + "rx_ddp_flags" , 5, 5, /* faka,flo,fhi */ + "ddp_rx2tx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_MAIN_UNUSED" , 3, 886, 887, /* name,aux,lo,hi */ + "rx_ddp_flags" , 6, 7, /* faka,flo,fhi */ + "ddp_main_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_VALID" , 3, 888, 888, /* name,aux,lo,hi */ + "rx_ddp_flags" , 8, 8, /* faka,flo,fhi */ + "ddp_buf0_valid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_INDICATE" , 3, 889, 889, /* name,aux,lo,hi */ + "rx_ddp_flags" , 9, 9, /* faka,flo,fhi */ + "ddp_buf0_indicate" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_FLUSH" , 3, 890, 890, /* name,aux,lo,hi */ + "rx_ddp_flags" , 10, 10, /* faka,flo,fhi */ + "ddp_buf0_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSHF_ENABLE_0" , 3, 891, 891, /* name,aux,lo,hi */ + "rx_ddp_flags" , 11, 11, /* faka,flo,fhi */ + "ddp_pshf_enable_0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PUSH_DISABLE_0" , 3, 892, 892, /* name,aux,lo,hi */ + "rx_ddp_flags" , 12, 12, /* faka,flo,fhi */ + "ddp_push_disable_0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSH_NO_INVALIDATE0" , 3, 893, 893, /* name,aux,lo,hi */ + "rx_ddp_flags" , 13, 13, /* faka,flo,fhi */ + "ddp_psh_no_invalidate0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_UNUSED" , 3, 894, 895, /* name,aux,lo,hi */ + "rx_ddp_flags" , 14, 15, /* faka,flo,fhi */ + "ddp_buf0_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_VALID" , 3, 896, 896, /* name,aux,lo,hi */ + "rx_ddp_flags" , 16, 16, /* faka,flo,fhi */ + "ddp_buf1_valid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_INDICATE" , 3, 897, 897, /* name,aux,lo,hi */ + "rx_ddp_flags" , 17, 17, /* faka,flo,fhi */ + "ddp_buf1_indicate" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_FLUSH" , 3, 898, 898, /* name,aux,lo,hi */ + "rx_ddp_flags" , 18, 18, /* faka,flo,fhi */ + "ddp_buf1_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSHF_ENABLE_1" , 3, 899, 899, /* name,aux,lo,hi */ + "rx_ddp_flags" , 19, 19, /* faka,flo,fhi */ + "ddp_pshf_enable_1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PUSH_DISABLE_1" , 3, 900, 900, /* name,aux,lo,hi */ + "rx_ddp_flags" , 20, 20, /* faka,flo,fhi */ + "ddp_push_disable_1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSH_NO_INVALIDATE1" , 3, 901, 901, /* name,aux,lo,hi */ + "rx_ddp_flags" , 21, 21, /* faka,flo,fhi */ + "ddp_psh_no_invalidate1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_UNUSED" , 3, 902, 903, /* name,aux,lo,hi */ + "rx_ddp_flags" , 22, 23, /* faka,flo,fhi */ + "ddp_buf1_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_offset" , 3, 904, 927, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_offset" , /* aka */ + COMP_NONE , /* comp */ + "Current offset into DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_len" , 3, 928, 951, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {"aux3_slush" , 3, 952, 959, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux3_slush" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf0_tag" , 3, 960, 991, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_tag" , /* aka */ + COMP_NONE , /* comp */ + "Tag for DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_tag" , 3, 992, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_tag" , /* aka */ + COMP_NONE , /* comp */ + "Tag for DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + +/* ====================================================== */ +_TCBVAR g_scb_info5[]={ + {"OPT_1_RSS_INFO" , 0, 0, 11, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_RSS_INFO" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_LISTEN_INTERFACE" , 0, 12, 19, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_LISTEN_INTERFACE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_LISTEN_FILTER" , 0, 20, 20, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_LISTEN_FILTER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_SYN_DEFENSE" , 0, 21, 21, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_SYN_DEFENSE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_CONNECTION_POLICY" , 0, 22, 23, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_CONNECTION_POLICY" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_FLT_INFO" , 0, 24, 63, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_FLT_INFO" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_ACCEPT_MODE" , 0, 64, 65, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_ACCEPT_MODE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TX_CHANNEL" , 0, 66, 67, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TX_CHANNEL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NO_CONGESTION_CONTROL" , 0, 68, 68, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NO_CONGESTION_CONTROL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_DELAYED_ACK" , 0, 69, 69, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_DELAYED_ACK" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_INJECT_TIMER" , 0, 70, 70, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_INJECT_TIMER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NON_OFFLOAD" , 0, 71, 71, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NON_OFFLOAD" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_ULP_MODE" , 0, 72, 75, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_ULP_MODE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAX_RCV_BUFFER" , 0, 76, 85, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAX_RCV_BUFFER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TOS" , 0, 86, 91, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TOS" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_SM_SEL" , 0, 92, 99, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_SM_SEL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_L2T_IX" , 0, 100, 111, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_L2T_IX" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TCAM_BYPASS" , 0, 112, 112, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TCAM_BYPASS" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NAGLE" , 0, 113, 113, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NAGLE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_WSF" , 0, 114, 117, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_WSF" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_KEEPALIVE" , 0, 118, 118, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_KEEPALIVE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_CONN_MAXRT" , 0, 119, 122, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_CONN_MAXRT" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAXRT_OVERRIDE" , 0, 123, 123, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAXRT_OVERRIDE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAX_SEG" , 0, 124, 127, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAX_SEG" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"scb_slush" , 0, 128, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "scb_slush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + +/* ====================================================== */ +_TCBVAR g_fcb_info5[]={ + {"filter" , 0, 33, 33, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "filter" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Report_TID" , 0, 53, 53, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Report_TID" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Drop" , 0, 54, 54, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Drop" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Direct_Steer" , 0, 55, 55, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Direct_Steer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Mask_Hash" , 0, 48, 48, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Mask_Hash" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Direct_Steer_Hash" , 0, 49, 49, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Direct_Steer_Hash" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Loopback" , 0, 91, 91, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Loopback" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Loopback_TX_Channel" , 0, 44, 45, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Loopback_TX_Channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Swap_MAC_addresses" , 0, 86, 86, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Swap_MAC_addresses" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Rewrite_DMAC" , 0, 92, 92, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Rewrite_DMAC" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Rewrite_SMAC" , 0, 93, 93, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Rewrite_SMAC" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Insert_VLAN" , 0, 94, 94, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Insert_VLAN" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Remove_VLAN" , 0, 39, 39, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Remove_VLAN" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"NAT_Mode" , 0, 50, 52, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "NAT_Mode" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"NAT_seq_check" , 0, 42, 42, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "NAT_seq_check" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"NAT_flag_check" , 0, 84, 84, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "NAT_flag_check" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Count_Hits" , 0, 36, 36, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Count_Hits" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Hit_frame_cnt" , 0, 160, 191, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Hit_frame_cnt" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Hit_byte_cnt_high" , 0, 224, 255, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Hit_byte_cnt_high" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Hit_byte_cnt_low" , 0, 192, 223, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Hit_byte_cnt_low" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + Property changes on: stable/11/usr.sbin/cxgbetool/tcbinfot5.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.sbin/cxgbetool/tcbinfot6.c =================================================================== --- stable/11/usr.sbin/cxgbetool/tcbinfot6.c (nonexistent) +++ stable/11/usr.sbin/cxgbetool/tcbinfot6.c (revision 339393) @@ -0,0 +1,1535 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* Auto-generated file. Avoid direct editing. */ +/* Edits will be lost when file regenerated. */ +#include +#include "tcb_common.h" +_TCBVAR g_tcb_info6[]={ + {"ulp_type" , 0, 0, 3, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp_type" , /* aka */ + COMP_NONE , /* comp */ + "ULP mode: 0 =toe, 2=iscsi, 4=rdma, 5=ddp, 6=fcoe, 7=user, 8=tls, 9=dtls, remaining values reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"ulp_raw" , 0, 4, 11, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp" , /* aka */ + COMP_ULP , /* comp */ + "ULP subtype", /*desc*/ + NULL, /*akadesc */ + }, + {"l2t_ix" , 0, 12, 23, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "l2t_ix" , /* aka */ + COMP_NONE , /* comp */ + "Destination MAC address index", /*desc*/ + NULL, /*akadesc */ + }, + {"smac_sel" , 0, 24, 31, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "smac_sel" , /* aka */ + COMP_NONE , /* comp */ + "Source MAC address index", /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MIGRATING" , 0, 32, 32, /* name,aux,lo,hi */ + "t_flags" , 0, 0, /* faka,flo,fhi */ + "migrating" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_NON_OFFLOAD" , 0, 33, 33, /* name,aux,lo,hi */ + "t_flags" , 1, 1, /* faka,flo,fhi */ + "non_offload" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_LOCK_TID" , 0, 34, 34, /* name,aux,lo,hi */ + "t_flags" , 2, 2, /* faka,flo,fhi */ + "lock_tid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_KEEPALIVE" , 0, 35, 35, /* name,aux,lo,hi */ + "t_flags" , 3, 3, /* faka,flo,fhi */ + "keepalive" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK" , 0, 36, 36, /* name,aux,lo,hi */ + "t_flags" , 4, 4, /* faka,flo,fhi */ + "dack" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_MSS" , 0, 37, 37, /* name,aux,lo,hi */ + "t_flags" , 5, 5, /* faka,flo,fhi */ + "dack_mss" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_NOT_ACKED" , 0, 38, 38, /* name,aux,lo,hi */ + "t_flags" , 6, 6, /* faka,flo,fhi */ + "dack_not_acked" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_NAGLE" , 0, 39, 39, /* name,aux,lo,hi */ + "t_flags" , 7, 7, /* faka,flo,fhi */ + "nagle" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_SSWS_DISABLED" , 0, 40, 40, /* name,aux,lo,hi */ + "t_flags" , 8, 8, /* faka,flo,fhi */ + "ssws_disabled" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_FLOW_CONTROL_DDP" , 0, 41, 41, /* name,aux,lo,hi */ + "t_flags" , 9, 9, /* faka,flo,fhi */ + "rx_flow_control_ddp" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_FLOW_CONTROL_DISABLE" , 0, 42, 42, /* name,aux,lo,hi */ + "t_flags" , 10, 10, /* faka,flo,fhi */ + "rx_flow_control_disable" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_CHANNEL" , 0, 43, 43, /* name,aux,lo,hi */ + "t_flags" , 11, 11, /* faka,flo,fhi */ + "rx_channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_CHANNEL" , 0, 44, 45, /* name,aux,lo,hi */ + "t_flags" , 12, 13, /* faka,flo,fhi */ + "tx_channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_QUIESCE" , 0, 46, 46, /* name,aux,lo,hi */ + "t_flags" , 14, 14, /* faka,flo,fhi */ + "tx_quiesce" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_QUIESCE" , 0, 47, 47, /* name,aux,lo,hi */ + "t_flags" , 15, 15, /* faka,flo,fhi */ + "rx_quiesce" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PACE_AUTO" , 0, 48, 48, /* name,aux,lo,hi */ + "t_flags" , 16, 16, /* faka,flo,fhi */ + "tx_pace_auto" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PACE_FIXED" , 0, 49, 49, /* name,aux,lo,hi */ + "t_flags" , 17, 17, /* faka,flo,fhi */ + "tx_pace_fixed" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_QUEUE" , 0, 50, 52, /* name,aux,lo,hi */ + "t_flags" , 18, 20, /* faka,flo,fhi */ + "tx_queue" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TURBO" , 0, 53, 53, /* name,aux,lo,hi */ + "t_flags" , 21, 21, /* faka,flo,fhi */ + "turbo" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_SEL0" , 0, 54, 54, /* name,aux,lo,hi */ + "t_flags" , 22, 22, /* faka,flo,fhi */ + "cctrl_sel0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_SEL1" , 0, 55, 55, /* name,aux,lo,hi */ + "t_flags" , 23, 23, /* faka,flo,fhi */ + "cctrl_sel1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_FIN" , 0, 56, 56, /* name,aux,lo,hi */ + "t_flags" , 24, 24, /* faka,flo,fhi */ + "core_fin" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_URG" , 0, 57, 57, /* name,aux,lo,hi */ + "t_flags" , 25, 25, /* faka,flo,fhi */ + "core_urg" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_MORE" , 0, 58, 58, /* name,aux,lo,hi */ + "t_flags" , 26, 26, /* faka,flo,fhi */ + "core_more" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_PUSH" , 0, 59, 59, /* name,aux,lo,hi */ + "t_flags" , 27, 27, /* faka,flo,fhi */ + "core_push" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_FLUSH" , 0, 60, 60, /* name,aux,lo,hi */ + "t_flags" , 28, 28, /* faka,flo,fhi */ + "core_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_ENABLE" , 0, 61, 61, /* name,aux,lo,hi */ + "t_flags" , 29, 29, /* faka,flo,fhi */ + "rcv_coalesce_enable" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_PUSH" , 0, 62, 62, /* name,aux,lo,hi */ + "t_flags" , 30, 30, /* faka,flo,fhi */ + "rcv_coalesce_push" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_LAST_PSH" , 0, 63, 63, /* name,aux,lo,hi */ + "t_flags" , 31, 31, /* faka,flo,fhi */ + "rcv_coalesce_last_psh" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RCV_COALESCE_HEARTBEAT" , 0, 64, 64, /* name,aux,lo,hi */ + "t_flags" , 32, 32, /* faka,flo,fhi */ + "rcv_coalesce_heartbeat" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RSS_FW" , 0, 65, 65, /* name,aux,lo,hi */ + "t_flags" , 33, 33, /* faka,flo,fhi */ + "rss_fw" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_ACTIVE_OPEN" , 0, 66, 66, /* name,aux,lo,hi */ + "t_flags" , 34, 34, /* faka,flo,fhi */ + "active_open" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_ASK_MODE" , 0, 67, 67, /* name,aux,lo,hi */ + "t_flags" , 35, 35, /* faka,flo,fhi */ + "ask_mode" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON0" , 0, 68, 68, /* name,aux,lo,hi */ + "t_flags" , 36, 36, /* faka,flo,fhi */ + "mod_schd_reason0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON1" , 0, 69, 69, /* name,aux,lo,hi */ + "t_flags" , 37, 37, /* faka,flo,fhi */ + "mod_schd_reason1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_REASON2" , 0, 70, 70, /* name,aux,lo,hi */ + "t_flags" , 38, 38, /* faka,flo,fhi */ + "mod_schd_reason2" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_TX" , 0, 71, 71, /* name,aux,lo,hi */ + "t_flags" , 39, 39, /* faka,flo,fhi */ + "mod_schd_tx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MOD_SCHD_RX" , 0, 72, 72, /* name,aux,lo,hi */ + "t_flags" , 40, 40, /* faka,flo,fhi */ + "mod_schd_rx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TIMER" , 0, 73, 73, /* name,aux,lo,hi */ + "t_flags" , 41, 41, /* faka,flo,fhi */ + "timer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DACK_TIMER" , 0, 74, 74, /* name,aux,lo,hi */ + "t_flags" , 42, 42, /* faka,flo,fhi */ + "dack_timer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEER_FIN" , 0, 75, 75, /* name,aux,lo,hi */ + "t_flags" , 43, 43, /* faka,flo,fhi */ + "peer_fin" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_COMPACT" , 0, 76, 76, /* name,aux,lo,hi */ + "t_flags" , 44, 44, /* faka,flo,fhi */ + "tx_compact" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_COMPACT" , 0, 77, 77, /* name,aux,lo,hi */ + "t_flags" , 45, 45, /* faka,flo,fhi */ + "rx_compact" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RDMA_ERROR" , 0, 78, 78, /* name,aux,lo,hi */ + "t_flags" , 46, 46, /* faka,flo,fhi */ + "rdma_error" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RDMA_FLM_ERROR" , 0, 79, 79, /* name,aux,lo,hi */ + "t_flags" , 47, 47, /* faka,flo,fhi */ + "rdma_flm_error" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TX_PDU_OUT" , 0, 80, 80, /* name,aux,lo,hi */ + "t_flags" , 48, 48, /* faka,flo,fhi */ + "tx_pdu_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RX_PDU_OUT" , 0, 81, 81, /* name,aux,lo,hi */ + "t_flags" , 49, 49, /* faka,flo,fhi */ + "rx_pdu_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DUPACK_COUNT_ODD" , 0, 82, 82, /* name,aux,lo,hi */ + "t_flags" , 50, 50, /* faka,flo,fhi */ + "dupack_count_odd" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_FAST_RECOVERY" , 0, 83, 83, /* name,aux,lo,hi */ + "t_flags" , 51, 51, /* faka,flo,fhi */ + "fast_recovery" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_SCALE" , 0, 84, 84, /* name,aux,lo,hi */ + "t_flags" , 52, 52, /* faka,flo,fhi */ + "recv_scale" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_TSTMP" , 0, 85, 85, /* name,aux,lo,hi */ + "t_flags" , 53, 53, /* faka,flo,fhi */ + "recv_tstmp" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_RECV_SACK" , 0, 86, 86, /* name,aux,lo,hi */ + "t_flags" , 54, 54, /* faka,flo,fhi */ + "recv_sack" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL0" , 0, 87, 87, /* name,aux,lo,hi */ + "t_flags" , 55, 55, /* faka,flo,fhi */ + "pend_ctl0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL1" , 0, 88, 88, /* name,aux,lo,hi */ + "t_flags" , 56, 56, /* faka,flo,fhi */ + "pend_ctl1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_PEND_CTL2" , 0, 89, 89, /* name,aux,lo,hi */ + "t_flags" , 57, 57, /* faka,flo,fhi */ + "pend_ctl2" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_IP_VERSION" , 0, 90, 90, /* name,aux,lo,hi */ + "t_flags" , 58, 58, /* faka,flo,fhi */ + "ip_version" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_ECN" , 0, 91, 91, /* name,aux,lo,hi */ + "t_flags" , 59, 59, /* faka,flo,fhi */ + "cctrl_ecn" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_ECE" , 0, 92, 92, /* name,aux,lo,hi */ + "t_flags" , 60, 60, /* faka,flo,fhi */ + "cctrl_ece" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_CWR" , 0, 93, 93, /* name,aux,lo,hi */ + "t_flags" , 61, 61, /* faka,flo,fhi */ + "cctrl_cwr" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CCTRL_RFR" , 0, 94, 94, /* name,aux,lo,hi */ + "t_flags" , 62, 62, /* faka,flo,fhi */ + "cctrl_rfr" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_CORE_BYPASS" , 0, 95, 95, /* name,aux,lo,hi */ + "t_flags" , 63, 63, /* faka,flo,fhi */ + "core_bypass" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"rss_info" , 0, 96, 105, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rss_info" , /* aka */ + COMP_NONE , /* comp */ + "RSS field", /*desc*/ + NULL, /*akadesc */ + }, + {"tos" , 0, 106, 111, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tos" , /* aka */ + COMP_NONE , /* comp */ + "TOS field for IP header", /*desc*/ + NULL, /*akadesc */ + }, + {"t_state" , 0, 112, 115, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_state" , /* aka */ + COMP_NONE , /* comp */ + "Connection TCP state (see TCP state table)", /*desc*/ + NULL, /*akadesc */ + }, + {"max_rt" , 0, 116, 119, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "max_rt" , /* aka */ + COMP_NONE , /* comp */ + "Maximum re-transmissions", /*desc*/ + NULL, /*akadesc */ + }, + {"t_maxseg" , 0, 120, 123, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_maxseg" , /* aka */ + COMP_NONE , /* comp */ + "MTU table index", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_scale" , 0, 124, 127, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_scale" , /* aka */ + COMP_NONE , /* comp */ + "Scaling for receive window (0-14). Note: this is reverse of common definition.", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_scale" , 0, 128, 131, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_scale" , /* aka */ + COMP_NONE , /* comp */ + "Scaling for send window (0-14). Note: this is reverse of common definition.", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rxtshift" , 0, 132, 135, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rxtshift" , /* aka */ + COMP_NONE , /* comp */ + "Retransmit exponential backoff", /*desc*/ + NULL, /*akadesc */ + }, + {"t_dupacks" , 0, 136, 139, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_dupacks" , /* aka */ + COMP_NONE , /* comp */ + "Number of duplicate ACKs received", /*desc*/ + NULL, /*akadesc */ + }, + {"timestamp_offset" , 0, 140, 143, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "timestamp_offset" , /* aka */ + COMP_NONE , /* comp */ + "Timestamp offset from running clock", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_adv" , 0, 144, 159, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_adv" , /* aka */ + COMP_NONE , /* comp */ + "Peer advertised window", /*desc*/ + NULL, /*akadesc */ + }, + {"timestamp" , 0, 160, 191, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "timestamp" , /* aka */ + COMP_NONE , /* comp */ + "Timer accounting field", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rtt_ts_recent_age" , 0, 192, 223, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rtt_ts_recent_age" , /* aka */ + COMP_NONE , /* comp */ + "Round-trip time; timestamps: ts_recent_age", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rtseq_recent" , 0, 224, 255, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rtseq_recent" , /* aka */ + COMP_NONE , /* comp */ + "Sequence number being timed t_rtseq; timestamps t_recent", /*desc*/ + NULL, /*akadesc */ + }, + {"t_srtt" , 0, 256, 271, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_srtt" , /* aka */ + COMP_NONE , /* comp */ + "Smoothed round-trip time", /*desc*/ + NULL, /*akadesc */ + }, + {"t_rttvar" , 0, 272, 287, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "t_rttvar" , /* aka */ + COMP_NONE , /* comp */ + "Variance in round-trip time", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_max" , 0, 288, 319, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_max" , /* aka */ + COMP_NONE , /* comp */ + "Highest sequence number in transmit buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_una_raw" , 0, 320, 347, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_una" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_una from tx_max", /*desc*/ + "Send unacknowledged", /*akadesc */ + }, + {"snd_nxt_raw" , 0, 348, 375, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_nxt" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_nxt from tx_max", /*desc*/ + "Send next", /*akadesc */ + }, + {"snd_max_raw" , 0, 376, 403, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_max" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of snd_max from tx_max", /*desc*/ + "Highest sequence number sent", /*akadesc */ + }, + {"snd_rec_raw" , 0, 404, 431, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_rec" , /* aka */ + COMP_TX_MAX , /* comp */ + "Offset of NewReno fast recovery end sequence from tx_max", /*desc*/ + "NewReno fast recovery end sequence number", /*akadesc */ + }, + {"snd_cwnd" , 0, 432, 459, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_cwnd" , /* aka */ + COMP_NONE , /* comp */ + "Congestion-control window", /*desc*/ + NULL, /*akadesc */ + }, + {"snd_ssthresh" , 0, 460, 487, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "snd_ssthresh" , /* aka */ + COMP_NONE , /* comp */ + "Slow Start threshold", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_hdr_ptr_raw" , 0, 488, 504, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_hdr_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for first byte in send buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_last_ptr_raw" , 0, 505, 521, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_last_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for last byte in send buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_nxt" , 0, 522, 553, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_nxt" , /* aka */ + COMP_NONE , /* comp */ + "TCP receive next", /*desc*/ + NULL, /*akadesc */ + }, + {"rcv_wnd" , 0, 554, 581, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rcv_wnd" , /* aka */ + COMP_NONE , /* comp */ + "Receive credits (advertised to peer in receive window)", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_hdr_offset" , 0, 582, 609, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_hdr_offset" , /* aka */ + COMP_NONE , /* comp */ + "Receive in-order buffered data", /*desc*/ + NULL, /*akadesc */ + }, + {"ts_last_ack_sent_raw" , 0, 610, 637, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ts_last_ack_sent" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of highest sequence acked from rcv_nxt", /*desc*/ + "Highest sequence number acked", /*akadesc */ + }, + {"rx_frag0_start_idx_raw" , 0, 638, 665, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag0_start_idx" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 0 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_start_idx_offset" , 0, 666, 693, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 1 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag0_len" , 0, 694, 721, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag0_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive re-order fragment 0 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_len" , 0, 722, 749, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive re-order fragment 1 length", /*desc*/ + NULL, /*akadesc */ + }, + {"pdu_len" , 0, 750, 765, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pdu_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive recovered PDU length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ptr_raw" , 0, 766, 782, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for in-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag1_ptr_raw" , 0, 783, 799, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag1_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"main_slush" , 0, 800, 831, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "main_slush" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"aux1_slush0" , 1, 832, 846, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux1_slush0" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_start_idx_offset_raw", 1, 847, 874, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 2 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_ptr_raw" , 1, 875, 891, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag2_len_raw" , 1, 892, 919, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag2_len" , /* aka */ + COMP_LEN , /* comp */ + "Receive re-order fragment 2 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_ptr_raw" , 1, 920, 936, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_ptr" , /* aka */ + COMP_PTR , /* comp */ + "Page pointer for out-of-order receive buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_len_raw" , 1, 937, 964, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_len" , /* aka */ + COMP_LEN , /* comp */ + "Receive re-order fragment 3 length", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_frag3_start_idx_offset_raw", 1, 965, 992, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_frag3_start_idx_offset" , /* aka */ + COMP_RCV_NXT , /* comp */ + "Offset of receive fragment 3 start sequence from rcv_nxt", /*desc*/ + NULL, /*akadesc */ + }, + {"pdu_hdr_len" , 1, 993, 1000, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pdu_hdr_len" , /* aka */ + COMP_NONE , /* comp */ + "Receive recovered PDU header length", /*desc*/ + NULL, /*akadesc */ + }, + {"aux1_slush1" , 1, 1001, 1019, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux1_slush1" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"ulp_ext" , 1, 1020, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp_ext" , /* aka */ + COMP_NONE , /* comp */ + "Extension of ulp_raw for PI configuration", /*desc*/ + NULL, /*akadesc */ + }, + + {"irs_ulp" , 2, 832, 840, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "irs_ulp" , /* aka */ + COMP_NONE , /* comp */ + "IRS modulo marker_interval when enterring iWARP mode", /*desc*/ + NULL, /*akadesc */ + }, + {"iss_ulp" , 2, 841, 849, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "iss_ulp" , /* aka */ + COMP_NONE , /* comp */ + "ISS modulo marker_interval when entering iWARP mode", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_pdu_len" , 2, 850, 863, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_pdu_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of Tx FPDU", /*desc*/ + NULL, /*akadesc */ + }, + {"cq_idx_sq" , 2, 864, 879, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "cq_idx_sq" , /* aka */ + COMP_NONE , /* comp */ + "CQ index of CQ for SQ", /*desc*/ + NULL, /*akadesc */ + }, + {"cq_idx_rq" , 2, 880, 895, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "cq_idx_rq" , /* aka */ + COMP_NONE , /* comp */ + "CQ index of CQ for RQ", /*desc*/ + NULL, /*akadesc */ + }, + {"qp_id" , 2, 896, 911, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "qp_id" , /* aka */ + COMP_NONE , /* comp */ + "QP index", /*desc*/ + NULL, /*akadesc */ + }, + {"pd_id" , 2, 912, 927, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "pd_id" , /* aka */ + COMP_NONE , /* comp */ + "PD index", /*desc*/ + NULL, /*akadesc */ + }, + {"STAG" , 2, 928, 959, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "stag" , /* aka */ + COMP_NONE , /* comp */ + "PDU response STAG", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_start" , 2, 960, 985, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_start" , /* aka */ + COMP_NONE , /* comp */ + "DW aligned starting addres of RQ", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_MSN" , 2, 986, 998, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_msn" , /* aka */ + COMP_NONE , /* comp */ + "Current MSN (modulo 8K, further check in ULP_RX)", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_max_offset" , 2, 999, 1002, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_max_offset" , /* aka */ + COMP_NONE , /* comp */ + "Log size RQ (the size in hardware is rounded up to a power of 2)", /*desc*/ + NULL, /*akadesc */ + }, + {"rq_write_ptr" , 2, 1003, 1015, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rq_write_ptr" , /* aka */ + COMP_NONE , /* comp */ + "Host RQ write pointer", /*desc*/ + NULL, /*akadesc */ + }, + {"RDMAP_opcode" , 2, 1016, 1019, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rdmap_opcode" , /* aka */ + COMP_NONE , /* comp */ + "Current FPDU command", /*desc*/ + NULL, /*akadesc */ + }, + {"ord_L_bit_vld" , 2, 1020, 1020, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ord_l_bit_vld" , /* aka */ + COMP_NONE , /* comp */ + "Current FPDU has L-bit set", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_flush" , 2, 1021, 1021, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_flush" , /* aka */ + COMP_NONE , /* comp */ + "1 = flush CPL_TX_DATA", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_oos_rxmt" , 2, 1022, 1022, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_oos_rxmt" , /* aka */ + COMP_NONE , /* comp */ + "Retransmit is out of FPDU sync", /*desc*/ + NULL, /*akadesc */ + }, + {"tx_oos_txmt" , 2, 1023, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "tx_oos_txmt" , /* aka */ + COMP_NONE , /* comp */ + "Transmit is out of FPDU sync, or disable aligned transmission", /*desc*/ + NULL, /*akadesc */ + }, + + {"rx_ddp_buf0_offset" , 3, 832, 855, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_offset" , /* aka */ + COMP_NONE , /* comp */ + "Current offset into DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf0_len" , 3, 856, 879, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_INDICATE_OUT" , 3, 880, 880, /* name,aux,lo,hi */ + "rx_ddp_flags" , 0, 0, /* faka,flo,fhi */ + "ddp_indicate_out" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_ACTIVE_BUF" , 3, 881, 881, /* name,aux,lo,hi */ + "rx_ddp_flags" , 1, 1, /* faka,flo,fhi */ + "ddp_active_buf" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_OFF" , 3, 882, 882, /* name,aux,lo,hi */ + "rx_ddp_flags" , 2, 2, /* faka,flo,fhi */ + "ddp_off" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_WAIT_FRAG" , 3, 883, 883, /* name,aux,lo,hi */ + "rx_ddp_flags" , 3, 3, /* faka,flo,fhi */ + "ddp_wait_frag" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF_INF" , 3, 884, 884, /* name,aux,lo,hi */ + "rx_ddp_flags" , 4, 4, /* faka,flo,fhi */ + "ddp_buf_inf" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_RX2TX" , 3, 885, 885, /* name,aux,lo,hi */ + "rx_ddp_flags" , 5, 5, /* faka,flo,fhi */ + "ddp_rx2tx" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_INDICATE_FLL" , 3, 886, 886, /* name,aux,lo,hi */ + "rx_ddp_flags" , 6, 6, /* faka,flo,fhi */ + "ddp_indicate_fll" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_MAIN_UNUSED" , 3, 887, 887, /* name,aux,lo,hi */ + "rx_ddp_flags" , 7, 7, /* faka,flo,fhi */ + "ddp_main_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_TLS_KEY_MODE" , 3, 887, 887, /* name,aux,lo,hi */ + "rx_ddp_flags" , 7, 7, /* faka,flo,fhi */ + "tls_key_mode" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_VALID" , 3, 888, 888, /* name,aux,lo,hi */ + "rx_ddp_flags" , 8, 8, /* faka,flo,fhi */ + "ddp_buf0_valid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_INDICATE" , 3, 889, 889, /* name,aux,lo,hi */ + "rx_ddp_flags" , 9, 9, /* faka,flo,fhi */ + "ddp_buf0_indicate" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_FLUSH" , 3, 890, 890, /* name,aux,lo,hi */ + "rx_ddp_flags" , 10, 10, /* faka,flo,fhi */ + "ddp_buf0_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSHF_ENABLE_0" , 3, 891, 891, /* name,aux,lo,hi */ + "rx_ddp_flags" , 11, 11, /* faka,flo,fhi */ + "ddp_pshf_enable_0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PUSH_DISABLE_0" , 3, 892, 892, /* name,aux,lo,hi */ + "rx_ddp_flags" , 12, 12, /* faka,flo,fhi */ + "ddp_push_disable_0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSH_NO_INVALIDATE0" , 3, 893, 893, /* name,aux,lo,hi */ + "rx_ddp_flags" , 13, 13, /* faka,flo,fhi */ + "ddp_psh_no_invalidate0" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF0_UNUSED" , 3, 894, 895, /* name,aux,lo,hi */ + "rx_ddp_flags" , 14, 15, /* faka,flo,fhi */ + "ddp_buf0_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_VALID" , 3, 896, 896, /* name,aux,lo,hi */ + "rx_ddp_flags" , 16, 16, /* faka,flo,fhi */ + "ddp_buf1_valid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_INDICATE" , 3, 897, 897, /* name,aux,lo,hi */ + "rx_ddp_flags" , 17, 17, /* faka,flo,fhi */ + "ddp_buf1_indicate" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_FLUSH" , 3, 898, 898, /* name,aux,lo,hi */ + "rx_ddp_flags" , 18, 18, /* faka,flo,fhi */ + "ddp_buf1_flush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSHF_ENABLE_1" , 3, 899, 899, /* name,aux,lo,hi */ + "rx_ddp_flags" , 19, 19, /* faka,flo,fhi */ + "ddp_pshf_enable_1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PUSH_DISABLE_1" , 3, 900, 900, /* name,aux,lo,hi */ + "rx_ddp_flags" , 20, 20, /* faka,flo,fhi */ + "ddp_push_disable_1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_PSH_NO_INVALIDATE1" , 3, 901, 901, /* name,aux,lo,hi */ + "rx_ddp_flags" , 21, 21, /* faka,flo,fhi */ + "ddp_psh_no_invalidate1" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_DDP_BUF1_UNUSED" , 3, 902, 903, /* name,aux,lo,hi */ + "rx_ddp_flags" , 22, 23, /* faka,flo,fhi */ + "ddp_buf1_unused" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_offset" , 3, 904, 927, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_offset" , /* aka */ + COMP_NONE , /* comp */ + "Current offset into DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_len" , 3, 928, 951, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {"aux3_slush" , 3, 952, 959, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "aux3_slush" , /* aka */ + COMP_NONE , /* comp */ + "Reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf0_tag" , 3, 960, 991, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf0_tag" , /* aka */ + COMP_NONE , /* comp */ + "Tag for DDP buffer 0", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_ddp_buf1_tag" , 3, 992, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_ddp_buf1_tag" , /* aka */ + COMP_NONE , /* comp */ + "Tag for DDP buffer 1", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_tls_buf_offset" , 4, 832, 855, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_tls_buf_offset" , /* aka */ + COMP_NONE , /* comp */ + "Current offset into DDP buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_tls_buf_len" , 4, 856, 879, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_tls_buf_len" , /* aka */ + COMP_NONE , /* comp */ + "Length of DDP buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_tls_flags" , 4, 880, 895, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_tls_flags" , /* aka */ + COMP_NONE , /* comp */ + "DDP control flags", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_tls_seq" , 4, 896, 959, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_tls_seq" , /* aka */ + COMP_NONE , /* comp */ + "TLS/SSL sequence number", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_tls_buf_tag" , 4, 960, 991, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_tls_buf_tag" , /* aka */ + COMP_NONE , /* comp */ + "Tag for DDP buffer", /*desc*/ + NULL, /*akadesc */ + }, + {"rx_tls_key_tag" , 4, 992, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "rx_tls_key_tag" , /* aka */ + COMP_NONE , /* comp */ + "Tag for TLS crypto state", /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + +/* ====================================================== */ +_TCBVAR g_scb_info6[]={ + {"OPT_1_RSS_INFO" , 0, 0, 11, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_RSS_INFO" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_LISTEN_INTERFACE" , 0, 12, 19, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_LISTEN_INTERFACE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_LISTEN_FILTER" , 0, 20, 20, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_LISTEN_FILTER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_SYN_DEFENSE" , 0, 21, 21, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_SYN_DEFENSE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_CONNECTION_POLICY" , 0, 22, 23, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_CONNECTION_POLICY" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_1_FLT_INFO" , 0, 24, 63, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_1_FLT_INFO" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_ACCEPT_MODE" , 0, 64, 65, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_ACCEPT_MODE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TX_CHANNEL" , 0, 66, 67, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TX_CHANNEL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NO_CONGESTION_CONTROL" , 0, 68, 68, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NO_CONGESTION_CONTROL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_DELAYED_ACK" , 0, 69, 69, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_DELAYED_ACK" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_INJECT_TIMER" , 0, 70, 70, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_INJECT_TIMER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NON_OFFLOAD" , 0, 71, 71, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NON_OFFLOAD" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_ULP_MODE" , 0, 72, 75, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_ULP_MODE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAX_RCV_BUFFER" , 0, 76, 85, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAX_RCV_BUFFER" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TOS" , 0, 86, 91, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TOS" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_SM_SEL" , 0, 92, 99, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_SM_SEL" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_L2T_IX" , 0, 100, 111, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_L2T_IX" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_TCAM_BYPASS" , 0, 112, 112, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_TCAM_BYPASS" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_NAGLE" , 0, 113, 113, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_NAGLE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_WSF" , 0, 114, 117, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_WSF" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_KEEPALIVE" , 0, 118, 118, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_KEEPALIVE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_CONN_MAXRT" , 0, 119, 122, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_CONN_MAXRT" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAXRT_OVERRIDE" , 0, 123, 123, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAXRT_OVERRIDE" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"OPT_0_MAX_SEG" , 0, 124, 127, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "OPT_0_MAX_SEG" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"scb_slush" , 0, 128, 1023, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "scb_slush" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + +/* ====================================================== */ +_TCBVAR g_fcb_info6[]={ + {"filter" , 0, 33, 33, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "filter" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Drop_Encapsulation_Headers" , 0, 35, 35, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Drop_Encapsulation_Headers" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Report_TID" , 0, 53, 53, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Report_TID" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Drop" , 0, 54, 54, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Drop" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Direct_Steer" , 0, 55, 55, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Direct_Steer" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Mask_Hash" , 0, 48, 48, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Mask_Hash" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Direct_Steer_Hash" , 0, 49, 49, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Direct_Steer_Hash" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Loopback" , 0, 91, 91, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Loopback" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Loopback_TX_Channel" , 0, 44, 45, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Loopback_TX_Channel" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Loopback_TX_Loopback" , 0, 85, 85, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Loopback_TX_Loopback" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Swap_MAC_addresses" , 0, 86, 86, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Swap_MAC_addresses" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Rewrite_DMAC" , 0, 92, 92, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Rewrite_DMAC" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Rewrite_SMAC" , 0, 93, 93, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Rewrite_SMAC" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Insert_VLAN" , 0, 94, 94, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Insert_VLAN" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Remove_VLAN" , 0, 39, 39, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Remove_VLAN" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"NAT_Mode" , 0, 50, 52, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "NAT_Mode" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"NAT_seq_check" , 0, 42, 42, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "NAT_seq_check" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"NAT_flag_check" , 0, 84, 84, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "NAT_flag_check" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Count_Hits" , 0, 36, 36, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Count_Hits" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Hit_frame_cnt" , 0, 160, 191, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Hit_frame_cnt" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Hit_byte_cnt_high" , 0, 224, 255, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Hit_byte_cnt_high" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"Hit_byte_cnt_low" , 0, 192, 223, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "Hit_byte_cnt_low" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {NULL,0,0,0, NULL,0,0, NULL, 0, NULL, NULL}, /*terminator*/ +}; + Property changes on: stable/11/usr.sbin/cxgbetool/tcbinfot6.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.sbin/cxgbetool/tcbshowt4.c =================================================================== --- stable/11/usr.sbin/cxgbetool/tcbshowt4.c (nonexistent) +++ stable/11/usr.sbin/cxgbetool/tcbshowt4.c (revision 339393) @@ -0,0 +1,416 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* Auto-generated file. Avoid direct editing. */ +/* Edits will be lost when file regenerated. */ +#include +#include "tcb_common.h" + +void t4_display_tcb_aux_0 (_TCBVAR *tvp, int aux) +{ + + + + + + + + PR("STATE:\n"); + PR(" %-12s (%-2u), %s, lock_tid %u, init %u\n", + spr_tcp_state(val("t_state")), + val("t_state"), + spr_ip_version(val("ip_version")), + val("lock_tid"), + val("init") + ); + PR(" l2t_ix 0x%x, smac sel 0x%x, tos 0x%x\n", + val("l2t_ix"), + val("smac_sel"), + val("tos") + ); + PR(" maxseg %u, recv_scaleflag %u, recv_tstmp %u, recv_sack %u\n", + val("t_maxseg"), val("recv_scale"), + val("recv_tstmp"), val("recv_sack")); + + + PR("TIMERS:\n"); /* **************************************** */ + PR(" timer %u, dack_timer %u\n", + val("timer"), val("dack_timer")); + PR(" mod_schd: tx: %u, rx: %u, reason 0x%1x\n", + val("mod_schd_tx"), + val("mod_schd_rx"), + ((val("mod_schd_reason2")<<2) | (val("mod_schd_reason1")<<1) | + val("mod_schd_reason0")) + ); + + + PR(" max_rt %-2u, rxtshift %u, keepalive %u\n", + val("max_rt"), val("t_rxtshift"), + val("keepalive")); + PR(" timestamp_offset 0x%x, timestamp 0x%x\n", + val("timestamp_offset"),val("timestamp")); + + + PR(" t_rtt_ts_recent_age %u t_rttseq_recent %u\n", + val("t_rtt_ts_recent_age"), val("t_rtseq_recent")); + PR(" t_srtt %u, t_rttvar %u\n", + val("t_srtt"),val("t_rttvar")); + + + + + + + PR("TRANSMIT BUFFER:\n"); /* *************************** */ + PR(" snd_una %u, snd_nxt %u, snd_max %u, tx_max %u\n", + val("snd_una"),val("snd_nxt"), + val("snd_max"),val("tx_max")); + PR(" core_fin %u, tx_hdr_offset %u\n", + val("core_fin"), SEQ_SUB(val("tx_max"),val("snd_una")) + ); + if (val("recv_scale") && !val("active_open")) { + PR(" rcv_adv %-5u << %-2u == %u (recv_scaleflag %u rcv_scale %u active open %u)\n", + val("rcv_adv"), val("rcv_scale"), + val("rcv_adv") << val("rcv_scale"), + val("recv_scale"), val("rcv_scale"), val("active_open")); + } else { + PR(" rcv_adv %-5u (rcv_scale %-2u recv_scaleflag %u active_open %u)\n", + val("rcv_adv"), val("rcv_scale"), + val("recv_scale"), val("active_open")); + } + + PR(" snd_cwnd %-5u snd_ssthresh %u snd_rec %u\n", + val("snd_cwnd") , val("snd_ssthresh"), val("snd_rec") + ); + + + + + PR(" cctrl: sel %s, ecn %u, ece %u, cwr %u, rfr %u\n", + spr_cctrl_sel(val("cctrl_sel0"),val("cctrl_sel1")), + val("cctrl_ecn"), val("cctrl_ece"), val("cctrl_cwr"), + val("cctrl_rfr")); + PR(" t_dupacks %u, dupack_count_odd %u, fast_recovery %u\n", + val("t_dupacks"), val("dupack_count_odd"),val("fast_recovery")); + PR(" core_more %u, core_urg, %u core_push %u,", + val("core_more"),val("core_urg"),val("core_push")); + PR(" core_flush %u\n",val("core_flush")); + PR(" nagle %u, ssws_disable %u, turbo %u,", + val("nagle"), val("ssws_disabled"), val("turbo")); + PR(" tx_pdu_out %u\n",val("tx_pdu_out")); + PR(" tx_pace_auto %u, tx_pace_fixed %u, tx_queue %u", + val("tx_pace_auto"),val("tx_pace_fixed"),val("tx_queue")); + + + PR(" tx_quiesce %u\n",val("tx_quiesce")); + PR(" tx_channel %u, tx_channel1 %u, tx_channel0 %u\n", + val("tx_channel"), + (val("tx_channel")>>1)&1, + val("tx_channel")&1 + ); + + + + + PR(" tx_hdr_ptr 0x%-6x tx_last_ptr 0x%-6x tx_compact %u\n", + val("tx_hdr_ptr"),val("tx_last_ptr"),val("tx_compact")); + + + + + PR("RECEIVE BUFFER:\n"); /* *************************** */ + PR(" last_ack_sent %-10u rx_compact %u\n", + val("ts_last_ack_sent"),val("rx_compact")); + PR(" rcv_nxt %-10u hdr_off %-10u\n", + val("rcv_nxt"), val("rx_hdr_offset")); + PR(" frag0_idx %-10u length %-10u frag0_ptr 0x%-8x\n", + val("rx_frag0_start_idx"), + val("rx_frag0_len"), + val("rx_ptr")); + PR(" frag1_idx %-10u length %-10u ", + val("rx_frag1_start_idx_offset"), + val("rx_frag1_len")); + + + + + if (val("ulp_type")!=4) { /* RDMA has FRAG1 idx && len, but no ptr? Should I not display frag1 at all? */ + PR("frag1_ptr 0x%-8x\n",val("rx_frag1_ptr")); + } else { + PR("\n"); + } + + + if (val("ulp_type") !=6 && val("ulp_type") != 5 && val("ulp_type") !=4) { + PR(" frag2_idx %-10u length %-10u frag2_ptr 0x%-8x\n", + val("rx_frag2_start_idx_offset"), + val("rx_frag2_len"), + val("rx_frag2_ptr")); + PR(" frag3_idx %-10u length %-10u frag3_ptr 0x%-8x\n", + val("rx_frag3_start_idx_offset"), + val("rx_frag3_len"), + val("rx_frag3_ptr")); + } + + + + + + + PR(" peer_fin %u, rx_pdu_out %u, pdu_len %u\n", + val("peer_fin"),val("rx_pdu_out"), val("pdu_len")); + + + + + if (val("recv_scale")) { + PR(" rcv_wnd %u >> snd_scale %u == %u, recv_scaleflag = %u\n", + val("rcv_wnd"), val("snd_scale"), + val("rcv_wnd") >> val("snd_scale"), + val("recv_scale")); + } else { + PR(" rcv_wnd %u. (snd_scale %u, recv_scaleflag = %u)\n", + val("rcv_wnd"), val("snd_scale"), + val("recv_scale")); + } + + + + + PR(" dack_mss %u dack %u, dack_not_acked: %u\n", + val("dack_mss"),val("dack"),val("dack_not_acked")); + PR(" rcv_coal %u rcv_co_psh %u rcv_co_last_psh %u heart %u\n", + val("rcv_coalesce_enable"), + val("rcv_coalesce_push"), + val("rcv_coalesce_last_psh"), + val("rcv_coalesce_heartbeat")); + + PR(" rx_channel %u rx_quiesce %u rx_flow_ctrl_dis %u,", + val("rx_channel"), val("rx_quiesce"), + val("rx_flow_control_disable")); + PR(" rx_flow_ctrl_ddp %u\n", + val("rx_flow_control_ddp")); + + + PR("MISCELANEOUS:\n"); /* *************************** */ + PR(" pend_ctl: 0x%1x, unused_flags: 0x%x, main_slush: 0x%x\n", + ((val("pend_ctl2")<<2) | (val("pend_ctl1")<<1) | + val("pend_ctl0")), + val("unused"),val("main_slush")); + PR(" Migrating %u, ask_mode %u, non_offload %u, rss_info %u\n", + val("migrating"), + val("ask_mode"), val("non_offload"), val("rss_info")); + PR(" ULP: ulp_type %u (%s), ulp_raw %u\n", + val("ulp_type"), spr_ulp_type(val("ulp_type")),val("ulp_raw")); + PR(" RDMA: error %u, flm_err %u\n", + val("rdma_error"), val("rdma_flm_error")); + + +} +void t4_display_tcb_aux_1 (_TCBVAR *tvp, int aux) +{ + + + + PR(" aux1_slush0: 0x%x aux1_slush1 0x%x\n", + val("aux1_slush0"), val("aux1_slush1")); + PR(" pdu_hdr_len %u\n",val("pdu_hdr_len")); + + + +} +void t4_display_tcb_aux_2 (_TCBVAR *tvp, int aux) +{ + + + + + PR(" qp_id %u, pd_id %u, stag %u\n", + val("qp_id"), val("pd_id"),val("stag")); + PR(" irs_ulp %u, iss_ulp %u\n", + val("irs_ulp"),val("iss_ulp")); + PR(" tx_pdu_len %u\n", + val("tx_pdu_len")); + PR(" cq_idx_sq %u, cq_idx_rq %u\n", + val("cq_idx_sq"),val("cq_idx_rq")); + PR(" rq_start %u, rq_MSN %u, rq_max_off %u, rq_write_ptr %u\n", + val("rq_start"),val("rq_msn"),val("rq_max_offset"), + val("rq_write_ptr")); + PR(" L_valid %u, rdmap opcode %u\n", + val("ord_l_bit_vld"),val("rdmap_opcode")); + PR(" tx_flush: %u, tx_oos_rxmt %u, tx_oos_txmt %u\n", + val("tx_flush"),val("tx_oos_rxmt"),val("tx_oos_txmt")); + + + + +} +void t4_display_tcb_aux_3 (_TCBVAR *tvp, int aux) +{ + + + + + PR(" aux3_slush: 0x%x, unused: buf0 0x%x, buf1: 0x%x, main: 0x%x\n", + val("aux3_slush"),val("ddp_buf0_unused"),val("ddp_buf1_unused"), + val("ddp_main_unused")); + + + + + + PR(" DDP: DDPOFF ActBuf IndOut WaitFrag Rx2Tx BufInf\n"); + PR(" %u %u %u %u %u %u\n", + val("ddp_off"),val("ddp_active_buf"),val("ddp_indicate_out"), + val("ddp_wait_frag"),val("ddp_rx2tx"),val("ddp_buf_inf") + ); + + + + + + PR(" Ind PshfEn PushDis Flush NoInvalidate\n"); + PR(" Buf0: %u %u %u %u %u\n", + val("ddp_buf0_indicate"), + val("ddp_pshf_enable_0"), val("ddp_push_disable_0"), + val("ddp_buf0_flush"), val("ddp_psh_no_invalidate0") + ); + PR(" Buf1: %u %u %u %u %u\n", + val("ddp_buf1_indicate"), + val("ddp_pshf_enable_1"), val("ddp_push_disable_1"), + val("ddp_buf1_flush"), val("ddp_psh_no_invalidate1") + ); + + + + + + + + + + + PR(" Valid Offset Length Tag\n"); + PR(" Buf0: %u 0x%6.6x 0x%6.6x 0x%8.8x", + val("ddp_buf0_valid"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_tag") + + + ); + if (0==val("ddp_off") && 1==val("ddp_buf0_valid") && 0==val("ddp_active_buf")) { + PR(" (Active)\n"); + } else { + PR(" (Inactive)\n"); + } + + + PR(" Buf1: %u 0x%6.6x 0x%6.6x 0x%8.8x", + val("ddp_buf1_valid"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_tag") + + + ); + + + if (0==val("ddp_off") && 1==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" (Active)\n"); + } else { + PR(" (Inactive)\n"); + } + + + + + + + if (1==val("ddp_off")) { + PR(" DDP is off (which also disables indicate)\n"); + } else if (1==val("ddp_buf0_valid") && 0==val("ddp_active_buf")) { + PR(" Data being DDP'ed to buf 0, "); + PR("which has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len")-val("rx_ddp_buf0_offset") + ); + if (1==val("ddp_buf1_valid")) { + PR(" And buf1, which is also valid, has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len")-val("rx_ddp_buf1_offset") + ); + } + } else if (1==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" Data being DDP'ed to buf 1, "); + PR("which has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len")-val("rx_ddp_buf1_offset") + ); + if (1==val("ddp_buf0_valid")) { + PR(" And buf0, which is also valid, has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len")-val("rx_ddp_buf0_offset") + ); + } + } else if (0==val("ddp_buf0_valid") && 1==val("ddp_buf1_valid") && 0==val("ddp_active_buf")) { + PR(" !!! Invalid DDP buf 1 valid, but buf 0 active.\n"); + } else if (1==val("ddp_buf0_valid") && 0==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" !!! Invalid DDP buf 0 valid, but buf 1 active.\n"); + } else { + PR(" DDP is enabled, but no buffers are active && valid.\n"); + + + + + if (0==val("ddp_indicate_out")) { + if (0==val("ddp_buf0_indicate") && 0==val("ddp_buf1_indicate")) { + PR(" 0 length Indicate buffers "); + if (0==val("rx_hdr_offset")) { + PR("will cause new data to be held in PMRX.\n"); + } else { + PR("is causing %u bytes to be held in PMRX\n", + val("rx_hdr_offset")); + } + } else { + PR(" Data being indicated to host\n"); + } + } else if (1==val("ddp_indicate_out")) { + PR(" Indicate is off, which "); + if (0==val("rx_hdr_offset")) { + PR("will cause new data to be held in PMRX.\n"); + } else { + PR("is causing %u bytes to be held in PMRX\n", + val("rx_hdr_offset")); + } + } + } + + + + +} Property changes on: stable/11/usr.sbin/cxgbetool/tcbshowt4.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.sbin/cxgbetool/tcbshowt5.c =================================================================== --- stable/11/usr.sbin/cxgbetool/tcbshowt5.c (nonexistent) +++ stable/11/usr.sbin/cxgbetool/tcbshowt5.c (revision 339393) @@ -0,0 +1,427 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* Auto-generated file. Avoid direct editing. */ +/* Edits will be lost when file regenerated. */ +#include +#include "tcb_common.h" + +void t5_display_tcb_aux_0 (_TCBVAR *tvp, int aux) +{ + + + + + + + + PR("STATE:\n"); + PR(" %-12s (%-2u), %s, lock_tid %u, rss_fw %u\n", + spr_tcp_state(val("t_state")), + val("t_state"), + spr_ip_version(val("ip_version")), + val("lock_tid"), + val("rss_fw") + ); + PR(" l2t_ix 0x%x, smac sel 0x%x, tos 0x%x\n", + val("l2t_ix"), + val("smac_sel"), + val("tos") + ); + PR(" maxseg %u, recv_scaleflag %u, recv_tstmp %u, recv_sack %u\n", + val("t_maxseg"), val("recv_scale"), + val("recv_tstmp"), val("recv_sack")); + + + PR("TIMERS:\n"); /* **************************************** */ + PR(" timer %u, dack_timer %u\n", + val("timer"), val("dack_timer")); + PR(" mod_schd: tx: %u, rx: %u, reason 0x%1x\n", + val("mod_schd_tx"), + val("mod_schd_rx"), + ((val("mod_schd_reason2")<<2) | (val("mod_schd_reason1")<<1) | + val("mod_schd_reason0")) + ); + + + PR(" max_rt %-2u, rxtshift %u, keepalive %u\n", + val("max_rt"), val("t_rxtshift"), + val("keepalive")); + PR(" timestamp_offset 0x%x, timestamp 0x%x\n", + val("timestamp_offset"),val("timestamp")); + + + PR(" t_rtt_ts_recent_age %u t_rttseq_recent %u\n", + val("t_rtt_ts_recent_age"), val("t_rtseq_recent")); + PR(" t_srtt %u, t_rttvar %u\n", + val("t_srtt"),val("t_rttvar")); + + + + + + + PR("TRANSMIT BUFFER:\n"); /* *************************** */ + PR(" snd_una %u, snd_nxt %u, snd_max %u, tx_max %u\n", + val("snd_una"),val("snd_nxt"), + val("snd_max"),val("tx_max")); + PR(" core_fin %u, tx_hdr_offset %u\n", + val("core_fin"), SEQ_SUB(val("tx_max"),val("snd_una")) + ); + if (val("recv_scale") && !val("active_open")) { + PR(" rcv_adv %-5u << %-2u == %u (recv_scaleflag %u rcv_scale %u active open %u)\n", + val("rcv_adv"), val("rcv_scale"), + val("rcv_adv") << val("rcv_scale"), + val("recv_scale"), val("rcv_scale"), val("active_open")); + } else { + PR(" rcv_adv %-5u (rcv_scale %-2u recv_scaleflag %u active_open %u)\n", + val("rcv_adv"), val("rcv_scale"), + val("recv_scale"), val("active_open")); + } + + PR(" snd_cwnd %-5u snd_ssthresh %u snd_rec %u\n", + val("snd_cwnd") , val("snd_ssthresh"), val("snd_rec") + ); + + + + + PR(" cctrl: sel %s, ecn %u, ece %u, cwr %u, rfr %u\n", + spr_cctrl_sel(val("cctrl_sel0"),val("cctrl_sel1")), + val("cctrl_ecn"), val("cctrl_ece"), val("cctrl_cwr"), + val("cctrl_rfr")); + PR(" t_dupacks %u, dupack_count_odd %u, fast_recovery %u\n", + val("t_dupacks"), val("dupack_count_odd"),val("fast_recovery")); + PR(" core_more %u, core_urg, %u core_push %u,", + val("core_more"),val("core_urg"),val("core_push")); + PR(" core_flush %u\n",val("core_flush")); + PR(" nagle %u, ssws_disable %u, turbo %u,", + val("nagle"), val("ssws_disabled"), val("turbo")); + PR(" tx_pdu_out %u\n",val("tx_pdu_out")); + PR(" tx_pace_auto %u, tx_pace_fixed %u, tx_queue %u", + val("tx_pace_auto"),val("tx_pace_fixed"),val("tx_queue")); + + + PR(" tx_quiesce %u\n",val("tx_quiesce")); + PR(" tx_channel %u, tx_channel1 %u, tx_channel0 %u\n", + val("tx_channel"), + (val("tx_channel")>>1)&1, + val("tx_channel")&1 + ); + + + + + PR(" tx_hdr_ptr 0x%-6x tx_last_ptr 0x%-6x tx_compact %u\n", + val("tx_hdr_ptr"),val("tx_last_ptr"),val("tx_compact")); + + + + + PR("RECEIVE BUFFER:\n"); /* *************************** */ + PR(" last_ack_sent %-10u rx_compact %u\n", + val("ts_last_ack_sent"),val("rx_compact")); + PR(" rcv_nxt %-10u hdr_off %-10u\n", + val("rcv_nxt"), val("rx_hdr_offset")); + PR(" frag0_idx %-10u length %-10u rx_ptr 0x%-8x\n", + val("rx_frag0_start_idx"), + val("rx_frag0_len"), + val("rx_ptr")); + PR(" frag1_idx %-10u length %-10u ", + val("rx_frag1_start_idx_offset"), + val("rx_frag1_len")); + + + + + if (val("ulp_type")!=4) { /* RDMA has FRAG1 idx && len, but no ptr? Should I not display frag1 at all? */ + PR("frag1_ptr 0x%-8x\n",val("rx_frag1_ptr")); + } else { + PR("\n"); + } + + + if (val("ulp_type") !=6 && val("ulp_type") != 5 && val("ulp_type") !=4) { + PR(" frag2_idx %-10u length %-10u frag2_ptr 0x%-8x\n", + val("rx_frag2_start_idx_offset"), + val("rx_frag2_len"), + val("rx_frag2_ptr")); + PR(" frag3_idx %-10u length %-10u frag3_ptr 0x%-8x\n", + val("rx_frag3_start_idx_offset"), + val("rx_frag3_len"), + val("rx_frag3_ptr")); + } + + + + + + + PR(" peer_fin %u, rx_pdu_out %u, pdu_len %u\n", + val("peer_fin"),val("rx_pdu_out"), val("pdu_len")); + + + + + if (val("recv_scale")) { + PR(" rcv_wnd %u >> snd_scale %u == %u, recv_scaleflag = %u\n", + val("rcv_wnd"), val("snd_scale"), + val("rcv_wnd") >> val("snd_scale"), + val("recv_scale")); + } else { + PR(" rcv_wnd %u. (snd_scale %u, recv_scaleflag = %u)\n", + val("rcv_wnd"), val("snd_scale"), + val("recv_scale")); + } + + + + + PR(" dack_mss %u dack %u, dack_not_acked: %u\n", + val("dack_mss"),val("dack"),val("dack_not_acked")); + PR(" rcv_coal %u rcv_co_psh %u rcv_co_last_psh %u heart %u\n", + val("rcv_coalesce_enable"), + val("rcv_coalesce_push"), + val("rcv_coalesce_last_psh"), + val("rcv_coalesce_heartbeat")); + + PR(" rx_channel %u rx_quiesce %u rx_flow_ctrl_dis %u,", + val("rx_channel"), val("rx_quiesce"), + val("rx_flow_control_disable")); + PR(" rx_flow_ctrl_ddp %u\n", + val("rx_flow_control_ddp")); + + + PR("MISCELANEOUS:\n"); /* *************************** */ + PR(" pend_ctl: 0x%1x, unused_flags: 0x%x, main_slush: 0x%x\n", + ((val("pend_ctl2")<<2) | (val("pend_ctl1")<<1) | + val("pend_ctl0")), + val("unused"),val("main_slush")); + PR(" Migrating %u, ask_mode %u, non_offload %u, rss_info %u\n", + val("migrating"), + val("ask_mode"), val("non_offload"), val("rss_info")); + PR(" ULP: ulp_type %u (%s), ulp_raw %u", + val("ulp_type"), spr_ulp_type(val("ulp_type")), + val("ulp_raw")); + + + if (aux==1) { + PR(", ulp_ext %u",val("ulp_ext")); + } + PR("\n"); + + + + + PR(" RDMA: error %u, flm_err %u\n", + val("rdma_error"), val("rdma_flm_error")); + + +} +void t5_display_tcb_aux_1 (_TCBVAR *tvp, int aux) +{ + + + + PR(" aux1_slush0: 0x%x aux1_slush1 0x%x\n", + val("aux1_slush0"), val("aux1_slush1")); + PR(" pdu_hdr_len %u\n",val("pdu_hdr_len")); + + + +} +void t5_display_tcb_aux_2 (_TCBVAR *tvp, int aux) +{ + + + + + PR(" qp_id %u, pd_id %u, stag %u\n", + val("qp_id"), val("pd_id"),val("stag")); + PR(" irs_ulp %u, iss_ulp %u\n", + val("irs_ulp"),val("iss_ulp")); + PR(" tx_pdu_len %u\n", + val("tx_pdu_len")); + PR(" cq_idx_sq %u, cq_idx_rq %u\n", + val("cq_idx_sq"),val("cq_idx_rq")); + PR(" rq_start %u, rq_MSN %u, rq_max_off %u, rq_write_ptr %u\n", + val("rq_start"),val("rq_msn"),val("rq_max_offset"), + val("rq_write_ptr")); + PR(" L_valid %u, rdmap opcode %u\n", + val("ord_l_bit_vld"),val("rdmap_opcode")); + PR(" tx_flush: %u, tx_oos_rxmt %u, tx_oos_txmt %u\n", + val("tx_flush"),val("tx_oos_rxmt"),val("tx_oos_txmt")); + + + + +} +void t5_display_tcb_aux_3 (_TCBVAR *tvp, int aux) +{ + + + + + PR(" aux3_slush: 0x%x, unused: buf0 0x%x, buf1: 0x%x, main: 0x%x\n", + val("aux3_slush"),val("ddp_buf0_unused"),val("ddp_buf1_unused"), + val("ddp_main_unused")); + + + + + + PR(" DDP: DDPOFF ActBuf IndOut WaitFrag Rx2Tx BufInf\n"); + PR(" %u %u %u %u %u %u\n", + val("ddp_off"),val("ddp_active_buf"),val("ddp_indicate_out"), + val("ddp_wait_frag"),val("ddp_rx2tx"),val("ddp_buf_inf") + ); + + + + + + PR(" Ind PshfEn PushDis Flush NoInvalidate\n"); + PR(" Buf0: %u %u %u %u %u\n", + val("ddp_buf0_indicate"), + val("ddp_pshf_enable_0"), val("ddp_push_disable_0"), + val("ddp_buf0_flush"), val("ddp_psh_no_invalidate0") + ); + PR(" Buf1: %u %u %u %u %u\n", + val("ddp_buf1_indicate"), + val("ddp_pshf_enable_1"), val("ddp_push_disable_1"), + val("ddp_buf1_flush"), val("ddp_psh_no_invalidate1") + ); + + + + + + + + + + + PR(" Valid Offset Length Tag\n"); + PR(" Buf0: %u 0x%6.6x 0x%6.6x 0x%8.8x", + val("ddp_buf0_valid"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_tag") + + + ); + if (0==val("ddp_off") && 1==val("ddp_buf0_valid") && 0==val("ddp_active_buf")) { + PR(" (Active)\n"); + } else { + PR(" (Inactive)\n"); + } + + + PR(" Buf1: %u 0x%6.6x 0x%6.6x 0x%8.8x", + val("ddp_buf1_valid"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_tag") + + + ); + + + if (0==val("ddp_off") && 1==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" (Active)\n"); + } else { + PR(" (Inactive)\n"); + } + + + + + + + if (1==val("ddp_off")) { + PR(" DDP is off (which also disables indicate)\n"); + } else if (1==val("ddp_buf0_valid") && 0==val("ddp_active_buf")) { + PR(" Data being DDP'ed to buf 0, "); + PR("which has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len")-val("rx_ddp_buf0_offset") + ); + if (1==val("ddp_buf1_valid")) { + PR(" And buf1, which is also valid, has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len")-val("rx_ddp_buf1_offset") + ); + } + } else if (1==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" Data being DDP'ed to buf 1, "); + PR("which has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len")-val("rx_ddp_buf1_offset") + ); + if (1==val("ddp_buf0_valid")) { + PR(" And buf0, which is also valid, has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len")-val("rx_ddp_buf0_offset") + ); + } + } else if (0==val("ddp_buf0_valid") && 1==val("ddp_buf1_valid") && 0==val("ddp_active_buf")) { + PR(" !!! Invalid DDP buf 1 valid, but buf 0 active.\n"); + } else if (1==val("ddp_buf0_valid") && 0==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" !!! Invalid DDP buf 0 valid, but buf 1 active.\n"); + } else { + PR(" DDP is enabled, but no buffers are active && valid.\n"); + + + + + if (0==val("ddp_indicate_out")) { + if (0==val("ddp_buf0_indicate") && 0==val("ddp_buf1_indicate")) { + PR(" 0 length Indicate buffers "); + if (0==val("rx_hdr_offset")) { + PR("will cause new data to be held in PMRX.\n"); + } else { + PR("is causing %u bytes to be held in PMRX\n", + val("rx_hdr_offset")); + } + } else { + PR(" Data being indicated to host\n"); + } + } else if (1==val("ddp_indicate_out")) { + PR(" Indicate is off, which "); + if (0==val("rx_hdr_offset")) { + PR("will cause new data to be held in PMRX.\n"); + } else { + PR("is causing %u bytes to be held in PMRX\n", + val("rx_hdr_offset")); + } + } + } + + + + +} Property changes on: stable/11/usr.sbin/cxgbetool/tcbshowt5.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.sbin/cxgbetool/tcbshowt6.c =================================================================== --- stable/11/usr.sbin/cxgbetool/tcbshowt6.c (nonexistent) +++ stable/11/usr.sbin/cxgbetool/tcbshowt6.c (revision 339393) @@ -0,0 +1,443 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* Auto-generated file. Avoid direct editing. */ +/* Edits will be lost when file regenerated. */ +#include +#include "tcb_common.h" + +void t6_display_tcb_aux_0 (_TCBVAR *tvp, int aux) +{ + + + + + + + + PR("STATE:\n"); + PR(" %-12s (%-2u), %s, lock_tid %u, rss_fw %u\n", + spr_tcp_state(val("t_state")), + val("t_state"), + spr_ip_version(val("ip_version")), + val("lock_tid"), + val("rss_fw") + ); + PR(" l2t_ix 0x%x, smac sel 0x%x, tos 0x%x\n", + val("l2t_ix"), + val("smac_sel"), + val("tos") + ); + PR(" maxseg %u, recv_scaleflag %u, recv_tstmp %u, recv_sack %u\n", + val("t_maxseg"), val("recv_scale"), + val("recv_tstmp"), val("recv_sack")); + + + PR("TIMERS:\n"); /* **************************************** */ + PR(" timer %u, dack_timer %u\n", + val("timer"), val("dack_timer")); + PR(" mod_schd: tx: %u, rx: %u, reason 0x%1x\n", + val("mod_schd_tx"), + val("mod_schd_rx"), + ((val("mod_schd_reason2")<<2) | (val("mod_schd_reason1")<<1) | + val("mod_schd_reason0")) + ); + + + PR(" max_rt %-2u, rxtshift %u, keepalive %u\n", + val("max_rt"), val("t_rxtshift"), + val("keepalive")); + PR(" timestamp_offset 0x%x, timestamp 0x%x\n", + val("timestamp_offset"),val("timestamp")); + + + PR(" t_rtt_ts_recent_age %u t_rttseq_recent %u\n", + val("t_rtt_ts_recent_age"), val("t_rtseq_recent")); + PR(" t_srtt %u, t_rttvar %u\n", + val("t_srtt"),val("t_rttvar")); + + + + + + + PR("TRANSMIT BUFFER:\n"); /* *************************** */ + PR(" snd_una %u, snd_nxt %u, snd_max %u, tx_max %u\n", + val("snd_una"),val("snd_nxt"), + val("snd_max"),val("tx_max")); + PR(" core_fin %u, tx_hdr_offset %u\n", + val("core_fin"), SEQ_SUB(val("tx_max"),val("snd_una")) + ); + if (val("recv_scale") && !val("active_open")) { + PR(" rcv_adv %-5u << %-2u == %u (recv_scaleflag %u rcv_scale %u active open %u)\n", + val("rcv_adv"), val("rcv_scale"), + val("rcv_adv") << val("rcv_scale"), + val("recv_scale"), val("rcv_scale"), val("active_open")); + } else { + PR(" rcv_adv %-5u (rcv_scale %-2u recv_scaleflag %u active_open %u)\n", + val("rcv_adv"), val("rcv_scale"), + val("recv_scale"), val("active_open")); + } + + PR(" snd_cwnd %-5u snd_ssthresh %u snd_rec %u\n", + val("snd_cwnd") , val("snd_ssthresh"), val("snd_rec") + ); + + + + + PR(" cctrl: sel %s, ecn %u, ece %u, cwr %u, rfr %u\n", + spr_cctrl_sel(val("cctrl_sel0"),val("cctrl_sel1")), + val("cctrl_ecn"), val("cctrl_ece"), val("cctrl_cwr"), + val("cctrl_rfr")); + PR(" t_dupacks %u, dupack_count_odd %u, fast_recovery %u\n", + val("t_dupacks"), val("dupack_count_odd"),val("fast_recovery")); + PR(" core_more %u, core_urg, %u core_push %u,", + val("core_more"),val("core_urg"),val("core_push")); + PR(" core_flush %u\n",val("core_flush")); + PR(" nagle %u, ssws_disable %u, turbo %u,", + val("nagle"), val("ssws_disabled"), val("turbo")); + PR(" tx_pdu_out %u\n",val("tx_pdu_out")); + PR(" tx_pace_auto %u, tx_pace_fixed %u, tx_queue %u", + val("tx_pace_auto"),val("tx_pace_fixed"),val("tx_queue")); + + + PR(" tx_quiesce %u\n",val("tx_quiesce")); + PR(" tx_channel %u, tx_channel1 %u, tx_channel0 %u\n", + val("tx_channel"), + (val("tx_channel")>>1)&1, + val("tx_channel")&1 + ); + + + + + PR(" tx_hdr_ptr 0x%-6x tx_last_ptr 0x%-6x tx_compact %u\n", + val("tx_hdr_ptr"),val("tx_last_ptr"),val("tx_compact")); + + + + + PR("RECEIVE BUFFER:\n"); /* *************************** */ + PR(" last_ack_sent %-10u rx_compact %u\n", + val("ts_last_ack_sent"),val("rx_compact")); + PR(" rcv_nxt %-10u hdr_off %-10u\n", + val("rcv_nxt"), val("rx_hdr_offset")); + PR(" frag0_idx %-10u length %-10u frag0_ptr 0x%-8x\n", + val("rx_frag0_start_idx"), + val("rx_frag0_len"), + val("rx_ptr")); + PR(" frag1_idx %-10u length %-10u ", + val("rx_frag1_start_idx_offset"), + val("rx_frag1_len")); + + + + + if (val("ulp_type")!=4) { /* RDMA has FRAG1 idx && len, but no ptr? Should I not display frag1 at all? */ + PR("frag1_ptr 0x%-8x\n",val("rx_frag1_ptr")); + } else { + PR("\n"); + } + + + if (val("ulp_type") != 9 && val("ulp_type")!=8 && val("ulp_type") !=6 && + val("ulp_type") != 5 && val("ulp_type") !=4) { + PR(" frag2_idx %-10u length %-10u frag2_ptr 0x%-8x\n", + val("rx_frag2_start_idx_offset"), + val("rx_frag2_len"), + val("rx_frag2_ptr")); + PR(" frag3_idx %-10u length %-10u frag3_ptr 0x%-8x\n", + val("rx_frag3_start_idx_offset"), + val("rx_frag3_len"), + val("rx_frag3_ptr")); + } + + + + + + + PR(" peer_fin %u, rx_pdu_out %u, pdu_len %u\n", + val("peer_fin"),val("rx_pdu_out"), val("pdu_len")); + + + + + if (val("recv_scale")) { + PR(" rcv_wnd %u >> snd_scale %u == %u, recv_scaleflag = %u\n", + val("rcv_wnd"), val("snd_scale"), + val("rcv_wnd") >> val("snd_scale"), + val("recv_scale")); + } else { + PR(" rcv_wnd %u. (snd_scale %u, recv_scaleflag = %u)\n", + val("rcv_wnd"), val("snd_scale"), + val("recv_scale")); + } + + + + + PR(" dack_mss %u dack %u, dack_not_acked: %u\n", + val("dack_mss"),val("dack"),val("dack_not_acked")); + PR(" rcv_coal %u rcv_co_psh %u rcv_co_last_psh %u heart %u\n", + val("rcv_coalesce_enable"), + val("rcv_coalesce_push"), + val("rcv_coalesce_last_psh"), + val("rcv_coalesce_heartbeat")); + + PR(" rx_channel %u rx_quiesce %u rx_flow_ctrl_dis %u,", + val("rx_channel"), val("rx_quiesce"), + val("rx_flow_control_disable")); + PR(" rx_flow_ctrl_ddp %u\n", + val("rx_flow_control_ddp")); + + + PR("MISCELANEOUS:\n"); /* *************************** */ + PR(" pend_ctl: 0x%1x, core_bypass: 0x%x, main_slush: 0x%x\n", + ((val("pend_ctl2")<<2) | (val("pend_ctl1")<<1) | + val("pend_ctl0")), + val("core_bypass"),val("main_slush")); + PR(" Migrating %u, ask_mode %u, non_offload %u, rss_info %u\n", + val("migrating"), + val("ask_mode"), val("non_offload"), val("rss_info")); + PR(" ULP: ulp_type %u (%s), ulp_raw %u", + val("ulp_type"), spr_ulp_type(val("ulp_type")), + val("ulp_raw")); + + + if (aux==1) { + PR(", ulp_ext %u",val("ulp_ext")); + } + PR("\n"); + + + + + PR(" RDMA: error %u, flm_err %u\n", + val("rdma_error"), val("rdma_flm_error")); + + +} +void t6_display_tcb_aux_1 (_TCBVAR *tvp, int aux) +{ + + + + PR(" aux1_slush0: 0x%x aux1_slush1 0x%x\n", + val("aux1_slush0"), val("aux1_slush1")); + PR(" pdu_hdr_len %u\n",val("pdu_hdr_len")); + + + +} +void t6_display_tcb_aux_2 (_TCBVAR *tvp, int aux) +{ + + + + + PR(" qp_id %u, pd_id %u, stag %u\n", + val("qp_id"), val("pd_id"),val("stag")); + PR(" irs_ulp %u, iss_ulp %u\n", + val("irs_ulp"),val("iss_ulp")); + PR(" tx_pdu_len %u\n", + val("tx_pdu_len")); + PR(" cq_idx_sq %u, cq_idx_rq %u\n", + val("cq_idx_sq"),val("cq_idx_rq")); + PR(" rq_start %u, rq_MSN %u, rq_max_off %u, rq_write_ptr %u\n", + val("rq_start"),val("rq_msn"),val("rq_max_offset"), + val("rq_write_ptr")); + PR(" L_valid %u, rdmap opcode %u\n", + val("ord_l_bit_vld"),val("rdmap_opcode")); + PR(" tx_flush: %u, tx_oos_rxmt %u, tx_oos_txmt %u\n", + val("tx_flush"),val("tx_oos_rxmt"),val("tx_oos_txmt")); + + + + +} +void t6_display_tcb_aux_3 (_TCBVAR *tvp, int aux) +{ + + + + + + + PR(" aux3_slush: 0x%x, unused: buf0 0x%x, buf1: 0x%x\n", + val("aux3_slush"),val("ddp_buf0_unused"),val("ddp_buf1_unused")); + + + PR(" ind_full: %u, tls_key_mode: %u\n", + val("ddp_indicate_fll"),val("tls_key_mode")); + + + PR(" DDP: DDPOFF ActBuf IndOut WaitFrag Rx2Tx BufInf\n"); + PR(" %u %u %u %u %u %u\n", + val("ddp_off"),val("ddp_active_buf"),val("ddp_indicate_out"), + val("ddp_wait_frag"),val("ddp_rx2tx"),val("ddp_buf_inf") + ); + + + PR(" Ind PshfEn PushDis Flush NoInvalidate\n"); + PR(" Buf0: %u %u %u %u %u\n", + val("ddp_buf0_indicate"), + val("ddp_pshf_enable_0"), val("ddp_push_disable_0"), + val("ddp_buf0_flush"), val("ddp_psh_no_invalidate0") + ); + PR(" Buf1: %u %u %u %u %u\n", + val("ddp_buf1_indicate"), + val("ddp_pshf_enable_1"), val("ddp_push_disable_1"), + val("ddp_buf1_flush"), val("ddp_psh_no_invalidate1") + ); + + + + + + + + + + + PR(" Valid Offset Length Tag\n"); + PR(" Buf0: %u 0x%6.6x 0x%6.6x 0x%8.8x", + val("ddp_buf0_valid"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_tag") + + + ); + if (0==val("ddp_off") && 1==val("ddp_buf0_valid") && 0==val("ddp_active_buf")) { + PR(" (Active)\n"); + } else { + PR(" (Inactive)\n"); + } + + + PR(" Buf1: %u 0x%6.6x 0x%6.6x 0x%8.8x", + val("ddp_buf1_valid"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_tag") + + + ); + + + if (0==val("ddp_off") && 1==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" (Active)\n"); + } else { + PR(" (Inactive)\n"); + } + + + + + + + if (1==val("ddp_off")) { + PR(" DDP is off (which also disables indicate)\n"); + } else if (1==val("ddp_buf0_valid") && 0==val("ddp_active_buf")) { + PR(" Data being DDP'ed to buf 0, "); + PR("which has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len")-val("rx_ddp_buf0_offset") + ); + if (1==val("ddp_buf1_valid")) { + PR(" And buf1, which is also valid, has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len")-val("rx_ddp_buf1_offset") + ); + } + } else if (1==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" Data being DDP'ed to buf 1, "); + PR("which has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf1_len"),val("rx_ddp_buf1_offset"), + val("rx_ddp_buf1_len")-val("rx_ddp_buf1_offset") + ); + if (1==val("ddp_buf0_valid")) { + PR(" And buf0, which is also valid, has %u - %u = %u bytes of space left\n", + val("rx_ddp_buf0_len"),val("rx_ddp_buf0_offset"), + val("rx_ddp_buf0_len")-val("rx_ddp_buf0_offset") + ); + } + } else if (0==val("ddp_buf0_valid") && 1==val("ddp_buf1_valid") && 0==val("ddp_active_buf")) { + PR(" !!! Invalid DDP buf 1 valid, but buf 0 active.\n"); + } else if (1==val("ddp_buf0_valid") && 0==val("ddp_buf1_valid") && 1==val("ddp_active_buf")) { + PR(" !!! Invalid DDP buf 0 valid, but buf 1 active.\n"); + } else { + PR(" DDP is enabled, but no buffers are active && valid.\n"); + + + + + if (0==val("ddp_indicate_out")) { + if (0==val("ddp_buf0_indicate") && 0==val("ddp_buf1_indicate")) { + PR(" 0 length Indicate buffers "); + if (0==val("rx_hdr_offset")) { + PR("will cause new data to be held in PMRX.\n"); + } else { + PR("is causing %u bytes to be held in PMRX\n", + val("rx_hdr_offset")); + } + } else { + PR(" Data being indicated to host\n"); + } + } else if (1==val("ddp_indicate_out")) { + PR(" Indicate is off, which "); + if (0==val("rx_hdr_offset")) { + PR("will cause new data to be held in PMRX.\n"); + } else { + PR("is causing %u bytes to be held in PMRX\n", + val("rx_hdr_offset")); + } + } + } + + + + +} +void t6_display_tcb_aux_4 (_TCBVAR *tvp, int aux) +{ + + + + PR("TLS: offset: 0x%6.6x, len:0x%6.6x, flags: 0x%4.4x\n", + val("rx_tls_buf_offset"),val("rx_tls_buf_len"), + val("rx_tls_flags")); + PR(" seq: 0x%llx \n",val64("rx_tls_seq")); + PR(" tag: 0x%8.8x, key:0x%8.8x\n", + val("rx_tls_buf_tag"),val("rx_tls_key_tag")); + + + + +} Property changes on: stable/11/usr.sbin/cxgbetool/tcbshowt6.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11 =================================================================== --- stable/11 (revision 339392) +++ stable/11 (revision 339393) Property changes on: stable/11 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r330887