[ovs-dev] [PATCH 04/13] netdev-dpdk: Use RCU for egress QoS.
Daniele Di Proietto
diproiettod at vmware.com
Thu Oct 13 00:31:21 UTC 2016
On 12/10/2016 13:04, "Ben Pfaff" <blp at ovn.org> wrote:
>On Tue, Oct 04, 2016 at 06:22:15PM -0700, Daniele Di Proietto wrote:
>> I think it's clearer to use RCU than to check for a pointer twice in the
>> fast path (before and after taking the spinlock). Now the spinlock is
>> integrated into 'qos_conf'.
>> 'qos_conf' objects cannot be modified, so, instead of having
>> 'qos_set()', we now have 'qos_is_equal()', which tells us if an object
>> must be destroyed and recreated.
>> With this patch we also avoid passing the netdev parameter to qos ops,
>> since it was unused most of the times.
>> Lastly, some duplication is removed.
>> CC: Ian Stokes <ian.stokes at intel.com>
>> Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
>The use of rte_strerror(-error) in netdev_dpdk_set_qos() looks a little
>confusing to me. Is ->qos_construct() supposed to return a negative
>number for errors? But that doesn't seem to mesh with the assignment
>"error = EOPNOTSUPP;" earlier in netdev_dpdk_set_qos(). But maybe I'm
>not familiar enough with how DPDK reports errors.
You're right, there is a problem. qos_construct() only returns positive
error codes, because it takes care of inverting the return value of
qos_construct(). I removed the minus sign
>Acked-by: Ben Pfaff <blp at ovn.org>
and applied this to master, thanks
More information about the dev