File: rte_dev_info.h

package info (click to toggle)
dpdk 25.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 127,892 kB
  • sloc: ansic: 2,358,479; python: 16,426; sh: 4,474; makefile: 1,713; awk: 70
file content (62 lines) | stat: -rw-r--r-- 1,903 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2015 Intel Corporation
 */

#ifndef _RTE_DEV_INFO_H_
#define _RTE_DEV_INFO_H_

#include <stdint.h>

#define RTE_ETH_REG_NAME_SIZE 64
struct rte_eth_reg_name {
	char name[RTE_ETH_REG_NAME_SIZE];
};

/*
 * Placeholder for accessing device registers
 */
struct rte_dev_reg_info {
	void *data; /**< Buffer for return registers */
	uint32_t offset; /**< Start register table location for access */
	uint32_t length; /**< Number of registers to fetch */
	uint32_t width; /**< Size of device register */
	uint32_t version; /**< Device version */
	/**
	 * Name of target module, filter for target subset of registers.
	 * This field could affects register selection for data/length/names.
	 */
	const char *filter;
	struct rte_eth_reg_name *names; /**< Registers name saver */
};

/*
 * Placeholder for accessing device EEPROM
 */
struct rte_dev_eeprom_info {
	void *data; /**< Buffer for return EEPROM */
	uint32_t offset; /**< Start EEPROM address for access*/
	uint32_t length; /**< Length of EEPROM region to access */
	uint32_t magic; /**< Device-specific key, such as device-id */
};

/**
 * Placeholder for accessing plugin module EEPROM
 */
struct rte_eth_dev_module_info {
	uint32_t type; /**< Type of plugin module EEPROM */
	uint32_t eeprom_len; /**< Length of plugin module EEPROM */
};

/* EEPROM Standards for plug in modules */
#define RTE_ETH_MODULE_SFF_8079             0x1
#define RTE_ETH_MODULE_SFF_8079_LEN         256
#define RTE_ETH_MODULE_SFF_8472             0x2
#define RTE_ETH_MODULE_SFF_8472_LEN         512
#define RTE_ETH_MODULE_SFF_8636             0x3
#define RTE_ETH_MODULE_SFF_8636_LEN         256
#define RTE_ETH_MODULE_SFF_8636_MAX_LEN     640
#define RTE_ETH_MODULE_SFF_8436             0x4
#define RTE_ETH_MODULE_SFF_8436_LEN         256
#define RTE_ETH_MODULE_SFF_8436_MAX_LEN     640

#endif /* _RTE_DEV_INFO_H_ */