mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
To: Andy Duan <fugang.duan@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Troy Kisky <troy.kisky@boundarydevices.com>,
	Andrew Lunn <andrew@lunn.ch>, Eric Nelson <eric@nelint.com>,
	Philippe Reynes <tremyfr@gmail.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Chris Healy <cphealy@gmail.com>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [patch net / RFC] net: fec: increase frame size limitation to actually available buffer
Date: Wed, 30 Nov 2016 09:36:15 +0300	[thread overview]
Message-ID: <dab27a3d-821c-8d07-ad98-2bdd8c442bc5@cogentembedded.com> (raw)
In-Reply-To: <AM4PR0401MB2260D022EC9B9E4C4333E621FF8C0@AM4PR0401MB2260.eurprd04.prod.outlook.com>

> But I think it is not necessary since the driver don't support jumbo frame.

Hardcoded 1522 raises two separate issues.

(1) When DSA is in use, frames processed by FEC chip contain DSA tag and
thus can be larger than hardcoded limit of 1522. This issue is not
FEC-specific, any driver that hardcodes maximum frame size to 1522 (many
do) will have this issue if used with DSA.

Clean solution for this must take into account that difference between
MTU and max frame size is no longer known at compile time. Actually this
is the case even without DSA, due to VLANs: max frame size is (MTU + 18)
without VLANs, but (MTU + 22) with VLANs. However currently drivers tend
to ignore this and hardcode 22.  With DSA, 22 is not enough, need to add
switch-specific tag size to that.

Not yet sure how to handle this. DSA-specific API to find out tag size
could be added, but generic solution should handle all cases of dynamic
difference between MTU and max frame size, not only DSA.


(2) There is some demand to use larger frames for optimization purposes.

FEC register fields that limit frame size are 14-bit, thus allowing
frames up to (4k-1). I'm about to prepare a larger patch:
- add ndo_change_mtu handler, allowing MTU up to (4k - overhead),
- set MAX_FL / TRUNC_FL based on configured MTU,
- if necessary, do buffer reallocation with larger buffers.

Is this suitable for upstreaming?
Is there any policy related to handling larger frames?

  reply	other threads:[~2016-11-30  6:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 18:35 Nikita Yushchenko
2016-11-30  2:37 ` Andy Duan
2016-11-30  6:36   ` Nikita Yushchenko [this message]
2016-11-30  7:25     ` Toshiaki Makita
2016-11-30 14:58       ` DSA vs envelope frames Nikita Yushchenko
2016-11-30 15:10         ` Andrew Lunn
2016-12-01  3:26           ` Florian Fainelli
2016-12-01 12:46         ` Toshiaki Makita
2016-11-30  7:35     ` [patch net / RFC] net: fec: increase frame size limitation to actually available buffer Andy Duan
2016-11-30 16:05 ` Zefir Kurtisi

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=dab27a3d-821c-8d07-ad98-2bdd8c442bc5@cogentembedded.com \
    --to=nikita.yoush@cogentembedded.com \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric@nelint.com \
    --cc=fabio.estevam@nxp.com \
    --cc=fugang.duan@nxp.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tremyfr@gmail.com \
    --cc=troy.kisky@boundarydevices.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

all inboxes | Powered by JetHome®