Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: liweihang <liweihang@huawei.com>
To: Gal Pressman <galpress@amazon.com>, Leon Romanovsky <leon@kernel.org>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Linuxarm <linuxarm@huawei.com>
Subject: Re: Question about IB_QP_CUR_STATE
Date: Fri, 10 Jul 2020 10:11:20 +0000	[thread overview]
Message-ID: <3cfb41bfa2cb4d5cb508a572dbb5e6c7@huawei.com> (raw)
In-Reply-To: a738e3f3-e2bc-a670-7292-8025c78e210d@amazon.com

On 2020/7/9 14:14, Gal Pressman wrote:
> On 08/07/2020 18:44, Leon Romanovsky wrote:
>> On Wed, Jul 08, 2020 at 03:42:34PM +0300, Gal Pressman wrote:
>>> On 08/07/2020 12:41, liweihang wrote:
>>>> Hi all,
>>>>
>>>> I'm a little confused about the role of IB_QP_CUR_STATE in the enumeration
>>>> ib_qp_attr_mask.
>>>>
>>>> In manual page of ibv_modify_qp(), comments of cur_qp_state is "Assume this
>>>> is the current QP state". Why we need to get current qp state from users
>>>> instead of drivers?
>>>>
>>>> For example, why the users are allowed to modify qp from RTR to RTS again
>>>> even if the qp's state in driver and hardware has already been RTS.
>>>>
>>>> I would be appretiate it if someone can help with this.
>>>>
>>>> Weihang
>>>>
>>>
>>> Talking about IB_QP_CUR_STATE, I see many drivers filling it in their query QP
>>> callback although it should only be used in modify operations.. Is there a
>>> reason not to remove it?
>>
>> IBTA section "11.2.5.3 QUERY QUEUE PAIR" has line about IB_QP_CUR_STATE.
>> It is one of output modifiers.
>>
>> Thanks
>>
> 
> It says the current QP state should be returned, that's what qp_state field is used for.
> According to the man pages:
> 
> libibverbs/man/ibv_query_qp.3:
>                enum ibv_qp_state       qp_state;            /* Current QP state */
>                enum ibv_qp_state       cur_qp_state;        /* Current QP state - irrelevant for ibv_query_qp */
> 

Hi Gal and Leon,

Thanks for your reply, as Gal said, I can't find the reason why the IBTA use
cur_qp_state either. I'll take a closer look at the protocol.

Weihang

  reply	other threads:[~2020-07-10 10:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08  9:41 Question about IB_QP_CUR_STATE liweihang
2020-07-08 12:20 ` Leon Romanovsky
2020-07-08 12:42 ` Gal Pressman
2020-07-08 15:44   ` Leon Romanovsky
2020-07-09  6:13     ` Gal Pressman
2020-07-10 10:11       ` liweihang [this message]
2020-07-12 10:44       ` Leon Romanovsky
2020-07-12 10:53         ` Gal Pressman
2020-07-12 11:01           ` Leon Romanovsky

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=3cfb41bfa2cb4d5cb508a572dbb5e6c7@huawei.com \
    --to=liweihang@huawei.com \
    --cc=galpress@amazon.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /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