When parameter reta_size < RTE_RETA_GROUP_SIZE, reta_count will be 0.
Then this function will be deadloop.
Fixes:
734ce47f71e0 ("bonding: support RSS dynamic configuration")
Cc: stable@dpdk.org
Signed-off-by: Zhiguang He <hezhiguang3@huawei.com>
Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
return -EINVAL;
/* Copy RETA table */
- reta_count = reta_size / RTE_RETA_GROUP_SIZE;
+ reta_count = (reta_size + RTE_RETA_GROUP_SIZE - 1) /
+ RTE_RETA_GROUP_SIZE;
for (i = 0; i < reta_count; i++) {
internals->reta_conf[i].mask = reta_conf[i].mask;