public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Stefan Chulski <stefanc@marvell.com>
Cc: Antoine Tenart <antoine.tenart@bootlin.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"maxime.chevallier@bootlin.com" <maxime.chevallier@bootlin.com>,
	"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
	"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
	Nadav Haklai <nadavh@marvell.com>,
	Yan Markman <ymarkman@marvell.com>,
	"mw@semihalf.com" <mw@semihalf.com>
Subject: Re: [PATCH net-next 5/5] net: mvpp2: jumbo frames support
Date: Sun, 4 Mar 2018 10:28:28 +0100	[thread overview]
Message-ID: <20180304102828.1437fbc3@windsurf.home> (raw)
In-Reply-To: <31a2c6c988bd4d5190e1fb3332f3bc35@IL-EXCH01.marvell.com>

Hello,

On Sun, 4 Mar 2018 06:56:02 +0000, Stefan Chulski wrote:

> > > +	if (port->pool_long->id == MVPP2_BM_JUMBO && port->id != 0) {  
> > 
> > Again, all over the place we hardcode the fact that Jumbo frames can only be
> > used on port 0. I know port 0 is the only one that can do 10G, but are there
> > possibly some use cases where you may want Jumbo frame on another port
> > ?
> > 
> > This all really feels very hardcoded to me.
> >   
> 
> All ports support Jumbo frames.
> But only port 0 can do TX HW checksum offload(due to TX FIFO size).
> 
> Packet processor 2.2 has only 19KB TX FIFO size.
> So in TX FIFO config code assign for Port 0 - 10KB, Port 1 - 3KB and Port 1 - 3KB.

Yes, but I was also questioning whether hardcoding this configuration
was correct.

> To perform checksum in HW, HW obviously should work in store and forward mode. Store all frame in TX FIFO and then check checksum.
> If mtu 1500B, everything fine and all port can do this.
> 
> If mtu is 9KB and 9KB frame transmitted, Port 0 still can do HW checksum. But ports 1 and 2 doesn't has enough FIFO for this.
> So we cannot offload this feature and SW should perform checksum.

So perhaps the real check should not be "port 0", but whether the MTU
is higher or lower than the TX FIFO size assigned to the current port.
This would express in much better way the reason why HW checksum can be
used or not.

> > > +	/* 9704 == 9728 - 20 and rounding to 8 */
> > > +	dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;  
> > 
> > Is this correct for all ports ? Shouldn't the maximum MTU be different
> > between port 0 (that supports Jumbo frames) and the other ports ?  
> 
> This is correct for all ports. All ports can support Jumbo frames.

OK. With your explanation above, I understand better.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

  reply	other threads:[~2018-03-04  9:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02 15:40 [PATCH net-next 0/5] net: mvpp2: jumbo frames support Antoine Tenart
2018-03-02 15:40 ` [PATCH net-next 1/5] net: mvpp2: use the same buffer pool for all ports Antoine Tenart
2018-03-02 16:01   ` Thomas Petazzoni
2018-03-04  6:59     ` Stefan Chulski
2018-03-05 10:48     ` Antoine Tenart
2018-03-05 12:41       ` Thomas Petazzoni
2018-03-05 12:56         ` Antoine Tenart
2018-03-02 15:40 ` [PATCH net-next 2/5] net: mvpp2: update the BM buffer free/destroy logic Antoine Tenart
2018-03-02 15:40 ` [PATCH net-next 3/5] net: mvpp2: use a data size of 10kB for Tx FIFO on port 0 Antoine Tenart
2018-03-02 16:11   ` Thomas Petazzoni
2018-03-04  6:29     ` Stefan Chulski
2018-03-04  9:25       ` Thomas Petazzoni
2018-03-04  9:33         ` Stefan Chulski
2018-03-02 15:40 ` [PATCH net-next 4/5] net: mvpp2: enable UDP/TCP checksum over IPv6 Antoine Tenart
2018-03-02 15:40 ` [PATCH net-next 5/5] net: mvpp2: jumbo frames support Antoine Tenart
2018-03-02 16:17   ` Thomas Petazzoni
2018-03-04  6:56     ` Stefan Chulski
2018-03-04  9:28       ` Thomas Petazzoni [this message]
2018-03-04  9:42         ` Stefan Chulski

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=20180304102828.1437fbc3@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mw@semihalf.com \
    --cc=nadavh@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=stefanc@marvell.com \
    --cc=ymarkman@marvell.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