linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Erez Shitrit <erezsh-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Subject: Re: [RFC v2 for accelerated IPoIB 00/6] Enhanced mode for IPoIB driver
Date: Wed, 22 Mar 2017 10:52:38 -0600	[thread overview]
Message-ID: <20170322165238.GA26589@obsidianresearch.com> (raw)
In-Reply-To: <CAAk-MO_KEV9MA5Dcaz8SZagMeC4hQX456Cu8To-YRBNMeNu3pg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, Mar 22, 2017 at 01:18:30PM +0200, Erez Shitrit wrote:

> 1. The qkey is not assigned at the initialization stage and the value
> in ah struct is not correct. It looks like, there is no way to avoid
> forwarding qkey (the item #6 - “no need to pass qkey, it is in the ah
> struct”).

It does make some sense that the qkey in the AH is not right, but it
still does not really make sense to forward it..

Just have the driver capture the qkey during 'attach_mcast'..

Looking at it more, there is something wrong with the implementation
in mlx5 since attach_mcast does not even use the qkey. I have no idea
how this works since the rx side must use a filter that only allows
packets that match the qkey for security.

Likely you will want to add a qkey argument to 'attach_mcast' to sort
this out..

> 2. In order to use the send from the ndo, there is need to pass the
> pointer to ib_av struct. The immediate solution is to embed it into
> the skb->data (we have 20 bytes free from the pseudo header).

Well, there are two solutions, one is to encode the ah in the pseudo
header during ipoib_hard_header. This is actually an optimization
because ipoib_hard_header is called bfore GSO splitting, so the ah can
be computed once instead of computed for every split packet. The
downside here is that it may be very complicated to store a kref in a
skb pseudo header and properly unref it at all the right times..

The other is to factor out the AH extraction from ipoib_start_xmit
into a helper function and have all the rn drivers call it to get the
AH.

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

  parent reply	other threads:[~2017-03-22 16:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 19:08 [RFC v2 for accelerated IPoIB 00/6] Enhanced mode for IPoIB driver Erez Shitrit
     [not found] ` <1490036908-12528-1-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-03-20 19:08   ` [RFC v2 for accelerated IPoIB 01/6] IB/ipoib: Separate control and data related initializations Erez Shitrit
2017-03-20 19:08   ` [RFC v2 for accelerated IPoIB 02/6] IB/ipoib: separate control from HW operation on ipoib_open/stop ndo Erez Shitrit
2017-03-20 19:08   ` [RFC v2 for accelerated IPoIB 03/6] IB/ipoib: Rename qpn to dqpn in ipoib_send and post_send functions Erez Shitrit
2017-03-20 19:08   ` [RFC v2 for accelerated IPoIB 04/6] IB/verb: Add ipoib_options struct and API Erez Shitrit
2017-03-20 19:08   ` [RFC v2 for accelerated IPoIB 05/6] IB/ipoib: Support ipoib acceleration options callbacks Erez Shitrit
2017-03-20 19:08   ` [RFC v2 for accelerated IPoIB 6/6] mlx5_ib: skeleton for mlx5_ib to support ipoib_ops Erez Shitrit
2017-03-20 20:59   ` [RFC v2 for accelerated IPoIB 00/6] Enhanced mode for IPoIB driver Jason Gunthorpe
     [not found]     ` <20170320205927.GA17225-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-21 11:49       ` Leon Romanovsky
     [not found]         ` <20170321114955.GB2079-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-21 16:15           ` Jason Gunthorpe
     [not found]             ` <20170321161530.GB22216-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-21 16:49               ` Leon Romanovsky
     [not found]                 ` <20170321164952.GE2079-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-22 11:18                   ` Erez Shitrit
     [not found]                     ` <CAAk-MO_KEV9MA5Dcaz8SZagMeC4hQX456Cu8To-YRBNMeNu3pg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-22 16:52                       ` Jason Gunthorpe [this message]
     [not found]                         ` <20170322165238.GA26589-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-26 16:17                           ` Erez Shitrit
     [not found]                             ` <CAAk-MO_7LVUQS_8+h9shFEXkjT6NHkzXeYRH+_8Wcjr0P+dHAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-26 20:42                               ` Jason Gunthorpe
     [not found]                                 ` <20170326204237.GB3113-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-28 11:40                                   ` Erez Shitrit
     [not found]                                     ` <CAAk-MO8Z7wKGFU5empgHGpN73cGMkKMi+ijnTHpfXBD5oZ+cGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-29 13:46                                       ` Jason 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=20170322165238.GA26589@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=erezsh-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=valex-VPRAkNaXOzVWk0Htik3J/w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).