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,
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 08:38:56 -0700 [thread overview]
Message-ID: <20170109153856.GA29687@obsidianresearch.com> (raw)
In-Reply-To: <1483893148-8211-3-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Sun, Jan 08, 2017 at 06:32:27PM +0200, Yishai Hadas wrote:
> +int ibv_cmd_modify_qp_ex(struct ibv_qp *qp, struct ibv_qp_attr *attr,
> + int attr_mask, struct ibv_modify_qp_ex *cmd,
> + size_t cmd_core_size, size_t cmd_size,
> + struct ibv_modify_qp_resp_ex *resp,
> + size_t resp_core_size, size_t resp_size)
> +{
> + if (resp_core_size < offsetof(struct ibv_modify_qp_resp_ex,
> + response_length) + sizeof(resp->response_length))
> + return EINVAL;
> +
> + IBV_INIT_CMD_RESP_EX_V(cmd, cmd_core_size, cmd_size, MODIFY_QP_EX,
> + resp, resp_core_size, resp_size);
> +
> + copy_modify_qp_fields(qp, attr, attr_mask, &cmd->base);
> +
> + if (attr_mask & IBV_QP_RATE_LIMIT) {
> + if (cmd_size >= offsetof(struct ibv_modify_qp_ex, rate_limit) +
> + sizeof(cmd->rate_limit))
> + cmd->rate_limit = attr->rate_limit;
> + else
> + return EINVAL;
> + }
cmd->rate_limit is not being 0'd if it isn't set
> @@ -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.
> 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.
You are supporting query_qp, right?
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 15:38 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 [this message]
[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
[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=20170109153856.GA29687@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-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