patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Wei Hu <weh@microsoft.com>
To: Long Li <longli@microsoft.com>, "dev@dpdk.org" <dev@dpdk.org>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH 1/1] net/mana: add 32 bit short doorbell
Date: Thu, 14 Sep 2023 05:11:02 +0000	[thread overview]
Message-ID: <SI2P153MB04419E5A5EE975EA6C17E236BBF7A@SI2P153MB0441.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <PH7PR21MB3263EB10D278B4632EF982E1CEF0A@PH7PR21MB3263.namprd21.prod.outlook.com>

> -----Original Message-----
> From: Long Li <longli@microsoft.com>
> Sent: Thursday, September 14, 2023 5:11 AM
> To: Wei Hu <weh@microsoft.com>; dev@dpdk.org; Ferruh Yigit
> <ferruh.yigit@amd.com>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>
> Cc: stable@dpdk.org
> Subject: RE: [PATCH 1/1] net/mana: add 32 bit short doorbell
> 
> > +
> > +/*
> > + * Write to hardware doorbell to notify new activity.
> > + */
> > +int
> > +mana_ring_short_doorbell(void *db_page, enum gdma_queue_types
> > queue_type,
> > +			 uint32_t queue_id, uint32_t tail_incr, uint8_t arm) {
> > +	uint8_t *addr = db_page;
> > +	union gdma_short_doorbell_entry e = {};
> > +
> > +	if ((queue_id & ~GDMA_SHORT_DB_QID_MASK) ||
> > +	    (tail_incr & ~GDMA_SHORT_DB_INC_MASK)) {
> > +		DP_LOG(ERR, "%s: queue_id %u or "
> > +		       "tail_incr %u overflowed, queue type %d",
> > +		       __func__, queue_id, tail_incr, queue_type);
> 
> This should never happen.
> 
> What does "overflowed" mean? Is it a hardware error or software error? If this
> is a software error, the calling code needs to make sure it never overflows
> when using short doorbells.
> 
This is to guard any hardware and software bugs or weirdness, which could lead
to silent failures if it doesn't log. 

The software code has already been made to avoid any intentional behaviors which
could cause tail_incr overflow. 

Thanks,
Wei


  reply	other threads:[~2023-09-14  5:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09 12:23 Wei Hu
2023-09-13 21:11 ` Long Li
2023-09-14  5:11   ` Wei Hu [this message]
2023-09-18 18:02 ` Ferruh Yigit
2023-09-19  3:38   ` Wei Hu
2023-09-19 11:27     ` Ferruh Yigit
2023-09-20  3:11       ` Wei Hu
2023-09-18 20:01 ` Long Li
2023-09-19  2:13   ` Wei Hu
2023-09-19 19:23     ` Long Li
2023-09-20  8:10       ` Wei Hu
2023-09-20 17:28         ` Long Li

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=SI2P153MB04419E5A5EE975EA6C17E236BBF7A@SI2P153MB0441.APCP153.PROD.OUTLOOK.COM \
    --to=weh@microsoft.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=longli@microsoft.com \
    --cc=stable@dpdk.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).