]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add max vector number check for pf
authorJian Shen <shenjian15@huawei.com>
Thu, 20 Dec 2018 03:52:01 +0000 (11:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Dec 2018 07:47:58 +0000 (23:47 -0800)
commit15e26a3413516a3094d6b9bfea5acc6f3574daae
tree10fd33d5405dd97d845fed6d3dd89e73313356b9
parent15f855c86a48bdc4e81f9092672899c915d1b4db
net: hns3: add max vector number check for pf

Each pf supports max 64 vectors and 128 tqps. For 2p/4p core scenario,
there may be more than 64 cpus online. So the result of min_t(u16,
num_Online_cpus(), tqp_num) may be more than 64. This patch adds check
for the vector number.

Fixes: df7ad9c92e58 ("net: hns3: fix for coalesce configuration lost during reset")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c