DPDK usage discussions
 help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: "Traynor, Kevin" <kevin.traynor@intel.com>,
	"dev@openvswitch.org" <dev@openvswitch.org>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] [ovs-dev] OVS with DPDK Meetup notes
Date: Tue, 1 Dec 2015 16:09:07 +0200	[thread overview]
Message-ID: <565DAA03.3070102@redhat.com> (raw)
In-Reply-To: <BC0FEEC7D7650749874CEC11314A88F74530E8EB@IRSMSX104.ger.corp.intel.com>

On 11/26/2015 07:56 PM, Traynor, Kevin wrote:
> Hi All,
>
> Just wanted to post some summary notes on the recent OVS with DPDK Meetup we
> had after the OVS conference. Thanks to everyone for the often lively discussion.
> I've collated and condensed Maryam's notes (Thank you Maryam) with my own.
> Corrections and additions are welcome.
>
> Usability
> ==========
> * Command line options
>    - Create defaults which can be overridden on the command line.
>    -c 0x1
>    -n 4 (this will be in DPDK 2.2 also)
>    -socket-mem 1024,0

Another possibility might be saving these in Open_vSwitch other_config 
db along with pmd-cpu-mask and the like. DPDK init could be delayed 
until the config db is available I think.

OTOH the command line variant is perhaps less effort. I've been carrying 
the following patch in my packages to allow passing arbitrary DPDK 
options to OVS service start via DPDK_OPTIONS in 
/etc/sysconfig/openvswitch,:

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 6d2e938..7db1500 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -240,8 +240,11 @@ start_forwarding () {
          fi

             # Start ovs-vswitchd.
-           set ovs-vswitchd unix:"$DB_SOCK"
-           set "$@" -vconsole:emer -vsyslog:err -vfile:info
+           set ovs-vswitchd
+           if test X"$DPDK_OPTIONS" != X; then
+               set "$@" --dpdk $DPDK_OPTIONS --
+           fi
+           set "$@" unix:"$DB_SOCK" -vconsole:emer -vsyslog:err -vfile:info
             if test X"$MLOCKALL" != Xno; then
                 set "$@" --mlockall
             fi

With that, the truly trivial (if a bit cheap) way of adding workable 
defaults becomes basically just:

diff --git 
a/rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template 
b/rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template
index 3050a07..d5bfe9d 100644
--- a/rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template
+++ b/rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template
@@ -21,3 +21,6 @@
  #   --ovsdb-server-wrapper=valgrind
  #
  OPTIONS=""
+
+# Uncomment to enable DPDK
+#DPDK_OPTIONS="-c0x1 -n4 --socket-mem 1024,0"


	- Panu -

      parent reply	other threads:[~2015-12-01 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 17:56 [dpdk-users] " Traynor, Kevin
2015-11-30 23:51 ` [dpdk-users] [ovs-dev] " Flavio Leitner
2015-12-01 14:09 ` Panu Matilainen [this message]

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=565DAA03.3070102@redhat.com \
    --to=pmatilai@redhat.com \
    --cc=dev@openvswitch.org \
    --cc=kevin.traynor@intel.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).