All of lore.kernel.org
 help / color / mirror / Atom feed
* Transmit VLAN with AF_PACKET
@ 2019-06-12 15:10 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2019-06-12 15:10 UTC (permalink / raw)
  To: netdev

Sending VLAN packets through AF_PACKET over Hyper-V netvsc driver doesn't work now.
The question is what is best option for fixing it?

AF_PACKET handles VLAN stripping on receive, but there currently is no mechanism
for VLAN offload on transmit. Instead an application may form a raw packet with
a VLAN header and inject it into the kernel. This works fine for most drivers.

The problem is that in order to send a VLAN packet through Hyper-V, the VLAN
tag must be stripped and placed in the NDIS meta data. If the VLAN header is
inline in the packet it gets dropped by the vswitch rules as an invalid packet.

There a several options for fixing this and would like some consensus.

Option #1: Add code in netvsc transmit to look at packet and do a
VLAN pop if necessary before doing the normal VLAN tag handling on
transmit.

Option #2: Do a generic solution in AF_PACKET so that if application
sends a packet with VLAN header, it gets popped and inserted into skb.

Option #3: Add new tpacket header on transmit to match the Rx VLAN
tag strip on receive.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-12 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 15:10 Transmit VLAN with AF_PACKET Stephen Hemminger

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.