sched: rework configuration failure handling
authorHuisong Li <lihuisong@huawei.com>
Fri, 23 Apr 2021 11:01:12 +0000 (19:01 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 24 Jul 2021 08:58:58 +0000 (10:58 +0200)
commitc6ccd1e3922ac346333a52e584d6c9fa7a43f237
tree61b0a19bf3d463b30bf6ab56696066089fbccb51
parenta042481ecd9e890b7fc088f9d2a3a6b6e82d3a4c
sched: rework configuration failure handling

Currently, rte_sched_free_memory() is called multiple times by the
exception handling code in rte_sched_subport_config() and
rte_sched_pipe_config().

This patch optimizes them into a unified outlet to free memory.

Fixes: ac6fcb841b0f ("sched: update subport rate dynamically")
Fixes: 34a90f86657c ("sched: modify pipe functions for config flexibility")
Fixes: ce7c4fd7c2ac ("sched: add pipe config to subport level")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/sched/rte_sched.c