patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Long Li <longli@microsoft.com>
To: Wei Hu <weh@microsoft.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	 Luca Boccassi <bluca@debian.org>,
	Kevin Traynor <ktraynor@redhat.com>
Subject: RE: [PATCH 1/1] net/mana: add 32 bit short doorbell
Date: Wed, 20 Sep 2023 17:28:56 +0000	[thread overview]
Message-ID: <PH7PR21MB32639019407E31F012A5DDE4CEF9A@PH7PR21MB3263.namprd21.prod.outlook.com> (raw)
In-Reply-To: <SI2P153MB04419F500FD2D0E1FDD4F095BBF9A@SI2P153MB0441.APCP153.PROD.OUTLOOK.COM>

> > Subject: RE: [PATCH 1/1] net/mana: add 32 bit short doorbell
> >
> > > > > +#ifdef RTE_ARCH_32
> > > > > +	uint16_t cqe_incr =
> > > > > +(uint16_t)rxq->gdma_cq.head_incr_to_short_db;
> > > >
> > > > How do you make sure head_incr_to_short_db doesn't overflow?
> > > >
> > >
> > > I have checked this with hardware team. In my opinion it would be
> > > easily overflown.
> > > The hw team seems suggesting the hw will take care of this.
> > >
> > > Thanks,
> > > Wei
> >
> > I'm not sure how HW can take care of this when it overflows. When it
> > happens, the HW will miss a doorbell and CQ queue will get full. And
> > eventually you'll lose completions for TX/RX.
> >
> > In mana_alloc_and_post_rx_wqes() and mana_rx_burst(), the code has
> > check for RX/TX_WQE_SHORT_DB_THRESHOLD to make sure tail_incr doesn't
> > overflow when ringing the doorbell.
> >
> > In gdma_poll_completion_queue(), you need to have a similar mechanism
> > to not overflow tail_incr  when ringing the doorbell.
> >
> I am not sure what can be done here. Applications could run in poll mode without
> need to ring cq doorbell, or it could take very long time before it change the
> interrupt state. What we can do when cq->head_incr_to_short_db reaches 0xffff
> in gdma_poll_completion_queue()?
> 
> If it breaks out the loop and return, the next time it enters it may still  at0xffff
> because it has not rung doorbell the have it reset yet.
> 
> If  just resetting the value to 0 and let it keep going in the loop, it is no difference
> than casting it to 16 bit unsigned int, which would be done in
> mana_arm_cq() if it is eventually called.
> 
> Anyway, ringing cq doorbell has not been tested as the driver doesn't support
> interrupts.

If 32bit doorbell doesn't support interrupts, you can remove this feature from 32 bits.

Long

      reply	other threads:[~2023-09-20 17:29 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
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 [this message]

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=PH7PR21MB32639019407E31F012A5DDE4CEF9A@PH7PR21MB3263.namprd21.prod.outlook.com \
    --to=longli@microsoft.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=ktraynor@redhat.com \
    --cc=stable@dpdk.org \
    --cc=weh@microsoft.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;
as well as URLs for NNTP newsgroup(s).