Bug 1278698

Summary: The packets that SR-IOV instances receive contains a vlan tag
Product: Red Hat OpenStack Reporter: Chen <cchen>
Component: openstack-neutronAssignee: Assaf Muller <amuller>
Status: CLOSED NOTABUG QA Contact: Ofer Blaut <oblaut>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0 (Kilo)CC: amuller, beagles, chrisw, fbaudin, nyechiel, sputhenp, srevivo, tfreger
Target Milestone: ---Keywords: ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-02 05:53:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chen 2015-11-06 08:14:15 UTC
Description of problem:

The packets that SR-IOV instances receive contains a vlan tag

Version-Release number of selected component (if applicable):

OSP 7

How reproducible:

100%

Steps to Reproduce:
1. Recompile the igbvf to let it print vlan ID to the /var/log/messages


static void igbvf_receive_skb(struct igbvf_adapter *adapter,
                              struct net_device *netdev,
                              struct sk_buff *skb,
                              u32 status, u16 vlan)
{
        u16 vid;
        if (status & E1000_RXD_STAT_VP) {
                if ((adapter->flags & IGBVF_FLAG_RX_LB_VLAN_BSWAP) &&
                    (status & E1000_RXDEXT_STATERR_LB))
                        vid = be16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
                else
                        vid = le16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
                if (test_bit(vid, adapter->active_vlans))
                        __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
        }

        pr_info("The vlan id is %d\n", vid);  <------ 

        napi_gro_receive(&adapter->rx_ring->napi, skb);
}

2. Check the /var/log/messages while ping the targeted VM.

Actual results:

You will find the following messages in /var/log/messages.

Nov  6 03:10:13 localhost kernel: igbvf: The vlan id is 101
Nov  6 03:10:18 localhost kernel: igbvf: The vlan id is 101
Nov  6 03:10:18 localhost kernel: igbvf: The vlan id is 101
Nov  6 03:10:19 localhost kernel: igbvf: The vlan id is 101

Expected results:

The packet shouldn't contain vlan tag when arriving at the VM.

Additional info:

Some drivers don't have the ability to strip the vlan tag. For example, one of the customers is using DPDK to handle the packet but DPDK doesn't strip the vlan tag, which leads to packet drop in instances.