diff mbox series

[iwl-net] i40e: Report MFS in decimal base instead of hex

Message ID 20240319141657.2783609-1-e.velu@criteo.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [iwl-net] i40e: Report MFS in decimal base instead of hex | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 939 this patch: 939
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 956 this patch: 956
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 956 this patch: 956
netdev/checkpatch warning WARNING: From:/Signed-off-by: email address mismatch: 'From: Erwan Velu <erwanaliasr1@gmail.com>' != 'Signed-off-by: Erwan Velu <e.velu@criteo.com>'
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-03-19--18-00 (tests: 907)

Commit Message

Erwan Velu March 19, 2024, 2:16 p.m. UTC
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 <e.velu@criteo.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Horman March 20, 2024, 11:19 a.m. UTC | #1
On Tue, Mar 19, 2024 at 03:16:55PM +0100, Erwan Velu wrote:
> 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)
> 

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.

> Signed-off-by: Erwan Velu <e.velu@criteo.com>

That not withstanding, this looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>

...
Brelinski, Tony April 16, 2024, 11:11 p.m. UTC | #2
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Erwan Velu
> Sent: Tuesday, March 19, 2024 7:17 AM
> Cc: Velu, Erwan <e.velu@criteo.com>; linux-kernel@vger.kernel.org; Eric
> Dumazet <edumazet@google.com>; netdev@vger.kernel.org; Nguyen,
> Anthony L <anthony.l.nguyen@intel.com>; intel-wired-lan@lists.osuosl.org;
> Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; David
> S. Miller <davem@davemloft.net>
> Subject: [Intel-wired-lan] [PATCH iwl-net] 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)
> 
> Signed-off-by: Erwan Velu <e.velu@criteo.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 85ecf2f3de18..9a142562db38 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -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