All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Timur Tabi' <timur@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH 1/2] [for 4.13] net: qcom/emac: disable flow control autonegotiation by default
Date: Wed, 2 Aug 2017 15:38:01 +0000	[thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD0049282@AcuExch.aculab.com> (raw)
In-Reply-To: <115c4698-cfcb-83dc-e70b-89207ef326a8@codeaurora.org>

From: Timur Tabi
> Sent: 02 August 2017 16:09
> On 08/02/2017 09:51 AM, David Laight wrote:
> > Sending pause frames just tells the adjacent switch not to send you packets
> > (because you'll discard them).
> > Since the idea is to avoid the discards, the switch will buffer the
> > packets it would have sent.
> > The buffers in the switch then fill up with packets it isn't sending you.
> 
> I was under the impression that the switch forwards the pause frames to
> other devices, so that the transmitting NIC can stop sending the data,

Most of my ethernet knowledge predates FDX :-)
It wouldn't make any sense to try to use the source address of a pause
frame to suppress traffic to a specific MAC - that would have to go way down
into IP on all the receiving systems.
Also ISTR that pause frames are very short and don't even contain MAC
addresses.

> but your explanation makes a lot more sense.  If the EMAC never stops
> sending pause frames, then the switch's buffers will fill up, disabling
> all other devices.  If the switch does not have per-port buffers, then
> it makes sense when the buffer is full, it blocks all ports.

A switch will (probably) either have buffers for each input port, or for
each output port (or maybe both).
Output port buffers are less likely to cause grief when an output port is
running at a slower speed than the input port.

But is a switch is going to send pause frames it doesn't really matter
how the buffers are arranged. The cascade will still happen.

It would take very careful heuristics in a switch to manage pause
frames properly.

Of course, once the kernel has crashed, even multicast packets will
eventually run the MAC out of buffers.
(Unless you run on private network and manage to reinstall and reboot
while the MAC is still active and then eventually die when a receive
frame overwrites what used to be a receive buffer.)

	David

  reply	other threads:[~2017-08-02 15:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 21:37 [PATCH 0/2] net: qcom/emac: fixes for pause frame floods Timur Tabi
2017-08-01 21:37 ` [PATCH 1/2] [for 4.13] net: qcom/emac: disable flow control autonegotiation by default Timur Tabi
2017-08-01 21:55   ` Florian Fainelli
2017-08-01 22:02     ` Timur Tabi
2017-08-01 22:08       ` Florian Fainelli
2017-08-01 23:15   ` Andrew Lunn
2017-08-02  0:56     ` Timur Tabi
2017-08-02  2:58       ` Andrew Lunn
2017-08-02  3:22         ` Timur Tabi
2017-08-02 13:48   ` David Laight
2017-08-02 14:21     ` Timur Tabi
2017-08-02 14:51       ` David Laight
2017-08-02 15:08         ` Timur Tabi
2017-08-02 15:38           ` David Laight [this message]
2017-08-02 17:54   ` David Miller
2017-08-02 18:23     ` Timur Tabi
2017-08-02 18:35       ` David Miller
2017-08-02 18:39         ` Timur Tabi
2017-08-02 23:15           ` David Miller
2017-08-03  1:00             ` Timur Tabi
2017-08-02 18:36       ` David Miller
2017-08-01 21:37 ` [PATCH 2/2] net: qcom/emac: add software control for pause frame mode Timur Tabi
2017-08-01 21:51   ` Florian Fainelli
2017-08-01 22:00     ` Timur Tabi
2017-08-01 22:06       ` Florian Fainelli
2017-09-12 22:07   ` Timur Tabi

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=063D6719AE5E284EB5DD2968C1650D6DD0049282@AcuExch.aculab.com \
    --to=david.laight@aculab.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=timur@codeaurora.org \
    /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 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.