FD.io VPP  v16.06
Vector Packet Processing
xlate.c File Reference
+ Include dependency graph for xlate.c:

Go to the source code of this file.

Macros

#define INTERNAL_SS   1
 
#define SSE2_QOS_DEBUG_ERROR(msg, args...)   fformat(stderr, msg "\n", ##args);
 
#define SSE2_QOS_DEBUG_INFO(msg, args...)   fformat(stderr, msg "\n", ##args);
 
#define SSE2_QOS_TR_ERR(TpParms...)
 
#define SSE2_QOS_TR_INFO(TpParms...)
 
#define MIN(x, y)   (((x)<(y))?(x):(y))
 
#define MAX(x, y)   (((x)>(y))?(x):(y))
 
#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_OFFSET   0
 
#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_MASK   8
 
#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_SHIFT   24
 
#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_OFFSET   2
 
#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_MASK   2
 
#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_SHIFT   10
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_OFFSET   3
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_MASK   2
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_SHIFT   0
 
#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_OFFSET   4
 
#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_MASK   32
 
#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_SHIFT   0
 
#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_OFFSET   8
 
#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_MASK   2
 
#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_SHIFT   30
 
#define IPE_POLICER_FULL_WRITE_REQUEST_AN_OFFSET   8
 
#define IPE_POLICER_FULL_WRITE_REQUEST_AN_MASK   1
 
#define IPE_POLICER_FULL_WRITE_REQUEST_AN_SHIFT   29
 
#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_OFFSET   8
 
#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_MASK   4
 
#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_SHIFT   22
 
#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_OFFSET   9
 
#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_MASK   11
 
#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_SHIFT   11
 
#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_OFFSET   10
 
#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_MASK   11
 
#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_SHIFT   0
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_OFFSET   12
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_MASK   5
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_SHIFT   27
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_OFFSET   12
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_MASK   7
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_SHIFT   20
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_OFFSET   13
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_MASK   5
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_SHIFT   15
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_OFFSET   14
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_MASK   7
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_SHIFT   8
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CB_OFFSET   16
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CB_MASK   31
 
#define IPE_POLICER_FULL_WRITE_REQUEST_CB_SHIFT   0
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EB_OFFSET   20
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EB_MASK   31
 
#define IPE_POLICER_FULL_WRITE_REQUEST_EB_SHIFT   0
 
#define IPE_RFC_RFC2697   0x00000000
 
#define IPE_RFC_RFC2698   0x00000001
 
#define IPE_RFC_RFC4115   0x00000002
 
#define IPE_RFC_MEF5CF1   0x00000003
 
#define SSE2_QOS_POLICER_FIXED_PKT_SIZE   256
 
#define SSE2_QOS_POL_TICKS_PER_SEC   1000LL /* 1 tick = 1 ms */
 
#define SSE2_QOS_POL_DEF_BURST_BYTE   100
 
#define SSE2_QOS_POL_MIN_BURST_BYTE   9*1024
 
#define SSE2_QOS_POL_ALLOW_NEGATIVE   1
 
#define SSE2_QOS_POL_COMM_BKT_MAX   (1<<IPE_POLICER_FULL_WRITE_REQUEST_CB_MASK)
 
#define SSE2_QOS_POL_EXTD_BKT_MAX   (1<<IPE_POLICER_FULL_WRITE_REQUEST_EB_MASK)
 
#define SSE2_QOS_POL_RATE_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_REXP_MASK)
 
#define SSE2_QOS_POL_RATE_EXP_MAX   ((1<<SSE2_QOS_POL_RATE_EXP_SIZE) - 1)
 
#define SSE2_QOS_POL_AVG_RATE_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_ARM_MASK)
 
#define SSE2_QOS_POL_AVG_RATE_MANT_MAX   ((1<< SSE2_QOS_POL_AVG_RATE_MANT_SIZE) - 1)
 
#define SSE2_QOS_POL_AVG_RATE_MAX
 
#define SSE2_QOS_POL_PEAK_RATE_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_PRM_MASK)
 
#define SSE2_QOS_POL_PEAK_RATE_MANT_MAX   ((1<<SSE2_QOS_POL_PEAK_RATE_MANT_SIZE) - 1)
 
#define SSE2_QOS_POL_PEAK_RATE_MAX
 
