mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Noam Camus <noamca@mellanox.com>
To: <davem@davemloft.net>
Cc: <noamca@mellanox.com>, <linux-kernel@vger.kernel.org>,
	<abrodkin@synopsys.com>, <eladkan@mellanox.com>,
	<talz@mellanox.com>
Subject: [PATCH 0/3] Net driver bugs fix and code style
Date: Tue, 26 Apr 2016 10:35:23 +0300	[thread overview]
Message-ID: <1461656126-22226-1-git-send-email-noamca@mellanox.com> (raw)

From: Elad Kanfi <eladkan@mellanox.com>

Summary:
 1. Bug description: TX done interrupts that arrives while interrupts
    are masked, during NAPI poll, will not trigger an interrupt handling.
    Since TX interrupt is of level edge we will lose the TX done interrupt.
    As a result all pending tx frames will get no service.

    Solution: Check if there is a pending tx request after unmasking the
    interrupt and if answer is yes then re-add ourselves to
    the NAPI poll list.

 2. Bug description: CPU-A before sending a frame will set a variable
    to true. CPU-B that executes the tx done interrupt service routine
    might read a non valid value of that variable.

    Solution: Add a memory barrier at the tx sending function. 

 3. In addition, the check of a valid pending tx request was switched
    to an inline function to avoid duplicated code.

Elad Kanfi (3):
  net: nps_enet: code style
  net: nps_enet: Sync access to packet sent flag
  net: nps_enet: bug fix - handle lost tx interrupts

 drivers/net/ethernet/ezchip/nps_enet.c |   34 +++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 5 deletions(-)

             reply	other threads:[~2016-04-26  7:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  7:35 Noam Camus [this message]
2016-04-26  7:35 ` [PATCH 1/3] net: nps_enet: " Noam Camus
2016-04-26  7:35 ` [PATCH 2/3] net: nps_enet: Sync access to packet sent flag Noam Camus
2016-04-26  7:35 ` [PATCH 3/3] net: nps_enet: bug fix - handle lost tx interrupts Noam Camus
2016-04-26 15:57 ` [PATCH 0/3] Net driver bugs fix and code style David Miller
2016-04-26 17:23   ` Noam Camus
2016-04-26 17:57     ` David Miller
2016-04-26 17:58     ` David Miller

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=1461656126-22226-1-git-send-email-noamca@mellanox.com \
    --to=noamca@mellanox.com \
    --cc=abrodkin@synopsys.com \
    --cc=davem@davemloft.net \
    --cc=eladkan@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=talz@mellanox.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®