Names like dpdk0 and dpdk1 are not enough to identify a DPDK interface.
We could update README.RHEL.rst and add

OVS_EXTRA='set Interface ${DEVICE} options:dpdk-devargs=0000:01:00.0'

but a better solution is to add new parameters in the configuration file
to explicitly specify the dpdk-devargs.

Fixes: 55e075e65ef9("netdev-dpdk: Arbitrary 'dpdk' port naming")
Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com>
---
 rhel/README.RHEL.rst                        | 13 +++++++++----
 rhel/etc_sysconfig_network-scripts_ifup-ovs |  6 ++++--
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/rhel/README.RHEL.rst b/rhel/README.RHEL.rst
index afccf1703..af4589325 100644
--- a/rhel/README.RHEL.rst
+++ b/rhel/README.RHEL.rst
@@ -266,14 +266,16 @@ DPDK NIC port:
 
 ::
 
-    ==> ifcfg-dpdk0 <==
-    DPDK vhost-user port:
-    DEVICE=dpdk0
+    ==> ifcfg-mydpdk0 <==
+    DEVICE=mydpdk0
+    DPDK_DEVARGS="0000:01:00.0"
     ONBOOT=yes
     DEVICETYPE=ovs
     TYPE=OVSDPDKPort
     OVS_BRIDGE=obr0
 
+DPDK vhost-user port:
+
 ::
 
     ==> ifcfg-vhu0 <==
@@ -283,6 +285,8 @@ DPDK NIC port:
     TYPE=OVSDPDKVhostUserPort
     OVS_BRIDGE=obr0
 
+DPDK bond:
+
 ::
 
     ==> ifcfg-bond0 <==
@@ -292,7 +296,8 @@ DPDK NIC port:
     TYPE=OVSDPDKBond
     OVS_BRIDGE=ovsbridge0
     BOOTPROTO=none
-    BOND_IFACES="dpdk0 dpdk1"
+    BOND_IFACES="mydpdk0 mydpdk1"
+    BOND_DPDK_DEVARGS="0000:01:00.0 0000:06:00.0"
     OVS_OPTIONS="bond_mode=active-backup"
     HOTPLUG=no
 
diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs 
b/rhel/etc_sysconfig_network-scripts_ifup-ovs
index e49e6fe71..8fe60fcb1 100755
--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
@@ -170,7 +170,7 @@ case "$TYPE" in
                ovs-vsctl -t ${TIMEOUT} \
                        -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
                        -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
-                       -- set Interface "$DEVICE" type=dpdk ${OVS_EXTRA+-- 
$OVS_EXTRA}
+                       -- set Interface "$DEVICE" type=dpdk 
options:dpdk-devargs="${DPDK_DEVARGS}" ${OVS_EXTRA+-- $OVS_EXTRA}
                ;;
        OVSDPDKRPort)
                ifup_ovs_bridge
@@ -188,8 +188,10 @@ case "$TYPE" in
                ;;
        OVSDPDKBond)
                ifup_ovs_bridge
+               set -- ${BOND_DPDK_DEVARGS}
                for _iface in $BOND_IFACES; do
-                       IFACE_TYPES="${IFACE_TYPES} -- set interface ${_iface} 
type=dpdk"
+                       IFACE_TYPES="${IFACE_TYPES} -- set interface ${_iface} 
type=dpdk options:dpdk-devargs=$1"
+                       shift
                done
                ovs-vsctl -t ${TIMEOUT} \
                        -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
-- 
2.11.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to