Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-22 Thread Tom Herbert
On Mon, May 22, 2017 at 1:42 PM, Jesper Dangaard Brouer wrote: > On Mon, 22 May 2017 08:39:35 +0200 > Jesper Dangaard Brouer wrote: > >> On Sun, 21 May 2017 15:10:29 -0700 >> Tom Herbert wrote: >> >> > On Sun, May 21, 2017 at 9:04 AM, Jesper Dangaard Brouer >> > wrote: >> > > On Sat, 20 May 201

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-22 Thread Jesper Dangaard Brouer
On Mon, 22 May 2017 08:39:35 +0200 Jesper Dangaard Brouer wrote: > On Sun, 21 May 2017 15:10:29 -0700 > Tom Herbert wrote: > > > On Sun, May 21, 2017 at 9:04 AM, Jesper Dangaard Brouer > > wrote: > > > On Sat, 20 May 2017 09:16:09 -0700 > > > Tom Herbert wrote: > > > > > >> > +/* XDP rx

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-21 Thread Jesper Dangaard Brouer
On Sun, 21 May 2017 15:10:29 -0700 Tom Herbert wrote: > On Sun, May 21, 2017 at 9:04 AM, Jesper Dangaard Brouer > wrote: > > On Sat, 20 May 2017 09:16:09 -0700 > > Tom Herbert wrote: > > > >> > +/* XDP rxhash have an associated type, which is related to the RSS > >> > + * (Receive Side Scalin

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-21 Thread John Fastabend
On 05/21/2017 08:21 PM, Alexei Starovoitov wrote: > On Sun, May 21, 2017 at 05:55:50PM +0200, Jesper Dangaard Brouer wrote: >>> And it looks useful to me, but >> >>> 1. i'm worried that we'd be relying on something that mellanox didn't >>> implement in their drivers before. Was it tested and guarn

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-21 Thread Alexei Starovoitov
On Sun, May 21, 2017 at 05:55:50PM +0200, Jesper Dangaard Brouer wrote: > > And it looks useful to me, but > > > 1. i'm worried that we'd be relying on something that mellanox didn't > > implement in their drivers before. Was it tested and guarnteed to > > exist in the future revisions of firmwa

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-21 Thread Tom Herbert
On Sun, May 21, 2017 at 9:04 AM, Jesper Dangaard Brouer wrote: > On Sat, 20 May 2017 09:16:09 -0700 > Tom Herbert wrote: > >> > +/* XDP rxhash have an associated type, which is related to the RSS >> > + * (Receive Side Scaling) standard, but NIC HW have different mapping >> > + * and support. Thu

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-21 Thread Jesper Dangaard Brouer
On Sat, 20 May 2017 09:16:09 -0700 Tom Herbert wrote: > > +/* XDP rxhash have an associated type, which is related to the RSS > > + * (Receive Side Scaling) standard, but NIC HW have different mapping > > + * and support. Thus, create mapping that is interesting for XDP. XDP > > + * would primar

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-21 Thread Jesper Dangaard Brouer
On Fri, 19 May 2017 20:07:52 -0700 Alexei Starovoitov wrote: > On Thu, May 18, 2017 at 05:41:48PM +0200, Jesper Dangaard Brouer wrote: > > > > +/* XDP rxhash have an associated type, which is related to the RSS > > + * (Receive Side Scaling) standard, but NIC HW have different mapping > > + * a

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-20 Thread Tom Herbert
On Thu, May 18, 2017 at 8:41 AM, Jesper Dangaard Brouer wrote: > Introducing a new XDP feature and associated bpf helper bpf_xdp_rxhash. > > The rxhash and type allow filtering on packets without touching > packet memory. The performance difference on my system with a > 100 Gbit/s mlx5 NIC is 12M

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-19 Thread Jakub Kicinski
On Fri, 19 May 2017 20:34:00 -0700, Alexei Starovoitov wrote: > On Fri, May 19, 2017 at 08:21:47PM -0700, Jakub Kicinski wrote: > > On Fri, 19 May 2017 20:07:52 -0700, Alexei Starovoitov wrote: > > > How about exposing 'struct mlx5_cqe64 *' to XDP programs as-is? > > > We can make sure that XDP p

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-19 Thread Alexei Starovoitov
On Fri, May 19, 2017 at 08:21:47PM -0700, Jakub Kicinski wrote: > On Fri, 19 May 2017 20:07:52 -0700, Alexei Starovoitov wrote: > > How about exposing 'struct mlx5_cqe64 *' to XDP programs as-is? > > We can make sure that XDP program does read only access into it and > > it will see cqe->rss_hash_r

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-19 Thread Jakub Kicinski
On Fri, 19 May 2017 20:07:52 -0700, Alexei Starovoitov wrote: > How about exposing 'struct mlx5_cqe64 *' to XDP programs as-is? > We can make sure that XDP program does read only access into it and > it will see cqe->rss_hash_result, cqe->rss_hash_type and everything else > in there, but this will

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-19 Thread Alexei Starovoitov
On Thu, May 18, 2017 at 05:41:48PM +0200, Jesper Dangaard Brouer wrote: > > +/* XDP rxhash have an associated type, which is related to the RSS > + * (Receive Side Scaling) standard, but NIC HW have different mapping > + * and support. Thus, create mapping that is interesting for XDP. XDP > + *

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-19 Thread Jesper Dangaard Brouer
On Thu, 18 May 2017 17:41:48 +0200 Jesper Dangaard Brouer wrote: > Introducing a new XDP feature and associated bpf helper bpf_xdp_rxhash. > > The rxhash and type allow filtering on packets without touching > packet memory. The performance difference on my system with a > 100 Gbit/s mlx5 NIC is

[RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-18 Thread Jesper Dangaard Brouer
Introducing a new XDP feature and associated bpf helper bpf_xdp_rxhash. The rxhash and type allow filtering on packets without touching packet memory. The performance difference on my system with a 100 Gbit/s mlx5 NIC is 12Mpps to 19Mpps. TODO: desc RXHASH and associated type, and how XDP choose