[PATCH 1/1] net/mana: add 32 bit short doorbell
Long Li
longli at microsoft.com
Tue Sep 19 21:23:39 CEST 2023
> > > +#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.
Thanks,
Long
More information about the stable
mailing list