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]
Message-ID: <CAM_iQpVVJVXGLmEWfNj-MG6j4pyYp3TOV7gcnBZ0-9OrMWEa=A@mail.gmail.com>
Date:   Wed, 27 Mar 2019 13:53:40 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Marc Kleine-Budde <mkl@...gutronix.de>
Cc:     Jiri Pirko <jiri@...nulli.us>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Dave Taht <dave.taht@...il.com>,
        Jamal Hadi Salim <jhs@...atatu.com>, kernel@...gutronix.de,
        linux-can@...r.kernel.org, David Miller <davem@...emloft.net>
Subject: Re: [PATCH 1/2] net: sch_generic: add flag IFF_FIFO_QUEUE to use
 pfifo_fast as default scheduler

On Wed, Mar 27, 2019 at 1:11 PM Marc Kleine-Budde <mkl@...gutronix.de> wrote:
> Doubts aside, how should an arbitrary default qdisc per netdevice look
> like? Add a string "default_qdisc" to the netdev? Lookup qdisc by string
> during DOWN->UP transition? What do if that qdisc is not compiled into
> the kernel? Or rather use an array of qdiscs with one of sch_generic
> defaults?

I think you can just save a Qdisc_ops pointer in netdevice,
like how we install the default qdisc:

  38 const struct Qdisc_ops *default_qdisc_ops = &pfifo_fast_ops;
  39 EXPORT_SYMBOL(default_qdisc_ops);

And hard-code whatever default into your netdevice init code.

At least for pfifo_fast, you don't need to worry about module
loading. If you really do, you can call qdisc_lookup_default()
and request_module() like what qdisc_set_default() does.
Of course, you can refactor qdisc_set_default() and call it too.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