# Re: \[PATCH net-next v2 2/3\] openvswitch: remove unreachable code in vlan parsing

- From: Pravin Shelar \<hidden\>
- Date: 2016-10-06 05:22:20 
- List: netdev
- Page: https://ratatoskr.run/netdev/2016/10/11031242
- Thread: https://ratatoskr.run/netdev/2016/10/11031207/t.md

```text
On Wed, Oct 5, 2016 at 6:07 AM, Jiri Benc [ref] wrote:
> Now when the first vlan tag is always in skb->vlan_tci, drop code that
> assumed it might not be the case.
>
User can turn off TX vlan offload for OVS internal device that would
allow vlan tagged packet with vlan header on the skb-data. This case
will cause issue here.

We could handle this case by not allowing this configuration.

> This patch also removes the wrong likely() statement around
> skb_vlan_tag_present introduced by 018c1dda5ff1 ("openvswitch: 802.1AD Flow
> handling, actions, vlan parsing, netlink attributes"). This code is called
> whenever flow key is being extracted from the packet, the packet may be as
> likely vlan tagged as not.
>
> Signed-off-by: Jiri Benc <redacted>
```
