Commit graph

41 commits

Author SHA1 Message Date
Warner Losh 4d65a7c695 usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Elyes Haouas 34181db8bc cxgbetool: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:39 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Navdeep Parhar 4913a24e79 cxgbetool(8): Add support for tracing loopback traffic for a port.
Use lo<n> to tap the loopback for port <n>.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2023-04-01 17:50:57 -07:00
Gordon Bergling 74d2a3c16d cxgbetool(8): Fix common typos in sysctl descriptions
- s/addres/address/

MFC after:	5 days
2023-01-19 14:22:00 +01:00
Gordon Bergling 59f7c7ff51 cxgbetool(8): Fix a typo in a source code comment
- s/paramter/parameter/

MFC after:	3 days
2022-09-15 10:29:54 +02:00
Navdeep Parhar f6cc21e8e1 cxgbetool: remove unnecessary vertical whitespace.
No functional change.

MFC after:	3 days
2022-08-19 15:38:13 -07:00
Navdeep Parhar 811a82d53a 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
2022-04-14 15:54:13 -07:00
Gordon Bergling 28a6b24729 cxgbetool(8): Fix a typo in the man page
- s/begining/beginning/

MFC after:	3 days
2022-03-28 19:33:44 +02:00
Emmanuel Vadot b8876cac2d pkgbase: Create a cxgbe-tools package
cxgbetool is only useful for users who have a Chelsio card.
Create a package for it so users that don't have this card can
avoid having this program.

Differential Revision:	https://reviews.freebsd.org/D31793
2021-09-07 10:19:37 +02:00
Navdeep Parhar 35e62b00c3 cxgbetool(8): Update the register definitions used to decode regdump.
Obtained from:	Chelsio Communications
MFC after:	1 week
Sponsored by:	Chelsio Communications
2021-07-13 17:55:55 -07:00
Navdeep Parhar ac02945f7e cxgbetool(8): add a 'clip' subcommand to deal with the CLIP table.
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2021-05-23 16:28:31 -07:00
Navdeep Parhar 038148c108 cxgbetool(8): Add support for setting the hashfilter mode (filter mask).
Tighten up the validation of filter modes while here.  Unrecognized
keywords will be now be flagged as errors instead of being ignored.
2021-02-19 14:23:58 -08:00
Ed Maste 25611bc0ab cxgbetool: correct utilties typo 2021-01-24 10:21:53 -05:00
Gordon Bergling 2911dc6cea cxgbetool(8): Remove dublicate word 'whether'
MFC after:	1 week
2020-10-10 14:36:16 +00:00
Navdeep Parhar 9edef078cc cxgbetool(8): Add a subaction (tcbrss <n>) 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.<ifname>.<inst>.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
2018-10-27 05:26:09 +00:00
Navdeep Parhar 1e16837679 cxgbetool(8): The VLAN tag provided in the action for a filter must be prefixed
with either '=' or '+'.  Fix the description of the parameter in the man page
while here.

Approved by:	re@ (kib@)
Sponsored by:	Chelsio Communications
2018-09-21 23:48:40 +00:00
Navdeep Parhar 93dcd0775f cxgbetool(8): Clarify the meaning of the "queue" parameter used to steer
traffic to a particular queue.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
Approved by:	re@ (kib@)
2018-09-18 22:41:30 +00:00
Navdeep Parhar 6ba813531f cxgbetool(8): Userspace part of support for high priority filters on T6+.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-08-09 14:21:27 +00:00
Navdeep Parhar ffcf81c99d cxgbetool(8): Require and validate only those inputs that are applicable
to the type of rate limiter being configured.  For example, the class
WRR scheduler doesn't need any kbps limits (it just needs the weights
for each class), the channel scheduler doesn't need anything except the
aggregate kbps to limit the channel to, and so on.

MFC after:	3 days
Sponsored by:	Chelsio Communications
2018-07-25 17:20:54 +00:00
Navdeep Parhar 2293e22112 cxgbetool(8): Reject invalid VLAN values.
Submitted by:	Krishnamraju Eraparaju @ Chelsio
MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-06-26 21:56:06 +00:00
Navdeep Parhar a12a06fae2 cxgbetool: Disallow negative values for numeric parameters.
Sponsored by:	Chelsio Communications
2018-06-04 23:17:18 +00:00
Hans Petter Selasky 5fd1ea0810 Re-apply r190640.
- Restore local change to include <net/bpf.h> inside pcap.h.
This fixes ports build problems.
- Update local copy of dlt.h with new DLT types.
- Revert no longer needed <net/bpf.h> includes which were added
as part of r334277.

