netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] mlx5: count all link events
Date: Wed, 19 May 2021 13:49:00 -0700	[thread overview]
Message-ID: <f48c950330996dcbb11f1a78b7c0a0445c656a20.camel@kernel.org> (raw)
In-Reply-To: <20210519171825.600110-1-kuba@kernel.org>

On Wed, 2021-05-19 at 10:18 -0700, Jakub Kicinski wrote:
> mlx5 devices were observed generating MLX5_PORT_CHANGE_SUBTYPE_ACTIVE
> events without an intervening MLX5_PORT_CHANGE_SUBTYPE_DOWN. This
> breaks link flap detection based on Linux carrier state transition
> count as netif_carrier_on() does nothing if carrier is already on.
> Make sure we count such events.
> 

Can you share more on the actual scenario that has happened ? 
in mlx5 i know of situations where fw might generate such events, just
as FYI for virtual ports (vports) on some configuration changes.

another explanation is that in the driver we explicitly query the link
state and we never take the event value, so it could have been that the
link flapped so fast we missed the intermediate state.

According to HW spec for some reason we should always query and not
rely on the event. 

<quote>
If software retrieves this indication (port state change event), this
signifies that the state has been
changed and a QUERY_VPORT_STATE command should be performed to get the
new state.
</quote>

> netif_carrier_event() increments the counters and fires the linkwatch
> events. The latter is not necessary for the use case but seems like
> the right thing to do.
> 



  parent reply	other threads:[~2021-05-19 20:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 17:18 [PATCH net-next] mlx5: count all link events Jakub Kicinski
2021-05-19 19:34 ` Lijun Pan
2021-05-19 19:51   ` Jakub Kicinski
2021-05-19 20:18     ` Saeed Mahameed
2021-05-19 20:56       ` Jakub Kicinski
2021-05-20  5:36         ` Saeed Mahameed
2021-05-20 15:48           ` Jakub Kicinski
2021-05-20 18:03             ` Saeed Mahameed
2021-05-19 20:49 ` Saeed Mahameed [this message]
2021-05-19 21:06   ` Jakub Kicinski
2021-05-20  0:07     ` Saeed Mahameed
2021-05-20  0:44       ` Jakub Kicinski

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=f48c950330996dcbb11f1a78b7c0a0445c656a20.camel@kernel.org \
    --to=saeed@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.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 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).