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>] [day] [month] [year] [list]
Message-ID: <20180814172516.14ec4d5e@epycfail>
Date:   Tue, 14 Aug 2018 17:25:16 +0200
From:   Stefano Brivio <sbrivio@...hat.com>
To:     William Tu <u9012063@...il.com>
Cc:     Ben Pfaff <blp@....org>, Matteo Croce <mcroce@...hat.com>,
        Pravin B Shelar <pshelar@....org>,
        Justin Pettit <jpettit@...are.com>,
        Greg Rose <gvrose8192@...il.com>,
        netdev <netdev@...r.kernel.org>,
        "<dev@...nvswitch.org>" <dev@...nvswitch.org>,
        Jiri Benc <jbenc@...hat.com>,
        Aaron Conole <aconole@...hat.com>,
        Joe Stringer <joe@...d.net.nz>
Subject: Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in
 per-port round-robin order

Hi William,

On Fri, 10 Aug 2018 07:11:01 -0700
William Tu <u9012063@...il.com> wrote:

> > int rr_select_srcport(struct dp_upcall_info *upcall)
> > {
> >         /* look up source port from upcall->skb... */
> > }
> >
> > And we could then easily extend this to use BPF with maps one day.
> >
> >  
> Hi Stefano,
> 
> If you want to experiment with BPF, Joe and I have some prototype.
> We implemented the upcall mechanism using BPF perf event helper function
> https://github.com/williamtu/ovs-ebpf/blob/master/bpf/datapath.c#L62
> 
> And there are threads polling the perf ring buffer to receive packets from
> BPF.
> https://github.com/williamtu/ovs-ebpf/blob/master/lib/perf-event.c#L232

Interesting, thanks for the pointers!

> If I follow the discussion correctly, before upcall, you need to queue
> packets based on different configurations (vport/hash/vni/5-tuple/...)
> and queue to different buckets when congestion happens.

Yes, correct.

> In this case, you
> probably needs a BPF map to enqueue/dequeue the packet.BPF queue map is
> not supported yet, but there is patch available:
> [iovisor-dev] [RFC PATCH 1/3] bpf: add bpf queue map
> 
> So how to enqueue and dequeue packets depends on user's BPF implementation.
> This allows fairness scheme to be extensible.

For the moment being we'll try to ensure that BPF can be plugged there
rather easily. I see the advantage, but I'd rather do this as a second
step.

-- 
Stefano

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