diff mbox series

[v2,net-next,1/2] qed: display VF trust config

Message ID 20220302105222.8201-1-manishc@marvell.com
State Accepted
Commit 4e6e6bec7440b9b76f312f28b1f4e944eebb3abc
Headers show
Series [v2,net-next,1/2] qed: display VF trust config | expand

Commit Message

Manish Chopra March 2, 2022, 10:52 a.m. UTC
Driver does support SR-IOV VFs trust configuration but
it does not display it when queried via ip link utility.

Cc: stable@vger.kernel.org
Fixes: f990c82c385b ("qed*: Add support for ndo_set_vf_trust")
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---

v1->v2: add Cc and Fixes tags for stable inclusion

 drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 +
 1 file changed, 1 insertion(+)

--
2.35.1.273.ge6ebfd0

Comments

Manish Chopra March 2, 2022, 10:52 a.m. UTC | #1
Today when VFs are put in promiscuous mode, they can request PF
to configure device for them to receive all VLANs traffic regardless
of what vlan is configured by the PF (via ip link) and PF allows this
config request regardless of whether VF is trusted or not.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
index 8ac38828ba45..c5abfb28cf3f 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
@@ -4715,6 +4715,7 @@  static int qed_get_vf_config(struct qed_dev *cdev,
 	tx_rate = vf_info->tx_rate;
 	ivi->max_tx_rate = tx_rate ? tx_rate : link.speed;
 	ivi->min_tx_rate = qed_iov_get_vf_min_rate(hwfn, vf_id);
+	ivi->trusted = vf_info->is_trusted_request;

 	return 0;
 }