net/bnxt: validate RSS hash key length
authorVenkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Wed, 2 Oct 2019 23:25:55 +0000 (16:25 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 8 Oct 2019 10:14:31 +0000 (12:14 +0200)
commit91aee9711ee31828112eb941c0271924d2f1071a
treee2d355ec5269d36e6abbcc683df761572e7c2667
parent9be7bc29b36c6f9b5ea9919f0f104605d3cbfbc3
net/bnxt: validate RSS hash key length

In bnxt_rss_hash_update_op, driver is proceeding with
bnxt_hwrm_vnic_rss_cfg even though RSS hashkey length is invalid.

This patch fixes the problem by returning -EINVAL when RSS hashkey
length is invalid.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c