From: Marcel Apfelbaum <marcel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux Kernel Mailinglist
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Hal Rosenstock
<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] drivers/rxe: improve rxe loopback
Date: Mon, 31 Jul 2017 12:53:51 +0300 [thread overview]
Message-ID: <c1642e45-d814-cda1-357c-dfd9eb2a97c4@redhat.com> (raw)
In-Reply-To: <CAG9sBKNc89nVeJM-UZk8JRy9zXz-U1JdWJ8KkjpeSXvdbwNNsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 30/07/2017 12:57, Moni Shoua wrote:
>>> Have you considered using ip_route_output_key() for IPv4 or
>>> ip6_route_output() for IPv6 to decide if this is a loopback?
>>> For reference you can check the flow starting at rdma_resolve_ip()
>>>
>>
>> Hi Moni,
>>
>> Yes, I had looked into it, but I haven't seen how I can find
>> out if the destination IP belongs to the same RXE.
>> The loopback flag will give us the "same host"
>> confirmation, but not the same rxe instance, right?
>>
>> Any ideas would be welcomed.
>>
>> Thanks,
>> Marcel
>>
> Hi Marcel
>
Hi Moni,
> You are right about that. IFF_LOOPBACK tells you that the source and
> destination addresses are on the same host but not necessarily on the
> same RXE device.
>
> As Leon mentioned, calling addrX_same_rxe() for each packet seems to
> heavy , especially when the use case that justifies it (instead of
> calling memcmp() on src and dst) is rare. Do you agree?
I do agree is rare, but is depending on use-case. And since it
is a bug we should fix it, but not on the expense of performance
of course.
> If so I think that marking a connection as loopback once is the right approach
> For RC/UC - when modified to RTR
Sounds good to me.
> For UD - this is harder. IsLoopback() is function of the WQE (or at
> least the QP and AH together( but not the QP. I think you can add an
> improvement that will work for the majority of cases. This is a sketch
> of what I have in mind. Let me know what you think please
>
> 1. Add bool last_used_qp to AH structure
> 2. Add bool is_loopback_with_last_qp to AH structure
> 3. Set values to AH.last_used_qp and AH.is_loopback_with_last_qp in
> post_send() modify_ah(),...
> 4. Mark WQE as loopback depending on the above
>
Your pointer is very much appreciated, I will look into it.
Thanks,
Marcel
--
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
next prev parent reply other threads:[~2017-07-31 9:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-26 14:52 [PATCH] drivers/rxe: improve rxe loopback Marcel Apfelbaum
2017-07-26 19:36 ` Yuval Shaia
2017-07-26 19:56 ` Yuval Shaia
[not found] ` <20170726145248.21677-1-marcel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-26 19:57 ` Yuval Shaia
2017-07-27 7:04 ` Moni Shoua
2017-07-27 9:55 ` Marcel Apfelbaum
[not found] ` <778dcc67-30f2-aecc-3e53-7cf4d0afb74e-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-30 9:57 ` Moni Shoua
[not found] ` <CAG9sBKNc89nVeJM-UZk8JRy9zXz-U1JdWJ8KkjpeSXvdbwNNsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-31 9:53 ` Marcel Apfelbaum [this message]
2017-07-27 7:36 ` Leon Romanovsky
[not found] ` <20170727073635.GB13672-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-27 9:49 ` Marcel Apfelbaum
[not found] ` <52aeac10-079f-5c3b-5987-14ead00e2646-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-27 10:40 ` Leon Romanovsky
2017-07-27 13:47 ` kbuild test robot
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=c1642e45-d814-cda1-357c-dfd9eb2a97c4@redhat.com \
--to=marcel-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@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