RE: [PATCH v2 net] net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +	if (w < cq->budget) {
> > +		mana_gd_ring_cq(gdma_queue, SET_ARM_BIT);
> > +		cq->work_done_since_doorbell = 0;
> > +		napi_complete_done(&cq->napi, w);
> > +	} else if (cq->work_done_since_doorbell >
> > +		   cq->gdma_cq->queue_size / COMP_ENTRY_SIZE * 4) {
> 
> should we define a macro for 4? may be 'CQ_WRAPAROUND_LIMIT'

I prefer to leaving the code as is. This is the only place it's used, and there is a comment explaining why this value is chosen.

> 
> > +		/* MANA hardware requires at least one doorbell ring every 8
> > +		 * wraparounds of CQ even if there is no need to arm the CQ.
> > +		 * This driver rings the doorbell as soon as we have exceeded
> > +		 * 4 wraparounds.
> > +		 */
> > +		mana_gd_ring_cq(gdma_queue, 0);
> > +		cq->work_done_since_doorbell = 0;
> > 2.17.1





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux