[ovs-dev] [PATCH 3/3] rhel: Fix ifup and ifdown after DPDK naming change.

Aaron Conole aconole at redhat.com
Tue Feb 14 17:39:00 UTC 2017


Daniele Di Proietto <diproiettod at vmware.com> writes:

> On 02/02/2017 12:48, "Ben Pfaff" <blp at ovn.org> wrote:
>
>>On Tue, Jan 24, 2017 at 06:21:53PM -0800, Daniele Di Proietto wrote:
>>> 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 <diproiettod at vmware.com>
>>
>>This seems useful.
>
> Hi Ben,
>
> thanks for looking at this one and sorry for the delay.
>
>
>>
>>I don't understand why this uses "set" then $1.  Are you concerned that
>>BOND_DPDK_DEVARGS might have multiple words and you want to get just the
>>first one?
>
> Now for each interface we need to specify two parameters: the name (it is
> chosen by the user and it can be arbitrary) and the devargs (most likely the
> PCI address).
>
> With this patch the user enters the names in BOND_IFACES and the devargs in
> BOND_DPDK_DEVARGS.
>
> set -- ${BOND_DPDK_DEVARGS}
> for _iface in ${BOND_IFACE}; do
>     echo $_iface $1
>     shift
> done
>
> is a quick and dirty way to iterate through both lists in the same loop.
>
> Or maybe we could change the interface to specify in the same list the
> name and the devargs.
>
> Aaron, since you were looking at this as well, do you have any preference
> on the user interface?

I don't have a preference, but I think typically put OVS_ in front of
variables in the ifcfg-* files.

Otherwise, ACK

> Thanks,
>
> Daniele
>
>>
>>>  	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" \


More information about the dev mailing list