net: hns: Fix ping failed when use net bridge and send multicast
authorYonglong Liu <liuyonglong@huawei.com>
Sat, 15 Dec 2018 03:53:29 +0000 (11:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 08:51:01 +0000 (09:51 +0100)
commit97fd4c7f6ddf1fefcce7e684f1eeb895b9fdf387
tree203447fb5a0c969638913b4b7df979e4cce99160
parent1f89e4e8b54d5bd85b1f80b8a3180b6206a6df68
net: hns: Fix ping failed when use net bridge and send multicast

[ Upstream commit 6adafc356e20189193b38ee6b9af7743078bf6b4 ]

Create a net bridge, add eth and vnet to the bridge. The vnet is used
by a virtual machine. When ping the virtual machine from the outside
host and the virtual machine send multicast at the same time, the ping
package will lost.

The multicast package send to the eth, eth will send it to the bridge too,
and the bridge learn the mac of eth. When outside host ping the virtual
mechine, it will match the promisc entry of the eth which is not expected,
and the bridge send it to eth not to vnet, cause ping lost.

So this patch change promisc tcam entry position to the END of 512 tcam
entries, which indicate lower priority. And separate one promisc entry to
two: mc & uc, to avoid package match the wrong tcam entry.

Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c