linux-stable/include/linux/mlx5
Mark Bloch 7f46a0b732 net/mlx5: Lag, add debugfs to query hardware lag state
Lag state has become very complicated with many modes, flags, types and
port selections methods and future work will add additional features.

Add a debugfs to query the current lag state. A new directory named "lag"
will be created under the mlx5 debugfs directory. As the driver has
debugfs per pci function the location will be: <debugfs>/mlx5/<BDF>/lag

For example:
/sys/kernel/debug/mlx5/0000:08:00.0/lag

The following files are exposed:

- state: Returns "active" or "disabled". If "active" it means hardware
         lag is active.

- members: Returns the BDFs of all the members of lag object.

- type: Returns the type of the lag currently configured. Valid only
	if hardware lag is active.
	* "roce" - Members are bare metal PFs.
	* "switchdev" - Members are in switchdev mode.
	* "multipath" - ECMP offloads.

- port_sel_mode: Returns the egress port selection method, valid
		 only if hardware lag is active.
		 * "queue_affinity" - Egress port is selected by
		   the QP/SQ affinity.
		 * "hash" - Egress port is selected by hash done on
		   each packet. Controlled by: xmit_hash_policy of the
		   bond device.
- flags: Returns flags that are specific per lag @type. Valid only if
	 hardware lag is active.
	 * "shared_fdb" - "on" or "off", if "on" single FDB is used.

- mapping: Returns the mapping which is used to select egress port.
	   Valid only if hardware lag is active.
	   If @port_sel_mode is "hash" returns the active egress ports.
	   The hash result will select only active ports.
	   if @port_sel_mode is "queue_affinity" returns the mapping
	   between the configured port affinity of the QP/SQ and actual
	   egress port. For example:
	   * 1:1 - Mapping means if the configured affinity is port 1
	           traffic will egress via port 1.
	   * 1:2 - Mapping means if the configured affinity is port 1
		   traffic will egress via port 2. This can happen
		   if port 1 is down or in active/backup mode and port 1
		   is backup.

Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2022-05-09 22:54:04 -07:00
..
cq.h net/mlx5: Use mlx5_cmd_do() in core create_{cq,dct} 2022-02-23 15:21:59 -08:00
device.h net/mlx5: Add misc5 flow table match parameters 2021-12-31 00:17:23 -08:00
doorbell.h
driver.h net/mlx5: Lag, add debugfs to query hardware lag state 2022-05-09 22:54:04 -07:00
eq.h net/mlx5: Introduce API for bulk request and release of IRQs 2022-01-06 16:22:52 -08:00
eswitch.h net/mlx5: E-Switch, Fix resetting of encap mode when entering switchdev 2021-11-16 12:20:19 -08:00
fs.h net/mlx5: fs, add unused destination type 2022-05-02 21:21:14 -07:00
fs_helpers.h
mlx5_ifc.h net/mlx5: Remove not-supported ICV length 2022-05-03 22:59:17 -07:00
mlx5_ifc_fpga.h net/mlx5_fpga: Drop INNOVA IPsec support 2022-04-09 08:23:47 +03:00
mlx5_ifc_vdpa.h vdpa/mlx5: Fix queue type selection logic 2021-08-11 06:44:43 -04:00
mpfs.h {net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table 2021-05-18 23:01:48 -07:00
port.h IB/mlx5: Fix undefined behavior due to shift overflowing the constant 2022-04-06 10:15:03 +03:00
qp.h net/mlx5e: Fix build warning, detected write beyond size of field 2022-03-22 16:48:56 -07:00
rsc_dump.h
transobj.h net/mlx5e: Fix page reclaim for dead peer hairpin 2021-06-09 17:20:03 -07:00
vport.h