Re: XDP question: best API for returning/setting egress port?

2017-04-20 Thread Andy Gospodarek
On Wed, Apr 19, 2017 at 11:42:30PM +0200, Daniel Borkmann wrote: > On 04/19/2017 10:02 PM, Andy Gospodarek wrote: > > On Tue, Apr 18, 2017 at 09:58:56PM +0200, Jesper Dangaard Brouer wrote: > > > > > > As I argued in NetConf presentation[1] (from slide #9) we need a port > > > mapping table

Re: XDP question: best API for returning/setting egress port?

2017-04-20 Thread Jesper Dangaard Brouer
On Thu, 20 Apr 2017 00:51:31 +0200 Daniel Borkmann wrote: > On 04/19/2017 10:02 PM, Andy Gospodarek wrote: > [...] > > and then lookup this dest in a table we have the option to make that > > dest an ifindex/socket/other. > > > > I did also look at JohnF's patch and I do

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread John Fastabend
[...] > JohnF, any test results with this you can share? Presumably you tested with > virtio-net, right? > For my patches using the xdp_redirect with virtio-net showed no measurable difference from running just the straight XDP_TX in the PPS column. However virtio_net XDP_TX was quite low to

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Daniel Borkmann
On 04/19/2017 10:02 PM, Andy Gospodarek wrote: [...] and then lookup this dest in a table we have the option to make that dest an ifindex/socket/other. I did also look at JohnF's patch and I do like the simplicity of the redirect action and new ndo_xdp_xmit and how it moves towards a way to

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Daniel Borkmann
On 04/19/2017 10:02 PM, Andy Gospodarek wrote: On Tue, Apr 18, 2017 at 09:58:56PM +0200, Jesper Dangaard Brouer wrote: As I argued in NetConf presentation[1] (from slide #9) we need a port mapping table (instead of using ifindex'es). Both for supporting other "port" types than net_devices

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Andy Gospodarek
On Tue, Apr 18, 2017 at 09:58:56PM +0200, Jesper Dangaard Brouer wrote: > > As I argued in NetConf presentation[1] (from slide #9) we need a port > mapping table (instead of using ifindex'es). Both for supporting > other "port" types than net_devices (think sockets), and for > sandboxing what

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Jesper Dangaard Brouer
On Wed, 19 Apr 2017 14:33:27 +0200 Daniel Borkmann wrote: > On 04/19/2017 02:00 PM, Jesper Dangaard Brouer wrote: > > On Tue, 18 Apr 2017 13:54:45 -0700 > > John Fastabend wrote: > >> On 17-04-18 12:58 PM, Jesper Dangaard Brouer wrote: > >>> >

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Daniel Borkmann
On 04/19/2017 02:00 PM, Jesper Dangaard Brouer wrote: On Tue, 18 Apr 2017 13:54:45 -0700 John Fastabend wrote: On 17-04-18 12:58 PM, Jesper Dangaard Brouer wrote: As I argued in NetConf presentation[1] (from slide #9) we need a port mapping table (instead of using

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Hannes Frederic Sowa
Hi, On 18.04.2017 21:58, Jesper Dangaard Brouer wrote: > > As I argued in NetConf presentation[1] (from slide #9) we need a port > mapping table (instead of using ifindex'es). Both for supporting > other "port" types than net_devices (think sockets), and for > sandboxing what XDP can bypass. >

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Jesper Dangaard Brouer
On Tue, 18 Apr 2017 13:54:45 -0700 John Fastabend wrote: > On 17-04-18 12:58 PM, Jesper Dangaard Brouer wrote: > > > > As I argued in NetConf presentation[1] (from slide #9) we need a port > > mapping table (instead of using ifindex'es). Both for supporting > > other

Re: XDP question: best API for returning/setting egress port?

2017-04-18 Thread John Fastabend
On 17-04-18 12:58 PM, Jesper Dangaard Brouer wrote: > > As I argued in NetConf presentation[1] (from slide #9) we need a port > mapping table (instead of using ifindex'es). Both for supporting > other "port" types than net_devices (think sockets), and for > sandboxing what XDP can bypass. > > I

XDP question: best API for returning/setting egress port?

2017-04-18 Thread Jesper Dangaard Brouer
As I argued in NetConf presentation[1] (from slide #9) we need a port mapping table (instead of using ifindex'es). Both for supporting other "port" types than net_devices (think sockets), and for sandboxing what XDP can bypass. I want to create a new XDP action called XDP_REDIRECT, that