lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Aug 2022 19:46:16 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Zhengchao Shao <shaozhengchao@...wei.com>
Cc:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
        <jhs@...atatu.com>, <xiyou.wangcong@...il.com>, <jiri@...nulli.us>,
        <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>
Subject: Re: [PATCH -next] net: sched: sch_skbprio: add support for qlen
 statistics of each priority in sch_skbprio

On Thu, 25 Aug 2022 18:27:45 +0800 Zhengchao Shao wrote:
> diff --git a/net/sched/sch_skbprio.c b/net/sched/sch_skbprio.c
> index 7a5e4c454715..fe2bb7bf9d2a 100644
> --- a/net/sched/sch_skbprio.c
> +++ b/net/sched/sch_skbprio.c
> @@ -83,6 +83,7 @@ static int skbprio_enqueue(struct sk_buff *skb, struct Qdisc *sch,
>  		__skb_queue_tail(qdisc, skb);

The skb queue called "qdisc" here (confusingly) already maintains 
a length (also called qlen). Can we just access that variable instead
of maintaining the same value manually?

>  		qdisc_qstats_backlog_inc(sch, skb);
>  		q->qstats[prio].backlog += qdisc_pkt_len(skb);
> +		q->qstats[prio].qlen++;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