diff options
Diffstat (limited to 'arch/mips/include/asm/octeon/cvmx-pip.h')
-rw-r--r-- | arch/mips/include/asm/octeon/cvmx-pip.h | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/arch/mips/include/asm/octeon/cvmx-pip.h b/arch/mips/include/asm/octeon/cvmx-pip.h index 9e739a640855..a76fe5a57a9f 100644 --- a/arch/mips/include/asm/octeon/cvmx-pip.h +++ b/arch/mips/include/asm/octeon/cvmx-pip.h | |||
@@ -37,8 +37,8 @@ | |||
37 | #include <asm/octeon/cvmx-fpa.h> | 37 | #include <asm/octeon/cvmx-fpa.h> |
38 | #include <asm/octeon/cvmx-pip-defs.h> | 38 | #include <asm/octeon/cvmx-pip-defs.h> |
39 | 39 | ||
40 | #define CVMX_PIP_NUM_INPUT_PORTS 40 | 40 | #define CVMX_PIP_NUM_INPUT_PORTS 40 |
41 | #define CVMX_PIP_NUM_WATCHERS 4 | 41 | #define CVMX_PIP_NUM_WATCHERS 4 |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * Encodes the different error and exception codes | 44 | * Encodes the different error and exception codes |
@@ -92,10 +92,10 @@ typedef enum { | |||
92 | 92 | ||
93 | /** | 93 | /** |
94 | * NOTES | 94 | * NOTES |
95 | * late collision (data received before collision) | 95 | * late collision (data received before collision) |
96 | * late collisions cannot be detected by the receiver | 96 | * late collisions cannot be detected by the receiver |
97 | * they would appear as JAM bits which would appear as bad FCS | 97 | * they would appear as JAM bits which would appear as bad FCS |
98 | * or carrier extend error which is CVMX_PIP_EXTEND_ERR | 98 | * or carrier extend error which is CVMX_PIP_EXTEND_ERR |
99 | */ | 99 | */ |
100 | typedef enum { | 100 | typedef enum { |
101 | /* No error */ | 101 | /* No error */ |
@@ -122,11 +122,11 @@ typedef enum { | |||
122 | * error) | 122 | * error) |
123 | */ | 123 | */ |
124 | CVMX_PIP_UNDER_FCS_ERR = 6ull, | 124 | CVMX_PIP_UNDER_FCS_ERR = 6ull, |
125 | /* RGM 7 = FCS error */ | 125 | /* RGM 7 = FCS error */ |
126 | CVMX_PIP_GMX_FCS_ERR = 7ull, | 126 | CVMX_PIP_GMX_FCS_ERR = 7ull, |
127 | /* RGM+SPI 8 = min frame error (pkt len < min frame len) */ | 127 | /* RGM+SPI 8 = min frame error (pkt len < min frame len) */ |
128 | CVMX_PIP_UNDER_ERR = 8ull, | 128 | CVMX_PIP_UNDER_ERR = 8ull, |
129 | /* RGM 9 = Frame carrier extend error */ | 129 | /* RGM 9 = Frame carrier extend error */ |
130 | CVMX_PIP_EXTEND_ERR = 9ull, | 130 | CVMX_PIP_EXTEND_ERR = 9ull, |
131 | /* | 131 | /* |
132 | * RGM 10 = length mismatch (len did not match len in L2 | 132 | * RGM 10 = length mismatch (len did not match len in L2 |
@@ -161,10 +161,10 @@ typedef enum { | |||
161 | CVMX_PIP_PIP_L2_MAL_HDR = 18L | 161 | CVMX_PIP_PIP_L2_MAL_HDR = 18L |
162 | /* | 162 | /* |
163 | * NOTES: xx = late collision (data received before collision) | 163 | * NOTES: xx = late collision (data received before collision) |
164 | * late collisions cannot be detected by the receiver | 164 | * late collisions cannot be detected by the receiver |
165 | * they would appear as JAM bits which would appear as | 165 | * they would appear as JAM bits which would appear as |
166 | * bad FCS or carrier extend error which is | 166 | * bad FCS or carrier extend error which is |
167 | * CVMX_PIP_EXTEND_ERR | 167 | * CVMX_PIP_EXTEND_ERR |
168 | */ | 168 | */ |
169 | } cvmx_pip_rcv_err_t; | 169 | } cvmx_pip_rcv_err_t; |
170 | 170 | ||
@@ -192,13 +192,13 @@ typedef struct { | |||
192 | /* Number of packets processed by PIP */ | 192 | /* Number of packets processed by PIP */ |
193 | uint32_t packets; | 193 | uint32_t packets; |
194 | /* | 194 | /* |
195 | * Number of indentified L2 multicast packets. Does not | 195 | * Number of indentified L2 multicast packets. Does not |
196 | * include broadcast packets. Only includes packets whose | 196 | * include broadcast packets. Only includes packets whose |
197 | * parse mode is SKIP_TO_L2 | 197 | * parse mode is SKIP_TO_L2 |
198 | */ | 198 | */ |
199 | uint32_t multicast_packets; | 199 | uint32_t multicast_packets; |
200 | /* | 200 | /* |
201 | * Number of indentified L2 broadcast packets. Does not | 201 | * Number of indentified L2 broadcast packets. Does not |
202 | * include multicast packets. Only includes packets whose | 202 | * include multicast packets. Only includes packets whose |
203 | * parse mode is SKIP_TO_L2 | 203 | * parse mode is SKIP_TO_L2 |
204 | */ | 204 | */ |
@@ -287,7 +287,7 @@ typedef union { | |||
287 | * @port_num: Port number to configure | 287 | * @port_num: Port number to configure |
288 | * @port_cfg: Port hardware configuration | 288 | * @port_cfg: Port hardware configuration |
289 | * @port_tag_cfg: | 289 | * @port_tag_cfg: |
290 | * Port POW tagging configuration | 290 | * Port POW tagging configuration |
291 | */ | 291 | */ |
292 | static inline void cvmx_pip_config_port(uint64_t port_num, | 292 | static inline void cvmx_pip_config_port(uint64_t port_num, |
293 | union cvmx_pip_prt_cfgx port_cfg, | 293 | union cvmx_pip_prt_cfgx port_cfg, |
@@ -298,20 +298,20 @@ static inline void cvmx_pip_config_port(uint64_t port_num, | |||
298 | } | 298 | } |
299 | #if 0 | 299 | #if 0 |
300 | /** | 300 | /** |
301 | * @deprecated This function is a thin wrapper around the Pass1 version | 301 | * @deprecated This function is a thin wrapper around the Pass1 version |
302 | * of the CVMX_PIP_QOS_WATCHX CSR; Pass2 has added a field for | 302 | * of the CVMX_PIP_QOS_WATCHX CSR; Pass2 has added a field for |
303 | * setting the group that is incompatible with this function, | 303 | * setting the group that is incompatible with this function, |
304 | * the preferred upgrade path is to use the CSR directly. | 304 | * the preferred upgrade path is to use the CSR directly. |
305 | * | 305 | * |
306 | * Configure the global QoS packet watchers. Each watcher is | 306 | * Configure the global QoS packet watchers. Each watcher is |
307 | * capable of matching a field in a packet to determine the | 307 | * capable of matching a field in a packet to determine the |
308 | * QoS queue for scheduling. | 308 | * QoS queue for scheduling. |
309 | * | 309 | * |
310 | * @watcher: Watcher number to configure (0 - 3). | 310 | * @watcher: Watcher number to configure (0 - 3). |
311 | * @match_type: Watcher match type | 311 | * @match_type: Watcher match type |
312 | * @match_value: | 312 | * @match_value: |
313 | * Value the watcher will match against | 313 | * Value the watcher will match against |
314 | * @qos: QoS queue for packets matching this watcher | 314 | * @qos: QoS queue for packets matching this watcher |
315 | */ | 315 | */ |
316 | static inline void cvmx_pip_config_watcher(uint64_t watcher, | 316 | static inline void cvmx_pip_config_watcher(uint64_t watcher, |
317 | cvmx_pip_qos_watch_types match_type, | 317 | cvmx_pip_qos_watch_types match_type, |
@@ -331,7 +331,7 @@ static inline void cvmx_pip_config_watcher(uint64_t watcher, | |||
331 | * Configure the VLAN priority to QoS queue mapping. | 331 | * Configure the VLAN priority to QoS queue mapping. |
332 | * | 332 | * |
333 | * @vlan_priority: | 333 | * @vlan_priority: |
334 | * VLAN priority (0-7) | 334 | * VLAN priority (0-7) |
335 | * @qos: QoS queue for packets matching this watcher | 335 | * @qos: QoS queue for packets matching this watcher |
336 | */ | 336 | */ |
337 | static inline void cvmx_pip_config_vlan_qos(uint64_t vlan_priority, | 337 | static inline void cvmx_pip_config_vlan_qos(uint64_t vlan_priority, |
@@ -451,10 +451,10 @@ static inline void cvmx_pip_get_port_status(uint64_t port_num, uint64_t clear, | |||
451 | * | 451 | * |
452 | * @interface: Interface to configure (0 or 1) | 452 | * @interface: Interface to configure (0 or 1) |
453 | * @invert_result: | 453 | * @invert_result: |
454 | * Invert the result of the CRC | 454 | * Invert the result of the CRC |
455 | * @reflect: Reflect | 455 | * @reflect: Reflect |
456 | * @initialization_vector: | 456 | * @initialization_vector: |
457 | * CRC initialization vector | 457 | * CRC initialization vector |
458 | */ | 458 | */ |
459 | static inline void cvmx_pip_config_crc(uint64_t interface, | 459 | static inline void cvmx_pip_config_crc(uint64_t interface, |
460 | uint64_t invert_result, uint64_t reflect, | 460 | uint64_t invert_result, uint64_t reflect, |
@@ -500,13 +500,13 @@ static inline void cvmx_pip_tag_mask_clear(uint64_t mask_index) | |||
500 | * | 500 | * |
501 | * @mask_index: Which tag mask to modify (0..3) | 501 | * @mask_index: Which tag mask to modify (0..3) |
502 | * @offset: Offset into the bitmask to set bits at. Use the GCC macro | 502 | * @offset: Offset into the bitmask to set bits at. Use the GCC macro |
503 | * offsetof() to determine the offsets into packet headers. | 503 | * offsetof() to determine the offsets into packet headers. |
504 | * For example, offsetof(ethhdr, protocol) returns the offset | 504 | * For example, offsetof(ethhdr, protocol) returns the offset |
505 | * of the ethernet protocol field. The bitmask selects which | 505 | * of the ethernet protocol field. The bitmask selects which |
506 | * bytes to include the the tag, with bit offset X selecting | 506 | * bytes to include the the tag, with bit offset X selecting |
507 | * byte at offset X from the beginning of the packet data. | 507 | * byte at offset X from the beginning of the packet data. |
508 | * @len: Number of bytes to include. Usually this is the sizeof() | 508 | * @len: Number of bytes to include. Usually this is the sizeof() |
509 | * the field. | 509 | * the field. |
510 | */ | 510 | */ |
511 | static inline void cvmx_pip_tag_mask_set(uint64_t mask_index, uint64_t offset, | 511 | static inline void cvmx_pip_tag_mask_set(uint64_t mask_index, uint64_t offset, |
512 | uint64_t len) | 512 | uint64_t len) |