All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Murali Krishna Policharla <murali.policharla@broadcom.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	"open list:BROADCOM SYSTEMPORT ETHERNET DRIVER" 
	<bcm-kernel-feedback-list@broadcom.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE
Date: Mon, 21 Dec 2020 14:55:58 -0800	[thread overview]
Message-ID: <ae506e45-c4fe-7c36-6c9c-67b47818e7ba@gmail.com> (raw)
In-Reply-To: <20201221222534.ln4onsjpryqzzfqq@skbuf>



On 12/21/2020 2:25 PM, Vladimir Oltean wrote:
> On Mon, Dec 21, 2020 at 01:49:03PM -0800, Florian Fainelli wrote:
>> On 12/18/2020 1:17 PM, Florian Fainelli wrote:
>>>>>>>>> SYSTEMPORT Lite does not actually validate the frame length, so setting
>>>>>>>>> a maximum number to the buffer size we allocate could work, but I don't
>>>>>>>>> see a reason to differentiate the two types of MACs here.
>>>>>>>>
>>>>>>>> And if the Lite doesn't validate the frame length, then shouldn't it
>>>>>>>> report a max_mtu equal to the max_mtu of the attached DSA switch, plus
>>>>>>>> the Broadcom tag length? Doesn't the b53 driver support jumbo frames?
>>>>>>>
>>>>>>> And how would I do that without create a horrible layering violation in
>>>>>>> either the systemport driver or DSA? Yes the b53 driver supports jumbo
>>>>>>> frames.
>>>>>>
>>>>>> Sorry, I don't understand where is the layering violation (maybe it doesn't
>>>>>> help me either that I'm not familiar with Broadcom architectures).
>>>>>>
>>>>>> Is the SYSTEMPORT Lite always used as a DSA master, or could it also be
>>>>>> used standalone? What would be the issue with hardcoding a max_mtu value
>>>>>> which is large enough for b53 to use jumbo frames?
>>>>>
>>>>> SYSTEMPORT Lite is always used as a DSA master AFAICT given its GMII
>>>>> Integration Block (GIB) was specifically designed with another MAC and
>>>>> particularly that of a switch on the other side.
>>>>>
>>>>> The layering violation I am concerned with is that we do not know ahead
>>>>> of time which b53 switch we are going to be interfaced with, and they
>>>>> have various limitations on the sizes they support. Right now b53 only
>>>>> concerns itself with returning JMS_MAX_SIZE, but I am fairly positive
>>>>> this needs fixing given the existing switches supported by the driver.
>>>>
>>>> Maybe we don't need to over-engineer this. As long as you report a large
>>>> enough max_mtu in the SYSTEMPORT Lite driver to accomodate for all
>>>> possible revisions of embedded switches, and the max_mtu of the switch
>>>> itself is still accurate and representative of the switch revision limits,
>>>> I think that's good enough.
>>>
>>> I suppose that is fair, v2 coming, thanks!
>>
>> I was going to issue a v2 for this patch, but given that we don't
>> allocate buffers larger than 2KiB and there is really no need to
>> implement ndo_change_mtu(), is there really a point not to use
>> UMAC_MAX_MTU_SIZE for both variants of the SYSTEMPORT MAC?
> 
> After your first reply that "the Lite doesn't validate the frame length", I was
> under the impression that it is sufficient to declare a larger max_mtu such as
> JMS_MAX_SIZE and 9K jumbo frames would just work. But with the current buffer
> allocation in bcm_sysport_rx_refill it clearly wouldn't. A stupid confusion
> really. So yeah, sorry for having you resend a v2 with no change.
> If it helps you could add to the patch:
> 
> Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
> 
> Thanks again for explaining.

No worries, Jakub, David, do you need me to resend or can you pick it up
from patchwork?
-- 
Florian

      reply	other threads:[~2020-12-21 22:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 17:38 Florian Fainelli
2020-12-18 20:24 ` Vladimir Oltean
2020-12-18 20:30   ` Florian Fainelli
2020-12-18 20:52     ` Vladimir Oltean
2020-12-18 20:54       ` Florian Fainelli
2020-12-18 21:02         ` Vladimir Oltean
2020-12-18 21:08           ` Florian Fainelli
2020-12-18 21:14             ` Vladimir Oltean
2020-12-18 21:17               ` Florian Fainelli
2020-12-21 21:49                 ` Florian Fainelli
2020-12-21 22:25                   ` Vladimir Oltean
2020-12-21 22:55                     ` Florian Fainelli [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=ae506e45-c4fe-7c36-6c9c-67b47818e7ba@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=murali.policharla@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --subject='Re: [PATCH net] net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.