All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Jinpu Wang <jinpu.wang@ionos.com>, Haris Iqbal <haris.iqbal@ionos.com>
Cc: jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH RFC 08/12] RDMA/rtrs: Kill recon_cnt from several structs
Date: Tue, 15 Nov 2022 18:33:50 +0800	[thread overview]
Message-ID: <52fec35a-e7d1-09d7-728f-60c2f86bd498@linux.dev> (raw)
In-Reply-To: <CAMGffEmEGVJFGY6NEg+NvPG_h5A4J7oKtDhEw13=Kdn+13Fdrg@mail.gmail.com>



On 11/15/22 5:58 PM, Jinpu Wang wrote:
> On Tue, Nov 15, 2022 at 10:53 AM Jinpu Wang <jinpu.wang@ionos.com> wrote:
>> On Tue, Nov 15, 2022 at 10:39 AM Haris Iqbal <haris.iqbal@ionos.com> wrote:
>>> On Sun, Nov 13, 2022 at 2:08 AM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>>>> Seems the only relevant comment about recon_cnt is,
>>>>
>>>> /*
>>>>   * On every new session connections increase reconnect counter
>>>>   * to avoid clashes with previous sessions not yet closed
>>>>   * sessions on a server side.
>>>>   */
>>>>
>>>> However, it is not clear how the recon_cnt avoid clashed at these places
>>>> in the commit since no where checks it.
>>> It does seem redundant. This predates my time, so I don't know if
>>> there was a change which removed the usage of this. I tried to search
>>> in commit history, but couldn't.
>>>
>>> @Jinpu Your thoughts?
> Sorry for sending an empty reply.
> I checked a bit, and also can find a reason why the recon_cnt was
> added, it is not checked on the server side.
> I think it's ok to remove it. But we can simply remove the field in
> rtrs_msg_conn_req, commented below.
>
>>>> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
>>>> ---
>>>>   drivers/infiniband/ulp/rtrs/rtrs-clt.c | 8 --------
>>>>   drivers/infiniband/ulp/rtrs/rtrs-pri.h | 3 ---
>>>>   drivers/infiniband/ulp/rtrs/rtrs-srv.c | 7 +------
>>>>   3 files changed, 1 insertion(+), 17 deletions(-)
>>>>
>>>> diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
>>>> index 5ffc170dae8c..dcc8c041a141 100644
>>>> --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
>>>> +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
>>>> @@ -1802,7 +1802,6 @@ static int rtrs_rdma_route_resolved(struct rtrs_clt_con *con)
>>>>                  .version = cpu_to_le16(RTRS_PROTO_VER),
>>>>                  .cid = cpu_to_le16(con->c.cid),
>>>>                  .cid_num = cpu_to_le16(clt_path->s.con_num),
>>>> -               .recon_cnt = cpu_to_le16(clt_path->s.recon_cnt),
>>>>          };
>>>>          msg.first_conn = clt_path->for_new_clt ? FIRST_CONN : 0;
>>>>          uuid_copy(&msg.sess_uuid, &clt_path->s.uuid);
>>>> @@ -2336,13 +2335,6 @@ static int init_conns(struct rtrs_clt_path *clt_path)
>>>>          unsigned int cid;
>>>>          int err;
>>>>
>>>> -       /*
>>>> -        * On every new session connections increase reconnect counter
>>>> -        * to avoid clashes with previous sessions not yet closed
>>>> -        * sessions on a server side.
>>>> -        */
>>>> -       clt_path->s.recon_cnt++;
>>>> -
>>>>          /* Establish all RDMA connections  */
>>>>          for (cid = 0; cid < clt_path->s.con_num; cid++) {
>>>>                  err = create_con(clt_path, cid);
>>>> diff --git a/drivers/infiniband/ulp/rtrs/rtrs-pri.h b/drivers/infiniband/ulp/rtrs/rtrs-pri.h
>>>> index a2420eecaf5a..c4ddaeba1c59 100644
>>>> --- a/drivers/infiniband/ulp/rtrs/rtrs-pri.h
>>>> +++ b/drivers/infiniband/ulp/rtrs/rtrs-pri.h
>>>> @@ -109,7 +109,6 @@ struct rtrs_path {
>>>>          struct rtrs_con **con;
>>>>          unsigned int            con_num;
>>>>          unsigned int            irq_con_num;
>>>> -       unsigned int            recon_cnt;
>>>>          unsigned int            signal_interval;
>>>>          struct rtrs_ib_dev      *dev;
>>>>          int                     dev_ref;
>>>> @@ -177,7 +176,6 @@ struct rtrs_sg_desc {
>>>>    * @version:      RTRS protocol version
>>>>    * @cid:          Current connection id
>>>>    * @cid_num:      Number of connections per session
>>>> - * @recon_cnt:    Reconnections counter
>>>>    * @sess_uuid:    UUID of a session (path)
>>>>    * @paths_uuid:           UUID of a group of sessions (paths)
>>>>    *
>>>> @@ -196,7 +194,6 @@ struct rtrs_msg_conn_req {
>>>>          __le16          version;
>>>>          __le16          cid;
>>>>          __le16          cid_num;
>>>> -       __le16          recon_cnt;
>>>>          uuid_t          sess_uuid;
>>>>          uuid_t          paths_uuid;
>>>>          u8              first_conn : 1;
> We can remove it from protocol, this break compatibility with older kernel.

Can we bump up RTRS_PROTO_VER_MINOR for the compatibility? Otherwise
those structs are immutable forever.

Thanks,
Guoqing

  reply	other threads:[~2022-11-15 10:34 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13  1:08 [PATCH RFC 00/12] Misc changes for rtrs Guoqing Jiang
2022-11-13  1:08 ` [PATCH RFC 01/12] RDMA/rtrs-srv: Remove ib_dev_count from rtrs_srv_ib_ctx Guoqing Jiang
2022-11-14  7:39   ` Jinpu Wang
2022-11-14  8:00     ` Guoqing Jiang
2022-11-14  8:24       ` Jinpu Wang
2022-11-14  8:45         ` Guoqing Jiang
2022-11-14 13:36           ` Haris Iqbal
2022-11-15 10:22             ` Guoqing Jiang
2022-11-13  1:08 ` [PATCH RFC 02/12] RDMA/rtrs-srv: Refactor rtrs_srv_rdma_cm_handler Guoqing Jiang
2022-11-14 14:39   ` Haris Iqbal
2022-11-15 10:24     ` Guoqing Jiang
2022-11-13  1:08 ` [PATCH RFC 03/12] RDMA/rtrs-srv: Only close srv_path if it is just allocated Guoqing Jiang
2022-11-14 16:18   ` Haris Iqbal
2022-11-15 10:24     ` Guoqing Jiang
2022-11-15 10:31       ` Jinpu Wang
2022-11-13  1:08 ` [PATCH RFC 04/12] RDMA/rtrs-srv: refactor the handling of failure case in map_cont_bufs Guoqing Jiang
2022-11-14 16:21   ` Haris Iqbal
2022-11-13  1:08 ` [PATCH RFC 05/12] RDMA/rtrs-srv: Correct the checking of ib_map_mr_sg Guoqing Jiang
2022-11-15 11:46   ` Jinpu Wang
2022-11-16  1:13     ` Guoqing Jiang
2022-11-16  5:44       ` Jinpu Wang
2022-11-13  1:08 ` [PATCH RFC 06/12] RDMA/rtrs-clt: " Guoqing Jiang
2022-11-15 11:49   ` Jinpu Wang
2022-11-13  1:08 ` [PATCH RFC 07/12] RDMA/rtrs-srv: Remove outdated comments from create_con Guoqing Jiang
2022-11-14 16:22   ` Haris Iqbal
2022-11-13  1:08 ` [PATCH RFC 08/12] RDMA/rtrs: Kill recon_cnt from several structs Guoqing Jiang
2022-11-15  9:39   ` Haris Iqbal
2022-11-15  9:53     ` Jinpu Wang
2022-11-15  9:58       ` Jinpu Wang
2022-11-15 10:33         ` Guoqing Jiang [this message]
2022-11-13  1:08 ` [PATCH RFC 09/12] RDMA/rtrs: Clean up rtrs_rdma_dev_pd_ops Guoqing Jiang
2022-11-15  9:18   ` Haris Iqbal
2022-11-13  1:08 ` [PATCH RFC 10/12] RDMA/rtrs-srv: Remove paths_num Guoqing Jiang
2022-11-15  9:48   ` Haris Iqbal
2022-11-15 10:01     ` Jinpu Wang
2022-11-15 10:30       ` Guoqing Jiang
2022-11-13  1:08 ` [PATCH RFC 11/12] RDMA/rtrs-srv: fix several issues in rtrs_srv_destroy_path_files Guoqing Jiang
2022-11-14 16:22   ` Haris Iqbal
2022-11-13  1:08 ` [PATCH RFC 12/12] RDMA/rtrs-srv: Remove kobject_del from rtrs_srv_destroy_once_sysfs_root_folders Guoqing Jiang
2022-11-14 16:23   ` Haris Iqbal
2022-11-14  8:32 ` [PATCH RFC 00/12] Misc changes for rtrs Leon Romanovsky
2022-11-14  8:46   ` Guoqing Jiang
2022-11-17  9:52 ` Leon Romanovsky
2022-11-17 10:06   ` Guoqing Jiang

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=52fec35a-e7d1-09d7-728f-60c2f86bd498@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=haris.iqbal@ionos.com \
    --cc=jgg@ziepe.ca \
    --cc=jinpu.wang@ionos.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.