i40e: Report MFS in decimal base instead of hex
Subsystems (3)
PATCH 1/1 i40e: Report MFS in decimal base instead of hex
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)
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -2
@@ -16106,8 +16106,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) val =FIELD_GET (I40E_PRTGL_SAH_MFS_MASK ,rd32 (&pf->hw,I40E_PRTGL_SAH ));if (val <MAX_FRAME_SIZE_DEFAULT ) -dev_warn (&pdev->dev,"MFS for port %x has been set below the default: %x\n" , - pf->hw.port, val); +dev_warn (&pdev->dev,"MFS for port %x (%d) has been set below the default (%d)\n" , + pf->hw.port, val,MAX_FRAME_SIZE_DEFAULT );/* Add a filter to drop all Flow control frames from any VSI from being * transmitted. By doing so we stop a malicious VF from sending out
Signature · 1 line
2.44.0
Quoted 11 lines · Erwan Velu
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= 1536Without any explicit "0x" prefix, this message is read like the MFS is set to 600 bytes.
Quoted 9 lines
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)
Hi Erwan,
If this is for (iwl-)net, then it should probably have a Fixes tag. I expect it is sufficient to respond to this email with an appropriate tag.
Quoted 1 line
Signed-off-by Erwan Velu <[email protected]>
That not withstanding, this looks good to me.
...
Quoted 28 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Erwan Velu
Sent: Tuesday, March 19, 2024 7:17 AM
Cc: Velu, Erwan <[email protected]>; [email protected]; Eric Dumazet <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; [email protected]; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; David S. Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net] i40e: Report MFS in decimal base instead of hexIf 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= 1536Without 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.
Quoted 8 lines
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]>--- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)