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: <20131120.152029.1712178262809565940.davem@davemloft.net>
Date:	Wed, 20 Nov 2013 15:20:29 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	vyasevic@...hat.com
Cc:	mst@...hat.com, netdev@...r.kernel.org
Subject: Re: [RFC net-next PATCH] macvtap: Add packet capture support

From: Vlad Yasevich <vyasevic@...hat.com>
Date: Wed, 20 Nov 2013 15:10:39 -0500

> I don't know if "better" is what I'd say here.  With the current code,
> if no-one is capturing, the cost is that of "if list_empty".  If
> I switch to rx_handler approach, the cost goes up on every packet even
> if no-one is capture.  The call stack ends up beeing really silly:
>   _netif_receive_skb_core()
>      macvlan_handle_frame()
>        macvtap_receive()
>          return RX_HANDLER_ANOTHER;
>      macvtap_handle_frame()
>          consume.
> 
> Yes, this approach seems to fit in better with the architecture of the
> stack, but boy, it looks inefficient.

It is cheaper than:

>      macvlan_handle_frame()
>        macvtap_receive()
>          netif_receive_skb()
>      ....
>      reprocess software interrupt

etc. etc.

With the rx_handler approach we're just iterating to a function call
which consumes the SKB, that whole code path is pretty much guarenteed
to be in the CPUs I-cache the second time.

I look forward to seeing your perf data :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