diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-09-08 18:34:54 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-09-08 18:38:30 +0200 |
commit | 9f8f1933dce555d3c246f447f54fca8de8889da9 (patch) | |
tree | dc447d0174473de8385d47eb8aedc058a336e4a9 /net/sched/sch_sfb.c | |
parent | net: sparx5: fix function return type to match actual type (diff) | |
parent | Merge tag 'net-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff) | |
download | linux-9f8f1933dce555d3c246f447f54fca8de8889da9.tar.xz linux-9f8f1933dce555d3c246f447f54fca8de8889da9.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/ethernet/freescale/fec.h
7d650df99d52 ("net: fec: add pm_qos support on imx6q platform")
40c79ce13b03 ("net: fec: add stop mode support for imx8 platform")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/sched/sch_sfb.c')
-rw-r--r-- | net/sched/sch_sfb.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/sched/sch_sfb.c b/net/sched/sch_sfb.c index 31717fa45a4f..1be8d04d69dc 100644 --- a/net/sched/sch_sfb.c +++ b/net/sched/sch_sfb.c @@ -135,15 +135,15 @@ static void increment_one_qlen(u32 sfbhash, u32 slot, struct sfb_sched_data *q) } } -static void increment_qlen(const struct sk_buff *skb, struct sfb_sched_data *q) +static void increment_qlen(const struct sfb_skb_cb *cb, struct sfb_sched_data *q) { u32 sfbhash; - sfbhash = sfb_hash(skb, 0); + sfbhash = cb->hashes[0]; if (sfbhash) increment_one_qlen(sfbhash, 0, q); - sfbhash = sfb_hash(skb, 1); + sfbhash = cb->hashes[1]; if (sfbhash) increment_one_qlen(sfbhash, 1, q); } @@ -281,8 +281,10 @@ static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, { struct sfb_sched_data *q = qdisc_priv(sch); + unsigned int len = qdisc_pkt_len(skb); struct Qdisc *child = q->qdisc; struct tcf_proto *fl; + struct sfb_skb_cb cb; int i; u32 p_min = ~0; u32 minqlen = ~0; @@ -399,11 +401,12 @@ static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, } enqueue: + memcpy(&cb, sfb_skb_cb(skb), sizeof(cb)); ret = qdisc_enqueue(skb, child, to_free); if (likely(ret == NET_XMIT_SUCCESS)) { - qdisc_qstats_backlog_inc(sch, skb); + sch->qstats.backlog += len; sch->q.qlen++; - increment_qlen(skb, q); + increment_qlen(&cb, q); } else if (net_xmit_drop_count(ret)) { q->stats.childdrop++; qdisc_qstats_drop(sch); |