FD.io VPP  v19.08.3-2-gbabecb413
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 int sse2_qos_pol_round (u64 numerator, u64 denominator, u64 *rounded_value, sse2_qos_round_type_en round_type)
 
static int sse2_pol_validate_cfg_params (sse2_qos_pol_cfg_params_st *cfg)
 
static void sse2_qos_convert_value_to_exp_mant_fmt (u64 value, u16 max_exp_value, u16 max_mant_value, sse2_qos_round_type_en type, u8 *exp, u32 *mant)
 
static int sse2_pol_convert_cfg_rates_to_hw (sse2_qos_pol_cfg_params_st *cfg, sse2_qos_pol_hw_params_st *hw)
 
u64 sse2_pol_get_bkt_max (u64 rate_hw, u64 bkt_max)
 
u64 sse2_pol_get_bkt_value (u64 rate_hw, u64 byte_value)
 
static void sse2_pol_rnd_burst_byte_fmt (u64 cfg_burst, u16 max_exp_value, u16 max_mant_value, u32 max_bkt_value, u32 rate_hw, u8 *exp, u32 *mant, u32 *bkt_value)
 
static int sse2_pol_convert_cfg_burst_to_hw (sse2_qos_pol_cfg_params_st *cfg, sse2_qos_pol_hw_params_st *hw)
 
static int sse2_pol_convert_cfg_to_hw_params (sse2_qos_pol_cfg_params_st *cfg, sse2_qos_pol_hw_params_st *hw)
 
u32 sse2_qos_convert_pps_to_kbps (u32 rate_pps)
 
u32 sse2_qos_convert_burst_ms_to_bytes (u32 burst_ms, u32 rate_kbps)
 
int sse2_pol_compute_hw_params (sse2_qos_pol_cfg_params_st *cfg, sse2_qos_pol_hw_params_st *hw)
 
static u64 get_tsc_hz (void)
 
static int compute_policer_params (u64 hz, u64 cir_rate, u64 pir_rate, u32 *current_limit, u32 *extended_limit, u32 *cir_bytes_per_period, u32 *pir_bytes_per_period, u32 *scale)
 
int x86_pol_compute_hw_params (sse2_qos_pol_cfg_params_st *cfg, policer_read_response_type_st *hw)
 
int 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 int sse2_pol_convert_hw_to_cfg_params (sse2_qos_pol_hw_params_st *hw, sse2_qos_pol_cfg_params_st *cfg)
 
u32 sse2_qos_convert_kbps_to_pps (u32 rate_kbps)
 
u32 sse2_qos_convert_burst_bytes_to_ms (u64 burst_bytes, u32 rate_kbps)
 
int sse2_pol_physical_2_logical (policer_read_response_type_st *phys, sse2_qos_pol_cfg_params_st *cfg)
 

Macro Definition Documentation

◆ INTERNAL_SS

#define INTERNAL_SS   1

Definition at line 28 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_AN_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_AN_MASK   1

Definition at line 73 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_AN_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_AN_OFFSET   8

Definition at line 72 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_AN_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_AN_SHIFT   29

Definition at line 74 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_ARM_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_MASK   11

Definition at line 81 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_ARM_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_OFFSET   9

Definition at line 80 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_ARM_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_ARM_SHIFT   11

Definition at line 82 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CB_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_CB_MASK   31

Definition at line 105 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CB_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_CB_OFFSET   16

Definition at line 104 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CB_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_CB_SHIFT   0

Definition at line 106 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CBLE_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_MASK   5

Definition at line 89 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CBLE_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_OFFSET   12

Definition at line 88 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CBLE_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLE_SHIFT   27

Definition at line 90 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CBLM_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_MASK   7

Definition at line 93 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CBLM_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_OFFSET   12

Definition at line 92 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CBLM_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_CBLM_SHIFT   20

Definition at line 94 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CMD_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_MASK   2

Definition at line 61 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CMD_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_OFFSET   3

