packages: sort network related packages into package/network/
[openwrt.git] / package / network / utils / iproute2 / patches / 000-sync_pkt_sched_h.patch
1 --- a/include/linux/pkt_sched.h
2 +++ b/include/linux/pkt_sched.h
3 @@ -193,6 +193,33 @@ struct tc_sfq_xstats {
4         __s32           allot;
5  };
6  
7 +/* ESFQ section */
8 +
9 +enum
10 +{
11 +        /* traditional */
12 +       TCA_SFQ_HASH_CLASSIC,
13 +       TCA_SFQ_HASH_DST,
14 +       TCA_SFQ_HASH_SRC,
15 +       TCA_SFQ_HASH_FWMARK,
16 +       /* conntrack */
17 +       TCA_SFQ_HASH_CTORIGDST,
18 +       TCA_SFQ_HASH_CTORIGSRC,
19 +       TCA_SFQ_HASH_CTREPLDST,
20 +       TCA_SFQ_HASH_CTREPLSRC,
21 +       TCA_SFQ_HASH_CTNATCHG,
22 +};
23 +
24 +struct tc_esfq_qopt
25 +{
26 +       unsigned        quantum;        /* Bytes per round allocated to flow */
27 +       int             perturb_period; /* Period of hash perturbation */
28 +       __u32           limit;          /* Maximal packets in queue */
29 +       unsigned        divisor;        /* Hash divisor  */
30 +       unsigned        flows;          /* Maximal number of flows  */
31 +       unsigned        hash_kind;      /* Hash function to use for flow identification */
32 +};
33 +
34  /* RED section */
35  
36  enum {
37 @@ -633,4 +660,84 @@ struct tc_qfq_stats {
38         __u32 lmax;
39  };
40  
41 +/* CODEL */
42 +
43 +enum {
44 +       TCA_CODEL_UNSPEC,
45 +       TCA_CODEL_TARGET,
46 +       TCA_CODEL_LIMIT,
47 +       TCA_CODEL_INTERVAL,
48 +       TCA_CODEL_ECN,
49 +       __TCA_CODEL_MAX
50 +};
51 +
52 +#define TCA_CODEL_MAX  (__TCA_CODEL_MAX - 1)
53 +
54 +struct tc_codel_xstats {
55 +       __u32   maxpacket; /* largest packet we've seen so far */
56 +       __u32   count;     /* how many drops we've done since the last time we
57 +                           * entered dropping state
58 +                           */
59 +       __u32   lastcount; /* count at entry to dropping state */
60 +       __u32   ldelay;    /* in-queue delay seen by most recently dequeued packet */
61 +       __s32   drop_next; /* time to drop next packet */
62 +       __u32   drop_overlimit; /* number of time max qdisc packet limit was hit */
63 +       __u32   ecn_mark;  /* number of packets we ECN marked instead of dropped */
64 +       __u32   dropping;  /* are we in dropping state ? */
65 +};
66 +
67 +/* FQ_CODEL */
68 +
69 +enum {
70 +       TCA_FQ_CODEL_UNSPEC,
71 +       TCA_FQ_CODEL_TARGET,
72 +       TCA_FQ_CODEL_LIMIT,
73 +       TCA_FQ_CODEL_INTERVAL,
74 +       TCA_FQ_CODEL_ECN,
75 +       TCA_FQ_CODEL_FLOWS,
76 +       TCA_FQ_CODEL_QUANTUM,
77 +       __TCA_FQ_CODEL_MAX
78 +};
79 +
80 +#define TCA_FQ_CODEL_MAX       (__TCA_FQ_CODEL_MAX - 1)
81 +
82 +enum {
83 +       TCA_FQ_CODEL_XSTATS_QDISC,
84 +       TCA_FQ_CODEL_XSTATS_CLASS,
85 +};
86 +
87 +struct tc_fq_codel_qd_stats {
88 +       __u32   maxpacket;      /* largest packet we've seen so far */
89 +       __u32   drop_overlimit; /* number of time max qdisc
90 +                                * packet limit was hit
91 +                                */
92 +       __u32   ecn_mark;       /* number of packets we ECN marked
93 +                                * instead of being dropped
94 +                                */
95 +       __u32   new_flow_count; /* number of time packets
96 +                                * created a 'new flow'
97 +                                */
98 +       __u32   new_flows_len;  /* count of flows in new list */
99 +       __u32   old_flows_len;  /* count of flows in old list */
100 +};
101 +
102 +struct tc_fq_codel_cl_stats {
103 +       __s32   deficit;
104 +       __u32   ldelay;         /* in-queue delay seen by most recently
105 +                                * dequeued packet
106 +                                */
107 +       __u32   count;
108 +       __u32   lastcount;
109 +       __u32   dropping;
110 +       __s32   drop_next;
111 +};
112 +
113 +struct tc_fq_codel_xstats {
114 +       __u32   type;
115 +       union {
116 +               struct tc_fq_codel_qd_stats qdisc_stats;
117 +               struct tc_fq_codel_cl_stats class_stats;
118 +       };
119 +};
120 +
121  #endif