ether: add soft vlan encap/decap
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 9 Feb 2015 01:13:54 +0000 (09:13 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 20 Feb 2015 18:18:47 +0000 (19:18 +0100)
commitc974021a59493dce58aea1076d07243728e36e4d
treefff6a32d5571869aa70b8568ee3ffe399daf7a81
parent9ffd50826f3ec8c9e23ff0bd3c35ce9f614c66c4
ether: add soft vlan encap/decap

It is helpful to allow device drivers that don't support hardware
VLAN stripping to emulate this in software. This allows application
to be device independent.

Avoid discarding shared mbufs. Make a copy in rte_vlan_insert() of any
packet to be tagged that has a reference count > 1.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
lib/librte_ether/rte_ether.h