Definition at line 60 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_CMD_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_CMD_SHIFT   0

Definition at line 62 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EB_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_EB_MASK   31

Definition at line 109 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EB_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_EB_OFFSET   20

Definition at line 108 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EB_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_EB_SHIFT   0

Definition at line 110 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EBLE_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_MASK   5

Definition at line 97 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EBLE_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_OFFSET   13

Definition at line 96 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EBLE_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLE_SHIFT   15

Definition at line 98 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EBLM_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_MASK   7

Definition at line 101 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EBLM_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_OFFSET   14

Definition at line 100 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_EBLM_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_EBLM_SHIFT   8

Definition at line 102 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_M40AH_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_MASK   8

Definition at line 53 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_M40AH_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_OFFSET   0

Definition at line 52 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_M40AH_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AH_SHIFT   24

Definition at line 54 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_M40AL_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_MASK   32

Definition at line 65 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_M40AL_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_OFFSET   4

Definition at line 64 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_M40AL_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_M40AL_SHIFT   0

Definition at line 66 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_PRM_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_MASK   11

Definition at line 85 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_PRM_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_OFFSET   10

Definition at line 84 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_PRM_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_PRM_SHIFT   0

Definition at line 86 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_REXP_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_MASK   4

Definition at line 77 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_REXP_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_OFFSET   8

Definition at line 76 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_REXP_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_REXP_SHIFT   22

Definition at line 78 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_RFC_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_MASK   2

Definition at line 69 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_RFC_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_OFFSET   8

Definition at line 68 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_RFC_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_RFC_SHIFT   30

Definition at line 70 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_TYPE_MASK

#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_MASK   2

Definition at line 57 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_TYPE_OFFSET

#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_OFFSET   2

Definition at line 56 of file xlate.c.

◆ IPE_POLICER_FULL_WRITE_REQUEST_TYPE_SHIFT

#define IPE_POLICER_FULL_WRITE_REQUEST_TYPE_SHIFT   10

Definition at line 58 of file xlate.c.

◆ IPE_RFC_MEF5CF1

#define IPE_RFC_MEF5CF1   0x00000003

Definition at line 115 of file xlate.c.

◆ IPE_RFC_RFC2697

#define IPE_RFC_RFC2697   0x00000000

Definition at line 112 of file xlate.c.

◆ IPE_RFC_RFC2698

#define IPE_RFC_RFC2698   0x00000001

Definition at line 113 of file xlate.c.

◆ IPE_RFC_RFC4115

#define IPE_RFC_RFC4115   0x00000002

Definition at line 114 of file xlate.c.

◆ MAX

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

Definition at line 49 of file xlate.c.

◆ MAX_RATE_SHIFT

#define MAX_RATE_SHIFT   10

◆ MIN

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

Definition at line 45 of file xlate.c.

◆ RATE128

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

Definition at line 203 of file xlate.c.

◆ RATE256

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

Definition at line 202 of file xlate.c.

◆ RATE64

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

Definition at line 204 of file xlate.c.

◆ RATE_128TO256_UNIT

#define RATE_128TO256_UNIT   4LL

Definition at line 207 of file xlate.c.

◆ RATE_64TO128_UNIT

#define RATE_64TO128_UNIT   2LL

Definition at line 208 of file xlate.c.

◆ RATE_OVER256_UNIT

#define RATE_OVER256_UNIT   8LL

Definition at line 206 of file xlate.c.

◆ SSE2_QOS_DEBUG_ERROR

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

Definition at line 31 of file xlate.c.

◆ SSE2_QOS_DEBUG_INFO

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

Definition at line 34 of file xlate.c.

◆ SSE2_QOS_POL_ALLOW_NEGATIVE

#define SSE2_QOS_POL_ALLOW_NEGATIVE   1

Definition at line 141 of file xlate.c.

◆ SSE2_QOS_POL_AVG_RATE_MANT_MAX

#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.

