DPDK usage discussions
 help / color / mirror / Atom feed
* Re: [dpdk-users] [dpdk-dev] capture packets on VM
       [not found]   ` <OF4ACE2E8C.960EC929-ON65257FF5.003EE48D-65257FF5.003FEF53@tcs.com>
@ 2016-07-19 13:41     ` Pattan, Reshma
  2016-07-20  6:09     ` Raja Jayapal
  1 sibling, 0 replies; 3+ messages in thread
From: Pattan, Reshma @ 2016-07-19 13:41 UTC (permalink / raw)
  To: Raja Jayapal; +Cc: users, De Lara Guarch, Pablo

Hi Raja,

Since this is a usability question this should be discussed under users@dpdk.org<mailto:users@dpdk.org> mailing list. Hence I removed dev@dpdk.org<mailto:dev@dpdk.org>.
Ya actually packets received from port 0 should be transmitted on to port1 and packets received from port1 should go to port2.

Can you paste o/p of  "show config fwd" and also interpret if  traffic on your board is flowing as per existing flow rules.

Ex:
testpmd> show  config fwd
io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support disabled, MP over anonymous pages disabled
Logical Core 5 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01  ==> this means, Streams received on port 0 will be sent on to port1 .
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 ==> this means, Streams received on port1 will be sent onto port0.

Thanks,
Reshma

From: Raja Jayapal [mailto:raja.jayapal@tcs.com]
Sent: Tuesday, July 19, 2016 12:38 PM
To: Pattan, Reshma <reshma.pattan@intel.com>
Cc: dev@dpdk.org
Subject: RE: [dpdk-dev] capture packets on VM

Hi Reshma,

Thanks for your information.
I have been trying to run the testpmd app and would like to get some idea on the packet flow in testpmd.

br0 -----vnet0----- (port0)VM NIC

br1------vnet1------(port1)VM NIC

br2------vnet2------(port2)VM NIC

br0 IP and MAC:
fe:54:00:0d:af:af - 192.168.100.10
br1 IP and MAC:
fe:54:00:4e:5b:df - 192.168.100.20
br2 IP and MAC:
fe:54:00:93:78:6d - 192.168.100.30

Ran testpmd application on VM and sending packets from Host using packeth.

Using PackETH generator, sent traffic from br0 destined to br1(modified the source / destination MAC and IP in packeth tool), but i could see that the packets are received on port0 and transmitted on port2.

Sending packets from br0 to br1:

./testpmd -c 3 -n 4 -- -i --total-num-mbufs=3000
testpmd> show port stats all
  ######################## NIC statistics for port 0  ########################
  RX-packets: 4          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0
  ############################################################################
  ######################## NIC statistics for port 1  ########################
  RX-packets: 0          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0
  ############################################################################
  ######################## NIC statistics for port 2  ########################
  RX-packets: 0          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 4          TX-errors: 0          TX-bytes:  0
  ############################################################################
testpmd>

Second time, sent traffic from br1 to br2, but the packets are received on port2 and transmitted on port0.

Sending packets from br1 to br2:

testpmd> show port stats all
  ######################## NIC statistics for port 0  ########################
  RX-packets: 0          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 6          TX-errors: 0          TX-bytes:  0
  ############################################################################
  ######################## NIC statistics for port 1  ########################
  RX-packets: 6          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0
  ############################################################################
  ######################## NIC statistics for port 2  ########################
  RX-packets: 0          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0
  ############################################################################
testpmd>

Could you please suggest whether this is expected behaviour?
Also suggest if any configuarion needs to be done to make the flow to work correctly.


Thanks,
Raja

-----"Pattan, Reshma" <reshma.pattan@intel.com<mailto:reshma.pattan@intel.com>> wrote: -----
To: Raja Jayapal <raja.jayapal@tcs.com<mailto:raja.jayapal@tcs.com>>
From: "Pattan, Reshma" <reshma.pattan@intel.com<mailto:reshma.pattan@intel.com>>
Date: 07/15/2016 07:33PM
Cc: "dev@dpdk.org<mailto:dev@dpdk.org>" <dev@dpdk.org<mailto:dev@dpdk.org>>
Subject: RE: [dpdk-dev] capture packets on VM

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Raja Jayapal
> Sent: Friday, July 15, 2016 6:55 AM
> To: dev@dpdk.org<mailto:dev@dpdk.org>
> Subject: [dpdk-dev] capture packets on VM
>
> Hi All,
>
> I have installed dpdk on VM and would like to know how to capture the packets
> on dpdk ports.
> I am sending traffic from host  and want to know how to confirm whether the
> packets are flowing via dpdk ports.
> I tried with tcpdump and wireshark but could not capture the packets inside VM.
> setup : bridge1(Host)------- VM(Guest with DPDK) ----- bridge2(Host)
>

Hi,

On DPDK you can capture packets with app/pdump/ tool. This tool is available for use from 16.07RC1.
What you can do is run testpmd and see if packets are seen in testpmd, that confirms if packets are landing on dpdk ports or not.
If you also want to capture packet for analysis, you need to run app/pdump/ tool along with testpmd.
The pdump tool captures the packet to pcap file, so you can use tcpdump -ni <pcap file> to view the packets.
More about the tool usage can be found under doc/guides/sample_app_ug/pdump.rst

Let me know if you need further help on this.

Thanks,
Reshma


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] [dpdk-dev] capture packets on VM
       [not found]   ` <OF4ACE2E8C.960EC929-ON65257FF5.003EE48D-65257FF5.003FEF53@tcs.com>
  2016-07-19 13:41     ` [dpdk-users] [dpdk-dev] capture packets on VM Pattan, Reshma
@ 2016-07-20  6:09     ` Raja Jayapal
  2016-07-20 10:17       ` Pattan, Reshma
  1 sibling, 1 reply; 3+ messages in thread
From: Raja Jayapal @ 2016-07-20  6:09 UTC (permalink / raw)
  To: Pattan, Reshma; +Cc: users, De Lara Guarch, Pablo

Hi Reshma/All,

Please find the "show config fwd" output below.

 testpmd> show config fwd
Warning! Cannot handle an odd number of ports with the current port topology. Configuration must be changed to have an even number of ports, or relaunch application with --port-topology=chained
io packet forwarding - ports=3 - cores=1 - streams=3 - NUMA support disabled, MP over anonymous pages disabled
Logical Core 1 (socket 0) forwards packets on 3 streams:
  RX P=0/Q=0 (socket 0) -> TX P=2/Q=0 (socket 0) peer=02:00:00:00:00:02
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
  RX P=2/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00

As described above, i have modified the topology to have even number of ports.

testpmd> show config fwd
io packet forwarding - ports=4 - cores=1 - streams=4 - NUMA support disabled, MP over anonymous pages disabled
Logical Core 1 (socket 0) forwards packets on 4 streams:
  RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
  RX P=2/Q=0 (socket 0) -> TX P=3/Q=0 (socket 0) peer=02:00:00:00:00:03
  RX P=3/Q=0 (socket 0) -> TX P=2/Q=0 (socket 0) peer=02:00:00:00:00:02

I could confirm that the packet is getting forwarded as per the config and setting the IP and MAC in packet generator does not take effect.
In testpmd app, whatever the MAC/IP is configured on traffic generator, the packets are forwaded in adjacent ports.

If i want to forward the packet based on IP&MAC, will it be achieved by running l2fwd or l3fwd ?

Kindly suggest.

Thanks,
Raja


-----"Pattan, Reshma" <reshma.pattan@intel.com> wrote: -----
To: Raja Jayapal <raja.jayapal@tcs.com>
From: "Pattan, Reshma" <reshma.pattan@intel.com>
Date: 07/19/2016 07:12PM
Cc: "users@dpdk.org" <users@dpdk.org>, "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Subject: RE: [dpdk-dev] capture packets on VM

       
 Hi Raja,
  
 Since this is a usability question this should be discussed under users@dpdk.org mailing list. Hence I removed  dev@dpdk.org. 
 Ya actually packets received from port 0 should be transmitted on to port1 and packets received from port1 should go to port2.
  
 Can you paste o/p of  &#8221;show config fwd&#8221; and also interpret if  traffic on your board is flowing as per existing flow rules.
  
 Ex:
 testpmd> show  config fwd
 io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support disabled, MP over anonymous pages disabled
 Logical Core 5 (socket 0) forwards packets on 2 streams:
   RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01  è  this means, Streams received on port 0 will be sent on to port1 . 
   RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 è this means, Streams received on port1 will be sent onto port0.
  
 Thanks,
 Reshma
  
 
 
 
 From: Raja Jayapal [mailto:raja.jayapal@tcs.com] 
 Sent: Tuesday, July 19, 2016 12:38 PM
 To: Pattan, Reshma <reshma.pattan@intel.com>
 Cc: dev@dpdk.org
 Subject: RE: [dpdk-dev] capture packets on VM
    
 Hi Reshma, 
 
 Thanks for your information.
 I have been trying to run the testpmd app and would like to get some idea on the packet flow in testpmd.
 
 br0 -----vnet0----- (port0)VM NIC
 
 br1------vnet1------(port1)VM NIC
 
 br2------vnet2------(port2)VM NIC
 
 br0 IP and MAC:
 fe:54:00:0d:af:af - 192.168.100.10
 br1 IP and MAC:
 fe:54:00:4e:5b:df - 192.168.100.20
 br2 IP and MAC:
 fe:54:00:93:78:6d - 192.168.100.30
 
 Ran testpmd application on VM and sending packets from Host using packeth.
 
 Using PackETH generator, sent traffic from br0 destined to br1(modified the source / destination MAC and IP in packeth tool), but i could see that the packets are received on port0 and transmitted on port2.
 
 Sending packets from br0 to br1:
 
 ./testpmd -c 3 -n 4 -- -i --total-num-mbufs=3000
 testpmd> show port stats all
   ######################## NIC statistics for port 0  ########################
   RX-packets: 4          RX-missed: 0          RX-bytes:  0
   RX-errors: 0
   RX-nombuf:  0         
   TX-packets: 0          TX-errors: 0          TX-bytes:  0
   ############################################################################
   ######################## NIC statistics for port 1  ########################
   RX-packets: 0          RX-missed: 0          RX-bytes:  0
   RX-errors: 0
   RX-nombuf:  0         
   TX-packets: 0          TX-errors: 0          TX-bytes:  0
   ############################################################################
   ######################## NIC statistics for port 2  ########################
   RX-packets: 0          RX-missed: 0          RX-bytes:  0
   RX-errors: 0
   RX-nombuf:  0         
   TX-packets: 4          TX-errors: 0          TX-bytes:  0
   ############################################################################
 testpmd> 
 
 Second time, sent traffic from br1 to br2, but the packets are received on port2 and transmitted on port0.
 
 Sending packets from br1 to br2:
 
 testpmd> show port stats all
   ######################## NIC statistics for port 0  ########################
   RX-packets: 0          RX-missed: 0          RX-bytes:  0
   RX-errors: 0
   RX-nombuf:  0         
   TX-packets: 6          TX-errors: 0          TX-bytes:  0
   ############################################################################
   ######################## NIC statistics for port 1  ########################
   RX-packets: 6ÿÿÿÿÿÿÿÿÿ RX-missed: 0ÿÿÿÿÿÿÿÿÿ RX-bytes:ÿ 0
 ÿ RX-errors: 0
 ÿ RX-nombuf:ÿ 0ÿÿÿÿÿÿÿÿ 
 ÿ TX-packets: 0ÿÿÿÿÿÿÿÿÿ TX-errors: 0ÿÿÿÿÿÿÿÿÿ TX-bytes:ÿ 0
 ÿ ############################################################################
 ÿ ######################## NIC statistics for port 2ÿ ########################
 ÿ RX-packets: 0ÿÿÿÿÿÿÿÿÿ RX-missed: 0ÿÿÿÿÿÿÿÿÿ RX-bytes:ÿ 0
 ÿ RX-errors: 0
 ÿ RX-nombuf:ÿ 0ÿÿÿÿÿÿÿÿ 
 ÿ TX-packets: 0ÿÿÿÿÿÿÿÿÿ TX-errors: 0ÿÿÿÿÿÿÿÿÿ TX-bytes:ÿ 0
 ÿ ############################################################################
 testpmd> 
 
 Could you please suggest whether this is expected behaviour?
 Also suggest if any configuarion needs to be done to make the flow to work correctly. 
 
 
 Thanks,
 Raja
 
 -----"Pattan, Reshma" <reshma.pattan@intel.com> wrote: -----
 
 
 To: Raja Jayapal <raja.jayapal@tcs.com>
 From: "Pattan, Reshma" <reshma.pattan@intel.com>
 Date: 07/15/2016 07:33PM
 Cc: "dev@dpdk.org" <dev@dpdk.org>
 Subject: RE: [dpdk-dev] capture packets on VM
 
 
 > -----Original Message-----
 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Raja Jayapal
 > Sent: Friday, July 15, 2016 6:55 AM
 > To: dev@dpdk.org
 > Subject: [dpdk-dev] capture packets on VM
 > 
 > Hi All,
 > 
 > I have installed dpdk on VM and would like to know how to capture the packets
 > on dpdk ports.
 > I am sending traffic from hostÿ and want to know how to confirm whether the
 > packets are flowing via dpdk ports.
 > I tried with tcpdump and wireshark but could not capture the packets inside VM.
 > setup : bridge1(Host)------- VM(Guest with DPDK) ----- bridge2(Host)
 > 
 
 Hi,
 
 On DPDK you can capture packets with app/pdump/ tool. This tool is available for use from 16.07RC1. 
 What you can do is run testpmd and see if packets are seen in testpmd, that confirms if packets are landing on dpdk ports or not.
 If you also want to capture packet for analysis, you need to run app/pdump/ tool along with testpmd. 
 The pdump tool captures the packet to pcap file, so you can use tcpdump -ni <pcap file> to view the packets. 
 More about the tool usage can be found under doc/guides/sample_app_ug/pdump.rst
 
 Let me know if you need further help on this.
 
 Thanks,
 Reshma
 
 
    =====-----=====-----=====
 Notice: The information contained in this e-mail
 message and/or attachments to it may contain 
 confidential or privileged information. If you are 
 not the intended recipient, any dissemination, use, 
 review, distribution, printing or copying of the 
 information contained in this e-mail message 
 and/or attachments to it are strictly prohibited. If 
 you have received this communication in error, 
 please notify us by reply e-mail or telephone and 
 immediately and permanently delete the message 
 and any attachments. Thank you
     
From Volkan.Atli@argela.com.tr  Wed Jul 20 09:40:40 2016
Return-Path: <Volkan.Atli@argela.com.tr>
Received: from MX2.argela.com.tr (unknown [95.0.156.15])
 by dpdk.org (Postfix) with ESMTP id BBA48377E
 for <users@dpdk.org>; Wed, 20 Jul 2016 09:40:40 +0200 (CEST)
Received: from MX2.argela.com.tr (192.168.0.26) by MX2.argela.com.tr
 (192.168.0.26) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 20 Jul
 2016 10:40:32 +0300
Received: from MX2.argela.com.tr ([fe80::e817:b333:ea71:7f88]) by
 MX2.argela.com.tr ([fe80::e817:b333:ea71:7f88%12]) with mapi id
 15.00.1178.000; Wed, 20 Jul 2016 10:40:32 +0300
From: Ali Volkan Atli <Volkan.Atli@argela.com.tr>
To: "users@dpdk.org" <users@dpdk.org>
Thread-Topic: How to get instant pmd rx queue occupancy after
 rte_eth_rx_burst()
Thread-Index: AQHR4ln+DKfwU7W5DE++bXSZAMDvAw=Date: Wed, 20 Jul 2016 07:40:31 +0000
Message-ID: <e5aaf23e0ef349f285956958f267590b@MX2.argela.com.tr>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [192.168.3.72]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: [dpdk-users] How to get instant pmd rx queue occupancy after
	rte_eth_rx_burst()
X-BeenThere: users@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: usage discussions <users.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/users>,
 <mailto:users-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/users/>
List-Post: <mailto:users@dpdk.org>
List-Help: <mailto:users-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/users>,
 <mailto:users-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jul 2016 07:40:41 -0000

Hi 

I'm trying to use a DPDK dropper by using rte_red_enqueue() and I need to know queue size after rte_eth_rx_burst(). Is there any sample application or a way to get queue occupancy? Thanks in advance.

- Volkan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] [dpdk-dev] capture packets on VM
  2016-07-20  6:09     ` Raja Jayapal
