]> git.proxmox.com Git - mirror_ovs.git/commit
netdev-dpdk: Fix egress policer error detection bug.
authorIan Stokes <ian.stokes@intel.com>
Tue, 9 Aug 2016 17:20:26 +0000 (18:20 +0100)
committerDaniele Di Proietto <diproiettod@vmware.com>
Tue, 9 Aug 2016 22:01:10 +0000 (15:01 -0700)
commit7ea266e953577af6bcca520a3fade377fa8c7ccf
tree212f24ca012f142aec7dcaa3115718cf81156242
parent27373420c87e4516a0f21bece9335d0166dfa73c
netdev-dpdk: Fix egress policer error detection bug.

When egress policer is set as a QoS type for a port, an error may occur during
setup if incorrect parameters are used for the rte_meter. If this occurs
the egress policer construct and set functions should free any allocated
memory relevant to the policer and set the QoS configuration pointer to
null. The netdev_dpdk_set_qos function should check the error value returned
for any QoS construct/set calls with an assertion to avoid segfault.
Also this commit modifies egress_policer_qos_set() to correctly lock the QoS
spinlock while the egress policer configuration is updated to avoid
segfault.

Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
lib/netdev-dpdk.c