]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix for setting rss_size incorrectly
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 20 Sep 2017 10:52:57 +0000 (18:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2017 23:15:40 +0000 (16:15 -0700)
commit4d7cc174cfbc2247e303f9c50af057b46748eb2b
tree82786d6a8d6e4cece0c8e2257bbf868ebd7caf36
parent714269d211d5b1840653f93a983c76b17f8df594
net: hns3: Fix for setting rss_size incorrectly

rss_size is 1, 2, 4, 8, 16, 32, 64, 128, but acutal tc queue
size can be any u16 less than 128. If tc queue size is 5, we
set the rss_size to 8, indirection table will be used to limit
the size of actual queue size.
It may cause dropping of receiving packet in hardware if
rss_size is not set correctly.
For now, each TC has the same rss size.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c