Commit 558e93c9 authored by Czeslaw Zagorski's avatar Czeslaw Zagorski Committed by Jeff Kirsher

i40e: Remove unicast log when VF is leaving multicast mode.

This patch removes unicast log when VF is leaving multicast mode.
Added check of vf->vf_states &
I40E_VF_STATE_MC_PROMISC/I40E_VF_STATE_UC_PROMISC.
Without this commit, leaving multicast mode logs "unset unicast"
in dmsg.
Signed-off-by: default avatarCzeslaw Zagorski <czeslawx.zagorski@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent b2722359
......@@ -2043,30 +2043,33 @@ static int i40e_vc_config_promiscuous_mode_msg(struct i40e_vf *vf, u8 *msg)
alluni = true;
aq_ret = i40e_config_vf_promiscuous_mode(vf, info->vsi_id, allmulti,
alluni);
if (!aq_ret) {
if (aq_ret)
goto err_out;
if (allmulti) {
if (!test_and_set_bit(I40E_VF_STATE_MC_PROMISC,
&vf->vf_states))
dev_info(&pf->pdev->dev,
"VF %d successfully set multicast promiscuous mode\n",
vf->vf_id);
set_bit(I40E_VF_STATE_MC_PROMISC, &vf->vf_states);
} else {
} else if (test_and_clear_bit(I40E_VF_STATE_MC_PROMISC,
&vf->vf_states))
dev_info(&pf->pdev->dev,
"VF %d successfully unset multicast promiscuous mode\n",
vf->vf_id);
clear_bit(I40E_VF_STATE_MC_PROMISC, &vf->vf_states);
}
if (alluni) {
if (!test_and_set_bit(I40E_VF_STATE_UC_PROMISC,
&vf->vf_states))
dev_info(&pf->pdev->dev,
"VF %d successfully set unicast promiscuous mode\n",
vf->vf_id);
set_bit(I40E_VF_STATE_UC_PROMISC, &vf->vf_states);
} else {
} else if (test_and_clear_bit(I40E_VF_STATE_UC_PROMISC,
&vf->vf_states))
dev_info(&pf->pdev->dev,
"VF %d successfully unset unicast promiscuous mode\n",
vf->vf_id);
clear_bit(I40E_VF_STATE_UC_PROMISC, &vf->vf_states);
}
}
err_out:
/* send the response to the VF */
return i40e_vc_send_resp_to_vf(vf,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment