All of lore.kernel.org
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Atul Raut <araut@codeaurora.org>, linux-ntb@googlegroups.com
Subject: Re: [PATCH v2 1/4] NTB : Introduce message library
Date: Wed, 9 May 2018 22:35:16 -0600	[thread overview]
Message-ID: <ab2b9171-ae76-0cdb-5cbc-9aa08a3a29ab@deltatee.com> (raw)
In-Reply-To: <37573d5a-cbe1-123c-f522-9a7fbb11d489@codeaurora.org>



On 09/05/18 08:10 PM, Atul Raut wrote:
> Agree, few points would like to bring it here & see if that makes
> sense ?
> 1. Here Library brings some useful things, that  currently two 
> client are using it with assumption that these things may
> need for feature clients as well.
> 2. The main objective of library is to solve common problem
> that any client driver may have, and that is configuring
> inbound/outbound memory window by sharing some info using these
> registers in certain way, one way is my patch that derived from
> Sergey's ntb_perf module.
> The idea is to have basic infrastructure in place which solves
> basic configuration problem for any client driver.
> Not sure these answers your question, but if any one has some
> other suggestions on library implementation I will give an try.

Well, I'd much rather try for something a little better and actually see
the code get cleaner instead of just copying what was in one client into
a library. Case in point: you're adding way more lines to
ntb_transport.c despite creating a library that's supposed to make it's
code simpler.

I'd suggest an API that accepts a small block of memory and sends it
over either spads or msgs (whichever is available). The protocol for
this can be defined by the library and the clients won't care how the
data is sent. Clients then only need to create and populate a small
structure with data it requires to initialize itself. The structure can
then be sent and received with minimal code by the clients. This will
clean up the clients and avoid having them parse and send all these CMD
IDs. It also lets clients define the data they want to send themselves
instead of encoding all possible commands in the library. Such an API
would also be much more future proof as future clients will be able to
use it for any kind of initialization data.


>>> Do we really need a cmd_wid message? 
> These will act dummy for scratchpad based registers, added just to 
> have common API's for scratchpad & message registers.

I don't understand this. But the fact is, it will not work with
Switchtec as there is only 3 messages available. So you will have to
think of something else.

Logan

  reply	other threads:[~2018-05-10  4:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-06 19:20 [PATCH v2 0/4] NTB : Introduce message library Atul Raut
2018-05-06 19:20 ` [PATCH v2 1/4] " Atul Raut
2018-05-07  5:29   ` Logan Gunthorpe
2018-05-10  2:10     ` Atul Raut
2018-05-10  4:35       ` Logan Gunthorpe [this message]
2018-05-10 18:13         ` Atul Raut
2018-05-11 22:40   ` Serge Semin
2018-05-06 19:20 ` [PATCH v2 2/4] NTB : Add message library NTB API Atul Raut
2018-05-11 22:44   ` Serge Semin
2018-05-11 23:11     ` Logan Gunthorpe
2018-05-14 20:25       ` Serge Semin
2018-05-14 20:59         ` Logan Gunthorpe
2018-05-14 21:39           ` Serge Semin
2018-05-14 22:04             ` Logan Gunthorpe
2018-05-13  0:25     ` Allen Hubbe
2018-05-13  0:31       ` Allen Hubbe
2018-05-14 23:16       ` Serge Semin
2018-05-15 14:21         ` Allen Hubbe
2018-05-31 22:27           ` Serge Semin
2018-05-06 19:20 ` [PATCH v2 3/4] NTB : Modification to ntb_perf module Atul Raut
2018-05-06 19:20 ` [PATCH v2 4/4] NTB : Add support to message registers based devices Atul Raut
2018-05-11 22:39 ` [PATCH v2 0/4] NTB : Introduce message library Serge Semin
2018-05-11 23:00   ` Logan Gunthorpe
2018-05-14 20:40     ` Serge Semin
2018-05-14 21:04       ` Logan Gunthorpe

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=ab2b9171-ae76-0cdb-5cbc-9aa08a3a29ab@deltatee.com \
    --to=logang@deltatee.com \
    --cc=araut@codeaurora.org \
    --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.