]> 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)
commitb6e5e570b2051a031254370f7cab4c627f5c8015
tree87c9155f5b0222b440936679c48f79e97bd6abef
parentc2858a69b03b41b9211f2b51e8ef6328834a5ef7
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