#define SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_CBLM_MASK)
 
#define SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_MAX   ((1<<SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_SIZE) - 1)
 
#define SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_CBLE_MASK)
 
#define SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_MAX   ((1<<SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_SIZE) - 1)
 
#define SSE2_QOS_POL_COMM_BKT_LIMIT_MAX
 
#define SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_EBLM_MASK)
 
#define SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_MAX   ((1<<SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_SIZE) - 1)
 
#define SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_EBLE_MASK)
 
#define SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_MAX   ((1<<SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_SIZE) - 1)
 
#define SSE2_QOS_POL_EXT_BKT_LIMIT_MAX
 
#define RATE256   (256114688000LL / 8LL / SSE2_QOS_POL_TICKS_PER_SEC)
 
#define RATE128   (128057344000LL / 8LL / SSE2_QOS_POL_TICKS_PER_SEC)
 
#define RATE64   ( 64028672000LL / 8LL / SSE2_QOS_POL_TICKS_PER_SEC)
 
#define RATE_OVER256_UNIT   8LL
 
#define RATE_128TO256_UNIT   4LL
 
#define RATE_64TO128_UNIT   2LL
 
#define MAX_RATE_SHIFT   10
 

Functions

static cerrno sse2_qos_pol_round (uint64_t numerator, uint64_t denominator, uint64_t *rounded_value, sse2_qos_round_type_en round_type)
 
static cerrno sse2_pol_validate_cfg_params (sse2_qos_pol_cfg_params_st *cfg)
 
static void sse2_qos_convert_value_to_exp_mant_fmt (uint64_t value, uint16_t max_exp_value, uint16_t max_mant_value, sse2_qos_round_type_en type, uint8_t *exp, uint32_t *mant)
 
static cerrno sse2_pol_convert_cfg_rates_to_hw (sse2_qos_pol_cfg_params_st *cfg, sse2_qos_pol_hw_params_st *hw)
 
uint64_t sse2_pol_get_bkt_max (uint64_t rate_hw, uint64_t bkt_max)
 
uint64_t sse2_pol_get_bkt_value (uint64_t rate_hw, uint64_t byte_value)
 
static void sse2_pol_rnd_burst_byte_fmt (uint64_t cfg_burst, uint16_t max_exp_value, uint16_t max_mant_value, uint32_t max_bkt_value, uint32_t rate_hw, uint8_t *exp, uint32_t *mant, uint32_t *bkt_value)
 
static cerrno sse2_pol_convert_cfg_burst_to_hw (sse2_qos_pol_cfg_params_st *cfg, sse2_qos_pol_hw_params_st *hw)
 
static cerrno sse2_pol_convert_cfg_to_hw_params (sse2_qos_pol_cfg_params_st *cfg, sse2_qos_pol_hw_params_st *hw)
 
uint32_t sse2_qos_convert_pps_to_kbps (uint32_t rate_pps)
 
uint32_t sse2_qos_convert_burst_ms_to_bytes (uint32_t burst_ms, uint32_t rate_kbps)
 
trans_layer_rc sse2_pol_compute_hw_params (sse2_qos_pol_cfg_params_st *cfg, sse2_qos_pol_hw_params_st *hw)
 
static uint64_t get_tsc_hz (void)
 
static int compute_policer_params (uint64_t hz, uint64_t cir_rate, uint64_t pir_rate, uint32_t *current_limit, uint32_t *extended_limit, uint32_t *cir_bytes_per_period, uint32_t *pir_bytes_per_period, uint32_t *scale)
 
trans_layer_rc x86_pol_compute_hw_params (sse2_qos_pol_cfg_params_st *cfg, policer_read_response_type_st *hw)
 
trans_layer_rc sse2_pol_logical_2_physical (sse2_qos_pol_cfg_params_st *cfg, policer_read_response_type_st *phys)
 
static void sse2_qos_convert_pol_bucket_to_hw_fmt (policer_read_response_type_st *bkt, sse2_qos_pol_hw_params_st *hw_fmt)
 
static cerrno sse2_pol_convert_hw_to_cfg_params (sse2_qos_pol_hw_params_st *hw, sse2_qos_pol_cfg_params_st *cfg)
 
uint32_t sse2_qos_convert_kbps_to_pps (uint32_t rate_kbps)
 
