DPDK usage discussions
 help / color / mirror / Atom feed
From: Bala Sankaran <bsankara@redhat.com>
To: users@dpdk.org
Cc: Aaron Conole <aconole@redhat.com>
Subject: [dpdk-users] Traffic doesn't forward on virtual devices
Date: Thu, 28 Jun 2018 15:18:13 -0400 (EDT)	[thread overview]
Message-ID: <1882345510.2557424.1530213493803.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1291144238.2553240.1530211305119.JavaMail.zimbra@redhat.com>


Hello team,

I am working on a project to do PVP tests on dpdk. As a first step, I would like to get traffic flow between tap devices. I'm in process of setting up the architecture, in which I've used testpmd to forward traffic between two virtual devices(tap and vhost users) over a bridge. 

While I'm at it, I've identified that the internal dev_attached flag never gets set to 1 from the rte_eth_vhost.c file. I've tried to manually set it to 1 in the start routine, but I just see that the queue index being referenced is out of range.
 
I'm not sure how to proceed.  Has anyone had luck using testpmd to communicate with vhost-user devices?  If yes, any hints on a workaround?

Here's how I configured my setup after installing dpdk and openvswitch:

1. To start ovs-ctl:
/usr/local/share/openvswitch/scripts/ovs-ctl start

2. Setup hugepages: 
echo '2048' > /proc/sys/vm/nr_hugepages

3. Add a new network namespace:
ip netns add ns1

4. Add and set a bridge:
ovs-vsctl add-br dpdkbr0 -- set Bridge dpdkbr0 datapath_type=netdev options:vhost-server-path=/usr/local/var/run/openvswitch/vhu0
ovs-vsctl show

5. Add a vhost user to the bridge created:
ovs-vsctl add-port dpdkbr0 vhu0 -- set Interface vhu0 type=dpdkvhostuserclient

6. Execute bash on the network namespace:
ip netns exec ns1 bash

7. Use testpmd and connect the namespaces:
testpmd --socket-mem=512 --vdev='eth_vhost0,iface=/usr/local/var/run/openvswitch/vhu0,queues=1'  --vdev='net_tap0,iface=tap0' --file-prefix page0 -- -i


I repeated steps 3 - 7 for another network namespace on the same bridge. Following this, in fresh terminals, I assigned IP addresses to the tap devices created and tried pinging them. From port statistics, 
I identified the above mentioned issue with the dev_attached and queue statistics.

I would greatly appreciate any help from your end.

Thanks. 

-------------------------------------------------
Bala Sankaran
Networking Services Intern
Red Hat Inc .,

       reply	other threads:[~2018-06-28 19:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1291144238.2553240.1530211305119.JavaMail.zimbra@redhat.com>
2018-06-28 19:18 ` Bala Sankaran [this message]
2018-07-05 14:53   ` Bala Sankaran
2018-07-05 15:41     ` Wiles, Keith
2018-07-05 15:46       ` Bala Sankaran
2018-07-09 18:10         ` Aaron Conole
2018-07-10  8:20           ` Loftus, Ciara
2018-07-10 17:37             ` Bala Sankaran
2018-07-11  8:12               ` Loftus, Ciara
2018-07-11 14:28                 ` Bala Sankaran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1882345510.2557424.1530213493803.JavaMail.zimbra@redhat.com \
    --to=bsankara@redhat.com \
    --cc=aconole@redhat.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).