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: <CAMDZJNXK263KkXp2=gVkuW1nqD2nqJbNxGC2YwRkZT5__hJkCQ@mail.gmail.com>
Date:   Wed, 22 Dec 2021 09:19:28 +0800
From:   Tonghao Zhang <xiangxia.m.yue@...il.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jonathan Lemon <jonathan.lemon@...il.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Alexander Lobakin <alobakin@...me>,
        Paolo Abeni <pabeni@...hat.com>,
        Talal Ahmad <talalahmad@...gle.com>,
        Kevin Hao <haokexin@...il.com>,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        Kees Cook <keescook@...omium.org>,
        Kumar Kartikeya Dwivedi <memxor@...il.com>,
        Antoine Tenart <atenart@...nel.org>,
        Wei Wang <weiwan@...gle.com>, Arnd Bergmann <arnd@...db.de>
Subject: Re: [net-next v5 1/2] net: sched: use queue_mapping to pick tx queue

On Tue, Dec 21, 2021 at 1:51 AM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> On Mon, Dec 20, 2021 at 4:38 AM <xiangxia.m.yue@...il.com> wrote:
> >   In general recording the decision in the skb seems a little heavy handed.
> >   This patch introduces a per-CPU variable, suggested by Eric.
> >
> >   The xmit.skip_txqueue flag is firstly cleared in __dev_queue_xmit().
> >   - Tx Qdisc may install that skbedit actions, then xmit.skip_txqueue flag
> >     is set in qdisc->enqueue() though tx queue has been selected in
> >     netdev_tx_queue_mapping() or netdev_core_pick_tx(). That flag is cleared
> >     firstly in __dev_queue_xmit(), is useful:
> >   - Avoid picking Tx queue with netdev_tx_queue_mapping() in next netdev
> >     in such case: eth0 macvlan - eth0.3 vlan - eth0 ixgbe-phy:
> >     For example, eth0, macvlan in pod, which root Qdisc install skbedit
> >     queue_mapping, send packets to eth0.3, vlan in host. In __dev_queue_xmit() of
> >     eth0.3, clear the flag, does not select tx queue according to skb->queue_mapping
> >     because there is no filters in clsact or tx Qdisc of this netdev.
> >     Same action taked in eth0, ixgbe in Host.
> >   - Avoid picking Tx queue for next packet. If we set xmit.skip_txqueue
> >     in tx Qdisc (qdisc->enqueue()), the proper way to clear it is clearing it
> >     in __dev_queue_xmit when processing next packets.
>
> Any reason why we can't just move sch_handle_egress() down after
> netdev_core_pick_tx() and recalculate txq with skb->queue_mapping?
If we sch_handle_egress() down after netdev_core_pick_tx(), and we
overwrite the txqueue, the overhead of
netdev_core_pick_tx() is unnecessary, so I don't do that . If
eth0(macvlan) -> eth0.3(vlan) -> eth0(ixgbe), skb-> queue_mapping is
not cleared,
skb-> queue_mapping affect every netdevice to pick the tx queue.
> Thanks.



-- 
Best regards, Tonghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