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: <CAMDZJNXwOZUyJndHsOjjR-n-m1V2BkVh7xsvEOuj=tJ2OaVHbQ@mail.gmail.com>
Date:   Tue, 14 Dec 2021 10:19:39 +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 v3 2/2] net: sched: support hash/classid/cpuid
 selecting tx queue

On Tue, Dec 14, 2021 at 6:53 AM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> On Sat, Dec 11, 2021 at 6:34 PM Tonghao Zhang <xiangxia.m.yue@...il.com> wrote:
> >
> > On Sun, Dec 12, 2021 at 10:19 AM Cong Wang <xiyou.wangcong@...il.com> wrote:
> > >
> > > On Thu, Dec 9, 2021 at 6:36 PM <xiangxia.m.yue@...il.com> wrote:
> > > >
> > > > From: Tonghao Zhang <xiangxia.m.yue@...il.com>
> > > >
> > > > This patch allows users to select queue_mapping, range
> > > > from A to B. And users can use skb-hash, cgroup classid
> > > > and cpuid to select Tx queues. Then we can load balance
> > > > packets from A to B queue. The range is an unsigned 16bit
> > > > value in decimal format.
> > > >
> > > > $ tc filter ... action skbedit queue_mapping hash-type normal A B
> > > >
> > > > "skbedit queue_mapping QUEUE_MAPPING" (from "man 8 tc-skbedit") is
> > > > enhanced with flags:
> > > > * SKBEDIT_F_QUEUE_MAPPING_HASH
> > > > * SKBEDIT_F_QUEUE_MAPPING_CLASSID
> > > > * SKBEDIT_F_QUEUE_MAPPING_CPUID
> > >
> > > With act_bpf you can do all of them... So why do you have to do it
> > > in skbedit?
> > Hi Cong
> > This idea is inspired by skbedit queue_mapping, and skbedit is
> > enhanced by this patch.
>
> This is exactly my question. ;)
>
> > We support this in skbedit firstly in production. act_bpf can do more
> > things than this. Anyway we
> > can support this in both act_skbedit/acc_bpf. 1/2 is changed from
> > skip_tx_queue in skb to per-cpu var suggested-by Eric. We need another
> > patch which can change the
> > per-cpu var in bpf. I will post this patch later.
>
> The point is if act_bpf can do it, you don't need to bother skbedit at
> all. More importantly, you are enforcing policies in kernel, which is
> not encouraged. So unless you provide more details, this patch is not
> needed at all.
Hi Cong,
1. As I understand it, act_bpf can work with 1/2 patch(but we should
another path to change the skip_txqueue in bpf).
It is easy for kernel developer. But for another user, it is not easy.
tc command is a choice, and easy to use.
2. BTW, act_bpf can't try to instead act_xxx action in future even
though it can do more thing. right ?
3. This patch is more important to work with 1/2, and only enhance the
skbedit queue_mapping function. not a big change.
4. "policies" ? if selecting tx from a range(this patch) is what you
mean "policies", so change the skb mark, priority, tc-peidt
and other tc-action are "policies" too. we still need the different tc actions.
>
> Thanks.



-- 
Best regards, Tonghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