From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 19EF03775 for ; Fri, 15 May 2015 15:56:15 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 15 May 2015 06:56:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,434,1427785200"; d="scan'208";a="710714750" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga001.fm.intel.com with ESMTP; 15 May 2015 06:56:13 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.73]) by IRSMSX101.ger.corp.intel.com ([169.254.1.217]) with mapi id 14.03.0224.002; Fri, 15 May 2015 14:56:13 +0100 From: "Ananyev, Konstantin" To: "Assaad, Sami (Sami)" , "Richardson, Bruce" , Stephen Hemminger Thread-Topic: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)? Thread-Index: AdCOjk4sR+QxMfZpRpCFxRUJ6L7QSgACaCOAABRBmoAAAisswAAFP2MAAAO9guA= Date: Fri, 15 May 2015 13:56:13 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772582142F48B@irsmsx105.ger.corp.intel.com> References: <9478F0FB69DAA249AF0A9BDA1E6ED95218817AB9@US70TWXCHMBA07.zam.alcatel-lucent.com> <20150514164719.7b68b0ef@urahara> <20150515092719.GA1520@bricha3-MOBL3> <2601191342CEEE43887BDE71AB9772582142F279@irsmsx105.ger.corp.intel.com> <9478F0FB69DAA249AF0A9BDA1E6ED95218818190@US70TWXCHMBA07.zam.alcatel-lucent.com> In-Reply-To: <9478F0FB69DAA249AF0A9BDA1E6ED95218818190@US70TWXCHMBA07.zam.alcatel-lucent.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)? 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: Fri, 15 May 2015 13:56:16 -0000 > -----Original Message----- > From: Assaad, Sami (Sami) [mailto:sami.assaad@alcatel-lucent.com] > Sent: Friday, May 15, 2015 2:00 PM > To: Ananyev, Konstantin; Richardson, Bruce; Stephen Hemminger > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] How do you setup a VM in Promiscuous Mode using P= CI Pass-Through (SR-IOV)? >=20 > Thanks Konstantin for your reply. >=20 > Konstantin, >=20 > Would you be able in providing more details as to ixgbe VF mirroring? > Would you have any valuable URL's or documentation that explain this in d= etail and/or provide examples? I didn't use it much, but you can have a look at rte_eth_mirror_rule_set()/= rte_eth_mirror_rule_reset(). Also you can use testpmd as a reference how to use these functions. Let say: 1. start testpmd with PF and 2 VFs on the same port: ./dpdk.org/x86_64-native-linuxapp-gcc/app/testpmd -l 6,7 -n 4 --socket-mem= =3D1024,0 -w 07:00.1 -w 07:10.1 -w 07:10.3 -- -i --no-flush-rx testpmd> set verbose 9 testpmd> set fwd rxonly testpmd> start 2. Send a packet to the port and confirm that only PF/queue 0 received it. Should see something like that: port 0/queue 0: received 1 packets src=3D00:00:0A:00:0E:00 - dst=3D00:00:0A:00:0F:00 - type=3D0x0800 - lengt= h=3D60 - nb_segs=3D1 - Receive queue=3D0x0 PKT_RX_IPV4_HDR 3. configure 2 mirror rules, so each VF receive a copy: =20 testpmd> set port 0 mirror-rule 1 uplink-mirror dst-pool 32 on testpmd> set port 0 mirror-rule 0 uplink-mirror dst-pool 33 on 4. Send another packet and confirm that PF and both VF received a copy port 0/queue 0: received 1 packets src=3D00:00:0A:00:0E:00 - dst=3D00:00:0A:00:0F:00 - type=3D0x0800 - lengt= h=3D60 - nb_segs=3D1 - Receive queue=3D0x0 PKT_RX_IPV4_HDR port 1/queue 0: received 1 packets src=3D00:00:0A:00:0E:00 - dst=3D00:00:0A:00:0F:00 - type=3D0x0800 - lengt= h=3D64 - nb_segs=3D1 - Receive queue=3D0x0 PKT_RX_IPV4_HDR port 2/queue 0: received 1 packets src=3D00:00:0A:00:0E:00 - dst=3D00:00:0A:00:0F:00 - type=3D0x0800 - lengt= h=3D64 - nb_segs=3D1 - Receive queue=3D0x0 PKT_RX_IPV4_HDR Konstantin >=20 > Thanks in advance. >=20 > Best Regards, > Sami. >=20 > -----Original Message----- > From: Ananyev, Konstantin [mailto:konstantin.ananyev@intel.com] > Sent: Friday, May 15, 2015 5:31 AM > To: Richardson, Bruce; Stephen Hemminger > Cc: dev@dpdk.org; Assaad, Sami (Sami) > Subject: RE: [dpdk-dev] How do you setup a VM in Promiscuous Mode using P= CI Pass-Through (SR-IOV)? >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > > Sent: Friday, May 15, 2015 10:27 AM > > To: Stephen Hemminger > > Cc: dev@dpdk.org; Assaad, Sami (Sami) > > Subject: Re: [dpdk-dev] How do you setup a VM in Promiscuous Mode using= PCI Pass-Through (SR-IOV)? > > > > On Thu, May 14, 2015 at 04:47:19PM -0700, Stephen Hemminger wrote: > > > On Thu, 14 May 2015 21:38:24 +0000 > > > "Assaad, Sami (Sami)" wrote: > > > > > > > Hello, > > > > > > > > My Hardware consists of the following: > > > > - DL380 Gen 9 Server supporting two Haswell Processors (Xeon CPU = E5-2680 v3 @ 2.50GHz) > > > > - An x540 Ethernet Controller Card supporting 2x10G ports. > > > > > > > > Software: > > > > - CentOS 7 (3.10.0-229.1.2.el7.x86_64) > > > > - DPDK 1.8 > > > > > > > > I want all the network traffic received on the two 10G ports to be > > > > transmitted to my VM. The issue is that the Virtual Function / > > Physical Functions have setup the internal virtual switch to only > > route Ethernet packets with destination MAC address matching the VM > > virtual interface MAC. How can I configure my virtual environment to pr= ovide all network traffic to the VM...i.e. set the virtual > functions for both PCI devices in Promiscuous mode? > > > > > > > > [ If a l2fwd-vf example exists, this would actually solve this > > > > problem ... Is there a DPDK l2fwd-vf example available? ] > > > > > > > > > > > > Thanks in advance. > > > > > > > > Best Regards, > > > > Sami Assaad. > > > > > > This is a host side (not DPDK) issue. > > > > > > Intel PF driver will not allow guest (VF) to go into promiscious > > > mode since it would allow traffic stealing which is a security violat= ion. > > > > Could you maybe try passing the PF directly into the VM, rather than a > > VF based off it? Since you seem to want all traffic to go to the one > > VM, there seems little point in creating a VF on the device, and > > should let the VM control the whole NIC directly. >=20 > As I remember, with ixgbe it is possible to make one VF a mirror (receive= a copy of all traffic). > Konstantin >=20 > > > > Regards, > > /Bruce