net: hns3: add support for setting VF trust

This patch adds supports for setting VF trust by host. If specified
VF is trusted, then it can enable promisc(include allmulti mode).
If a trusted VF enabled promisc, and being untrusted, host will
disable promisc mode for this VF.

For VF will update its promisc mode from set_rx_mode now, so it's
unnecessary to set broadcst promisc mode when initialization or

Signed-off-by: Jian Shen <>
Signed-off-by: Huazhong Tan <>
Signed-off-by: Jakub Kicinski <>
9 files changed