netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@intel.com>
To: Erwan Velu <erwanaliasr1@gmail.com>
Cc: "Velu, Erwan" <e.velu@criteo.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: RE: [Intel-wired-lan] [PATCH v4 iwl-net] i40e: Prevent setting MTU if greater than MFS
Date: Mon, 22 Apr 2024 13:19:45 +0000	[thread overview]
Message-ID: <CYYPR11MB8429BF7A90F0A57D5154F9FEBD122@CYYPR11MB8429.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAL2JzuxraP5xCxt4_EK3zbz9kyAyxJFuEadtq4zHsdMjR5PGTw@mail.gmail.com>

> -----Original Message-----
> From: Erwan Velu <erwanaliasr1@gmail.com> 
> Sent: Friday, April 19, 2024 8:10 PM
> To: Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH v4 iwl-net] i40e: Prevent setting MTU if greater than MFS
>
> Hum that's pretty unexpected.
>Can you print "new_mtu"  and "max_mtu" in i40e_change_mtu() ?

Hi velu,

Please find below logs


[root@ ~]# ifconfig ens803f0np0
ens803f0np0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:00:00:00:01:00  txqueuelen 1000  (Ethernet)
        RX packets 6  bytes 1908 (1.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 1368 (1.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@ ~]# ifconfig ens803f0np0 mtu 9700
[root@ ~]# ifconfig ens803f0np0
ens803f0np0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9700
        ether 00:00:00:00:01:00  txqueuelen 1000  (Ethernet)
        RX packets 10  bytes 3180 (3.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 2052 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@~]# ifconfig ens803f0np0 mtu 1000
[root@ ~]# ifconfig ens803f0np0
ens803f0np0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1000
        ether 00:00:00:00:01:00  txqueuelen 1000  (Ethernet)
        RX packets 10  bytes 3180 (3.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 2052 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Dmesg:

[  +0.013744] i40e 0000:86:00.0: fw 9.140.76856 api 1.15 nvm 9.40 0xefd0ed12 1.3534.0 [8086:158b] [8086:0002]
[  +0.102046] i40e 0000:86:00.0: MAC address: 00:00:00:00:01:00
[  +0.003999] i40e 0000:86:00.0: FW LLDP is enabled
[  +0.006038] i40e 0000:86:00.0 eth0: NIC Link is Up, 25 Gbps Full Duplex, Requested FEC: CL108 RS-FEC, Negotiated FEC: CL108 RS-FEC, Autoneg: True, Flow Control: None
[  +0.000448] i40e 0000:86:00.0: PCI-Express: Speed 8.0GT/s Width x8
[  +0.000385] i40e 0000:86:00.0: MFS for port 0 (5888) has been set below the default (9728)
[  +0.000129] i40e 0000:86:00.0: Features: PF-id[0] VFs: 64 VSIs: 66 QP: 96 RSS FD_ATR FD_SB NTUPLE DCB VxLAN Geneve PTP VEPA
[  +0.004540] i40e 0000:86:00.0 ens803f0np0: renamed from eth0
[  +0.009012] i40e 0000:86:00.1: fw 9.140.76856 api 1.15 nvm 9.40 0xefd0ed12 1.3534.0 [8086:158b] [8086:0002]
[  +0.236975] i40e 0000:86:00.1: MAC address: 00:00:00:00:01:01
[  +0.000252] i40e 0000:86:00.1: FW LLDP is enabled
[  +0.006078] i40e 0000:86:00.1 eth0: NIC Link is Up, 25 Gbps Full Duplex, Requested FEC: CL108 RS-FEC, Negotiated FEC: None, Autoneg: True, Flow Control: None
[  +0.000437] i40e 0000:86:00.1: PCI-Express: Speed 8.0GT/s Width x8
[  +0.000386] i40e 0000:86:00.1: MFS for port 1 (5888) has been set below the default (9728)
[  +0.000129] i40e 0000:86:00.1: Features: PF-id[1] VFs: 64 VSIs: 66 QP: 96 RSS FD_ATR FD_SB NTUPLE DCB VxLAN Geneve PTP VEPA
[  +0.004697] i40e 0000:86:00.1 ens803f1np1: renamed from eth0

[Apr22 10:06] i40e 0000:86:00.0 ens803f0np0: New MTU is 9700, Max MTU is 9702
[ +21.608224] i40e 0000:86:00.0 ens803f0np0: New MTU is 1000, Max MTU is 9702

>Le ven. 19 avr. 2024 à 16:26, Pucha, HimasekharX Reddy <himasekharx.reddy.pucha@intel.com> a écrit :
> >
> > >-----Original Message-----
> > > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf 
> > >Of Erwan Velu
> > > Sent: Wednesday, March 13, 2024 2:37 PM
> > > 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 v4 iwl-net] i40e: Prevent setting 
> > >MTU if greater than MFS
> > >
> > > Commit 6871a7de705 ("[intelxl] Use admin queue to set port MAC address and maximum frame size") from iPXE project set the MFS to 0x600 = 1536.
> > > See https://github.com/ipxe/ipxe/commit/6871a7de705
> > >
> > > At boot time the i40e driver complains about it with the following message but continues.
> > >
> > >       MFS for port 1 has been set below the default: 600
> > >
> > > If the MTU size is increased, the driver accepts it but large packets will not be processed by the firmware generating tx_errors. The issue is pretty silent for users. i.e doing TCP in such context will generates lots of retransmissions until the proper > window size (below 1500) will be used.
> > >
> > > To fix this case, it would have been ideal to increase the MFS, via i40e_aqc_opc_set_mac_config, incoming patch will take care of it.
> > >
> > > At least, commit prevents setting up an MTU greater than the current MFS.
> > > It will avoid being in the position of having an MTU set to 9000 on the netdev with a firmware refusing packets larger than 1536.
> > >
> > > A typical trace looks like:
> > > [  377.548696] i40e 0000:5d:00.0 eno5: Error changing mtu to 9000, Max is 1500. MFS is too small.
> > >
> > > Signed-off-by: Erwan Velu <e.velu@criteo.com>
> > > ---
> > >  drivers/net/ethernet/intel/i40e/i40e_main.c | 10 +++++++++-
> > >  1 file changed, 9 insertions(+), 1 deletion(-)
> > >
> >
> >
> > With patch when we set the MFS to 1700 (5888) in the NVM (as seen below) and then set the MTU on PF0 to 9000 and it set it to 9000 with no errors and no messages in dmesg.
> >
> > [root@localhost user]# ip link set mtu 9000 dev enp131s0f0np0 
> > [root@localhost user]# ip link show dev enp131s0f0np0
> > 9: enp131s0f0np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP mode DEFAULT group default qlen 1000
> >     link/ether 00:00:00:00:01:00 brd ff:ff:ff:ff:ff:ff
> >
> > dmesg when loading the driver:
> > [257.035823] 140e 0000:83:00.1: MFS for port 1 (5888) has been set 
> > below the default (9728)
>


      parent reply	other threads:[~2024-04-22 13:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  9:07 [PATCH v4 iwl-net] i40e: Prevent setting MTU if greater than MFS Erwan Velu
2024-03-14 16:10 ` Brett Creeley
2024-03-14 17:10   ` Erwan Velu
2024-03-14 17:55     ` Brett Creeley
2024-03-14 18:04       ` Erwan Velu
2024-03-14 20:31         ` Tony Nguyen
2024-03-15  9:17           ` Erwan Velu
2024-03-15 16:19             ` Brett Creeley
2024-03-18 17:45 ` Simon Horman
2024-03-19 10:26   ` Sunil Kovvuri Goutham
     [not found]   ` <d33b98de-dfc0-445e-bdd7-0ae76d050ed4@criteo.com>
2024-03-19 12:20     ` Simon Horman
2024-03-19 13:33       ` Erwan Velu
2024-04-19 14:26 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
     [not found]   ` <CAL2JzuxraP5xCxt4_EK3zbz9kyAyxJFuEadtq4zHsdMjR5PGTw@mail.gmail.com>
2024-04-22 13:19     ` Pucha, HimasekharX Reddy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CYYPR11MB8429BF7A90F0A57D5154F9FEBD122@CYYPR11MB8429.namprd11.prod.outlook.com \
    --to=himasekharx.reddy.pucha@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=e.velu@criteo.com \
    --cc=edumazet@google.com \
    --cc=erwanaliasr1@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).