public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Tzahi Oved <tzahio-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH libmlx4 v6 1/2] libmlx4: Infra-structure changes to support verbs extensions
Date: Tue, 04 Jun 2013 14:39:52 -0500	[thread overview]
Message-ID: <51AE4288.4010505@opengridcomputing.com> (raw)
In-Reply-To: <1364332591-22866-1-git-send-email-sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

On 3/26/2013 4:16 PM, sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:

<snip>

> @@ -236,23 +235,30 @@ found:
>   		return NULL;
>   	}
>   
> -	dev = malloc(sizeof *dev);
> +	dev = calloc(1, sizeof(*dev));
>   	if (!dev) {
>   		fprintf(stderr, PFX "Fatal: couldn't allocate device for %s\n",
>   			uverbs_sys_path);
>   		return NULL;
>   	}
>   
> -	dev->ibv_dev.ops = mlx4_dev_ops;
>   	dev->page_size   = sysconf(_SC_PAGESIZE);
> -
> -	return &dev->ibv_dev;
> +	dev->verbs_dev.sz = sizeof(*dev);
> +	dev->verbs_dev.size_of_context =
> +		sizeof(struct mlx4_context) - sizeof(struct ibv_context);
> +	 /* mlx4_init_context will initialize provider calls */
> +	dev->verbs_dev.init_context = mlx4_init_context;
> +	dev->verbs_dev.uninit_context = mlx4_uninit_context;
> +
> +	return &dev->verbs_dev;
>   }
>   
> +
>   #ifdef HAVE_IBV_REGISTER_DRIVER
>   static __attribute__((constructor)) void mlx4_register_driver(void)
>   {
> -	ibv_register_driver("mlx4", mlx4_driver_init);
> +	verbs_register_driver("mlx4", mlx4_driver_init);
> +
>   }
>   #else

Shouldn't ibv_register_driver() need to be called in the lib constructor 
function if HAVE_IBV_REGISTER_DRIVER is not defined?


Steve.
--
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:[~2013-06-04 19:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 21:16 [PATCH libmlx4 v6 1/2] libmlx4: Infra-structure changes to support verbs extensions sean.hefty-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <1364332591-22866-1-git-send-email-sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-03-26 21:16   ` [PATCH libmlx4 v6 2/2] libmlx4: Add support for XRC QPs sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-06-04 19:39   ` Steve Wise [this message]
     [not found]     ` <51AE4288.4010505-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2013-06-04 19:46       ` [PATCH libmlx4 v6 1/2] libmlx4: Infra-structure changes to support verbs extensions Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A823736FD2CF18-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-06-04 20:01           ` Steve Wise
     [not found]             ` <51AE47A3.5060802-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2013-06-05 14:54               ` Steve Wise
     [not found]                 ` <51AF5129.7020205-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2013-06-05 16:55                   ` Jason Gunthorpe
2013-06-04 20:55           ` 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=51AE4288.4010505@opengridcomputing.com \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=tzahio-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-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