diff options
author | David S. Miller <davem@davemloft.net> | 2017-10-30 06:10:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-30 13:09:24 +0100 |
commit | e1ea2f9856b765a2eaabb403a6751f70efc9ba4c (patch) | |
tree | 771f0f96fdab1b27757730e96d911c73f5499ee4 /include/net/fq_impl.h | |
parent | Merge branch 'ipvlan-private-vepa' (diff) | |
parent | Linux 4.14-rc7 (diff) | |
download | linux-e1ea2f9856b765a2eaabb403a6751f70efc9ba4c.tar.xz linux-e1ea2f9856b765a2eaabb403a6751f70efc9ba4c.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several conflicts here.
NFP driver bug fix adding nfp_netdev_is_nfp_repr() check to
nfp_fl_output() needed some adjustments because the code block is in
an else block now.
Parallel additions to net/pkt_cls.h and net/sch_generic.h
A bug fix in __tcp_retransmit_skb() conflicted with some of
the rbtree changes in net-next.
The tc action RCU callback fixes in 'net' had some overlap with some
of the recent tcf_block reworking.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/fq_impl.h')
-rw-r--r-- | include/net/fq_impl.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h index 8b237e4afee6..be7c0fab3478 100644 --- a/include/net/fq_impl.h +++ b/include/net/fq_impl.h @@ -159,6 +159,7 @@ static void fq_tin_enqueue(struct fq *fq, fq_flow_get_default_t get_default_func) { struct fq_flow *flow; + bool oom; lockdep_assert_held(&fq->lock); @@ -180,8 +181,8 @@ static void fq_tin_enqueue(struct fq *fq, } __skb_queue_tail(&flow->queue, skb); - - if (fq->backlog > fq->limit || fq->memory_usage > fq->memory_limit) { + oom = (fq->memory_usage > fq->memory_limit); + while (fq->backlog > fq->limit || oom) { flow = list_first_entry_or_null(&fq->backlogs, struct fq_flow, backlogchain); @@ -196,8 +197,10 @@ static void fq_tin_enqueue(struct fq *fq, flow->tin->overlimit++; fq->overlimit++; - if (fq->memory_usage > fq->memory_limit) + if (oom) { fq->overmemory++; + oom = (fq->memory_usage > fq->memory_limit); + } } } |