diff options
author | David S. Miller <davem@davemloft.net> | 2015-05-13 20:31:43 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-13 20:31:43 +0200 |
commit | b04096ff33a977c01c8780ca3ee129dbd641bad4 (patch) | |
tree | 8652f27f158984e5aa4c00ddf1a4885a32435f28 /include/net/codel.h | |
parent | fix missing copy_from_user in macvtap (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-b04096ff33a977c01c8780ca3ee129dbd641bad4.tar.xz linux-b04096ff33a977c01c8780ca3ee129dbd641bad4.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Four minor merge conflicts:
1) qca_spi.c renamed the local variable used for the SPI device
from spi_device to spi, meanwhile the spi_set_drvdata() call
got moved further up in the probe function.
2) Two changes were both adding new members to codel params
structure, and thus we had overlapping changes to the
initializer function.
3) 'net' was making a fix to sk_release_kernel() which is
completely removed in 'net-next'.
4) In net_namespace.c, the rtnl_net_fill() call for GET operations
had the command value fixed, meanwhile 'net-next' adjusted the
argument signature a bit.
This also matches example merge resolutions posted by Stephen
Rothwell over the past two days.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/codel.h')
-rw-r--r-- | include/net/codel.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/net/codel.h b/include/net/codel.h index 8c0f78f209e8..267e70210061 100644 --- a/include/net/codel.h +++ b/include/net/codel.h @@ -121,12 +121,14 @@ static inline u32 codel_time_to_us(codel_time_t val) * @target: target queue size (in time units) * @ce_threshold: threshold for marking packets with ECN CE * @interval: width of moving time window + * @mtu: device mtu, or minimal queue backlog in bytes. * @ecn: is Explicit Congestion Notification enabled */ struct codel_params { codel_time_t target; codel_time_t ce_threshold; codel_time_t interval; + u32 mtu; bool ecn; }; @@ -172,10 +174,12 @@ struct codel_stats { #define CODEL_DISABLED_THRESHOLD INT_MAX -static void codel_params_init(struct codel_params *params) +static void codel_params_init(struct codel_params *params, + const struct Qdisc *sch) { params->interval = MS2TIME(100); params->target = MS2TIME(5); + params->mtu = psched_mtu(qdisc_dev(sch)); params->ce_threshold = CODEL_DISABLED_THRESHOLD; params->ecn = false; } @@ -187,7 +191,7 @@ static void codel_vars_init(struct codel_vars *vars) static void codel_stats_init(struct codel_stats *stats) { - stats->maxpacket = 256; + stats->maxpacket = 0; } /* @@ -241,7 +245,7 @@ static bool codel_should_drop(const struct sk_buff *skb, stats->maxpacket = qdisc_pkt_len(skb); if (codel_time_before(vars->ldelay, params->target) || - sch->qstats.backlog <= stats->maxpacket) { + sch->qstats.backlog <= params->mtu) { /* went below - stay below for at least interval */ vars->first_above_time = 0; return false; |