netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ariel Elior <Ariel.Elior@cavium.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, Ariel Elior <Ariel.Elior@cavium.com>,
	"Michal Kalderon" <Michal.Kalderon@cavium.com>,
	Tomer Tayar <Tomer.Tayar@cavium.com>
Subject: [PATCH net-next 0/6 v2] qed*: Doorbell overflow recovery
Date: Tue, 23 Oct 2018 08:35:43 +0300	[thread overview]
Message-ID: <20181023053549.5591-1-Ariel.Elior@cavium.com> (raw)

Doorbell Overflow
If sufficient CPU cores will send doorbells at a sufficiently high rate, they
can cause an overflow in the doorbell queue block message fifo. When fill level
reaches maximum, the device stops accepting all doorbells from that PF until a
recovery procedure has taken place.

Doorbell Overflow Recovery
The recovery procedure basically means resending the last doorbell for every
doorbelling entity. A doorbelling entity is anything which may send doorbells:
L2 tx ring, rdma sq/rq/cq, light l2, vf l2 tx ring, spq, etc. This relies on
the design assumption that all doorbells are aggregative, so last doorbell
carries the information of all previous doorbells.

APIs
All doorbelling entities need to register with the mechanism before sending
doorbells. The registration entails providing the doorbell address the entity
would be using, and a virtual address where last doorbell data can be found.
Typically fastpath structures already have this construct.

Executing the recovery procedure
Handling the attentions, iterating over all the registered entities and
resending their doorbells, is all handled within qed core module.

Relevance
All doorbelling entities in all protocols need to register with the mechanism,
via the new APIs. Technically this is quite simple (just call the API). Some
protocol fastpath implementation may not have the doorbell data stored anywhere
(compute it from scratch every time) and will have to add such a place.
This is rare and is also better practice (save some cycles on the fastpath).

Performance Penalty
No performance penalty should incur as a result of this feature. If anything
performance can improve by avoiding recalcualtion of doorbell data everytime
doorbell is sent (in some flows).

Add the database used to register doorbelling entities, and APIs for adding
and deleting entries, and logic for traversing the database and doorbelling
once on behalf of all entities.

Please consider applying to net-next.
Thanks,
Ariel

Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>

v1->v2:
-------
Add support for ARCH=i386 (definition of writeq)

v2->v3:
-------
Use generic writeq implementation in 
io-64-nonatomic-lo-hi.h instead of reimplementing.

Ariel Elior (6):
  qed: Add doorbell overflow recovery mechanism
  qed: Use the doorbell overflow recovery mechanism in case of doorbell
    overflow
  qed: Register slowpath queue doorbell with doorbell overflow recovery
    mechanism
  qed: Register light L2 queues with doorbell overflow recovery
    mechanism
  qed: Expose the doorbell overflow recovery mechanism to the protocol
    drivers
  qede: Register l2 queues with doorbell overflow recovery mechanism

 drivers/net/ethernet/qlogic/qed/qed.h          |  31 ++-
 drivers/net/ethernet/qlogic/qed/qed_dev.c      | 334 ++++++++++++++++++++++++-
 drivers/net/ethernet/qlogic/qed/qed_dev_api.h  |  28 +++
 drivers/net/ethernet/qlogic/qed/qed_int.c      | 152 +++++++++--
 drivers/net/ethernet/qlogic/qed/qed_int.h      |  10 +
 drivers/net/ethernet/qlogic/qed/qed_ll2.c      |  30 ++-
 drivers/net/ethernet/qlogic/qed/qed_ll2.h      |   1 +
 drivers/net/ethernet/qlogic/qed/qed_main.c     |  66 ++++-
 drivers/net/ethernet/qlogic/qed/qed_reg_addr.h |  50 ++++
 drivers/net/ethernet/qlogic/qed/qed_sp.h       |   4 +-
 drivers/net/ethernet/qlogic/qed/qed_spq.c      |  22 ++
 drivers/net/ethernet/qlogic/qede/qede_main.c   |   9 +
 include/linux/qed/qed_if.h                     |  42 ++++
 13 files changed, 744 insertions(+), 35 deletions(-)

-- 
1.8.3.1

             reply	other threads:[~2018-10-23 13:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23  5:35 Ariel Elior [this message]
2018-10-23  5:35 ` [PATCH net-next v3 1/6] qed: Add doorbell overflow recovery mechanism Ariel Elior
2018-10-23  5:35 ` [PATCH net-next v3 2/6] qed: Use the doorbell overflow recovery mechanism in case of doorbell overflow Ariel Elior
2018-10-23  5:35 ` [PATCH net-next v3 3/6] qed: Register slowpath queue doorbell with doorbell overflow recovery mechanism Ariel Elior
2018-10-23  5:35 ` [PATCH net-next v3 4/6] qed: Register light L2 queues " Ariel Elior
2018-10-23  5:35 ` [PATCH net-next v3 5/6] qed: Expose the doorbell overflow recovery mechanism to the protocol drivers Ariel Elior
2018-10-23  5:35 ` [PATCH net-next v3 6/6] qede: Register l2 queues with doorbell overflow recovery mechanism Ariel Elior
2018-10-23  5:50 ` [PATCH net-next 0/6 v2] qed*: Doorbell overflow recovery David Miller
  -- strict thread matches above, loose matches on Subject: below --
2018-10-22 16:40 Ariel Elior

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=20181023053549.5591-1-Ariel.Elior@cavium.com \
    --to=ariel.elior@cavium.com \
    --cc=Michal.Kalderon@cavium.com \
    --cc=Tomer.Tayar@cavium.com \
    --cc=davem@davemloft.net \
    --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).