◆ SSE2_QOS_POL_AVG_RATE_MANT_SIZE

#define SSE2_QOS_POL_AVG_RATE_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_ARM_MASK)

Definition at line 153 of file xlate.c.

◆ SSE2_QOS_POL_AVG_RATE_MAX

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

Definition at line 157 of file xlate.c.

◆ SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_MAX

#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.

◆ SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_SIZE

#define SSE2_QOS_POL_COMM_BKT_LIMIT_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_CBLE_MASK)

Definition at line 173 of file xlate.c.

◆ SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_MAX

#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.

◆ SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_SIZE

#define SSE2_QOS_POL_COMM_BKT_LIMIT_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_CBLM_MASK)

Definition at line 169 of file xlate.c.

◆ SSE2_QOS_POL_COMM_BKT_LIMIT_MAX

#define SSE2_QOS_POL_COMM_BKT_LIMIT_MAX
Value:
unsigned long u64
Definition: types.h:89
#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.

◆ SSE2_QOS_POL_COMM_BKT_MAX

#define SSE2_QOS_POL_COMM_BKT_MAX   (1<<IPE_POLICER_FULL_WRITE_REQUEST_CB_MASK)

Definition at line 145 of file xlate.c.

◆ SSE2_QOS_POL_DEF_BURST_BYTE

#define SSE2_QOS_POL_DEF_BURST_BYTE   100

Definition at line 128 of file xlate.c.

◆ SSE2_QOS_POL_EXT_BKT_LIMIT_MAX

#define SSE2_QOS_POL_EXT_BKT_LIMIT_MAX
Value:
unsigned long u64
Definition: types.h:89
#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.

◆ SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_MAX

#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.

◆ SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_SIZE

#define SSE2_QOS_POL_EXTD_BKT_LIMIT_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_EBLE_MASK)

Definition at line 185 of file xlate.c.

◆ SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_MAX

#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.

◆ SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_SIZE

#define SSE2_QOS_POL_EXTD_BKT_LIMIT_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_EBLM_MASK)

Definition at line 181 of file xlate.c.

◆ SSE2_QOS_POL_EXTD_BKT_MAX

#define SSE2_QOS_POL_EXTD_BKT_MAX   (1<<IPE_POLICER_FULL_WRITE_REQUEST_EB_MASK)

Definition at line 147 of file xlate.c.

◆ SSE2_QOS_POL_MIN_BURST_BYTE

#define SSE2_QOS_POL_MIN_BURST_BYTE   9*1024

Definition at line 134 of file xlate.c.

◆ SSE2_QOS_POL_PEAK_RATE_MANT_MAX

#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.

◆ SSE2_QOS_POL_PEAK_RATE_MANT_SIZE

#define SSE2_QOS_POL_PEAK_RATE_MANT_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_PRM_MASK)

Definition at line 161 of file xlate.c.

◆ SSE2_QOS_POL_PEAK_RATE_MAX

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

Definition at line 165 of file xlate.c.

◆ SSE2_QOS_POL_RATE_EXP_MAX

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

Definition at line 152 of file xlate.c.

◆ SSE2_QOS_POL_RATE_EXP_SIZE

#define SSE2_QOS_POL_RATE_EXP_SIZE   (IPE_POLICER_FULL_WRITE_REQUEST_REXP_MASK)

Definition at line 150 of file xlate.c.

◆ SSE2_QOS_POL_TICKS_PER_SEC

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

Definition at line 123 of file xlate.c.

◆ SSE2_QOS_POLICER_FIXED_PKT_SIZE

#define SSE2_QOS_POLICER_FIXED_PKT_SIZE   256

Definition at line 120 of file xlate.c.

◆ SSE2_QOS_TR_ERR

#define SSE2_QOS_TR_ERR (   TpParms...)

Definition at line 38 of file xlate.c.

◆ SSE2_QOS_TR_INFO

#define SSE2_QOS_TR_INFO (   TpParms...)

