From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH V2 libibverbs 2/7] Add member functions to poll an extended CQ
Date: Thu, 19 May 2016 12:19:33 -0600 [thread overview]
Message-ID: <20160519181933.GB26130@obsidianresearch.com> (raw)
In-Reply-To: <1463658702-9975-3-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Thu, May 19, 2016 at 02:51:37PM +0300, Yishai Hadas wrote:
> + int (*start_poll_ex)(struct ibv_cq_ex *current,
> + struct ibv_poll_cq_ex_attr *attr);
> + int (*next_poll_ex)(struct ibv_cq_ex *current);
> + void (*end_poll_ex)(struct ibv_cq_ex *current);
Probably don't need the _ex here..
> + uint64_t (*read_wr_id)(struct ibv_cq_ex *current);
> + enum ibv_wc_status (*read_status)(struct ibv_cq_ex *current);
> + enum ibv_wc_opcode (*read_opcode)(struct ibv_cq_ex *current);
opcode, status and wr_id are always available in every WR, so I think
a faster way to return them should be devised. Perahps have the driver
write them to ibv_cq_ex and have the inline functions read the struct
directly?
How does this work multi-threaded? Is the locking done in
start_poll.end_poll?
> + uint32_t (*read_vendor_err)(struct ibv_cq_ex *current);
> + uint32_t (*read_byte_len)(struct ibv_cq_ex *current);
> + uint32_t (*read_imm_data)(struct ibv_cq_ex *current);
> + uint32_t (*read_qp_num)(struct ibv_cq_ex *current);
> + uint32_t (*read_src_qp)(struct ibv_cq_ex *current);
> + int (*read_wc_flags)(struct ibv_cq_ex *current);
> + uint16_t (*read_pkey_index)(struct ibv_cq_ex *current);
> + uint16_t (*read_slid)(struct ibv_cq_ex *current);
> + uint8_t (*read_sl)(struct ibv_cq_ex *current);
> + uint8_t (*read_dlid_path_bits)(struct ibv_cq_ex *current);
Maybe some of these should be grouped into a struct? What kind of
performance hit did you measure on these calls? Reading all the ud
parameters is not very expensive...
read_ud_info ?
What does the driver look like? I'm assuming it turned out as short
and jump free as I outlined?
Finally, these extended APIs really need to be always available - so
the core code should always provide a compatability wrapper for
providers that do not implement this API. The compat wrapper should
use the existing provider wc interface.
We should not have stuff like in your rc_pingpong example where
totally different code paths are required on something like wc
processing.
Jason
--
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-19 18:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 11:51 [PATCH V2 libibverbs 0/7] Completion timestamping Yishai Hadas
[not found] ` <1463658702-9975-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-19 11:51 ` [PATCH V2 libibverbs 1/7] Add support for extended creating CQ verb Yishai Hadas
2016-05-19 11:51 ` [PATCH V2 libibverbs 2/7] Add member functions to poll an extended CQ Yishai Hadas
[not found] ` <1463658702-9975-3-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-19 18:19 ` Jason Gunthorpe [this message]
[not found] ` <20160519181933.GB26130-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-23 15:31 ` Yishai Hadas
[not found] ` <c2a28acc-811a-84da-0793-88032de99b23-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-05-24 17:34 ` Jason Gunthorpe
2016-05-19 11:51 ` [PATCH V2 libibverbs 3/7] Add timestamp_mask and hca_core_clock to ibv_query_device_ex Yishai Hadas
2016-05-19 11:51 ` [PATCH V2 libibverbs 4/7] Add completion timestamp to poll_cq Yishai Hadas
2016-05-19 11:51 ` [PATCH V2 libibverbs 5/7] Create a single threaded CQ Yishai Hadas
2016-05-19 11:51 ` [PATCH V2 libibverbs 6/7] Add a verb that queries real time values from the HCA Yishai Hadas
2016-05-19 11:51 ` [PATCH V2 libibverbs 7/7] Add timestamp support in rc_pingpong Yishai Hadas
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=20160519181933.GB26130@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@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=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