]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: hns3: Fix parameter type for q_id in hclge_tm_q_to_qs_map_cfg()
authorJian Shen <shenjian15@huawei.com>
Wed, 19 Sep 2018 17:29:58 +0000 (18:29 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit0144f2e8f8dd8349e7d2962e2c9370489f870de6
treef50c52665954d24e21d919138031a8da44fb901f
parent8ed41eeb320fcfa8480e4bcb4d2d1876aac729cf
net: hns3: Fix parameter type for q_id in hclge_tm_q_to_qs_map_cfg()

BugLink: https://bugs.launchpad.net/bugs/1810457
So far all the places calling hclge_tm_q_to_qs_map_cfg() are assigning
an u16 type value to "q_id", and in the processing of
hclge_tm_q_to_qs_map_cfg(), it also converts the "q_id" to le16.

The max tqp number for pf can be more than 256, we should use "u16" to
store the queue id, instead of "u8", which may cause data lost.

Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 32c7fbc8ffd752c6aa05d2dd7c13b0f0aa00ddaa)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c