datapath: Use strip_vlan() for modify_vlan_tci().
authorJesse Gross <jesse@nicira.com>
Mon, 6 Jun 2011 23:11:47 +0000 (16:11 -0700)
committerJesse Gross <jesse@nicira.com>
Thu, 16 Jun 2011 21:41:15 +0000 (14:41 -0700)
commit1d0f14d4c1da6e67234c0c43db66721cd7fbac98
treef3ba010705e2368e9ead7872d4824ab0299b78e1
parentb328b55b4a34b2bb4ea22d5a58ae10f3779cb761
datapath: Use strip_vlan() for modify_vlan_tci().

The sematics for setting a vlan tag are to modify the existing tag
if one exists.  This can be expressed as removing the existing tag
first and then adding a new one.  This simplifies the code by not
requiring two copies of the logic that manipulates non-accelerated
vlans and should not make a performance difference because the vlan
tag is contained in a single cache line.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/actions.c