net/ice: check Rx queue number on RSS init
authorDapeng Yu <dapengx.yu@intel.com>
Wed, 23 Dec 2020 05:30:18 +0000 (13:30 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:06 +0000 (16:03 +0100)
commitbfa4f648728a742f0b38edb628e2978fa5721b01
treea9ec486bdaf9803dcf55201e6a44f2b10b13181f
parent95f2f0e9fc2a66bc3cb077f31aca69feb29680aa
net/ice: check Rx queue number on RSS init

When RSS is initialized, rx queues number is used as denominator to set
default value into the RSS lookup table. If it is zero, there will be
error of being divided by 0. So add value check to avoid the error.

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_ethdev.c