@ 2016-07-20 10:17       ` Pattan, Reshma
  0 siblings, 0 replies; 3+ messages in thread
From: Pattan, Reshma @ 2016-07-20 10:17 UTC (permalink / raw)
  To: Raja Jayapal, De Lara Guarch, Pablo; +Cc: users

Hi Raja,

You can use l3fwd  to forward packets to specific ports based on destination ip.
L3fwd uses LPM lookup to do destination based forwarding. As described in below  paragraph from the given link,
you need to add routing entry for the destinations ips of your interest and compile the code.

Place where routing entry should go is in below strut from file dpdk/examples/l3fwd/ l3fwd_lpm.c
static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
        {IPv4(1, 1, 1, 0), 24, 0},
        {IPv4(2, 1, 1, 0), 24, 1},
        {IPv4(3, 1, 1, 0), 24, 2},
        {IPv4(4, 1, 1, 0), 24, 3},
        {IPv4(5, 1, 1, 0), 24, 4},
        {IPv4(6, 1, 1, 0), 24, 5},
        {IPv4(7, 1, 1, 0), 24, 6},
        {IPv4(8, 1, 1, 0), 24, 7},
};

http://dpdk.org/doc/guides-16.04/sample_app_ug/l3_forward.html
"The LPM lookup key is represented by the Destination IP Address field read from the input packet.
The ID of the output interface for the input packet is the next hop returned by the LPM lookup.
The set of LPM rules used by the application is statically configured and loaded into the LPM object at initialization time."

@Pablo: Do you know how MAC based forwarding can be done using L2?

Thanks,
Reshma


From: Raja Jayapal [mailto:raja.jayapal@tcs.com]
Sent: Wednesday, July 20, 2016 7:10 AM
To: Pattan, Reshma <reshma.pattan@intel.com>
Cc: users@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
Subject: RE: [dpdk-dev] capture packets on VM

Hi Reshma/All,

Please find the "show config fwd" output below.

 testpmd> show config fwd
Warning! Cannot handle an odd number of ports with the current port topology. Configuration must be changed to have an even number of ports, or relaunch application with --port-topology=chained
io packet forwarding - ports=3 - cores=1 - streams=3 - NUMA support disabled, MP over anonymous pages disabled
Logical Core 1 (socket 0) forwards packets on 3 streams:
  RX P=0/Q=0 (socket 0) -> TX P=2/Q=0 (socket 0) peer=02:00:00:00:00:02
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
  RX P=2/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00

As described above, i have modified the topology to have even number of ports.

testpmd> show config fwd
io packet forwarding - ports=4 - cores=1 - streams=4 - NUMA support disabled, MP over anonymous pages disabled
Logical Core 1 (socket 0) forwards packets on 4 streams:
  RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
  RX P=2/Q=0 (socket 0) -> TX P=3/Q=0 (socket 0) peer=02:00:00:00:00:03
  RX P=3/Q=0 (socket 0) -> TX P=2/Q=0 (socket 0) peer=02:00:00:00:00:02

I could confirm that the packet is getting forwarded as per the config and setting the IP and MAC in packet generator does not take effect.
In testpmd app, whatever the MAC/IP is configured on traffic generator, the packets are forwaded in adjacent ports.

If i want to forward the packet based on IP&MAC, will it be achieved by running l2fwd or l3fwd ?

Kindly suggest.

Thanks,
Raja


-----"Pattan, Reshma" <reshma.pattan@intel.com<mailto:reshma.pattan@intel.com>> wrote: -----
To: Raja Jayapal <raja.jayapal@tcs.com<mailto:raja.jayapal@tcs.com>>
From: "Pattan, Reshma" <reshma.pattan@intel.com<mailto:reshma.pattan@intel.com>>
Date: 07/19/2016 07:12PM
Cc: "users@dpdk.org<mailto:users@dpdk.org>" <users@dpdk.org<mailto:users@dpdk.org>>, "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com<mailto:pablo.de.lara.guarch@intel.com>>
Subject: RE: [dpdk-dev] capture packets on VM
Hi Raja,

Since this is a usability question this should be discussed under users@dpdk.org<mailto:users@dpdk.org> mailing list. Hence I removed dev@dpdk.org<mailto:dev@dpdk.org>.
Ya actually packets received from port 0 should be transmitted on to port1 and packets received from port1 should go to port2.

Can you paste o/p of  "show config fwd" and also interpret if  traffic on your board is flowing as per existing flow rules.

Ex:
testpmd> show  config fwd
io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support disabled, MP over anonymous pages disabled
Logical Core 5 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01  ==> this means, Streams received on port 0 will be sent on to port1 .
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 ==> this means, Streams received on port1 will be sent onto port0.

Thanks,
Reshma

From: Raja Jayapal [mailto:raja.jayapal@tcs.com]
Sent: Tuesday, July 19, 2016 12:38 PM
To: Pattan, Reshma <reshma.pattan@intel.com<mailto:reshma.pattan@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org>
Subject: RE: [dpdk-dev] capture packets on VM

Hi Reshma,

Thanks for your information.
I have been trying to run the testpmd app and would like to get some idea on the packet flow in testpmd.

br0 -----vnet0----- (port0)VM NIC

br1------vnet1------(port1)VM NIC

br2------vnet2------(port2)VM NIC

br0 IP and MAC:
fe:54:00:0d:af:af - 192.168.100.10
br1 IP and MAC:
fe:54:00:4e:5b:df - 192.168.100.20
br2 IP and MAC:
fe:54:00:93:78:6d - 192.168.100.30

Ran testpmd application on VM and sending packets from Host using packeth.

Using PackETH generator, sent traffic from br0 destined to br1(modified the source / destination MAC and IP in packeth tool), but i could see that the packets are received on port0 and transmitted on port2.

Sending packets from br0 to br1:

./testpmd -c 3 -n 4 -- -i --total-num-mbufs=3000
testpmd> show port stats all
  ######################## NIC statistics for port 0  ########################
  RX-packets: 4          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0
  ############################################################################
  ######################## NIC statistics for port 1  ########################
  RX-packets: 0          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0
  ############################################################################
  ######################## NIC statistics for port 2  ########################
  RX-packets: 0          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 4          TX-errors: 0          TX-bytes:  0
  ############################################################################
testpmd>

Second time, sent traffic from br1 to br2, but the packets are received on port2 and transmitted on port0.

Sending packets from br1 to br2:

testpmd> show port stats all
  ######################## NIC statistics for port 0  ########################
  RX-packets: 0          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 6          TX-errors: 0          TX-bytes:  0
  ############################################################################
  ######################## NIC statistics for port 1  ########################
  RX-packets: 6          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0
  ############################################################################
  ######################## NIC statistics for port 2  ########################
  RX-packets: 0          RX-missed: 0          RX-bytes:  0
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0
  ############################################################################
testpmd>

Could you please suggest whether this is expected behaviour?
Also suggest if any configuarion needs to be done to make the flow to work correctly.


Thanks,
Raja

-----"Pattan, Reshma" <reshma.pattan@intel.com<mailto:reshma.pattan@intel.com>> wrote: -----
To: Raja Jayapal <raja.jayapal@tcs.com<mailto:raja.jayapal@tcs.com>>
From: "Pattan, Reshma" <reshma.pattan@intel.com<mailto:reshma.pattan@intel.com>>
Date: 07/15/2016 07:33PM
Cc: "dev@dpdk.org<mailto:dev@dpdk.org>" <dev@dpdk.org<mailto:dev@dpdk.org>>
Subject: RE: [dpdk-dev] capture packets on VM

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Raja Jayapal
> Sent: Friday, July 15, 2016 6:55 AM
> To: dev@dpdk.org<mailto:dev@dpdk.org>
> Subject: [dpdk-dev] capture packets on VM
>
> Hi All,
>
> I have installed dpdk on VM and would like to know how to capture the packets
> on dpdk ports.
> I am sending traffic from host  and want to know how to confirm whether the
> packets are flowing via dpdk ports.
> I tried with tcpdump and wireshark but could not capture the packets inside VM.
> setup : bridge1(Host)------- VM(Guest with DPDK) ----- bridge2(Host)
>

Hi,

On DPDK you can capture packets with app/pdump/ tool. This tool is available for use from 16.07RC1.
What you can do is run testpmd and see if packets are seen in testpmd, that confirms if packets are landing on dpdk ports or not.
If you also want to capture packet for analysis, you need to run app/pdump/ tool along with testpmd.
The pdump tool captures the packet to pcap file, so you can use tcpdump -ni <pcap file> to view the packets.
More about the tool usage can be found under doc/guides/sample_app_ug/pdump.rst

Let me know if you need further help on this.

Thanks,
Reshma

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-20 10:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3AEA2BF9852C6F48A459DA490692831F0105A1B4@IRSMSX109.ger.corp.intel.com>
     [not found] ` <OFE7FCB127.CF1C1A63-ON65257FF1.0020280D-65257FF1.00207F0D@tcs.com>
     [not found]   ` <OF4ACE2E8C.960EC929-ON65257FF5.003EE48D-65257FF5.003FEF53@tcs.com>
2016-07-19 13:41     ` [dpdk-users] [dpdk-dev] capture packets on VM Pattan, Reshma
2016-07-20  6:09     ` Raja Jayapal
2016-07-20 10:17       ` Pattan, Reshma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).