Definition at line 42 of file xlate.c.

Function Documentation

◆ compute_policer_params()

static int compute_policer_params ( u64  hz,
u64  cir_rate,
u64  pir_rate,
u32 current_limit,
u32 extended_limit,
u32 cir_bytes_per_period,
u32 pir_bytes_per_period,
u32 scale 
)
static

Definition at line 952 of file xlate.c.

+ Here is the caller graph for this function:

◆ get_tsc_hz()

static u64 get_tsc_hz ( void  )
static

Definition at line 939 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_pol_compute_hw_params()

int sse2_pol_compute_hw_params ( sse2_qos_pol_cfg_params_st cfg,
sse2_qos_pol_hw_params_st hw 
)

Definition at line 890 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_pol_convert_cfg_burst_to_hw()

static int 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 702 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_pol_convert_cfg_rates_to_hw()

static int 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 400 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_pol_convert_cfg_to_hw_params()

static int 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 793 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_pol_convert_hw_to_cfg_params()

static int 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 1304 of file xlate.c.

+ Here is the caller graph for this function:

◆ sse2_pol_get_bkt_max()

u64 sse2_pol_get_bkt_max ( u64  rate_hw,
u64  bkt_max 
)

Definition at line 585 of file xlate.c.

+ Here is the caller graph for this function:

◆ sse2_pol_get_bkt_value()

u64 sse2_pol_get_bkt_value ( u64  rate_hw,
u64  byte_value 
)

Definition at line 623 of file xlate.c.

+ Here is the caller graph for this function:

◆ sse2_pol_logical_2_physical()

int sse2_pol_logical_2_physical ( sse2_qos_pol_cfg_params_st cfg,
policer_read_response_type_st phys 
)

Definition at line 1171 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_pol_physical_2_logical()

int sse2_pol_physical_2_logical ( policer_read_response_type_st phys,
sse2_qos_pol_cfg_params_st cfg 
)

Definition at line 1432 of file xlate.c.

+ Here is the call graph for this function:

◆ sse2_pol_rnd_burst_byte_fmt()

static void sse2_pol_rnd_burst_byte_fmt ( u64  cfg_burst,
u16  max_exp_value,
u16  max_mant_value,
u32  max_bkt_value,
u32  rate_hw,
u8 exp,
u32 mant,
u32 bkt_value 
)
static

Definition at line 642 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_pol_validate_cfg_params()

static int sse2_pol_validate_cfg_params ( sse2_qos_pol_cfg_params_st cfg)
static

Definition at line 254 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_qos_convert_burst_bytes_to_ms()

u32 sse2_qos_convert_burst_bytes_to_ms ( u64  burst_bytes,
u32  rate_kbps 
)

Definition at line 1410 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_qos_convert_burst_ms_to_bytes()

u32 sse2_qos_convert_burst_ms_to_bytes ( u32  burst_ms,
u32  rate_kbps 
)

Definition at line 868 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_qos_convert_kbps_to_pps()

u32 sse2_qos_convert_kbps_to_pps ( u32  rate_kbps)

Definition at line 1393 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_qos_convert_pol_bucket_to_hw_fmt()

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 1279 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_qos_convert_pps_to_kbps()

u32 sse2_qos_convert_pps_to_kbps ( u32  rate_pps)

Definition at line 852 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_qos_convert_value_to_exp_mant_fmt()

static void sse2_qos_convert_value_to_exp_mant_fmt ( u64  value,
u16  max_exp_value,
u16  max_mant_value,
sse2_qos_round_type_en  type,
u8 exp,
u32 mant 
)
static

Definition at line 353 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sse2_qos_pol_round()

static int sse2_qos_pol_round ( u64  numerator,
u64  denominator,
u64 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:

◆ x86_pol_compute_hw_params()

int x86_pol_compute_hw_params ( sse2_qos_pol_cfg_params_st cfg,
policer_read_response_type_st hw 
)

Definition at line 1055 of file xlate.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: