public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: "Weiny, Ira" <ira.weiny@intel.com>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	"Wan, Kaike" <kaike.wan@intel.com>,
	"Fleck, John" <john.fleck@intel.com>, Thomas Graf <tgraf@suug.ch>,
	Doug Ledford <dledford@redhat.com>,
	Jiri Pirko <jiri@mellanox.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	linux-netdev <netdev@vger.kernel.org>
Subject: Re: Netlink messages without NLM_F_REQUEST flag
Date: Wed, 7 Jun 2017 21:13:58 +0300	[thread overview]
Message-ID: <20170607181358.GH1127@mtr-leonro.local> (raw)
In-Reply-To: <2807E5FD2F6FDA4886F6618EAC48510E67CCE1CD@CRSMSX101.amr.corp.intel.com>

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

On Wed, Jun 07, 2017 at 05:10:35PM +0000, Weiny, Ira wrote:
> >
> > On Wed, Jun 07, 2017 at 10:47:50AM -0600, Jason Gunthorpe wrote:
> > > On Wed, Jun 07, 2017 at 07:43:44PM +0300, Leon Romanovsky wrote:
> > > > On Wed, Jun 7, 2017 at 7:37 PM, Jason Gunthorpe
> > > > <jgunthorpe@obsidianresearch.com> wrote:
> > > > > On Wed, Jun 07, 2017 at 07:19:01PM +0300, Leon Romanovsky wrote:
> > > > >> It makes me wonder if it is expected behavior for
> > > > >> ibnl_rcv_reply_skb() to handle !NLM_F_REQUEST messages and do
> > > > >> we really need it? What are the scenarios?  In my use case,
> > > > >> which is for sure different from yours, I'm always setting
> > > > >> NLM_F_REQUEST while communicating with kernel.
> > > > >
> > > > > If I recall the user space SA code issues REQUESTS from the
> > > > > kernel to userspace, so userspace returns with the response
> > > > > format. This is abnormal for netlink hence the special function.
> > > >
> > > > In netlink semantics, kernel side is supposed to send netlink
> > > > notification message and userspace is supposed to send REQUEST.
> > >
> > > That pattern is for async communications, the SA stuff needs a sync
> > > protocol, unfortunately.
> >
> > There is special flag NLM_F_ACK for it and userspace will set
> > NLM_F_REQUEST | NLM_F_ACK once synchronization is needed.
> >
>
> Reference?
>
> From my understanding, NLM_F_REQUEST | NLM_F_ACK is simply requesting an ack from the kernel on a request.  In our case the message is a response to the kernel request.

There is a large chance that we are talking about different aspects of
"sync protocol" and for sure it is due to  my misunderstanding. Can you
elaborate more about the protocol? Why is so unique to RDMA?

Why is ACK + sequence number tracking not enough?

https://www.infradead.org/~tgr/libnl/doc/core.html#core_msg_ack

>
> Ira
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2017-06-07 18:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 16:19 Netlink messages without NLM_F_REQUEST flag Leon Romanovsky
     [not found] ` <20170607161901.GD1127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-06-07 16:37   ` Jason Gunthorpe
     [not found]     ` <20170607163758.GA25313-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-07 16:43       ` Leon Romanovsky
     [not found]         ` <CALq1K=Jj_jJ5_OAiiws-es37tFEsLeLJeSvnU+bfwd0KLkGM3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-07 16:47           ` Jason Gunthorpe
     [not found]             ` <20170607164750.GA7507-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-07 17:00               ` Leon Romanovsky
     [not found]                 ` <20170607170037.GG1127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-06-07 17:07                   ` Jason Gunthorpe
     [not found]                     ` <20170607170702.GB7507-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-07 18:18                       ` Leon Romanovsky
     [not found]                         ` <20170607181810.GI1127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-06-07 18:26                           ` Hefty, Sean
2017-06-07 18:35                         ` Jason Gunthorpe
     [not found]                           ` <20170607183511.GA10225-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-08  5:08                             ` Leon Romanovsky
2017-06-07 17:10                   ` Weiny, Ira
2017-06-07 18:13                     ` Leon Romanovsky [this message]

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=20170607181358.GH1127@mtr-leonro.local \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=ira.weiny@intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=jiri@mellanox.com \
    --cc=john.fleck@intel.com \
    --cc=kaike.wan@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox