[PATCH 1/1] net/mana: add 32 bit short doorbell
Wei Hu
weh at microsoft.com
Thu Sep 14 07:11:02 CEST 2023
> -----Original Message-----
> From: Long Li <longli at microsoft.com>
> Sent: Thursday, September 14, 2023 5:11 AM
> To: Wei Hu <weh at microsoft.com>; dev at dpdk.org; Ferruh Yigit
> <ferruh.yigit at amd.com>; Andrew Rybchenko
> <andrew.rybchenko at oktetlabs.ru>
> Cc: stable at 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
More information about the dev
mailing list