Suggested by:	antoine@, delphij@, np@
MFC after:	3 weeks
Sponsored by:	Mellanox Technologies
2018-05-31 09:11:21 +00:00
Hans Petter Selasky b00ab7548b MFV r333789: libpcap 1.9.0 (pre-release)
MFC after:	1 month
Sponsored by:	Mellanox Technologies
2018-05-28 08:12:18 +00:00
Navdeep Parhar 36ea2fe3bf cxgbetool(8): Provide user interface for hashfilters, hardware NAT, and
other filtering related features that were recently added to the driver.

Sponsored by:	Chelsio Communications
2018-05-15 04:31:11 +00:00
Navdeep Parhar 0d7404ba76 Fix typo in cxgbetool.8. 2018-04-15 19:23:37 +00:00
Navdeep Parhar 1131c927c4 cxgbe(4): Add support for Connection Offload Policy (aka COP).
COP allows fine-grained control on whether to offload a TCP connection
using t4_tom, and what settings to apply to a connection selected for
offload.  t4_tom must still be loaded and IFCAP_TOE must still be
enabled for full TCP offload to take place on an interface.  The
difference is that IFCAP_TOE used to be the only knob and would enable
TOE for all new connections on the inteface, but now the driver will
also consult the COP, if any, before offloading to the hardware TOE.

A policy is a plain text file with any number of rules, one per line.
Each rule has a "match" part consisting of a socket-type (L = listen,
A = active open, P = passive open, D = don't care) and a pcap-filter(7)
expression, and a "settings" part that specifies whether to offload the
connection or not and the parameters to use if so.  The general format
of a rule is: [socket-type] expr => settings

Example.  See cxgbetool(8) for more information.
[L] ip && port http => offload
[L] port 443 => !offload
[L] port ssh => offload
[P] src net 192.168/16 && dst port ssh => offload !nagle !timestamp cong newreno
[P] dst port ssh => offload !nagle ecn cong tahoe
[P] dst port http => offload
[A] dst port 443 => offload tls
[A] dst net 192.168/16 => offload !timestamp cong highspeed

The driver processes the rules for each new listen, active open, or
passive open and stops at the first match.  There is an implicit rule at
the end of every policy that prohibits offload when no rule in the
policy matches:
[D] all => !offload

This is a reworked and expanded version of a patch submitted by
Krishnamraju Eraparaju @ Chelsio.

Sponsored by:	Chelsio Communications
2018-04-14 19:07:56 +00:00
Navdeep Parhar ae9b401786 cxgbetool(8): Add the ability to decode hardware TCBs.
Obtained from:	Chelsio Communications
MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-03-14 00:04:58 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Navdeep Parhar 497e8a6bf0 cxgbetool(8): Do not close uninitialized fd on malloc failure.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2017-10-09 18:00:40 +00:00
Navdeep Parhar 313a64359d cxgbetool(8): Do not create a large file devoid of useful content when
the dumpstate ioctl fails.  Make the file world-readable while here.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2017-10-07 01:20:30 +00:00
Navdeep Parhar 7f7a2bce78 cxgbetool(8): mode must be specified when creating the dump file.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2017-09-13 00:37:42 +00:00
Navdeep Parhar f856f099cb cxgbe(4): Initial import of the "collect" component of Chelsio unified
debug (cudbg) code, hooked up to the main driver via an ioctl.

The ioctl can be used to collect the chip's internal state in a
compressed dump file.  These dumps can be decoded with the "view"
component of cudbg.

Obtained from:	Chelsio Communications
MFC after:	2 months
Sponsored by:	Chelsio Communications
2017-08-03 14:43:30 +00:00
Navdeep Parhar 8f82718fb2 cxgbetool(8): Add loadboot and loadboot-cfg subcommands to install or
remove bootrom and boot config.

MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2017-07-18 03:58:59 +00:00
Enji Cooper 59daefd7eb Fix some trivial manlint warnings
Sentences should begin on new lines, per manlint.

Bump .Dd for the change

MFC after:	1 month
Reviewed by:	bcr
Reported by:	make manlint
Sponsored by:	Dell EMC Isilon
2017-03-06 19:33:15 +00:00
Navdeep Parhar 54912308c8 Add cxgbetool(8) to the base system.
Move cxgbetool from tools/tools to usr.sbin. Compile and install it on
platforms where cxgbe(4) is built by default.  Knobs (WITH_CXGBETOOL and
WITHOUT_CXGBETOOL) have been added so that the user can override the
default setting.

Reviewed by:	ngie@, gnn@, bdrewery@
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D9854
2017-03-03 03:11:58 +00:00