datapath: Don't drop MTU-sized VLAN packets from userspace
authorJustin Pettit <jpettit@nicira.com>
Sat, 5 Sep 2009 00:03:22 +0000 (17:03 -0700)
committerJustin Pettit <jpettit@nicira.com>
Sat, 5 Sep 2009 05:19:15 +0000 (22:19 -0700)
commita393b897f27405592dc56f7084796c8bf1815519
treef96a683322962ce3b9273edfb3f2be0d6a8df02e
parent692c92e092226edcbbbf45466fd31ac09323d526
datapath: Don't drop MTU-sized VLAN packets from userspace

Before transimitting a packet, the datapath checks that the packet
length is not greater than the MTU.  It determines the length based on
the 'protocol' field in the skb.  If 'protocol' is ETH_P_8021Q, it reduces
the packet length as stored in the 'len' field by four bytes, which
is the size of a VLAN tag header.  Unfortunately, packets that arrived
from userspace were not having the 'protocol' field set, which would
cause MTU-sized packets to be dropped.  This commit sets the 'protocol'
field appropriately.

Thanks to Ben Pfaff for the help diagnosing this issue.

NIC-17 and NIC-26
datapath/datapath.c