Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Feb 2023 07:39:30 GMT
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1af49ac2e40e - stable/13 - cxgbetool(8): User interface to round-robin queue selection via COP.
Message-ID:  <202302020739.3127dUdw062002@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=1af49ac2e40e46cca5d015aa48660c9ca37f96fc

commit 1af49ac2e40e46cca5d015aa48660c9ca37f96fc
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2022-04-14 22:54:13 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2023-02-02 07:14:24 +0000

    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@
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D34922
    
    (cherry picked from commit 811a82d53aaf905bebb523600d375a457069f022)
---
 usr.sbin/cxgbetool/cxgbetool.8 | 18 +++++++++++-------
 usr.sbin/cxgbetool/cxgbetool.c | 15 +++++++++------
 2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/usr.sbin/cxgbetool/cxgbetool.8 b/usr.sbin/cxgbetool/cxgbetool.8
index d1c6f528d04e..96e66632e758 100644
--- a/usr.sbin/cxgbetool/cxgbetool.8
+++ b/usr.sbin/cxgbetool/cxgbetool.8
@@ -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
diff --git a/usr.sbin/cxgbetool/cxgbetool.c b/usr.sbin/cxgbetool/cxgbetool.c
index 1d239ccf238a..f93c28da8e16 100644
--- a/usr.sbin/cxgbetool/cxgbetool.c
+++ b/usr.sbin/cxgbetool/cxgbetool.c
@@ -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,
 	};
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302020739.3127dUdw062002>