tcpdump mailing list archives

[PATCH 00/04]: libpcap: VLAN acceleration support


From: Patrick McHardy <kaber () trash net>
Date: Fri, 18 Jul 2008 20:06:50 +0200

Currently libpcap can't properly deal with VLAN packets tagged
or stripped by the hardware. On RX the packets are simply not
visible at all (this is a pure kernel problem though), on TX
without the VLAN tag.

The upcoming kernel version (2.6.27) will preserve the tag on RX
(its already present in the meta data on TX) and deliver it to
packet sockets in the auxillary data. The end result is that
VLAN acceleration behaves exactly as pure software VLANs. See
this patch for reference:

http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=393e52e33c6c26ec7db290dab803bac1bed962d4

These patches add support to libpcap to retrieve the tag from
the auxillary data/tpacket2_hdr and reconstruct the original
VLAN header.

Changes since last posting:

- Forward port to latest CVS version
- Avoid moving the entire payload around by reserving some room
  at the head of the buffer
- Add TPACKET_V2 support for mmaped packet sockets
- Add patch to reconstruct VLAN header when using mmaped packet
  sockets

The patches are compile-time and run-time compatible with
old headers and kernels.

Please keep me CCed, I'm not subscribed to the list.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: