All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Add packet capture support on macvtap device
@ 2013-12-11 18:27 Vlad Yasevich
  2013-12-11 18:27 ` [PATCH net-next 1/2] macvtap: Add support of packet capture " Vlad Yasevich
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Vlad Yasevich @ 2013-12-11 18:27 UTC (permalink / raw)
  To: netdev; +Cc: mst, kaber, Vlad Yasevich

Change from RFC:
  - moved to the rx_handler approach.

This series adds support for packet capturing on macvtap device.
The initial approach was to simply export the capturing code as
a function from the core network.  While simple, it was not
a very architecturally clean approach.

The new appraoch is to provide macvtap with its rx_handler which can
is attached to the macvtap device itself.   Macvlan will simply requeue
the packet with an updated skb->dev.  BTW, macvlan layer already does this
for macvlan devices.  So, now macvtap and macvlan have almost the
same exact input path.

I've toyed with short-circuting the input path for macvtap by returning
RX_HANDLER_ANOTHER, but that just made the code more complicated and
didn't provide any kind of measurable gain (at least according to
netperf and perf runs on the host).

To see if there was a performance regression, I ran 1, 2 and 4 netperf
STREAM and MAERTS tests agains the VM from both remote host and another
guest on the same system.   The command ran was
    netperf -H $host -t $test -l 20 -i 10 -I 95 -c -C

The numbers I was getting with the new code were consistently very
slightly (1-2%) better then the old code.  I don't consider this
an improvement, but it's not a regression! :)

Running 'perf record' on the host didn't show any new hot spots
and cpu utilization stayed about the same.  This was better
then I expected from simply looking at the code.

Vlad Yasevich (2):
  macvtap: Add support of packet capture on macvtap device.
  macvlan: Remove custom recieve and forward handlers

 drivers/net/macvlan.c      | 17 ++++---------
 drivers/net/macvtap.c      | 63 +++++++++++++++++++++++++---------------------
 include/linux/if_macvlan.h |  7 +-----
 3 files changed, 41 insertions(+), 46 deletions(-)

-- 
1.8.4.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-12 18:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-11 18:27 [PATCH net-next 0/2] Add packet capture support on macvtap device Vlad Yasevich
2013-12-11 18:27 ` [PATCH net-next 1/2] macvtap: Add support of packet capture " Vlad Yasevich
2013-12-12  3:45   ` Jason Wang
2013-12-12 17:23     ` Vlad Yasevich
2013-12-11 18:27 ` [PATCH net-next 2/2] macvlan: Remove custom recieve and forward handlers Vlad Yasevich
2013-12-11 21:44 ` [PATCH net-next 0/2] Add packet capture support on macvtap device David Miller
2013-12-12 18:39 ` David Miller

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.