]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net: hns3: fix bug when calculating the TCAM table info
authorJian Shen <shenjian15@huawei.com>
Sat, 27 Feb 2021 07:24:53 +0000 (15:24 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:39:46 +0000 (13:39 -0500)
commit3ce4b152b9202d6641eec7d4f1f04fbec0795542
treeaa6a1a04a31826963db9bf3a48dd91ce82c255e2
parent58be6a7a6a6faee684a3f96abfa01eda40cedce0
net: hns3: fix bug when calculating the TCAM table info

BugLink: https://bugs.launchpad.net/bugs/1919492
commit b36fc875bcdee56865c444a2cdae17d354a6d5f5 upstream.

The function hclge_fd_convert_tuple() is used to convert tuples
and tuples mask to TCAM x and y.  But it misuses the source mac
as source mac mask when convert INNER_SRC_MAC, which may cause
the flow director rule works unexpectedly. So fix it.

Fixes: 117328680288 ("net: hns3: Add input key and action config support for flow director")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c