Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
mlx5io(4)	       FreeBSD Kernel Interfaces Manual		     mlx5io(4)

NAME
     mlx5io -- IOCTL interface to manage Connect-X 4/5 Mellanox	network
     adapters

SYNOPSIS
     #include <dev/mlx5/mlx5io.h>

DESCRIPTION
     The mlx5io	interface is provided for management of	the Connect-X 4	and 5
     network adapters in the aspects not covered by the	generic	network	con-
     figuration, mostly	related	to the PCIe attachment and internal card work-
     ing.  Interface consists of the commands, which are passed	by means of
     ioctl(2) on the file descriptor, opened from the /dev/mlx5ctl device
     node.

     The following commands are	implemented:

     MLX5_FWDUMP_FORCE
	     Take the snapshot of the firmware registers state and store it in
	     the kernel	buffer.	 The buffer must be empty, in other words, no
	     dumps should be written so	far, or	existing dump cleared with the
	     MLX5_FWDUMP_RESET command for the specified device.  The argument
	     for the command should point to the struct	mlx5_fwdump_addr
	     structure,	containing the PCIe bus	address	of the device.

	     struct mlx5_fwdump_addr {
		     uint32_t domain;
		     uint8_t bus;
		     uint8_t slot;
		     uint8_t func;
	     };

     MLX5_FWDUMP_RESET
	     Clear the stored firmware dump, preparing the kernel buffer for
	     the next dump.  The argument for the command should point to the
	     struct mlx5_fwdump_addr structure,	containing the PCIe bus
	     address of	the device.

     MLX5_FWDUMP_GET
	     Fetch the stored firmware dump into the user memory.  The argu-
	     ment to the command should	point to the input/output struct
	     mlx5_fwdump_get structure.	 Its devaddr field specifies the
	     address of	the device, the	buf fields points to the array of
	     struct mlx5_fwdump_reg of records of the registers	values,	the
	     size of the array is specified in the reg_cnt field.

	     struct mlx5_fwdump_get {
		     struct mlx5_fwdump_addr devaddr;
		     struct mlx5_fwdump_reg *buf;
		     size_t reg_cnt;
		     size_t reg_filled;	/* out */
	     };

	     On	successfull return, the	reg_filled field reports the number of
	     the buf array elements actually filled with the registers values.
	     If	buf contains the NULL pointer, no registers are	filled,	but
	     reg_filled	still contains the number of registers that should be
	     passed for	the complete dump.

	     The struct	mlx5_fwdump_reg	element	contains the address of	the
	     register in the field addr, and its value in the field val.

	     struct mlx5_fwdump_reg {
		     uint32_t addr;
		     uint32_t val;
	     };

FILES
     The /dev/mlx5ctl devfs(5) node is used to pass commands to	the driver.

RETURN VALUES
     If	successful, the	IOCTL returns zero.  Otherwise,	-1 is returned and the
     global variable errno is set to indicate the error.

SEE ALSO
     errno(2), ioctl(2), mlx5en(4), mlx5ib(4), mlx5tool(8) and pci(9).

FreeBSD	11.2		       February	20, 2018		  FreeBSD 11.2

NAME | SYNOPSIS | DESCRIPTION | FILES | RETURN VALUES | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=mlx5io&sektion=4&manpath=FreeBSD+11.2-RELEASE+and+Ports>

home | help