]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: avoid unnecessary check warnings in nfp_app_get_vf_config
authorFei Qin <fei.qin@corigine.com>
Wed, 8 Jun 2022 09:29:00 +0000 (11:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Jun 2022 05:02:38 +0000 (22:02 -0700)
commit68ffc1d10b0185a022e170f37a4b57540f8afcad
treeaae6942bd388a3580493ab650d3fe056dc27636e
parentf32e12e9ee7e782ca47b3911ee67c604b8868210
nfp: avoid unnecessary check warnings in nfp_app_get_vf_config

nfp_net_sriov_check is added in nfp_app_get_vf_config which intends
to ensure ivi->vlan_proto and ivi->max_tx_rate/min_tx_rate can be
read from VF config table only when firmware supports corresponding
capability.

However, "nfp_app_get_vf_config" can be called by commands like
"ip a", "ip link set $DEV up" and "ip link set $DEV vf $NUM vlan
$param" (with VF). When using commands above, many warnings
"ndo_set_vf_<cap_x> not supported" would appear if firmware doesn't
support VF rate limit and 802.1ad VLAN assingment. If more VFs are
created, things could get worse.

Thus, this patch add an extra bool parameter for nfp_net_sriov_check
to enable/disable the cap check warning report. Unnecessary warnings
in nfp_app_get_vf_config can be avoided. Valid warnings in kinds of
vf setting function can be reserved.

Fixes: 0f4b1d2f61df ("nfp: VF rate limit support")
Fixes: 69b7d4306a0b ("nfp: support 802.1ad VLAN assingment to VF")
Signed-off-by: Fei Qin <fei.qin@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c