uint32_t sse2_qos_convert_burst_bytes_to_ms (uint64_t burst_bytes, uint32_t rate_kbps)
 
trans_layer_rc sse2_pol_physical_2_logical (policer_read_response_type_st *phys, sse2_qos_pol_cfg_params_st *cfg)
 

Macro Definition Documentation

#define INTERNAL_SS   1

Definition at line 28 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_AN_MASK   1

Definition at line 73 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_AN_OFFSET   8

Definition at line 72 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_AN_SHIFT   29

Definition at line 74 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_MASK   11

Definition at line 81 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_OFFSET   9

Definition at line 80 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_SHIFT   11

Definition at line 82 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CB_MASK   31

Definition at line 105 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CB_OFFSET   16

Definition at line 104 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CB_SHIFT   0

Definition at line 106 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_MASK   5

Definition at line 89 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_OFFSET   12

Definition at line 88 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_SHIFT   27

Definition at line 90 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_MASK   7

Definition at line 93 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_OFFSET   12

Definition at line 92 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_SHIFT   20

Definition at line 94 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_MASK   2

Definition at line 61 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_OFFSET   3

Definition at line 60 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_SHIFT   0

Definition at line 62 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EB_MASK   31

Definition at line 109 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EB_OFFSET   20

Definition at line 108 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EB_SHIFT   0

Definition at line 110 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_MASK   5

Definition at line 97 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_OFFSET   13

Definition at line 96 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_SHIFT   15

Definition at line 98 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_MASK   7

Definition at line 101 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_OFFSET   14

Definition at line 100 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_SHIFT   8

Definition at line 102 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_MASK   8

Definition at line 53 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_OFFSET   0

Definition at line 52 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_SHIFT   24

Definition at line 54 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_MASK   32

Definition at line 65 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_OFFSET   4

Definition at line 64 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_SHIFT   0

Definition at line 66 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_MASK   11

Definition at line 85 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_OFFSET   10

Definition at line 84 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_SHIFT   0

Definition at line 86 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_MASK   4

Definition at line 77 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_OFFSET   8

Definition at line 76 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_SHIFT   22

Definition at line 78 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_MASK   2

Definition at line 69 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_OFFSET   8

Definition at line 68 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_SHIFT   30

Definition at line 70 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_MASK   2

Definition at line 57 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_OFFSET   2

Definition at line 56 of file xlate.c.

#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_SHIFT   10

Definition at line 58 of file xlate.c.

#define IPE_RFC_MEF5CF1   0x00000003

Definition at line 115 of file xlate.c.

#define IPE_RFC_RFC2697   0x00000000

Definition at line 112 of file xlate.c.

#define IPE_RFC_RFC2698   0x00000001

Definition at line 113 of file xlate.c.

#define IPE_RFC_RFC4115   0x00000002

Definition at line 114 of file xlate.c.

#define MAX (   x,
  y 
)    (((x)>(y))?(x):(y))

Definition at line 49 of file xlate.c.

#define MAX_RATE_SHIFT   10
#define MIN (   x,
  y 
)    (((x)<(y))?(x):(y))

Definition at line 45 of file xlate.c.

#define RATE128   (128057344000LL / 8LL / SSE2_QOS_POL_TICKS_PER_SEC)

Definition at line 203 of file xlate.c.

#define RATE256   (256114688000LL / 8LL / SSE2_QOS_POL_TICKS_PER_SEC)

Definition at line 202 of file xlate.c.

#define RATE64   ( 64028672000LL / 8LL / SSE2_QOS_POL_TICKS_PER_SEC)

Definition at line 204 of file xlate.c.

#define RATE_128TO256_UNIT   4LL

Definition at line 207 of file xlate.c.

#define RATE_64TO128_UNIT   2LL

Definition at line 208 of file xlate.c.

#define RATE_OVER256_UNIT   8LL

Definition at line 206 of file xlate.c.

