Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Upgrade to 4.4.50-rt62
[kvmfornfv.git]
/
kernel
/
net
/
sched
/
sch_sfq.c
diff --git
a/kernel/net/sched/sch_sfq.c
b/kernel/net/sched/sch_sfq.c
index
3abab53
..
498f0a2
100644
(file)
--- a/
kernel/net/sched/sch_sfq.c
+++ b/
kernel/net/sched/sch_sfq.c
@@
-346,7
+346,7
@@
static int
sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
{
struct sfq_sched_data *q = qdisc_priv(sch);
sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
{
struct sfq_sched_data *q = qdisc_priv(sch);
- unsigned int hash;
+ unsigned int hash
, dropped
;
sfq_index x, qlen;
struct sfq_slot *slot;
int uninitialized_var(ret);
sfq_index x, qlen;
struct sfq_slot *slot;
int uninitialized_var(ret);
@@
-461,7
+461,7
@@
enqueue:
return NET_XMIT_SUCCESS;
qlen = slot->qlen;
return NET_XMIT_SUCCESS;
qlen = slot->qlen;
- sfq_drop(sch);
+
dropped =
sfq_drop(sch);
/* Return Congestion Notification only if we dropped a packet
* from this flow.
*/
/* Return Congestion Notification only if we dropped a packet
* from this flow.
*/
@@
-469,7
+469,7
@@
enqueue:
return NET_XMIT_CN;
/* As we dropped a packet, better let upper stack know this */
return NET_XMIT_CN;
/* As we dropped a packet, better let upper stack know this */
- qdisc_tree_
decrease_qlen(sch, 1
);
+ qdisc_tree_
reduce_backlog(sch, 1, dropped
);
return NET_XMIT_SUCCESS;
}
return NET_XMIT_SUCCESS;
}
@@
-537,6
+537,7
@@
static void sfq_rehash(struct Qdisc *sch)
struct sfq_slot *slot;
struct sk_buff_head list;
int dropped = 0;
struct sfq_slot *slot;
struct sk_buff_head list;
int dropped = 0;
+ unsigned int drop_len = 0;
__skb_queue_head_init(&list);
__skb_queue_head_init(&list);
@@
-565,6
+566,7
@@
static void sfq_rehash(struct Qdisc *sch)
if (x >= SFQ_MAX_FLOWS) {
drop:
qdisc_qstats_backlog_dec(sch, skb);
if (x >= SFQ_MAX_FLOWS) {
drop:
qdisc_qstats_backlog_dec(sch, skb);
+ drop_len += qdisc_pkt_len(skb);
kfree_skb(skb);
dropped++;
continue;
kfree_skb(skb);
dropped++;
continue;
@@
-594,7
+596,7
@@
drop:
}
}
sch->q.qlen -= dropped;
}
}
sch->q.qlen -= dropped;
- qdisc_tree_
decrease_qlen(sch, dropped
);
+ qdisc_tree_
reduce_backlog(sch, dropped, drop_len
);
}
static void sfq_perturbation(unsigned long arg)
}
static void sfq_perturbation(unsigned long arg)
@@
-618,7
+620,7
@@
static int sfq_change(struct Qdisc *sch, struct nlattr *opt)
struct sfq_sched_data *q = qdisc_priv(sch);
struct tc_sfq_qopt *ctl = nla_data(opt);
struct tc_sfq_qopt_v1 *ctl_v1 = NULL;
struct sfq_sched_data *q = qdisc_priv(sch);
struct tc_sfq_qopt *ctl = nla_data(opt);
struct tc_sfq_qopt_v1 *ctl_v1 = NULL;
- unsigned int qlen;
+ unsigned int qlen
, dropped = 0
;
struct red_parms *p = NULL;
if (opt->nla_len < nla_attr_size(sizeof(*ctl)))
struct red_parms *p = NULL;
if (opt->nla_len < nla_attr_size(sizeof(*ctl)))
@@
-667,8
+669,8
@@
static int sfq_change(struct Qdisc *sch, struct nlattr *opt)
qlen = sch->q.qlen;
while (sch->q.qlen > q->limit)
qlen = sch->q.qlen;
while (sch->q.qlen > q->limit)
- sfq_drop(sch);
- qdisc_tree_
decrease_qlen(sch, qlen - sch->q.qlen
);
+
dropped +=
sfq_drop(sch);
+ qdisc_tree_
reduce_backlog(sch, qlen - sch->q.qlen, dropped
);
del_timer(&q->perturb_timer);
if (q->perturb_period) {
del_timer(&q->perturb_timer);
if (q->perturb_period) {