From: Jesse Gross Date: Mon, 7 Feb 2011 23:50:04 +0000 (-0800) Subject: datapath: Don't use vlan_features before 2.6.26. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d8916e58fe0592c2c0f3161f4287ce962269b7f;p=openvswitch datapath: Don't use vlan_features before 2.6.26. Support for offloading over vlans wasn't introduced until 2.6.26, so do full software emulation on kernels before that when dealing with vlan packets. Reported-by: Justin Pettit Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c index 21fa6a0e..11faf8ad 100644 --- a/datapath/vport-netdev.c +++ b/datapath/vport-netdev.c @@ -277,7 +277,11 @@ static int netdev_send(struct vport *vport, struct sk_buff *skb) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) if (vlan_tx_tag_present(skb)) { int err; - int features = skb->dev->features & skb->dev->vlan_features; + int features = 0; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) + features = skb->dev->features & skb->dev->vlan_features; +#endif err = vswitch_skb_checksum_setup(skb); if (unlikely(err)) {