All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Andy Gospodarek <andy@greyhouse.net>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	David Miller <davem@davemloft.net>,
	michael.chan@broadcom.com, netdev@vger.kernel.org,
	xdp-newbies@vger.kernel.org, brouer@redhat.com
Subject: Re: [PATCH v4 net-next RFC] net: Generic XDP
Date: Tue, 18 Apr 2017 22:26:16 +0200	[thread overview]
Message-ID: <20170418222616.4761a781@redhat.com> (raw)
In-Reply-To: <20170418190535.GG4730@C02RW35GFVH8.dhcp.broadcom.net>


On Tue, 18 Apr 2017 15:05:35 -0400 Andy Gospodarek <andy@greyhouse.net> wrote:

> On Fri, Apr 14, 2017 at 05:59:51PM -0700, Alexei Starovoitov wrote:
> > On Thu, Apr 13, 2017 at 04:23:15PM -0400, David Miller wrote:  
> > > +
> > > +	switch (act) {
> > > +	case XDP_TX:
> > > +		__skb_push(skb, skb->mac_len);  
> > 
> > s/skb->mac_len/mac_len/
> >   
> 
[...]
> 
> When using this change above suggested by Alexei, XDP_DROP and XDP_TX
> actions appear to work well with xdp1 and xdp2.

Also adjusted patch accordingly.

Ran a few quick tests today, but just against an really old e1000 NIC
attached to a PCI-bus (32bit).  There were not difference between DROP
and PASS, but this is likely due to a NIC HW limit.

Sender were sending 951,146 pps (<= tx_queue_0_packets /sec)

$ sudo ./xdp_bench01_mem_access_cost --readmem --action XDP_DROP --dev e1000
XDP_action   pps        pps-human-readable mem      
XDP_DROP     671975     671,975            read     
XDP_DROP     671997     671,997            read     
XDP_DROP     672061     672,061            read     
XDP_DROP     671861     671,861            read     
^CInterrupted: Removing XDP program on ifindex:2 device:e1000

$ sudo ./xdp_bench01_mem_access_cost --readmem --action XDP_PASS --dev e1000
XDP_action   pps        pps-human-readable mem      
XDP_PASS     672032     672,032            read     
XDP_PASS     671910     671,910            read     
XDP_PASS     671926     671,926            read     
XDP_PASS     671947     671,947            read     
^CInterrupted: Removing XDP program on ifindex:2 device:e1000

Program xdp_bench01_mem_access_cost avail here:
 https://github.com/netoptimizer/prototype-kernel/tree/master/kernel/samples/bpf

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

  parent reply	other threads:[~2017-04-18 20:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13 16:09 [PATCH v4 net-next RFC] net: Generic XDP David Miller
2017-04-13 20:16 ` Michael Chan
2017-04-13 20:23   ` David Miller
2017-04-14  1:59     ` [lkp-robot] [net] d1dff7db3b: net/core/dev.c:#suspicious_rcu_dereference_check()usage kernel test robot
2017-04-14  1:59       ` kernel test robot
2017-04-15  0:59     ` [PATCH v4 net-next RFC] net: Generic XDP Alexei Starovoitov
2017-04-15 15:46       ` David Ahern
2017-04-18 19:05       ` Andy Gospodarek
2017-04-18 19:07         ` David Miller
2017-04-18 19:29           ` David Miller
2017-04-18 19:37             ` Andy Gospodarek
2017-04-19 14:29             ` Andy Gospodarek
2017-04-19 17:17               ` Alexei Starovoitov
2017-04-19 17:44                 ` John Fastabend
2017-04-19 20:25                   ` Andy Gospodarek
2017-04-20  0:13                     ` Alexei Starovoitov
2017-04-20  1:40               ` David Miller
2017-04-20 22:09                 ` Andy Gospodarek
2017-04-20 14:30               ` Jesper Dangaard Brouer
2017-04-24 13:18                 ` Jesper Dangaard Brouer
2017-04-18 20:26         ` Jesper Dangaard Brouer [this message]
2017-04-14 16:33 ` William Tu
2017-04-24 14:24 ` Blogpost evaluation this " Jesper Dangaard Brouer
2017-04-24 22:26   ` David Miller
2017-04-25  8:28     ` Jesper Dangaard Brouer
2017-04-25 17:25     ` Andy Gospodarek
2017-04-25 17:31       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170418222616.4761a781@redhat.com \
    --to=brouer@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=xdp-newbies@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.