netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Poirier <bpoirier@suse.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	intel-wired-lan <intel-wired-lan@lists.osuosl.org>,
	Netdev <netdev@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] Revert "e1000e: Separate signaling for link check/link up"
Date: Mon, 29 Jan 2018 16:21:09 +0900	[thread overview]
Message-ID: <20180129072109.2jo5fe4ujozp3ykk@f1.synalogic.ca> (raw)
In-Reply-To: <CAKgT0UegBcVf5vzc7Vq4E1RpeeR7gqCAD=1+wn1Yq_tL48+LaA@mail.gmail.com>

On 2018/01/26 09:03, Alexander Duyck wrote:
> On Fri, Jan 26, 2018 at 1:12 AM, Benjamin Poirier <bpoirier@suse.com> wrote:
> > This reverts commit 19110cfbb34d4af0cdfe14cd243f3b09dc95b013.
> > This reverts commit 4110e02eb45ea447ec6f5459c9934de0a273fb91.
> >
> > ... because they cause an extra 2s delay for the link to come up when
> > autoneg is off.
> >
> > After reverting, the race condition described in the log of commit
> > 19110cfbb34d ("e1000e: Separate signaling for link check/link up") is
> > reintroduced. It may still be triggered by LSC events but this should not
> > result in link flap. It may no longer be triggered by RXO events because
> > commit 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts")
> > restored reading icr in the Other handler.
> 
> With the RXO events removed the only cause for us to transition the
> bit should be LSC. I'm not sure if the race condition in that state is
> a valid concern or not as the LSC should only get triggered if the
> link state toggled, even briefly.
> 
> The bigger concern I would have would be the opposite of the original
> race that was pointed out:
>     \ e1000_watchdog_task
>         \ e1000e_has_link
>             \ hw->mac.ops.check_for_link() === e1000e_check_for_copper_link
>                 /* link is up */
>                 mac->get_link_status = false;
> 
>                                 /* interrupt */
>                                 \ e1000_msix_other
>                                     hw->mac.get_link_status = true;
> 
>             link_active = !hw->mac.get_link_status
>             /* link_active is false, wrongly */
> 
> So the question I would have is what if we see the LSC for a link down
> just after the check_for_copper_link call completes? It may not be

Can you write out exactly what that race would be, in a format similar to the
above?

> anything seen in the real world since I don't know if we have any link
> flapping issues on e1000e or not without this patch. It is something
> to keep in mind for the future though.
> 
> 
> > As discussed, the driver should be in "maintenance mode". In the interest
> > of stability, revert to the original code as much as possible instead of a
> > half-baked solution.
> 
> If nothing else we may want to do a follow-up on this patch as we
> probably shouldn't be returning the error values to trigger link up.
> There are definitely issues to be found here. If nothing else we may
> want to explore just returning 1 if auto-neg is disabled instead of
> returning an error code.
> 
> > Link: https://www.spinics.net/lists/netdev/msg479923.html
> > Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
[...]

  reply	other threads:[~2018-01-29  7:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26  9:12 [PATCH 0/3] e1000e: Revert interrupt handling changes Benjamin Poirier
2018-01-26  9:12 ` [PATCH 1/3] Partial revert "e1000e: Avoid receiver overrun interrupt bursts" Benjamin Poirier
2018-01-26 16:50   ` Alexander Duyck
2018-01-29  7:20     ` Benjamin Poirier
2018-01-29 15:42       ` Alexander Duyck
2018-01-26  9:12 ` [PATCH 2/3] Revert "e1000e: Separate signaling for link check/link up" Benjamin Poirier
2018-01-26 17:03   ` Alexander Duyck
2018-01-29  7:21     ` Benjamin Poirier [this message]
2018-01-29 15:48       ` Alexander Duyck
2018-02-26  2:31         ` [RFC PATCH] e1000e: Fix link check race condition Benjamin Poirier
2018-02-26 16:14           ` Alexander Duyck
2018-02-28  5:19             ` Benjamin Poirier
2018-01-26  9:12 ` [PATCH 3/3] Revert "e1000e: Do not read ICR in Other interrupt" Benjamin Poirier
2018-01-26 21:01   ` Alexander Duyck
2018-01-29  7:28     ` Benjamin Poirier
2018-01-29 17:22       ` Alexander Duyck
2018-02-08  6:40         ` Benjamin Poirier

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=20180129072109.2jo5fe4ujozp3ykk@f1.synalogic.ca \
    --to=bpoirier@suse.com \
    --cc=alexander.duyck@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linux-kernel@vger.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).