--- zzzz-none-000/linux-3.10.107/include/uapi/linux/pkt_sched.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/include/uapi/linux/pkt_sched.h 2021-02-04 17:41:59.000000000 +0000 @@ -112,6 +112,249 @@ #define TCA_STAB_MAX (__TCA_STAB_MAX - 1) +enum { + TCA_NSS_ACCEL_MODE_NSS_FW, + TCA_NSS_ACCEL_MODE_PPE, + TCA_NSS_ACCEL_MODE_MAX +}; + +/* NSSFIFO section */ + +enum { + TCA_NSSFIFO_UNSPEC, + TCA_NSSFIFO_PARMS, + __TCA_NSSFIFO_MAX +}; + +#define TCA_NSSFIFO_MAX (__TCA_NSSFIFO_MAX - 1) + +struct tc_nssfifo_qopt { + __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ + __u8 set_default; /* Sets qdisc to be the default qdisc for enqueue */ + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +/* NSSWRED section */ + +enum { + TCA_NSSWRED_UNSPEC, + TCA_NSSWRED_PARMS, + __TCA_NSSWRED_MAX +}; + +#define TCA_NSSWRED_MAX (__TCA_NSSWRED_MAX - 1) +#define NSSWRED_CLASS_MAX 6 +struct tc_red_alg_parameter { + __u32 min; /* qlen_avg < min: pkts are all enqueued */ + __u32 max; /* qlen_avg > max: pkts are all dropped */ + __u32 probability;/* Drop probability at qlen_avg = max */ + __u32 exp_weight_factor;/* exp_weight_factor for calculate qlen_avg */ +}; + +struct tc_nsswred_traffic_class { + __u32 limit; /* Queue length */ + __u32 weight_mode_value; /* Weight mode value */ + struct tc_red_alg_parameter rap;/* Parameters for RED alg */ +}; + +/* + * Weight modes for WRED + */ +enum tc_nsswred_weight_modes { + TC_NSSWRED_WEIGHT_MODE_DSCP = 0,/* Weight mode is DSCP */ + TC_NSSWRED_WEIGHT_MODES, /* Must be last */ +}; + +struct tc_nsswred_qopt { + __u32 limit; /* Queue length */ + enum tc_nsswred_weight_modes weight_mode; + /* Weight mode */ + __u32 traffic_classes; /* How many traffic classes: DPs */ + __u32 def_traffic_class; /* Default traffic if no match: def_DP */ + __u32 traffic_id; /* The traffic id to be configured: DP */ + __u32 weight_mode_value; /* Weight mode value */ + struct tc_red_alg_parameter rap;/* RED algorithm parameters */ + struct tc_nsswred_traffic_class tntc[NSSWRED_CLASS_MAX]; + /* Traffic settings for dumpping */ + __u8 ecn; /* Setting ECN bit or dropping */ + __u8 set_default; /* Sets qdisc to be the default for enqueue */ + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +/* NSSCODEL section */ + +enum { + TCA_NSSCODEL_UNSPEC, + TCA_NSSCODEL_PARMS, + __TCA_NSSCODEL_MAX +}; + +#define TCA_NSSCODEL_MAX (__TCA_NSSCODEL_MAX - 1) + +struct tc_nsscodel_qopt { + __u32 target; /* Acceptable queueing delay */ + __u32 limit; /* Max number of packets that can be held in the queue */ + __u32 interval; /* Monitoring interval */ + __u32 flows; /* Number of flow buckets */ + __u32 quantum; /* Weight (in bytes) used for DRR of flow buckets */ + __u8 ecn; /* 0 - disable ECN, 1 - enable ECN */ + __u8 set_default; /* Sets qdisc to be the default qdisc for enqueue */ + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +struct tc_nsscodel_xstats { + __u32 peak_queue_delay; /* Peak delay experienced by a dequeued packet */ + __u32 peak_drop_delay; /* Peak delay experienced by a dropped packet */ +}; + +/* NSSFQ_CODEL section */ + +struct tc_nssfq_codel_xstats { + __u32 new_flow_count; /* Total number of new flows seen */ + __u32 new_flows_len; /* Current number of new flows */ + __u32 old_flows_len; /* Current number of old flows */ + __u32 ecn_mark; /* Number of packets marked with ECN */ + __u32 drop_overlimit; /* Number of packets dropped due to overlimit */ + __u32 maxpacket; /* The largest packet seen so far in the queue */ +}; + +/* NSSTBL section */ + +enum { + TCA_NSSTBL_UNSPEC, + TCA_NSSTBL_PARMS, + __TCA_NSSTBL_MAX +}; + +#define TCA_NSSTBL_MAX (__TCA_NSSTBL_MAX - 1) + +struct tc_nsstbl_qopt { + __u32 burst; /* Maximum burst size */ + __u32 rate; /* Limiting rate of TBF */ + __u32 peakrate; /* Maximum rate at which TBF is allowed to send */ + __u32 mtu; /* Max size of packet, or minumim burst size */ + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +/* NSSPRIO section */ + +#define TCA_NSSPRIO_MAX_BANDS 256 + +enum { + TCA_NSSPRIO_UNSPEC, + TCA_NSSPRIO_PARMS, + __TCA_NSSPRIO_MAX +}; + +#define TCA_NSSPRIO_MAX (__TCA_NSSPRIO_MAX - 1) + +struct tc_nssprio_qopt { + __u32 bands; /* Number of bands */ + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +/* NSSBF section */ + +enum { + TCA_NSSBF_UNSPEC, + TCA_NSSBF_CLASS_PARMS, + TCA_NSSBF_QDISC_PARMS, + __TCA_NSSBF_MAX +}; + +#define TCA_NSSBF_MAX (__TCA_NSSBF_MAX - 1) + +struct tc_nssbf_class_qopt { + __u32 burst; /* Maximum burst size */ + __u32 rate; /* Allowed bandwidth for this class */ + __u32 mtu; /* MTU of the associated interface */ + __u32 quantum; /* Quantum allocation for DRR */ +}; + +struct tc_nssbf_qopt { + __u16 defcls; /* Default class value */ + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +/* NSSWRR section */ + +enum { + TCA_NSSWRR_UNSPEC, + TCA_NSSWRR_CLASS_PARMS, + TCA_NSSWRR_QDISC_PARMS, + __TCA_NSSWRR_MAX +}; + +#define TCA_NSSWRR_MAX (__TCA_NSSWRR_MAX - 1) + +struct tc_nsswrr_class_qopt { + __u32 quantum; /* Weight associated to this class */ +}; + +struct tc_nsswrr_qopt { + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +/* NSSWFQ section */ + +enum { + TCA_NSSWFQ_UNSPEC, + TCA_NSSWFQ_CLASS_PARMS, + TCA_NSSWFQ_QDISC_PARMS, + __TCA_NSSWFQ_MAX +}; + +#define TCA_NSSWFQ_MAX (__TCA_NSSWFQ_MAX - 1) + +struct tc_nsswfq_class_qopt { + __u32 quantum; /* Weight associated to this class */ +}; + +struct tc_nsswfq_qopt { + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +/* NSSHTB section */ + +enum { + TCA_NSSHTB_UNSPEC, + TCA_NSSHTB_CLASS_PARMS, + TCA_NSSHTB_QDISC_PARMS, + __TCA_NSSHTB_MAX +}; + +#define TCA_NSSHTB_MAX (__TCA_NSSHTB_MAX - 1) + +struct tc_nsshtb_class_qopt { + __u32 burst; /* Allowed burst size */ + __u32 rate; /* Allowed bandwidth for this class */ + __u32 cburst; /* Maximum burst size */ + __u32 crate; /* Maximum bandwidth for this class */ + __u32 quantum; /* Quantum allocation for DRR */ + __u32 priority; /* Priority value associated with this class */ + __u32 overhead; /* Overhead in bytes per packet */ +}; + +struct tc_nsshtb_qopt { + __u32 r2q; /* Rate to quantum ratio */ + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + +/* NSSBLACKHOLE section */ + +enum { + TCA_NSSBLACKHOLE_UNSPEC, + TCA_NSSBLACKHOLE_PARMS, + __TCA_NSSBLACKHOLE_MAX +}; + +#define TCA_NSSBLACKHOLE_MAX (__TCA_NSSBLACKHOLE_MAX - 1) + +struct tc_nssblackhole_qopt { + __u8 set_default; /* Sets qdisc to be the default qdisc for enqueue */ + __u8 accel_mode; /* Dictates which data plane offloads the qdisc */ +}; + /* FIFO section */ struct tc_fifo_qopt { @@ -171,6 +414,10 @@ TCA_TBF_PARMS, TCA_TBF_RTAB, TCA_TBF_PTAB, + TCA_TBF_RATE64, + TCA_TBF_PRATE64, + TCA_TBF_BURST, + TCA_TBF_PBURST, __TCA_TBF_MAX, }; @@ -222,6 +469,33 @@ __s32 allot; }; +/* ESFQ section */ + +enum +{ + /* traditional */ + TCA_SFQ_HASH_CLASSIC, + TCA_SFQ_HASH_DST, + TCA_SFQ_HASH_SRC, + TCA_SFQ_HASH_FWMARK, + /* conntrack */ + TCA_SFQ_HASH_CTORIGDST, + TCA_SFQ_HASH_CTORIGSRC, + TCA_SFQ_HASH_CTREPLDST, + TCA_SFQ_HASH_CTREPLSRC, + TCA_SFQ_HASH_CTNATCHG, +}; + +struct tc_esfq_qopt +{ + unsigned quantum; /* Bytes per round allocated to flow */ + int perturb_period; /* Period of hash perturbation */ + __u32 limit; /* Maximal packets in queue */ + unsigned divisor; /* Hash divisor */ + unsigned flows; /* Maximal number of flows */ + unsigned hash_kind; /* Hash function to use for flow identification */ +}; + /* RED section */ enum { @@ -264,7 +538,8 @@ TCA_GRED_STAB, TCA_GRED_DPS, TCA_GRED_MAX_P, - __TCA_GRED_MAX, + TCA_GRED_LIMIT, + __TCA_GRED_MAX, }; #define TCA_GRED_MAX (__TCA_GRED_MAX - 1) @@ -327,6 +602,34 @@ __u32 matched; /* Drops due to flow match */ }; +/* LLQ section */ + +enum { + TCA_LLQ_UNSPEC, + TCA_LLQ_OPTIONS, + __TCA_LLQ_MAX, +}; + +#define TCA_LLQ_MAX (__TCA_LLQ_MAX - 1) + +struct tc_llq_copt { + __u8 priority; + __u8 weight; +}; + +struct tc_llq_cinfo { + __u8 priority; + __u8 weight; + long deficit; + long quantum; +}; + +struct tc_llq_qopt { + __s32 maxq; /* biggest possible quantum in classes */ + __s32 minq; /* smallest possible quantum in classes */ + __u32 defaultclass; +}; + /* HTB section */ #define TC_HTB_NUMPRIO 8 #define TC_HTB_MAXDEPTH 8 @@ -357,6 +660,8 @@ TCA_HTB_CTAB, TCA_HTB_RTAB, TCA_HTB_DIRECT_QLEN, + TCA_HTB_RATE64, + TCA_HTB_CEIL64, __TCA_HTB_MAX, }; @@ -519,6 +824,7 @@ TCA_NETEM_LOSS, TCA_NETEM_RATE, TCA_NETEM_ECN, + TCA_NETEM_RATE64, __TCA_NETEM_MAX, }; @@ -672,6 +978,7 @@ TCA_CODEL_LIMIT, TCA_CODEL_INTERVAL, TCA_CODEL_ECN, + TCA_CODEL_CE_THRESHOLD, __TCA_CODEL_MAX }; @@ -688,6 +995,7 @@ __u32 drop_overlimit; /* number of time max qdisc packet limit was hit */ __u32 ecn_mark; /* number of packets we ECN marked instead of dropped */ __u32 dropping; /* are we in dropping state ? */ + __u32 ce_mark; /* number of CE marked packets because of ce_threshold */ }; /* FQ_CODEL */ @@ -700,6 +1008,7 @@ TCA_FQ_CODEL_ECN, TCA_FQ_CODEL_FLOWS, TCA_FQ_CODEL_QUANTUM, + TCA_FQ_CODEL_CE_THRESHOLD, __TCA_FQ_CODEL_MAX }; @@ -723,6 +1032,7 @@ */ __u32 new_flows_len; /* count of flows in new list */ __u32 old_flows_len; /* count of flows in old list */ + __u32 ce_mark; /* packets above ce_threshold */ }; struct tc_fq_codel_cl_stats { @@ -744,4 +1054,98 @@ }; }; +/* FQ */ + +enum { + TCA_FQ_UNSPEC, + + TCA_FQ_PLIMIT, /* limit of total number of packets in queue */ + + TCA_FQ_FLOW_PLIMIT, /* limit of packets per flow */ + + TCA_FQ_QUANTUM, /* RR quantum */ + + TCA_FQ_INITIAL_QUANTUM, /* RR quantum for new flow */ + + TCA_FQ_RATE_ENABLE, /* enable/disable rate limiting */ + + TCA_FQ_FLOW_DEFAULT_RATE,/* obsolete, do not use */ + + TCA_FQ_FLOW_MAX_RATE, /* per flow max rate */ + + TCA_FQ_BUCKETS_LOG, /* log2(number of buckets) */ + + TCA_FQ_FLOW_REFILL_DELAY, /* flow credit refill delay in usec */ + + TCA_FQ_ORPHAN_MASK, /* mask applied to orphaned skb hashes */ + + __TCA_FQ_MAX +}; + +#define TCA_FQ_MAX (__TCA_FQ_MAX - 1) + +struct tc_fq_qd_stats { + __u64 gc_flows; + __u64 highprio_packets; + __u64 tcp_retrans; + __u64 throttled; + __u64 flows_plimit; + __u64 pkts_too_long; + __u64 allocation_errors; + __s64 time_next_delayed_flow; + __u32 flows; + __u32 inactive_flows; + __u32 throttled_flows; + __u32 pad; +}; + +/* Heavy-Hitter Filter */ + +enum { + TCA_HHF_UNSPEC, + TCA_HHF_BACKLOG_LIMIT, + TCA_HHF_QUANTUM, + TCA_HHF_HH_FLOWS_LIMIT, + TCA_HHF_RESET_TIMEOUT, + TCA_HHF_ADMIT_BYTES, + TCA_HHF_EVICT_TIMEOUT, + TCA_HHF_NON_HH_WEIGHT, + __TCA_HHF_MAX +}; + +#define TCA_HHF_MAX (__TCA_HHF_MAX - 1) + +struct tc_hhf_xstats { + __u32 drop_overlimit; /* number of times max qdisc packet limit + * was hit + */ + __u32 hh_overlimit; /* number of times max heavy-hitters was hit */ + __u32 hh_tot_count; /* number of captured heavy-hitters so far */ + __u32 hh_cur_count; /* number of current heavy-hitters */ +}; + +/* PIE */ +enum { + TCA_PIE_UNSPEC, + TCA_PIE_TARGET, + TCA_PIE_LIMIT, + TCA_PIE_TUPDATE, + TCA_PIE_ALPHA, + TCA_PIE_BETA, + TCA_PIE_ECN, + TCA_PIE_BYTEMODE, + __TCA_PIE_MAX +}; +#define TCA_PIE_MAX (__TCA_PIE_MAX - 1) + +struct tc_pie_xstats { + __u32 prob; /* current probability */ + __u32 delay; /* current delay in ms */ + __u32 avg_dq_rate; /* current average dq_rate in bits/pie_time */ + __u32 packets_in; /* total number of packets enqueued */ + __u32 dropped; /* packets dropped due to pie_action */ + __u32 overlimit; /* dropped due to lack of space in queue */ + __u32 maxq; /* maximum queue size */ + __u32 ecn_mark; /* packets marked with ecn*/ +}; #endif