All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Allen Hubbe" <Allen.Hubbe@emc.com>
To: 'Jon Mason' <jdmason@kudzu.us>, 'Dave Jiang' <dave.jiang@intel.com>
Cc: linux-ntb@googlegroups.com
Subject: RE: [PATCH] ntb: ntb perf tool
Date: Wed, 6 Jan 2016 11:37:21 -0500	[thread overview]
Message-ID: <000001d148a0$84a18480$8de48d80$@emc.com> (raw)
In-Reply-To: <CAPoiz9xsYBxFb1pLEYa4xtOF4roD2F_CwJMBsoQDg1ZCSVRBnA@mail.gmail.com>

Jon Mason <jdmason@kudzu.us>:
> On Tue, Jan 5, 2016 at 6:37 PM, Dave Jiang <dave.jiang@intel.com> wrote:

> > +static void perf_link_event(void *ctx)
> > +{
> > +       struct perf_ctx *perf = ctx;
> > +
> > +       if (ntb_link_is_up(perf->ntb, NULL, NULL) == 1)
> 
> The comparison to one seems unnecessary
> 

It api doc says it returns one, zero, or negative to indicate an error.  The Intel NTB driver does not return an error.  Would you prefer to change the api, to make the return simply a boolean, and have some other mechanism to query an error?

> > +       if (!perf->link_is_up)
> > +               cancel_delayed_work_sync(&perf->link_work);
> > +
> > +       for (i = 0; i < MAX_SPAD; i++)
> 
> Complete aside here, but we might need to add logic to the core NTB
> code to query the number of available SPADs and error out of we try to
> get more than that.

Use ntb_spad_count(), and the count does vary.  For example, there are half the number of spads in RP/TB topology than B2B.



  reply	other threads:[~2016-01-06 16:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 23:37 [PATCH] ntb: ntb perf tool Dave Jiang
2016-01-06 15:05 ` Jon Mason
2016-01-06 16:37   ` Allen Hubbe [this message]
2016-01-06 17:45     ` Jon Mason
2016-01-06 16:57   ` Jiang, Dave

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='000001d148a0$84a18480$8de48d80$@emc.com' \
    --to=allen.hubbe@emc.com \
    --cc=dave.jiang@intel.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-ntb@googlegroups.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 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.