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, 19 Jan 2018 16:18:43 -0500
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     Jesus Sanchez-Palencia <jesus.sanchez-palencia@...el.com>
Cc:     Network Development <netdev@...r.kernel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiří Pírko <jiri@...nulli.us>,
        vinicius.gomes@...el.com,
        Richard Cochran <richardcochran@...il.com>,
        intel-wired-lan@...ts.osuosl.org, anna-maria@...utronix.de,
        henrik@...tad.us, Thomas Gleixner <tglx@...utronix.de>,
        John Stultz <john.stultz@...aro.org>, andre.guedes@...el.com,
        ivan.briano@...el.com, levi.pearson@...man.com
Subject: Re: [RFC v2 net-next 06/10] net/sched: Introduce the TBS Qdisc

On Wed, Jan 17, 2018 at 6:06 PM, Jesus Sanchez-Palencia
<jesus.sanchez-palencia@...el.com> wrote:
> From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
>
> TBS (Time Based Scheduler) uses the information added earlier in this
> series (the socket option SO_TXTIME and the new role of
> sk_buff->tstamp) to schedule traffic transmission based on absolute
> time.
>
> For some workloads, just bandwidth enforcement is not enough, and
> precise control of the transmission of packets is necessary.
>
> Example:
>
> $ tc qdisc replace dev enp2s0 parent root handle 100 mqprio num_tc 3 \
>            map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@2 hw 0
>
> $ tc qdisc add dev enp2s0 parent 100:1 tbs delta 60000 clockid 11 offload 1
>
> In this example, the Qdisc will try to enable offloading (offload 1)
> the control of the transmission time to the network adapter, the
> time stamp in socket are in reference to the clockid '11' (CLOCK_TAI)
> and packets leave the Qdisc "delta" (60000) nanoseconds before its
> transmission time.
>
> When offloading is disabled, the network adapter will ignore the
> sk_buff time stamp, and so, the transmission time will be only "best
> effort" from the Qdisc.
>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>
> Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@...el.com>
> ---

> +static struct sk_buff *timerqueue_erase(struct Qdisc *sch,
> +                                       struct sk_buff *skb, bool drop)
> +{
> +       struct tbs_sched_data *q = qdisc_priv(sch);
> +
> +       rb_erase(&skb->rbnode, &q->head);
> +
> +       if (drop) {
> +               struct sk_buff *to_free = NULL;
> +
> +               qdisc_drop(skb, sch, &to_free);
> +               kfree_skb_list(to_free);
> +       } else {
> +               qdisc_qstats_backlog_dec(sch, skb);
> +               qdisc_bstats_update(sch, skb);
> +
> +               q->last = skb->tstamp;
> +       }
> +
> +       sch->q.qlen--;
> +
> +       /* The rbnode field in the skb re-uses these fields, now that
> +        * we are done with the rbnode, reset them.
> +        */
> +       skb->next = NULL;
> +       skb->prev = NULL;
> +       skb->dev = qdisc_dev(sch);
> +
> +       return skb;
> +}

Return value is not used in either caller.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