From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 30C16379E for ; Wed, 25 Mar 2015 04:14:46 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 24 Mar 2015 20:14:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,462,1422950400"; d="scan'208";a="670161285" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by orsmga001.jf.intel.com with ESMTP; 24 Mar 2015 20:14:33 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 25 Mar 2015 11:14:32 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.36]) by shsmsx102.ccr.corp.intel.com ([169.254.2.198]) with mapi id 14.03.0224.002; Wed, 25 Mar 2015 11:14:31 +0800 From: "Xu, HuilongX" To: "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi Thread-Index: AQHQYt/xkmaAc/M8rEqP3WZAgMmkzJ0sh5/w Date: Wed, 25 Mar 2015 03:14:30 +0000 Message-ID: References: <1426836708-19861-1-git-send-email-jingjing.wu@intel.com> In-Reply-To: <1426836708-19861-1-git-send-email-jingjing.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 03:14:47 -0000 Tested-by:huilong xu - Tested Commit: 0095bb6dd77a6b4570af27320187e63bf37500c6 - OS: FC20 3.11.10-301.fc20.x86_64 - GCC: gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC) - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz - NIC: Ethernet controller [0200]: Intel Corporation Ethernet Controller X= L710 for 40GbE QSFP+ [8086:1584] - Default x86_64-native-linuxapp-gcc configuration - Total 6 cases, 6 passed, 0 failed =20 1vf/1pf test environment set up: 1.build and install dpdk driver, bind igb_uio to PF 2.create 1vf in host echo 1 > ./devices/pci0000:80/0000:80:02.0/0000:83:00.0/max_vfs 3. dettach VF nic virsh nodedev-dettach pci_0000_83_02_0 4. run testpmd in host ./testpmd -c f -n 4 -- -i --txqflags 5. exec cmd in testpmd a) vlan set strip off all b) rx_vlan add 1 0 6. start vm taskset -c 6-10 qemu-system-x86_64 \ -enable-kvm -m 8192 -smp 2 -cpu host -name dpdk15-vm2 \ -drive file=3D/home/image/vdisk02-sriov-fc20.img \ -net tap,script=3D/etc/qemu-ifup \ -device pci-assign,bus=3Dpci.0,addr=3D0xb,host=3D83:02.0 \ -mem-path /dev/hugepages -mem-prealloc \ -vnc :12 -daemonize 7. in VM build and install dpdk driver ,bind igb_uio to VF 8. run testpmd in VM ./testpmd -c f -n 4 -- -i --txqflags 9. exec cmd lin in vm set promisc all off vlan set strip off all rx_vlan add 1 0 set fwd io start - Case 1: send package dst mac is VF MAC, not include VLAN=20 VF can received package and fwd , ixia can received package, th= is cas passed - Case 2: send package dst mac isn't VF mac,not include VLAN VF can received package and fwd , ixia can received package, th= is cas passed - Case 3: send package dst mac is VF mac and include VLAN ID 1 VF can received package and fwd , ixia can received package and= include VLAN ID 1, this cas passed =20 2vf/1pf test environment set up: 1.build and install dpdk driver, bind igb_uio to PF 2.create 1vf in host echo 2 > ./devices/pci0000:80/0000:80:02.0/0000:83:00.0/max_vfs 3. dettach VF nic virsh nodedev-dettach pci_0000_83_02_0 virsh nodedev-dettach pci_0000_83_02_1 4. run testpmd in host ./testpmd -c f -n 4 -- -i --txqflags 5. exec cmd in testpmd a) vlan set strip off all b) rx_vlan add 1 0 6. start vm taskset -c 6-10 qemu-system-x86_64 \ -enable-kvm -m 8192 -smp 2 -cpu host -name dpdk15-vm2 \ -drive file=3D/home/image/vdisk02-sriov-fc20.img \ -net tap,script=3D/etc/qemu-ifup \ -device pci-assign,bus=3Dpci.0,addr=3D0xb,host=3D83:02.0 \ -device pci-assign,bus=3Dpci.0,addr=3D0xb,host=3D83:02.1 \ -mem-path /dev/hugepages -mem-prealloc \ -vnc :12 -daemonize 7. in VM build and install dpdk driver ,bind igb_uio to VF 8. run testpmd in VM ./testpmd -c f -n 4 -- -i --txqflags 9. exec cmd lin in vm set promisc all off vlan set strip off all rx_vlan add 1 0 set fwd io start - Case 1: send package dst mac is VF MAC, not include VLAN=20 VF can received package and fwd , ixia can received package, th= is cas passed - Case 2: send package dst mac isn't VF mac,not include VLAN VF can received package and fwd , ixia can received package, th= is cas passed - Case 3: send package dst mac is VF mac and include VLAN ID 1 VF can received package and fwd , ixia can received package and= include VLAN ID 1, this cas passed =20 -----Original Message----- From: Wu, Jingjing=20 Sent: Friday, March 20, 2015 3:32 PM To: dev@dpdk.org Cc: Wu, Jingjing; Xu, HuilongX; Zhang, Helin Subject: [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi Disable VEB switching by removing ALLOW_LB on SRIOV vsi. If the source mac address of packet sent from VF is not listed in the VEB's mac table, the VEB will switch the packet back to the VF. It's a hardware issue. Enabling ALLOW_LB flag will block VF functions. Signed-off-by: Jingjing Wu --- lib/librte_pmd_i40e/i40e_ethdev.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_e= thdev.c index cf6685e..28ea5dc 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -3059,11 +3059,15 @@ i40e_vsi_setup(struct i40e_pf *pf, ctxt.connection_type =3D 0x1; ctxt.flags =3D I40E_AQ_VSI_TYPE_VF; =20 - /* Configure switch ID */ - ctxt.info.valid_sections |=3D - rte_cpu_to_le_16(I40E_AQ_VSI_PROP_SWITCH_VALID); - ctxt.info.switch_id =3D - rte_cpu_to_le_16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB); + /** + * Do not configure switch ID to enable VEB switch by + * I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB. Because in Fortville, + * if the source mac address of packet sent from VF is not + * listed in the VEB's mac table, the VEB will switch the + * packet back to the VF. Need to enable it when HW issue + * is fixed. + */ + /* Configure port/vlan */ ctxt.info.valid_sections |=3D rte_cpu_to_le_16(I40E_AQ_VSI_PROP_VLAN_VALID); --=20 1.9.3