aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgbe/t4_main.c
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2021-06-24 20:05:57 +0000
committerNavdeep Parhar <np@FreeBSD.org>2021-06-25 23:04:09 +0000
commitec8004dd419d8c8acfc9025dd050f141c949d53a (patch)
tree76192aa222c8387b26f0c4455d1e849fc87ff664 /sys/dev/cxgbe/t4_main.c
parent6beb67c7e0ad4c3f8277ed1122ef5efcde0a269c (diff)
downloadsrc-ec8004dd419d8c8acfc9025dd050f141c949d53a.tar.gz
src-ec8004dd419d8c8acfc9025dd050f141c949d53a.zip
cxgbe(4): Do not configure traffic classes automatically on attach.
The driver used to configure all available classes with some default parameters on attach and the rest of t4_sched.c was written with the assumption that all traffic classes are always valid in the hardware. But this resulted in a lot of informational messages being logged in the firmware's circular log, crowding out other more useful messages. This change leaves the tx scheduler alone during attach to reduce the spam in the devlog. The state of every class is now tracked separately from its flags and there is support for an 'uninitialized' state. MFC after: 2 weeks Sponsored by: Chelsio Communications
Diffstat (limited to 'sys/dev/cxgbe/t4_main.c')
-rw-r--r--sys/dev/cxgbe/t4_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 4c69a152963a..67500b0c44b9 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -7789,7 +7789,7 @@ cxgbe_sysctls(struct port_info *pi)
struct adapter *sc = pi->adapter;
int i;
char name[16];
- static char *tc_flags = {"\20\1USER\2SYNC\3ASYNC\4ERR"};
+ static char *tc_flags = {"\20\1USER"};
ctx = device_get_sysctl_ctx(pi->dev);
@@ -7866,6 +7866,8 @@ cxgbe_sysctls(struct port_info *pi)
children2 = SYSCTL_CHILDREN(SYSCTL_ADD_NODE(ctx,
SYSCTL_CHILDREN(oid), OID_AUTO, name,
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "traffic class"));
+ SYSCTL_ADD_UINT(ctx, children2, OID_AUTO, "state",
+ CTLFLAG_RD, &tc->state, 0, "current state");
SYSCTL_ADD_PROC(ctx, children2, OID_AUTO, "flags",
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, tc_flags,
(uintptr_t)&tc->flags, sysctl_bitfield_8b, "A", "flags");