Skip to content

Commit 7d9f22b

Browse files
iveceraanguy11
authored andcommitted
i40e: Fix unexpected MFS warning message
Commit 3a2c6ce ("i40e: Add a check to see if MFS is set") added a warning message that reports unexpected size of port's MFS (max frame size) value. This message use for the port number local variable 'i' that is wrong. In i40e_probe() this 'i' variable is used only to iterate VSIs to find FDIR VSI: <code> ... /* if FDIR VSI was set up, start it now */ for (i = 0; i < pf->num_alloc_vsi; i++) { if (pf->vsi[i] && pf->vsi[i]->type == I40E_VSI_FDIR) { i40e_vsi_open(pf->vsi[i]); break; } } ... </code> So the warning message use for the port number index of FDIR VSI if this exists or pf->num_alloc_vsi if not. Fix the message by using 'pf->hw.port' for the port number. Fixes: 3a2c6ce ("i40e: Add a check to see if MFS is set") Signed-off-by: Ivan Vecera <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 4e7f008 commit 7d9f22b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16224,7 +16224,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1622416224
I40E_PRTGL_SAH_MFS_MASK) >> I40E_PRTGL_SAH_MFS_SHIFT;
1622516225
if (val < MAX_FRAME_SIZE_DEFAULT)
1622616226
dev_warn(&pdev->dev, "MFS for port %x has been set below the default: %x\n",
16227-
i, val);
16227+
pf->hw.port, val);
1622816228

1622916229
/* Add a filter to drop all Flow control frames from any VSI from being
1623016230
* transmitted. By doing so we stop a malicious VF from sending out

0 commit comments

Comments
 (0)