All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Jubin John <jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org,
	mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	Vennila Megavannan
	<vennila.megavannan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH RESEND v3 5/6] staging/rdma/hfi1: adding per SDMA engine stats to hfistats
Date: Thu, 3 Mar 2016 10:50:41 -0500	[thread overview]
Message-ID: <56D85D51.40800@redhat.com> (raw)
In-Reply-To: <20160301202736.GA8501-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]

On 03/01/2016 03:27 PM, Jubin John wrote:
>>> diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c
>>> index 1d38be5..cb66bd0 100644
>>> --- a/drivers/staging/rdma/hfi1/sdma.c
>>> +++ b/drivers/staging/rdma/hfi1/sdma.c
>>> @@ -1061,7 +1061,6 @@ int sdma_init(struct hfi1_devdata *dd, u8 port)
>>>  		sde->desc_avail = sdma_descq_freecnt(sde);
>>>  		sde->sdma_shift = ilog2(descq_cnt);
>>>  		sde->sdma_mask = (1 << sde->sdma_shift) - 1;
>>> -		sde->descq_full_count = 0;
>>>  
>>>  		/* Create a mask for all 3 chip interrupt sources */
>>>  		sde->imask = (u64)1 << (0*TXE_NUM_SDMA_ENGINES + this_idx)
>>> @@ -1073,6 +1072,8 @@ int sdma_init(struct hfi1_devdata *dd, u8 port)
>>>  		/* Create a mask specifically for sdma_progress */
>>>  		sde->progress_mask =
>>>  			(u64)1 << (TXE_NUM_SDMA_ENGINES + this_idx);
>>> +		sde->int_mask =
>>> +			(u64)1 << (0 * TXE_NUM_SDMA_ENGINES + this_idx);
>>                                    ^^^^^^^^^^^^^^^^^^^^^^^^
>> Why is that there?
>>
> 
> Hi Doug,
> 
> The zero was intentionally added in an attempt to highlight that this
> was for the first interrupt source, like we do in other places above this
> where we have 1 * TXE_NUM_SDMA_ENGINES, 2 * TXE_NUM_SDMA_ENGINES etc.
> The interrupt sources are separated by the number of SDMA engines
> i.e TXE_NUM_SDMA_ENGINES. However, we agree that the code is not
> consistent throughout. Would you like us to do a cleanup of this code
> in a follow-on patch or rework this patch and resend the series?
> 
> Jubin
> 

Thanks, the code is confusing to read, so a cleanup would be nice.  Just
send me something I can squash into this patch is good enough.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

  parent reply	other threads:[~2016-03-03 15:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 23:30 [PATCH RESEND v3 0/6] staging/rdma/hfi1: Driver cleanup and misc fixes Jubin John
2016-01-11 23:30 ` [PATCH RESEND v3 4/6] staging/rdma/hfi1: Change default krcvqs Jubin John
     [not found] ` <1452555057-5155-1-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-01-11 23:30   ` [PATCH RESEND v3 1/6] staging/rdma/hfi1: Use BIT macro Jubin John
2016-01-11 23:30   ` [PATCH RESEND v3 2/6] staging/rdma/hfi1: Move s_sde to the read mostly portion of the hfi1_qp structure Jubin John
2016-01-11 23:30   ` [PATCH RESEND v3 3/6] staging/rdma/hfi1: change krcvqs module parameter type from byte to uint Jubin John
2016-01-11 23:30   ` [PATCH RESEND v3 5/6] staging/rdma/hfi1: adding per SDMA engine stats to hfistats Jubin John
     [not found]     ` <1452555057-5155-6-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-03-01 15:29       ` Doug Ledford
     [not found]         ` <56D5B567.4040706-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-01 20:27           ` Jubin John
     [not found]             ` <20160301202736.GA8501-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-03-03 15:50               ` Doug Ledford [this message]
     [not found]                 ` <56D85D51.40800-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-04  2:02                   ` Jubin John
2016-01-11 23:30   ` [PATCH RESEND v3 6/6] staging/rdma/hfi1: Remove unneeded variable index Jubin John

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=56D85D51.40800@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=vennila.megavannan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.