]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Dec 2018 20:07:32 +0000 (12:07 -0800)
commit0075644411d6b3b7992721dc9ea557877c83cdfd
tree87c9155f5b0222b440936679c48f79e97bd6abef
parentafb5a5441937d94cdc193c5e91ce8035cd2b0b32
net: hns: Fix ping failed when use net bridge and send multicast

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>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c