1
2
3
4
5
6
7
8
9#ifndef __PROCESS_H
10#define __PROCESS_H
11
12#include <compat.h>
13#include <rte_ethdev.h>
14
15
16
17
18
19#define PROCESS_PATH "/dev/fsl-usdpaa"
20
21
22
23
24enum dpaa_id_type {
25 dpaa_id_fqid,
26 dpaa_id_bpid,
27 dpaa_id_qpool,
28 dpaa_id_cgrid,
29 dpaa_id_max
30};
31
32int process_alloc(enum dpaa_id_type id_type, uint32_t *base, uint32_t num,
33 uint32_t align, int partial);
34void process_release(enum dpaa_id_type id_type, uint32_t base, uint32_t num);
35
36int process_reserve(enum dpaa_id_type id_type, uint32_t base, uint32_t num);
37
38
39enum dpaa_portal_type {
40 dpaa_portal_qman,
41 dpaa_portal_bman,
42};
43
44struct dpaa_portal_map {
45 void *cinh;
46 void *cena;
47};
48
49struct dpaa_ioctl_portal_map {
50
51 enum dpaa_portal_type type;
52
53
54
55 uint32_t index;
56
57
58
59
60 struct dpaa_portal_map addr;
61
62
63 u16 channel;
64 uint32_t pools;
65};
66
67int process_portal_map(struct dpaa_ioctl_portal_map *params);
68int process_portal_unmap(struct dpaa_portal_map *map);
69
70struct dpaa_ioctl_irq_map {
71 enum dpaa_portal_type type;
72 int fd;
73 void *portal_cinh;
74};
75
76int process_portal_irq_map(int fd, struct dpaa_ioctl_irq_map *irq);
77int process_portal_irq_unmap(int fd);
78
79struct usdpaa_ioctl_link_status {
80 char if_name[IF_NAME_MAX_LEN];
81 uint32_t efd;
82};
83
84__rte_internal
85int dpaa_intr_enable(char *if_name, int efd);
86
87__rte_internal
88int dpaa_intr_disable(char *if_name);
89
90struct usdpaa_ioctl_link_status_args_old {
91
92 char if_name[IF_NAME_MAX_LEN];
93
94 int link_status;
95};
96
97struct usdpaa_ioctl_link_status_args {
98
99 char if_name[IF_NAME_MAX_LEN];
100
101 int link_status;
102
103 int link_speed;
104
105 int link_duplex;
106
107 int link_autoneg;
108
109};
110
111struct usdpaa_ioctl_update_link_status_args {
112
113 char if_name[IF_NAME_MAX_LEN];
114
115 int link_status;
116};
117
118struct usdpaa_ioctl_update_link_speed {
119
120 char if_name[IF_NAME_MAX_LEN];
121
122 int link_speed;
123
124 int link_duplex;
125};
126
127__rte_internal
128int dpaa_get_link_status(char *if_name, struct rte_eth_link *link);
129__rte_internal
130int dpaa_update_link_status(char *if_name, int link_status);
131__rte_internal
132int dpaa_update_link_speed(char *if_name, int speed, int duplex);
133__rte_internal
134int dpaa_restart_link_autoneg(char *if_name);
135__rte_internal
136int dpaa_get_ioctl_version_number(void);
137
138#endif
139