DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ravi Rao <Ravi.Rao@us.fujitsu.com>
To: topperxin <topperxin@126.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] How to use dpdk ovs
Date: Thu, 07 May 2015 08:29:47 -0500	[thread overview]
Message-ID: <554B68CB.9080606@us.fujitsu.com> (raw)
In-Reply-To: <15a973e7.12107.14d2e815ade.Coremail.topperxin@126.com>

Hi,
Below are the seps that I followed to get DPDK with OVS. Some of the 
paths need to be changed to your env..
#12 Test Switching using OpenVSwitch with DPDK **************
#--- Setup the ifaces as dpdk..
cd /home/vnspteam01/dpdk-1.7.1
cd /home/vnspteam01/dpdk-1.8.0
sudo modprobe uio
sudo modprobe cuse
sudo rmmod igb_uio
sudo rmmod rte_kni
sudo insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
#**** Assign the dpdk capable interfaces to igb_uio driver
tools/dpdk_nic_bind.py --status
sudo /home/vnspteam01/dpdk-1.7.1/tools/dpdk_nic_bind.py -b igb_uio 
0000:02:00.0
sudo /home/vnspteam01/dpdk-1.7.1/tools/dpdk_nic_bind.py -b igb_uio 
0000:02:00.1
/home/vnspteam01/dpdk-1.7.1/tools/dpdk_nic_bind.py --status
#--- Setup the openVswitch
su -l
cd /home/vnspteam01/openvswitch-2.3.1
pkill -9 ovs
mkdir -p /usr/local/etc/openvswitch
mkdir -p /usr/local/var/run/openvswitch
rm -rf /usr/local/etc/openvswitch/conf.db
ovsdb/ovsdb-tool create /usr/local/etc/openvswitch/conf.db 
vswitchd/vswitch.ovsschema
#Start ovsdb-server
ovsdb/ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock 
--remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach
utilities/ovs-vsctl --no-wait init
#Start vswitchd:
export DB_SOCK=/usr/local/var/run/openvswitch/db.sock
vswitchd/ovs-vswitchd --dpdk -c 0x3 -n 4 --syslog syslog -- 
unix:$DB_SOCK --pidfile --detach
#Add bridge & ports
utilities/ovs-vsctl add-br ovs-br0 -- set bridge ovs-br0 
datapath_type=netdev
utilities/ovs-vsctl add-port ovs-br0 dpdk0 -- set Interface dpdk0 type=dpdk
utilities/ovs-vsctl add-port ovs-br0 dpdk1 -- set Interface dpdk1 type=dpdk
#display
utilities/ovs-vsctl show
utilities/ovs-vsctl list interface dpdk0
utilities/ovs-vsctl list interface dpdk1
#Add test flows
utilities/ovs-ofctl del-flows br0
# Add flows between port 1 (dpdk0) to port 2 (dpdk1)
utilities/ovs-ofctl add-flow br0 in_port=1,action=output:2
utilities/ovs-ofctl add-flow br0 in_port=2,action=output:1

Regards,
Ravi
On 05/07/15 08:12, topperxin wrote:
> Hi all
>         I'm freshman of dpdk.
>         And , I want to use dpdk ovs. I compiled successfully.
>         like:
>             Bridge "br0"
>                    Port "br0"
>                             Interface "br0"
>                             type: internal
>                    Port "dpdk0"
>                             Interface "dpdk0"
>                             type: dpdk
>          But ,I don't know how to use the dpdk port, how to let the data flow go through the dpdk0?
>          Who can tell me, thanks a lot.
>
>          lx
>

  reply	other threads:[~2015-05-07 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 13:12 topperxin
2015-05-07 13:29 ` Ravi Rao [this message]
2015-05-07 13:49 ` Gray, Mark D

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=554B68CB.9080606@us.fujitsu.com \
    --to=ravi.rao@us.fujitsu.com \
    --cc=dev@dpdk.org \
    --cc=topperxin@126.com \
    /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).