From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Yuval Shaia <yuval.shaia@oracle.com>,
berrange@redhat.com, thuth@redhat.com, philmd@redhat.com,
pbonzini@redhat.com, laurent@vivier.eu, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] configure: Check if we can use ibv_reg_mr_iova
Date: Sat, 31 Aug 2019 22:28:18 +0300 [thread overview]
Message-ID: <e9e23e9c-5fa3-0619-bb34-15a05df08c38@gmail.com> (raw)
In-Reply-To: <20190818132107.18181-2-yuval.shaia@oracle.com>
On 8/18/19 4:21 PM, Yuval Shaia wrote:
> The function reg_mr_iova is an enhanced version of ibv_reg_mr function
> that can help to easly register and use guest's MRs.
>
> Add check in 'configure' phase to detect if we have libibverbs with this
> support.
>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> configure | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/configure b/configure
> index 714e7fb6a1..e8e4a57b6f 100755
> --- a/configure
> +++ b/configure
> @@ -3205,6 +3205,34 @@ else
> pvrdma="no"
> fi
>
> +# Let's see if enhanced reg_mr is supported
> +if test "$pvrdma" = "yes" ; then
> +
> +cat > $TMPC <<EOF &&
> +#include <infiniband/verbs.h>
> +
> +int
> +main(void)
> +{
> + struct ibv_mr *mr;
> + struct ibv_pd *pd = NULL;
> + size_t length = 10;
> + uint64_t iova = 0;
> + int access = 0;
> + void *addr = NULL;
> +
> + mr = ibv_reg_mr_iova(pd, addr, length, iova, access);
Here you check if the API is changed, right?
Can you query for a library version instead?
Thanks,
Marcel
> +
> + ibv_dereg_mr(mr);
> +
> + return 0;
> +}
> +EOF
> + if ! compile_prog "" "-libverbs"; then
> + QEMU_CFLAGS="$QEMU_CFLAGS -DLEGACY_RDMA_REG_MR"
> + fi
> +fi
> +
> ##########################################
> # VNC SASL detection
> if test "$vnc" = "yes" && test "$vnc_sasl" != "no" ; then
next prev parent reply other threads:[~2019-08-31 19:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-18 13:21 [Qemu-devel] [PATCH 0/2] rdma: Utilize ibv_reg_mr_iova for memory registration Yuval Shaia
2019-08-18 13:21 ` [Qemu-devel] [PATCH 1/2] configure: Check if we can use ibv_reg_mr_iova Yuval Shaia
2019-08-31 19:28 ` Marcel Apfelbaum [this message]
2019-09-01 9:25 ` Yuval Shaia
2019-08-18 13:21 ` [Qemu-devel] [PATCH 2/2] hw/rdma: Utilize ibv_reg_mr_iova for memory registration Yuval Shaia
2019-08-31 19:31 ` Marcel Apfelbaum
2019-09-01 9:30 ` Yuval Shaia
2019-08-31 19:26 ` [Qemu-devel] [PATCH 0/2] rdma: " Marcel Apfelbaum
2019-11-05 11:23 ` Marcel Apfelbaum
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=e9e23e9c-5fa3-0619-bb34-15a05df08c38@gmail.com \
--to=marcel.apfelbaum@gmail.com \
--cc=berrange@redhat.com \
--cc=laurent@vivier.eu \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=yuval.shaia@oracle.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 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).