Skip to content

Commit f1db020

Browse files
gszczurxanguy11
authored andcommitted
iavf: Log info when VF is entering and leaving Allmulti mode
Add log when VF is entering and leaving Allmulti mode. The change of VF state is visible in dmesg now. Without this commit, entering and leaving Allmulti mode is not logged in dmesg. Signed-off-by: Grzegorz Szczurek <[email protected]> Tested-by: George Kuruvinakunnel <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent aeb5d11 commit f1db020

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

drivers/net/ethernet/intel/iavf/iavf_virtchnl.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -762,15 +762,23 @@ void iavf_set_promiscuous(struct iavf_adapter *adapter, int flags)
762762
if (flags & FLAG_VF_MULTICAST_PROMISC) {
763763
adapter->flags |= IAVF_FLAG_ALLMULTI_ON;
764764
adapter->aq_required &= ~IAVF_FLAG_AQ_REQUEST_ALLMULTI;
765-
dev_info(&adapter->pdev->dev, "Entering multicast promiscuous mode\n");
765+
dev_info(&adapter->pdev->dev, "%s is entering multicast promiscuous mode\n",
766+
adapter->netdev->name);
766767
}
767768

768769
if (!flags) {
769-
adapter->flags &= ~(IAVF_FLAG_PROMISC_ON |
770-
IAVF_FLAG_ALLMULTI_ON);
771-
adapter->aq_required &= ~(IAVF_FLAG_AQ_RELEASE_PROMISC |
772-
IAVF_FLAG_AQ_RELEASE_ALLMULTI);
773-
dev_info(&adapter->pdev->dev, "Leaving promiscuous mode\n");
770+
if (adapter->flags & IAVF_FLAG_PROMISC_ON) {
771+
adapter->flags &= ~IAVF_FLAG_PROMISC_ON;
772+
adapter->aq_required &= ~IAVF_FLAG_AQ_RELEASE_PROMISC;
773+
dev_info(&adapter->pdev->dev, "Leaving promiscuous mode\n");
774+
}
775+
776+
if (adapter->flags & IAVF_FLAG_ALLMULTI_ON) {
777+
adapter->flags &= ~IAVF_FLAG_ALLMULTI_ON;
778+
adapter->aq_required &= ~IAVF_FLAG_AQ_RELEASE_ALLMULTI;
779+
dev_info(&adapter->pdev->dev, "%s is leaving multicast promiscuous mode\n",
780+
adapter->netdev->name);
781+
}
774782
}
775783

776784
adapter->current_op = VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE;

0 commit comments

Comments
 (0)