33 #ifndef __CVMX_PIP_H__
34 #define __CVMX_PIP_H__
40 #define CVMX_PIP_NUM_INPUT_PORTS 40
41 #define CVMX_PIP_NUM_WATCHERS 4
317 cvmx_pip_qos_watch_types match_type,
320 cvmx_pip_port_watcher_cfg_t watcher_config;
322 watcher_config.u64 = 0;
323 watcher_config.s.match_type = match_type;
324 watcher_config.s.match_value = match_value;
325 watcher_config.s.qos = qos;
337 static inline void cvmx_pip_config_vlan_qos(
uint64_t vlan_priority,
341 pip_qos_vlanx.
u64 = 0;
342 pip_qos_vlanx.s.qos = qos;
352 static inline void cvmx_pip_config_diffserv_qos(
uint64_t diffserv,
uint64_t qos)
355 pip_qos_diffx.
u64 = 0;
356 pip_qos_diffx.s.qos = qos;
385 pip_stat_ctl.
u64 = 0;
386 pip_stat_ctl.s.rdclr =
clear;
399 pip_stat_inb_pktsx.u64 =
401 pip_stat_inb_octsx.u64 =
403 pip_stat_inb_errsx.u64 =
408 status->
octets = stat1.s.octs;
410 status->
packets = stat2.s.pkts;
426 status->
inb_octets = pip_stat_inb_octsx.s.octs;
427 status->
inb_errors = pip_stat_inb_errsx.s.errs;
429 if (cvmx_octeon_is_pass1()) {
468 config.s.invres = invert_result;
469 config.s.reflect = reflect;
473 pip_crc_ivx.s.iv = initialization_vector;
486 static inline void cvmx_pip_tag_mask_clear(
uint64_t mask_index)
490 pip_tag_incx.
u64 = 0;
491 pip_tag_incx.s.en = 0;
492 for (index = mask_index * 16; index < (mask_index + 1) * 16; index++)
516 uint64_t index = mask_index * 16 + offset / 8;
518 pip_tag_incx.s.en |= 0x80 >> (offset & 0x7);