Re: [PATCH for-next V1 03/11] IB/core: Add CQ creation time-stamping flag

Doug Ledford
2015-05-29T16:47:02Z

[-- Attachment #1: Type: text/plain, Size: 1599 bytes --]

On Thu, 2015-05-21 at 17:56 +0300, Or Gerlitz wrote:
> From: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> Add CQ creation flag which dictates that the created CQ will report
> completion time-stamp value in the WC.
>
> Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> include/rdma/ib_verbs.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 4f6b397..28ec073 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -166,6 +166,10 @@ struct ib_odp_caps {
> } per_transport_caps;
> };

This needs documentation, and quite possibly a different flag name. In
this case, you are timestamping the completion events. That's fine, but
that's not the only thing that would be a reasonable timestamp event in
a complete API. Maybe someone wants to timestamp the start of the
transfer instead, so they can order packets not on who finished first,
but who had their first byte arrive first. A note detailing this
possibility, and then stating that this particular option is for
completion timestamping, and maybe change the name to
TIMESTAMP_COMPLETION.

> +enum ib_cq_creation_flags {
> + IB_CQ_FLAGS_TIMESTAMP = 1 << 0,
> +};
> +
> struct ib_cq_init_attr {
> unsigned int cqe;
> int comp_vector;

--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: 0E572FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]