[openib-general] Re: [PATCH] [CMA] support loopback addresses

Michael S. Tsirkin mst at mellanox.co.il
Wed Dec 28 14:31:51 PST 2005


Hello, Sean!
Thanks for looking at this.

Quoting Sean Hefty <sean.hefty at intel.com>:
> +	INIT_WORK(work, loopback_addr_handler, id_priv);
> +	queue_work(wq, work);
> +	return 0;
> +err:
> +	kfree(work);
> +	return ret;
> +}

I'm not following this: why are we deferring the work?
Cant it be done directly?

> @@ -1508,12 +1602,17 @@ static void cma_remove_one(struct ib_dev
>  
>  static int cma_init(void)
>  {
> +	wq = create_singlethread_workqueue("rdma_cm");
> +	if (!wq)
> +		return -ENOMEM;
> +
>  	return ib_register_client(&cma_client);
>  }
>  
>  static void cma_cleanup(void)
>  {
>  	ib_unregister_client(&cma_client);
> +	destroy_workqueue(wq);
>  }
>  
>  module_init(cma_init);

It would be nice to avoid adding another workqueue.

-- 
MST



More information about the general mailing list