From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Yishai Hadas <yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
bodong-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH rdma-core 2/3] ibverbs: Add support for packet pacing
Date: Mon, 9 Jan 2017 10:02:00 -0700 [thread overview]
Message-ID: <20170109170200.GB13960@obsidianresearch.com> (raw)
In-Reply-To: <b9cca64f-0d67-6174-74e5-291f93b48c1c-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
On Mon, Jan 09, 2017 at 06:46:33PM +0200, Yishai Hadas wrote:
> >cmd->rate_limit is not being 0'd if it isn't set
>
> The 'cmd' was fully set to 0'd by the provider, see usage in the last patch.
Why are some providers zeroing this and other are not?
> In case we want to do it in this layer I would vote on using memset at the
> beginning of that function to prevent repeating this for any new field. Your
> last patch in that area could do it as well.
Sounds like you should clean this all up and use = {} consistently in
the providers and drop the explicit = 0.
> >>@@ -829,7 +829,8 @@ enum ibv_qp_attr_mask {
> >> IBV_QP_MAX_DEST_RD_ATOMIC = 1 << 17,
> >> IBV_QP_PATH_MIG_STATE = 1 << 18,
> >> IBV_QP_CAP = 1 << 19,
> >>- IBV_QP_DEST_QPN = 1 << 20
> >>+ IBV_QP_DEST_QPN = 1 << 20,
> >>+ IBV_QP_RATE_LIMIT = 1 << 25,
> >> };
> >
> >Why 25? 21 I think.
>
> To match kernel, 21-24 are reserved.
Hm, Ok
> >
> >> enum ibv_qp_state {
> >>@@ -875,6 +876,7 @@ struct ibv_qp_attr {
> >> uint8_t rnr_retry;
> >> uint8_t alt_port_num;
> >> uint8_t alt_timeout;
> >>+ uint32_t rate_limit;
> >> };
> >
> >Nope, this is returned by query_qp so you cannot just extend it.
> It's safe, please see below.
> >
> >You are supporting query_qp, right?
> At the moment the kernel doesn't support an extended command for query_qp so
> user space doesn't get and touch this field.
Yuk, why would you do this?
> Once support will be added in the kernel, the attr_mask field of
> ibv_query_qp should be used to indicate whether application asked for that
> field (i.e. IBV_QP_RATE_LIMIT) and supplied an input structure that has
> memory to hold this output so it's safe to extend the above structure. Same
> idea was used in this series for accessing this field in modify_qp as an
> input.
Insane as it may be, 'attr_mask' is defined as a hint for
ibv_query_qp, you are redefining it to be a hard requirement for ABI
purposes.
> We can consider adding an extra check in ibv_cmd_query_qp as part of this
> series to check whether IBV_QP_RATE_LIMIT or higher bits were asked, if yes
> return an error as there is no support for that value without using an
> extended command, makes sense ?
Absolutely.
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:[~2017-01-09 17:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-08 16:32 [PATCH rdma-core 0/3] Add packet pacing support Yishai Hadas
[not found] ` <1483893148-8211-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-08 16:32 ` [PATCH rdma-core 1/3] ibverbs: Report packet pacing capabilities when querying device Yishai Hadas
2017-01-08 16:32 ` [PATCH rdma-core 2/3] ibverbs: Add support for packet pacing Yishai Hadas
[not found] ` <1483893148-8211-3-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-09 15:38 ` Jason Gunthorpe
[not found] ` <20170109153856.GA29687-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-09 16:46 ` Yishai Hadas
[not found] ` <b9cca64f-0d67-6174-74e5-291f93b48c1c-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-01-09 17:02 ` Jason Gunthorpe [this message]
[not found] ` <20170109170200.GB13960-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-09 21:44 ` Yishai Hadas
[not found] ` <c50008b5-f0f2-a1a4-94e7-2354ea2b0123-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-01-10 8:18 ` Leon Romanovsky
2017-01-08 16:32 ` [PATCH rdma-core 3/3] mlx5: Add packet pacing support Yishai Hadas
[not found] ` <1483893148-8211-4-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-09 15:39 ` Jason Gunthorpe
[not found] ` <20170109153943.GB29687-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-09 16:56 ` 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=20170109170200.GB13960@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=bodong-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=yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@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