summaryrefslogtreecommitdiff
path: root/shaping/include/shaper.h
diff options
context:
space:
mode:
Diffstat (limited to 'shaping/include/shaper.h')
-rw-r--r--shaping/include/shaper.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/shaping/include/shaper.h b/shaping/include/shaper.h
index 46bc07f..62f0eb6 100644
--- a/shaping/include/shaper.h
+++ b/shaping/include/shaper.h
@@ -12,20 +12,16 @@ extern "C" {
#include "timeout.h"
}
-#define SHAPING_DIR_IN 0x1
-#define SHAPING_DIR_OUT 0x2
-
#define SHAPING_RULE_NUM_MAX 8
#define SHAPING_REF_PROFILE_NUM_MAX 8
#define SHAPING_PRIORITY_NUM_MAX 10
#define SHAPER_FLOW_POP_NUM_MAX 10
#define SESSION_CLOSE 0x1
-#define SESSION_BORROW 0x2
#define CONFIRM_PRIORITY_PKTS 20
-#define SHAPING_WROK_THREAD_NUM_MAX 128
+#define SHAPING_WROK_THREAD_NUM_MAX 256
#define SHAPING_STAT_REFRESH_INTERVAL_SEC 2
#define SHAPING_STAT_REFRESH_MAX_PER_POLLING 5
@@ -80,6 +76,12 @@ struct shaping_ctx {
struct shaping_thread_ctx *thread_ctx;
};
+enum shaping_packet_dir {
+ SHAPING_DIR_IN = 0,
+ SHAPING_DIR_OUT,
+ SHAPING_DIR_MAX
+};
+
enum shaping_packet_action {
SHAPING_FORWARD = 0,
SHAPING_QUEUED,
@@ -130,6 +132,7 @@ struct shaping_profile_hash_node {
struct shaper_aqm_blue_para aqm_blue_para;
struct shaper_aqm_codel_para aqm_codel_para;
unsigned char is_invalid;
+ unsigned char async_pass[SHAPING_PRIORITY_NUM_MAX][SHAPING_DIR_MAX];
struct timeout timeout_handle;
UT_hash_handle hh;
};
@@ -138,6 +141,7 @@ struct shaping_profile_info {
int id;//profile_id
enum shaping_profile_type type;
int priority;
+ unsigned char async_pass[SHAPING_DIR_MAX];
long long in_deposit_token_bits;
long long out_deposit_token_bits;
long long bidirection_deposit_token_bits;
@@ -212,7 +216,6 @@ struct shaping_tconsume_cb_arg {
struct shaping_profile_info *profile;
struct shaping_flow *sf;
unsigned char direction;
- unsigned char is_primary_pf;
long long start_time_us;
};