From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Yishai Hadas' <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
alexv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
tzahio-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Subject: RE: [PATCH V4 for-next 05/10] IB/core: Introduce Receive Work Queue indirection table
Date: Mon, 23 May 2016 12:07:47 -0500 [thread overview]
Message-ID: <01ba01d1b515$a18a6f80$e49f4e80$@opengridcomputing.com> (raw)
In-Reply-To: <1464006056-19653-6-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Introduce Receive Work Queue (WQ) indirection table.
> This object can be used to spread incoming traffic to different
> receive Work Queues.
>
> A Receive WQ indirection table points to variable size of WQs.
> This table is given to a QP in downstream patches.
>
> Signed-off-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/infiniband/core/verbs.c | 62
> +++++++++++++++++++++++++++++++++++++++++
> include/rdma/ib_verbs.h | 23 +++++++++++++++
> 2 files changed, 85 insertions(+)
>
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index c096cad..6b548d7 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -1636,6 +1636,68 @@ int ib_modify_wq(struct ib_wq *wq, struct ib_wq_attr
> *wq_attr,
> }
> EXPORT_SYMBOL(ib_modify_wq);
>
> +/*
> + * ib_create_rwq_ind_table - Creates a RQ Indirection Table.
> + * @device: The device on which to create the rwq indirection table.
> + * @ib_rwq_ind_table_init_attr: A list of initial attributes required to
> + * create the Indirection Table.
> + *
> + * Note: The life time of ib_rwq_ind_table_init_attr->ind_tbl is not less
> + * than the created ib_rwq_ind_table object and the caller is responsible
> + * for its memory allocation/free.
> + */
> +struct ib_rwq_ind_table *ib_create_rwq_ind_table(struct ib_device *device,
> + struct
ib_rwq_ind_table_init_attr
> *init_attr)
> +{
> + struct ib_rwq_ind_table *rwq_ind_table;
> + int i;
> + u32 table_size;
> +
> + if (!device->create_rwq_ind_table)
> + return ERR_PTR(-ENOSYS);
> +
> + table_size = (1 << init_attr->log_ind_tbl_size);
> + rwq_ind_table = device->create_rwq_ind_table(device,
> + init_attr, NULL);
> + if (IS_ERR(rwq_ind_table))
> + return rwq_ind_table;
> +
> + rwq_ind_table->ind_tbl = init_attr->ind_tbl;
> + rwq_ind_table->log_ind_tbl_size = init_attr->log_ind_tbl_size;
> + rwq_ind_table->device = device;
> + rwq_ind_table->uobject = NULL;
> + atomic_set(&rwq_ind_table->usecnt, 0);
> +
> + for (i = 0; i < table_size; i++)
> + atomic_inc(&rwq_ind_table->ind_tbl[i]->usecnt);
Hey Yishai,
Why do you need usecnt on the individual tables allocated by the device? I see
them inc'd here and dec'd in destroy. But I don't see them used anywhere else?
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
next prev parent reply other threads:[~2016-05-23 17:07 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 12:20 [PATCH V4 for-next 00/10] Verbs RSS Yishai Hadas
[not found] ` <1464006056-19653-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-23 12:20 ` [PATCH V4 for-next 01/10] net/mlx5: Export required core functions to support RSS Yishai Hadas
[not found] ` <1464006056-19653-2-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 12:48 ` Sagi Grimberg
2016-05-23 12:20 ` [PATCH V4 for-next 02/10] IB/core: Introduce Work Queue object and its verbs Yishai Hadas
[not found] ` <1464006056-19653-3-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-23 16:57 ` Steve Wise
[not found] ` <5d0982d2-3b07-11a3-a74c-a52b8e9fb392-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2016-05-24 8:50 ` Yishai Hadas
[not found] ` <d2401170-0ff4-c39a-d7c6-2a5face00fa2-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-05-24 14:25 ` Steve Wise
2016-05-24 14:51 ` Yishai Hadas
2016-05-29 12:51 ` Sagi Grimberg
[not found] ` <574AE5C4.5010707-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-05-29 12:56 ` Sagi Grimberg
[not found] ` <574AE710.3070901-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-05-29 13:30 ` Yishai Hadas
[not found] ` <7747beea-5c96-6c17-a87e-a16a45252487-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-05-30 6:38 ` Sagi Grimberg
2016-05-23 12:20 ` [PATCH V4 for-next 03/10] IB/uverbs: Add WQ support Yishai Hadas
[not found] ` <1464006056-19653-4-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 12:57 ` Sagi Grimberg
2016-05-23 12:20 ` [PATCH V4 for-next 04/10] IB/mlx5: Add receive Work Queue verbs Yishai Hadas
[not found] ` <1464006056-19653-5-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 13:02 ` Sagi Grimberg
2016-05-30 20:13 ` Or Gerlitz
2016-05-23 12:20 ` [PATCH V4 for-next 05/10] IB/core: Introduce Receive Work Queue indirection table Yishai Hadas
[not found] ` <1464006056-19653-6-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-23 17:07 ` Steve Wise [this message]
2016-05-24 7:39 ` Yishai Hadas
[not found] ` <46a7de86-dffe-e44c-3768-10dfb70e8802-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-05-24 14:02 ` Steve Wise
2016-05-29 13:06 ` Sagi Grimberg
2016-05-23 12:20 ` [PATCH V4 for-next 06/10] IB/uverbs: Introduce RWQ Indirection table Yishai Hadas
[not found] ` <1464006056-19653-7-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 13:07 ` Sagi Grimberg
2016-05-23 12:20 ` [PATCH V4 for-next 07/10] IB/mlx5: Add Receive Work Queue Indirection table operations Yishai Hadas
[not found] ` <1464006056-19653-8-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 13:08 ` Sagi Grimberg
2016-05-23 12:20 ` [PATCH V4 for-next 08/10] IB/core: Extend create QP to get indirection table Yishai Hadas
[not found] ` <1464006056-19653-9-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 13:11 ` Sagi Grimberg
[not found] ` <574AEA8D.2010909-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-05-29 13:55 ` Yishai Hadas
[not found] ` <d34f7f40-5e05-2eb9-4b81-649b2cb11174-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-05-30 6:43 ` Sagi Grimberg
2016-05-23 12:20 ` [PATCH V4 for-next 09/10] IB/uverbs: Extend create QP to get RWQ " Yishai Hadas
[not found] ` <1464006056-19653-10-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 13:12 ` Sagi Grimberg
2016-05-23 12:20 ` [PATCH V4 for-next 10/10] IB/mlx5: Add RSS QP support Yishai Hadas
[not found] ` <1464006056-19653-11-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 13:16 ` Sagi Grimberg
2016-05-29 11:27 ` [PATCH V4 for-next 00/10] Verbs RSS Yuval Shaia
2016-06-23 15:11 ` Doug Ledford
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='01ba01d1b515$a18a6f80$e49f4e80$@opengridcomputing.com' \
--to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
--cc=alexv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=talal-VPRAkNaXOzVWk0Htik3J/w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.