diff options
| author | Jesse Gross <jesse@nicira.com> | 2010-12-30 20:48:38 -0800 |
|---|---|---|
| committer | Jesse Gross <jesse@nicira.com> | 2011-02-07 13:49:00 -0800 |
| commit | 6e0ce48e27d5a845bdc8b57fb41bcec8a54f336a (patch) | |
| tree | d5c2313b0b239c9d5c67e5a963ce724b97b9d055 /datapath/vport-internal_dev.c | |
| parent | a992ec0b06bfddc4e8c2a50d79362b3dfb286dd5 (diff) | |
| download | openvswitch-6e0ce48e27d5a845bdc8b57fb41bcec8a54f336a.tar.gz | |
datapath: Add vlan acceleration field for older kernels.
Kernels prior to 2.6.27 did not have a vlan_tci field in struct
sk_buff for vlan acceleration. It's very convenient to use this
field for manipulating vlan tags, so we would like to use it as
the primary mechanism. To enable this, this commit adds similar
infrastructure to the OVS_CB on the kernels that need it and a
set of functions to use the correct location.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath/vport-internal_dev.c')
| -rw-r--r-- | datapath/vport-internal_dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index 1df618011..be2907454 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -15,6 +15,7 @@ #include "checksum.h" #include "datapath.h" +#include "vlan.h" #include "vport-generic.h" #include "vport-internal_dev.h" #include "vport-netdev.h" @@ -72,6 +73,7 @@ static int internal_dev_mac_addr(struct net_device *dev, void *p) static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) { compute_ip_summed(skb, true); + vlan_copy_skb_tci(skb); OVS_CB(skb)->flow = NULL; vport_receive(internal_dev_priv(netdev)->vport, skb); |
