Thread (7 messages) 7 messages, 3 authors, 2018-08-14

Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

From: Stefano Brivio <hidden>
Date: 2018-08-14 18:13:02

Possibly related (same subject, not in this thread)

Hi William,

On Fri, 10 Aug 2018 07:11:01 -0700
William Tu [off-list ref] wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help