summaryrefslogtreecommitdiff
path: root/include/linux/if_macvlan.h
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2013-12-11 22:27:10 +0400
committerDavid S. Miller <davem@davemloft.net>2013-12-12 22:38:39 +0400
commit6acf54f1cf0a6747bac9fea26f34cfc5a9029523 (patch)
tree8d115f3bc8e058587e848b1e8150032d10e20a0c /include/linux/if_macvlan.h
parent70f5613271744c8375d5d20a6685a58a9fdcaf8a (diff)
downloadlinux-6acf54f1cf0a6747bac9fea26f34cfc5a9029523.tar.xz
macvtap: Add support of packet capture on macvtap device.
Macvtap device currently doesn not allow a user to capture traffic on due to the fact that it steals the packets from the network stack before the skb->dev is set correctly on the receive side, and that use uses macvlan transmit path directly on the send side. As a result, we never get a change to give traffic to the taps while the correct device is set in the skb. This patch makes macvtap device behave almost exaclty like macvlan. On the send side, we switch to using dev_queue_xmit(). On the receive side, to deliver packets to macvtap, we now use netif_rx and dev_forward_skb just like macvlan. The only differnce now is that macvtap has its own rx_handler which is attached to the macvtap netdev. It is here that we now steal the packet and provide it to the socket. As a result, we can now capture traffic on the macvtap device: tcpdump -i macvtap0 It also gives us the abilit to add tc actions to the macvtap device and actually utilize different bandwidth management queues on output. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_macvlan.h')
0 files changed, 0 insertions, 0 deletions