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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170418222616.4761a781@redhat.com>
Date:   Tue, 18 Apr 2017 22:26:16 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     Andy Gospodarek <andy@...yhouse.net>
Cc:     Alexei Starovoitov <alexei.starovoitov@...il.com>,
        David Miller <davem@...emloft.net>, michael.chan@...adcom.com,
        netdev@...r.kernel.org, xdp-newbies@...r.kernel.org,
        brouer@...hat.com
Subject: Re: [PATCH v4 net-next RFC] net: Generic XDP


On Tue, 18 Apr 2017 15:05:35 -0400 Andy Gospodarek <andy@...yhouse.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