Skip to content

Commit f616f1e

Browse files
ErwanAliasr1Sasha Levin
authored andcommitted
i40e: Report MFS in decimal base instead of hex
[ Upstream commit ef3c313 ] If the MFS is set below the default (0x2600), a warning message is reported like the following : MFS for port 1 has been set below the default: 600 This message is a bit confusing as the number shown here (600) is in fact an hexa number: 0x600 = 1536 Without any explicit "0x" prefix, this message is read like the MFS is set to 600 bytes. MFS, as per MTUs, are usually expressed in decimal base. This commit reports both current and default MFS values in decimal so it's less confusing for end-users. A typical warning message looks like the following : MFS for port 1 (1536) has been set below the default (9728) Signed-off-by: Erwan Velu <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Tony Brelinski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Fixes: 3a2c6ce ("i40e: Add a check to see if MFS is set") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 365d083 commit f616f1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16237,8 +16237,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1623716237
val = (rd32(&pf->hw, I40E_PRTGL_SAH) &
1623816238
I40E_PRTGL_SAH_MFS_MASK) >> I40E_PRTGL_SAH_MFS_SHIFT;
1623916239
if (val < MAX_FRAME_SIZE_DEFAULT)
16240-
dev_warn(&pdev->dev, "MFS for port %x has been set below the default: %x\n",
16241-
pf->hw.port, val);
16240+
dev_warn(&pdev->dev, "MFS for port %x (%d) has been set below the default (%d)\n",
16241+
pf->hw.port, val, MAX_FRAME_SIZE_DEFAULT);
1624216242

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

0 commit comments

Comments
 (0)