include/linux/pds/pds_core_if.h

Source file repositories/reference/linux-study-clean/include/linux/pds/pds_core_if.h

File Facts

System
Linux kernel
Corpus path
include/linux/pds/pds_core_if.h
Extension
.h
Size
16699 bytes
Lines
573
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct pds_core_drv_identity {
	__le32 drv_type;
	__le32 os_dist;
	char   os_dist_str[128];
	__le32 kernel_ver;
	char   kernel_ver_str[32];
	char   driver_ver_str[32];
};

#define PDS_DEV_TYPE_MAX	16
/**
 * struct pds_core_dev_identity - Device identity information
 * @version:	      Version of device identify
 * @type:	      Identify type (0 for now)
 * @state:	      Device state
 * @rsvd:	      Word boundary padding
 * @nlifs:	      Number of LIFs provisioned
 * @nintrs:	      Number of interrupts provisioned
 * @ndbpgs_per_lif:   Number of doorbell pages per LIF
 * @intr_coal_mult:   Interrupt coalescing multiplication factor
 *		      Scale user-supplied interrupt coalescing
 *		      value in usecs to device units using:
 *		      device units = usecs * mult / div
 * @intr_coal_div:    Interrupt coalescing division factor
 *		      Scale user-supplied interrupt coalescing
 *		      value in usecs to device units using:
 *		      device units = usecs * mult / div
 * @vif_types:        How many of each VIF device type is supported
 */
struct pds_core_dev_identity {
	u8     version;
	u8     type;
	u8     state;
	u8     rsvd;
	__le32 nlifs;
	__le32 nintrs;
	__le32 ndbpgs_per_lif;
	__le32 intr_coal_mult;
	__le32 intr_coal_div;
	__le16 vif_types[PDS_DEV_TYPE_MAX];
};

#define PDS_CORE_IDENTITY_VERSION_1	1

/**
 * struct pds_core_dev_identify_cmd - Driver/device identify command
 * @opcode:	Opcode PDS_CORE_CMD_IDENTIFY
 * @ver:	Highest version of identify supported by driver
 *
 * Expects to find driver identification info (struct pds_core_drv_identity)
 * in cmd_regs->data.  Driver should keep the devcmd interface locked
 * while preparing the driver info.
 */
struct pds_core_dev_identify_cmd {
	u8 opcode;
	u8 ver;
};

/**
 * struct pds_core_dev_identify_comp - Device identify command completion
 * @status:	Status of the command (enum pds_core_status_code)
 * @ver:	Version of identify returned by device
 *
 * Device identification info (struct pds_core_dev_identity) can be found
 * in cmd_regs->data.  Driver should keep the devcmd interface locked
 * while reading the results.
 */
struct pds_core_dev_identify_comp {
	u8 status;
	u8 ver;
};

/**
 * struct pds_core_dev_reset_cmd - Device reset command
 * @opcode:	Opcode PDS_CORE_CMD_RESET
 *
 * Resets and clears all LIFs, VDevs, and VIFs on the device.
 */
struct pds_core_dev_reset_cmd {
	u8 opcode;
};

/**
 * struct pds_core_dev_reset_comp - Reset command completion
 * @status:	Status of the command (enum pds_core_status_code)
 */
struct pds_core_dev_reset_comp {
	u8 status;
};

Annotation

Implementation Notes