From owner-svn-src-all@freebsd.org Sat Oct 27 05:26:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7B2C10D9B44; Sat, 27 Oct 2018 05:26:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CCF57E3F5; Sat, 27 Oct 2018 05:26:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 482C8412C; Sat, 27 Oct 2018 05:26:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9R5QAvT055872; Sat, 27 Oct 2018 05:26:10 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9R5QAJQ055871; Sat, 27 Oct 2018 05:26:10 GMT (envelope-from np@FreeBSD.org) Message-Id: <201810270526.w9R5QAJQ055871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 27 Oct 2018 05:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339809 - head/usr.sbin/cxgbetool X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/usr.sbin/cxgbetool X-SVN-Commit-Revision: 339809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 05:26:11 -0000 Author: np Date: Sat Oct 27 05:26:09 2018 New Revision: 339809 URL: https://svnweb.freebsd.org/changeset/base/339809 Log: cxgbetool(8): Add a subaction (tcbrss ) that can be used with "pass" action to distribute traffic using the half of the VI's RSS indirection table. The value specified should either be the start of the VI's RSS slice (available at dev...rss_base since r339700) or the midpoint (rss_base + rss_size/2). The traffic that hits the filter will use the first or second half of the indirection table respectively. The indirection table can be populated in different ways to achieve different kinds of traffic/load distributions. For example, r339749 allows a netmap interface to have half the rx queues in the first half of the table and the rest in the other. Sponsored by: Chelsio Communications Modified: head/usr.sbin/cxgbetool/cxgbetool.c Modified: head/usr.sbin/cxgbetool/cxgbetool.c ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.c Sat Oct 27 04:59:35 2018 (r339808) +++ head/usr.sbin/cxgbetool/cxgbetool.c Sat Oct 27 05:26:09 2018 (r339809) @@ -924,7 +924,7 @@ do_show_one_filter_info(struct t4_filter *t, uint32_t if (t->fs.dirsteer == 0) { printf("RSS"); if (t->fs.maskhash) - printf("(TCB=hash)"); + printf("(region %d)", t->fs.iq << 1); } else { printf("%d", t->fs.iq); if (t->fs.dirsteerhash == 0) @@ -1263,11 +1263,19 @@ set_filter(uint32_t idx, int argc, const char *argv[], } 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; + t.fs.dirsteer = 1; /* direct steer */ + t.fs.iq = val; /* to the iq with this cntxt_id */ } else if (!parse_val("tcbhash", args, &val)) { - t.fs.maskhash = 1; - t.fs.dirsteerhash = 1; + t.fs.dirsteerhash = 1; /* direct steer */ + /* XXX: use (val << 1) as the rss_hash? */ + t.fs.iq = val; + } else if (!parse_val("tcbrss", args, &val)) { + t.fs.maskhash = 1; /* steer to RSS region */ + /* + * val = start idx of the region but the internal TCB + * field is 10b only and is left shifted by 1 before use. + */ + t.fs.iq = val >> 1; } else if (!parse_val("eport", args, &val)) { t.fs.eport = val; } else if (!parse_val("swapmac", args, &val)) {