All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] vlan packet handling in ixgbevf driver when in promiscuous mode
@ 2015-05-29 20:59 Chris Friesen
  2015-06-01 16:48 ` Rose, Gregory V
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Friesen @ 2015-05-29 20:59 UTC (permalink / raw)
  To: intel-wired-lan

Hi,

I'm doing some work with ixgbevf in the 3.10 kernel, but the current linux 
kernel git version seems to have similar behaviour.

Basically I'm interested in doing packet sniffing in a VM guest using PCI 
passthrough of a VF of an 82599.

What I'm seeing is that if I register for a vlan in the guest (creating 
eth1.100, for example) and then run tcpdump on the underlying device (eth1, for 
example) then I see the packet with the vlan header in it.

If I remove that vlan, then I see the packet with no vlan header.

I think this is coming from ixgbevf_receive_skb() in 3.10 (or 
ixgbevf_process_skb_fields() in current upstream git) where it has code that 
looks like this:

	if (test_bit(vid & VLAN_VID_MASK, active_vlans))
		__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);

While this makes sense for normal operation (where traffic from other vlans 
isn't coming in anyways) I don't think it makes sense when promiscuous mode is 
enabled.

In promiscuous mode I want to be able to see exactly what packets are coming on 
the (virtual) wire, so I should be able to see the vlan header even if I haven't 
actually registered for that vlan.

Basically I think that code above should add an "or device is in promiscuous 
mode" clause.

Thoughts?

Chris

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

end of thread, other threads:[~2015-06-04 21:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 20:59 [Intel-wired-lan] vlan packet handling in ixgbevf driver when in promiscuous mode Chris Friesen
2015-06-01 16:48 ` Rose, Gregory V
2015-06-02  0:01   ` Chris Friesen
2015-06-02  0:47     ` Hiroshi Shimamoto
2015-06-02  3:18       ` Alexander Duyck
2015-06-04 15:54     ` Rose, Gregory V
2015-06-04 18:31       ` Chris Friesen
2015-06-04 20:34         ` Alexander Duyck
2015-06-04 20:45           ` Chris Friesen
2015-06-04 21:02             ` Alexander Duyck

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.