net: hns3: add support for extended promiscuous command
authorGuojia Liao <liaoguojia@huawei.com>
Sun, 6 Dec 2020 04:06:13 +0000 (12:06 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Dec 2020 19:58:52 +0000 (11:58 -0800)
commitc43abe1a5f83d3afe39f9aea99edfd594add705c
treefddbe07c7ce5931d3a23df5dc425851832600970
parentbdc40a3f4b4f967e6411ee389f062d52a2686eca
net: hns3: add support for extended promiscuous command

For DEVICE_VERSION_V2, the hardware supports enable tx and rx
promiscuous separately. But tx or rx promiscuous is active for
unicast, multicast and broadcast promiscuous simultaneously.
To support traffics between functions belong to the same port,
we always enable tx promiscuous for broadcast promiscuous, so
tx promiscuous for unicast and multicast promiscuous is also
enabled.

For DEVICE_VERSION_V3, the hardware decouples the above
relationship. Tx unicast promiscuous, rx unicast promiscuous,
tx multicast promiscuous, rx multicast promiscuous, tx broadcast
promiscuous and rx broadcast promiscuous can be enabled separately.

So add support for the new promiscuous command.

Signed-off-by: Guojia Liao <liaoguojia@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c