diff options
author | Eric Garver <e@erig.me> | 2016-09-07 19:56:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-09 03:10:28 +0300 |
commit | 018c1dda5ff1e7bd1fe2d9fd1d0f5b82dc6fc0cd (patch) | |
tree | ccedb1acda9922d975903894776dcfb853fc3c2d /net/openvswitch/vport.c | |
parent | fe19c4f971a55cea3be442d8032a5f6021702791 (diff) | |
download | linux-018c1dda5ff1e7bd1fe2d9fd1d0f5b82dc6fc0cd.tar.xz |
openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes
Add support for 802.1ad including the ability to push and pop double
tagged vlans. Add support for 802.1ad to netlink parsing and flow
conversion. Uses double nested encap attributes to represent double
tagged vlan. Inner TPID encoded along with ctci in nested attributes.
This is based on Thomas F Herbert's original v20 patch. I made some
small clean ups and bug fixes.
Signed-off-by: Thomas F Herbert <thomasfherbert@gmail.com>
Signed-off-by: Eric Garver <e@erig.me>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport.c')
-rw-r--r-- | net/openvswitch/vport.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index 6b21fd068d87..8f198437c724 100644 --- a/net/openvswitch/vport.c +++ b/net/openvswitch/vport.c @@ -485,9 +485,14 @@ static unsigned int packet_length(const struct sk_buff *skb) { unsigned int length = skb->len - ETH_HLEN; - if (skb->protocol == htons(ETH_P_8021Q)) + if (skb_vlan_tagged(skb)) length -= VLAN_HLEN; + /* Don't subtract for multiple VLAN tags. Most (all?) drivers allow + * (ETH_LEN + VLAN_HLEN) in addition to the mtu value, but almost none + * account for 802.1ad. e.g. is_skb_forwardable(). + */ + return length; } |