#define SSE2_QOS_DEBUG_ERROR (   msg,
  args... 
)    fformat(stderr, msg "\n", ##args);

Definition at line 31 of file xlate.c.

#define SSE2_QOS_DEBUG_INFO (   msg,
  args... 
)    fformat(stderr, msg "\n", ##args);

Definition at line 34 of file xlate.c.

#define SSE2_QOS_POL_ALLOW_NEGATIVE   1

Definition at line 141 of file xlate.c.

#define SSE2_QOS_POL_AVG_RATE_MANT_MAX   ((1<< SSE2_QOS_POL_AVG_RATE_MANT_SIZE) - 1)

Definition at line 155 of file xlate.c.

#define SSE2_QOS_POL_AVG_RATE_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_ARM_MASK)

Definition at line 153 of file xlate.c.

#define SSE2_QOS_POL_AVG_RATE_MAX
Value:
#define SSE2_QOS_POL_AVG_RATE_MANT_MAX
Definition: xlate.c:155
#define SSE2_QOS_POL_RATE_EXP_MAX
Definition: xlate.c:152

Definition at line 157 of file xlate.c.

#define SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_MAX   ((1<<SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_SIZE) - 1)

Definition at line 175 of file xlate.c.

#define SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_CBLE_MASK)

Definition at line 173 of file xlate.c.

#define SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_MAX   ((1<<SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_SIZE) - 1)

Definition at line 171 of file xlate.c.

#define SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_CBLM_MASK)

Definition at line 169 of file xlate.c.

#define SSE2_QOS_POL_COMM_BKT_LIMIT_MAX
Value:
#define SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_MAX
Definition: xlate.c:171
#define SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_MAX
Definition: xlate.c:175

Definition at line 177 of file xlate.c.

#define SSE2_QOS_POL_COMM_BKT_MAX   (1<<IPE_POLICER_FULL_WRITE_REQUEST_CB_MASK)

Definition at line 145 of file xlate.c.

#define SSE2_QOS_POL_DEF_BURST_BYTE   100

Definition at line 128 of file xlate.c.

#define SSE2_QOS_POL_EXT_BKT_LIMIT_MAX
Value:
#define SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_MAX
Definition: xlate.c:183
#define SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_MAX
Definition: xlate.c:187

Definition at line 189 of file xlate.c.

#define SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_MAX   ((1<<SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_SIZE) - 1)

Definition at line 187 of file xlate.c.

#define SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_EBLE_MASK)

Definition at line 185 of file xlate.c.

#define SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_MAX   ((1<<SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_SIZE) - 1)

Definition at line 183 of file xlate.c.

#define SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_EBLM_MASK)

Definition at line 181 of file xlate.c.

#define SSE2_QOS_POL_EXTD_BKT_MAX   (1<<IPE_POLICER_FULL_WRITE_REQUEST_EB_MASK)

Definition at line 147 of file xlate.c.

#define SSE2_QOS_POL_MIN_BURST_BYTE   9*1024

Definition at line 134 of file xlate.c.

#define SSE2_QOS_POL_PEAK_RATE_MANT_MAX   ((1<<SSE2_QOS_POL_PEAK_RATE_MANT_SIZE) - 1)

Definition at line 163 of file xlate.c.

#define SSE2_QOS_POL_PEAK_RATE_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_PRM_MASK)

Definition at line 161 of file xlate.c.

#define SSE2_QOS_POL_PEAK_RATE_MAX
Value:
#define SSE2_QOS_POL_PEAK_RATE_MANT_MAX
Definition: xlate.c:163
#define SSE2_QOS_POL_RATE_EXP_MAX
Definition: xlate.c:152

Definition at line 165 of file xlate.c.

#define SSE2_QOS_POL_RATE_EXP_MAX   ((1<<SSE2_QOS_POL_RATE_EXP_SIZE) - 1)

Definition at line 152 of file xlate.c.

#define SSE2_QOS_POL_RATE_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_REXP_MASK)

Definition at line 150 of file xlate.c.

#define SSE2_QOS_POL_TICKS_PER_SEC   1000LL /* 1 tick = 1 ms */

Definition at line 123 of file xlate.c.

#define SSE2_QOS_POLICER_FIXED_PKT_SIZE   256

Definition at line 120 of file xlate.c.

#define SSE2_QOS_TR_ERR (   TpParms...)

Definition at line 38 of file xlate.c.

#define SSE2_QOS_TR_INFO (   TpParms...)

Definition at line 42 of file xlate.c.

Function Documentation

static int compute_policer_params ( uint64_t  hz,
uint64_t  cir_rate,
uint64_t  pir_rate,
uint32_t current_limit,
uint32_t extended_limit,
uint32_t cir_bytes_per_period,
uint32_t pir_bytes_per_period,
uint32_t scale 
)
static

Definition at line 883 of file xlate.c.

+ Here is the caller graph for this function:

static uint64_t get_tsc_hz ( void  )
static

Definition at line 870 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

trans_layer_rc sse2_pol_compute_hw_params ( sse2_qos_pol_cfg_params_st cfg,
sse2_qos_pol_hw_params_st hw 
)

Definition at line 825 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cerrno sse2_pol_convert_cfg_burst_to_hw ( sse2_qos_pol_cfg_params_st cfg,
sse2_qos_pol_hw_params_st hw 
)
static

Definition at line 653 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cerrno sse2_pol_convert_cfg_rates_to_hw ( sse2_qos_pol_cfg_params_st cfg,
sse2_qos_pol_hw_params_st hw 
)
static

Definition at line 386 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cerrno sse2_pol_convert_cfg_to_hw_params ( sse2_qos_pol_cfg_params_st cfg,
sse2_qos_pol_hw_params_st hw 
)
static

Definition at line 738 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cerrno sse2_pol_convert_hw_to_cfg_params ( sse2_qos_pol_hw_params_st hw,
sse2_qos_pol_cfg_params_st cfg 
)
static

Definition at line 1208 of file xlate.c.

+ Here is the caller graph for this function:

uint64_t sse2_pol_get_bkt_max ( uint64_t  rate_hw,
uint64_t  bkt_max 
)

Definition at line 545 of file xlate.c.

+ Here is the caller graph for this function:

uint64_t sse2_pol_get_bkt_value ( uint64_t  rate_hw,
uint64_t  byte_value 
)

Definition at line 578 of file xlate.c.

+ Here is the caller graph for this function:

trans_layer_rc sse2_pol_logical_2_physical ( sse2_qos_pol_cfg_params_st cfg,
policer_read_response_type_st phys 
)

Definition at line 1089 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

trans_layer_rc sse2_pol_physical_2_logical ( policer_read_response_type_st phys,
sse2_qos_pol_cfg_params_st cfg 
)

Definition at line 1323 of file xlate.c.

+ Here is the call graph for this function:

static void sse2_pol_rnd_burst_byte_fmt ( uint64_t  cfg_burst,
uint16_t  max_exp_value,
uint16_t  max_mant_value,
uint32_t  max_bkt_value,
uint32_t  rate_hw,
uint8_t exp,
uint32_t mant,
uint32_t bkt_value 
)
static

Definition at line 592 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cerrno sse2_pol_validate_cfg_params ( sse2_qos_pol_cfg_params_st cfg)
static

Definition at line 252 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t sse2_qos_convert_burst_bytes_to_ms ( uint64_t  burst_bytes,
uint32_t  rate_kbps 
)

Definition at line 1300 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t sse2_qos_convert_burst_ms_to_bytes ( uint32_t  burst_ms,
uint32_t  rate_kbps 
)

Definition at line 802 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t sse2_qos_convert_kbps_to_pps ( uint32_t  rate_kbps)

Definition at line 1283 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void sse2_qos_convert_pol_bucket_to_hw_fmt ( policer_read_response_type_st bkt,
sse2_qos_pol_hw_params_st hw_fmt 
)
static

Definition at line 1182 of file xlate.c.

+ Here is the caller graph for this function:

uint32_t sse2_qos_convert_pps_to_kbps ( uint32_t  rate_pps)

Definition at line 786 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void sse2_qos_convert_value_to_exp_mant_fmt ( uint64_t  value,
uint16_t  max_exp_value,
uint16_t  max_mant_value,
sse2_qos_round_type_en  type,
uint8_t exp,
uint32_t mant 
)
static

Definition at line 342 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cerrno sse2_qos_pol_round ( uint64_t  numerator,
uint64_t  denominator,
uint64_t *  rounded_value,
sse2_qos_round_type_en  round_type 
)
static

Definition at line 211 of file xlate.c.

+ Here is the caller graph for this function:

trans_layer_rc x86_pol_compute_hw_params ( sse2_qos_pol_cfg_params_st cfg,
policer_read_response_type_st hw 
)

Definition at line 985 of file xlate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: