cxgbetool(8): User interface to round-robin queue selection via COP.

Queue "roundrobin" in a COP rule means the driver should select queues
for new tids in a round-robin manner.

Reviewed by:	jhb@
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34922
This commit is contained in:
Navdeep Parhar 2022-04-14 15:54:13 -07:00
parent db28d4a0cd
commit 811a82d53a
2 changed files with 20 additions and 13 deletions

View file

@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd May 23, 2021
.Dd April 14, 2022
.Dt CXGBETOOL 8
.Os
.Sh NAME
@ -649,18 +649,22 @@ must be one of
.It Cm class Ar sc
Bind the connection to the specified tx scheduling class.
Valid range is 0 to 14 (for T4) and 0 to 15 (T5 onwards).
.It Cm rxq Ar qid
.It Cm rxq Ar qnum
Use the specified offload rx queue.
.Ar qid
should be between 0 and nofldrxq for the ifnet.
.Ar qnum
should be
.Cm random Ns , Cm roundrobin Ns ,
or a number between 0 and nofldrxq for the ifnet.
.It Cm txq Ar qnum
Use the specified offload tx queue.
.Ar qid
should be between 0 and nofldtxq for the ifnet.
.Ar qnum
should be
.Cm random Ns , Cm roundrobin Ns ,
or a number between 0 and nofldtxq for the ifnet.
.It Cm bind Ar qnum
Shorthand for
.Cm rxq Ar qnum Cm txq Ar qnum Ns .
Use only when nofldrxq is the same as nofldtxq.
Use when nofldrxq is the same as nofldtxq.
.It Cm mss Ar val
Set the advertised TCP MSS in the SYN for this connection to
.Ar val

View file

@ -3150,14 +3150,17 @@ parse_offload_settings_word(const char *s, char **pnext, const char *ws,
os->sched_class = val;
} else if (!strcmp(s, "bind") || !strcmp(s, "txq") ||
!strcmp(s, "rxq")) {
val = -1;
if (strcmp(param, "random")) {
if (!strcmp(param, "random")) {
val = QUEUE_RANDOM;
} else if (!strcmp(param, "roundrobin")) {
val = QUEUE_ROUNDROBIN;
} else {
p = str_to_number(param, &val, NULL);
if (*p || val < 0 || val > 0xffff) {
warnx("invalid queue specification "
"\"%s\". \"%s\" needs an integer"
" value, or \"random\".",
param, s);
" value, \"random\", or "
"\"roundrobin\".", param, s);
return (EINVAL);
}
}
@ -3207,8 +3210,8 @@ parse_offload_settings(const char *settings_ro, struct offload_settings *os)
.ecn = -1,
.ddp = -1,
.tls = -1,
.txq = -1,
.rxq = -1,
.txq = QUEUE_RANDOM,
.rxq = QUEUE_RANDOM,
.mss = -1,
};