From nobody Thu Apr 14 23:01:07 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 595B51B3F322; Thu, 14 Apr 2022 23:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KfZh41kmlz3m86; Thu, 14 Apr 2022 23:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649977268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vCn4RUUdExG7rbbevIPLNMsCR1uJdVl7WDD6szXWZ2s=; b=e8z2kDYhOFIpM8y00O/wM3h4Xd1c/1lyDhx2uVcXB3NCTwl3wyK2rGIY3+lDymcXKO/PG+ iC/SPnvev7ySaXvxjAajrRwHWEvWwRWpy51oSiqGI6b6VwzZZ5hqqiGhuCZsovbxEVyf8E yQpDbyEa/+8/xV794gGv017Prj1yAP22xZ7SF0nsxk2phnuXdkUTD/SrKiUe1zGVHxLwsh mxgmzgEPuiFFEc5yYML+LxebEFK32dsf8kLel4b67m8NtOJmkd6Ase9cjEPoV/ws9Z+3bd sGPvNjtS1aKoG49vl/BxaNKbgRGS/86iet/1OpR45RIrwNfPi26ezmIstS0kSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B53519D9; Thu, 14 Apr 2022 23:01:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23EN17pP021432; Thu, 14 Apr 2022 23:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23EN17YH021431; Thu, 14 Apr 2022 23:01:07 GMT (envelope-from git) Date: Thu, 14 Apr 2022 23:01:07 GMT Message-Id: <202204142301.23EN17YH021431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 811a82d53aaf - main - cxgbetool(8): User interface to round-robin queue selection via COP. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 811a82d53aaf905bebb523600d375a457069f022 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649977268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vCn4RUUdExG7rbbevIPLNMsCR1uJdVl7WDD6szXWZ2s=; b=wN6QpB9Y4J0dfoR4O3bvkeCGbW7cbTi95Mct79psTf7Y5umf0EGoJX+ZaTpga8Stg3uG6J D0fO6xsQDolB9Ham5aFBOuXWYfv7orEOWQ1ZeOI/L1rnpVX09T4v8zA+wMydoDNEN2OzWN hEnWJq0mt3RtJ4877T4SwiwdOKc7JK0mrO3tiw/OteAi6dOZBA00DCW7WyutG9ZEfapKVU 08ErwGm4bVL/XvM4dwH6YzVK0+1BkpAN76tC9LTCrrQCOOE6WpSLWUWNJ43TJBnZqkSZTL QPL08L6OYAvXoO18zPDWd1/IXXxpEKEB9cju3/QGrlnTHXYuGY98gtQDKbXJWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649977268; a=rsa-sha256; cv=none; b=WUxvs6L7/puQVgJ2zJL7IjcSDwPtteFRo1dJq8kPAkpuNrCucsStDGC2fsCj6roPtgBZRN 7HNBW1KUx53Irn5Aw37AX4ICr1sSx9GHIq7rkADABnQzJfFtzULEeFHf/A6rpViNFxbkeS BvEWrE8LOUMVOOM77zoG9UywuG3qxhgn0Um9Z8p6D/l3GubQaSuQgkAt8Pq2nPdIgoTgJU HkArtdkxq9CzDBiKnPJ+Am7RWN6HV3AGL3t7gPwZdMlCQMCRPwHniKnCCuCo22Qw3hMFAx S7WWh7FAAC3aBAZvxtDnIkmxx678XbqqXVowmj4oT2cszz2orUaJAAUL1J9cRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=811a82d53aaf905bebb523600d375a457069f022 commit 811a82d53aaf905bebb523600d375a457069f022 Author: Navdeep Parhar AuthorDate: 2022-04-14 22:54:13 +0000 Commit: Navdeep Parhar CommitDate: 2022-04-14 22:54:13 +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@ MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D34922 --- 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 77f092123de9..53de8f8ff89a 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, };