mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
net: hns3: fix bug when calculating the TCAM table info
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: 1173286802
("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>
This commit is contained in:
parent
c75ec148a3
commit
b36fc875bc
@ -5245,9 +5245,9 @@ static bool hclge_fd_convert_tuple(u32 tuple_bit, u8 *key_x, u8 *key_y,
|
||||
case BIT(INNER_SRC_MAC):
|
||||
for (i = 0; i < ETH_ALEN; i++) {
|
||||
calc_x(key_x[ETH_ALEN - 1 - i], rule->tuples.src_mac[i],
|
||||
rule->tuples.src_mac[i]);
|
||||
rule->tuples_mask.src_mac[i]);
|
||||
calc_y(key_y[ETH_ALEN - 1 - i], rule->tuples.src_mac[i],
|
||||
rule->tuples.src_mac[i]);
|
||||
rule->tuples_mask.src_mac[i]);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user