[ovs-dev] [PATCH 04/13] netdev-dpdk: Use RCU for egress QoS.

Ben Pfaff blp at ovn.org
Wed Oct 12 20:04:48 UTC 2016

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.

Acked-by: Ben Pfaff <blp at ovn.org>

More information about the dev mailing list