Skip to content

Commit f559a35

Browse files
aloktionanguy11
authored andcommitted
i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues"
This reverts commit 2ad1274 VF queues were not brought up when PF was brought up after being downed if the VF driver disabled VFs queues during PF down. This could happen in some older or external VF driver implementations. The problem was that PF driver used vf->queues_enabled as a condition to decide what link-state it would send out which caused the issue. Remove the check for vf->queues_enabled in the VF link notify. Now VF will always be notified of the current link status. Also remove the queues_enabled member from i40e_vf structure as it is not used anymore. Otherwise VNF implementation was broken and caused a link flap. The original commit was a workaround to avoid breaking existing VFs though it's really a fault of the VF code not the PF. The commit should be safe to revert as all of the VFs we know of have been fixed. Also, since we now know there is a related bug in the workaround, removing it is preferred. Fixes: 2ad1274 ("i40e: don't report link up for a VF who hasn't enabled") Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent b881145 commit f559a35

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,7 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf)
5555

5656
pfe.event = VIRTCHNL_EVENT_LINK_CHANGE;
5757
pfe.severity = PF_EVENT_SEVERITY_INFO;
58-
59-
/* Always report link is down if the VF queues aren't enabled */
60-
if (!vf->queues_enabled) {
61-
pfe.event_data.link_event.link_status = false;
62-
pfe.event_data.link_event.link_speed = 0;
63-
} else if (vf->link_forced) {
58+
if (vf->link_forced) {
6459
pfe.event_data.link_event.link_status = vf->link_up;
6560
pfe.event_data.link_event.link_speed =
6661
(vf->link_up ? i40e_virtchnl_link_speed(ls->link_speed) : 0);
@@ -70,7 +65,6 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf)
7065
pfe.event_data.link_event.link_speed =
7166
i40e_virtchnl_link_speed(ls->link_speed);
7267
}
73-
7468
i40e_aq_send_msg_to_vf(hw, abs_vf_id, VIRTCHNL_OP_EVENT,
7569
0, (u8 *)&pfe, sizeof(pfe), NULL);
7670
}
@@ -2443,8 +2437,6 @@ static int i40e_vc_enable_queues_msg(struct i40e_vf *vf, u8 *msg)
24432437
}
24442438
}
24452439

2446-
vf->queues_enabled = true;
2447-
24482440
error_param:
24492441
/* send the response to the VF */
24502442
return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_ENABLE_QUEUES,
@@ -2466,9 +2458,6 @@ static int i40e_vc_disable_queues_msg(struct i40e_vf *vf, u8 *msg)
24662458
struct i40e_pf *pf = vf->pf;
24672459
i40e_status aq_ret = 0;
24682460

2469-
/* Immediately mark queues as disabled */
2470-
vf->queues_enabled = false;
2471-
24722461
if (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states)) {
24732462
aq_ret = I40E_ERR_PARAM;
24742463
goto error_param;

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ struct i40e_vf {
9898
unsigned int tx_rate; /* Tx bandwidth limit in Mbps */
9999
bool link_forced;
100100
bool link_up; /* only valid if VF link is forced */
101-
bool queues_enabled; /* true if the VF queues are enabled */
102101
bool spoofchk;
103102
u16 num_vlan;
104103

0 commit comments

Comments
 (0)