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 -
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev