public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Minh Duc Tran
	<MinhDuc.Tran-iH1Dq9VlAzfQT0dZR+AlfA@public.gmane.org>,
	Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Jay Kallickal
	<jayamohank-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org"
	<michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jayamohan Kallickal
	<Jayamohan.Kallickal-iH1Dq9VlAzfQT0dZR+AlfA@public.gmane.org>,
	Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH 1/1] IB/iser: Remove hard coded values for cqe and send_wr
Date: Tue, 21 Oct 2014 17:49:24 +0300	[thread overview]
Message-ID: <54467274.7040006@dev.mellanox.co.il> (raw)
In-Reply-To: <ecfd3441-253c-47bf-b2cb-030b2a00f689-3RiH6ntJJkP8BX6JNMqfyFjyZtpTMMwT@public.gmane.org>

On 10/20/2014 8:36 AM, Minh Duc Tran wrote:
> Hi Sagi,
>
> I've created a new patch over the 21 iser patches you have mentioned early in this thread.  It is pasted at the end of this email.
> If I understand correctly, this patch will be applied along with Or's TODO list.
>
>
>>> ISER_MAX_RX_CQ_LEN             4096               /* This number should be calculated during create_session */
>
>> So in iSER CQs are shared a across the device - so this number should satisfy maximum number of connections per CQ (which is currently 8).
>
> Again, there should be no rules enforcing a CQ to support 8 connections.  The underlining hw should be able to supports more or less as it is configured to do.  Specific to the ocrdma hw, it has lower number of CQE per CQ but it has 32 CQ

We can take the minimum of supported, calculated.

>
>>> ISER_QP_MAX_RECV_DTOS    512                 /* Why can't we use ISCSI_DEF_XMIT_CMDS_MAX here ? */
>
>> iSER creates the connection QP when before the session is created - so it doesn't know what the user will set at cmds_max (which is potentially larger than ISCSI_DEF_XMIT_CMDS_MAX). So we allow 512 at the moment and adjust the session cmds_max accordingly. I agree that this is a >work around for the moment as we don't know at QP creation time what is the user setting of cmds_max.
>
> Like any other drivers, we should limit this number to the range hw supports.  If user setting is within hw range then number will be adjusted accordingly.  If user setting is not within hw range, set it to default values.
> What about something like this:
> #define ISER_GET_MAX_XMIT_CMDS(send_wr) (send_wr - ISER_MAX_TX_MISC_PDUS - \
> 					ISER_MAX_RX_MISC_PDUS)	/	\
> 					 (1 + ISER_INFLIGHT_DATAOUTS)
> cmds_max_supported = ISER_GET_MAX_XMIT_CMDS(dev_attr->max_qp_wr)
>

I agree, but we should not let the user set too much commands if we do.

>
>>> ISER_MAX_TX_CQ_LEN             36944           /* the mlx4 hw supports up to 3 CQ, but the ocrdma hw supports up to  32CQ with lower number of cqe per CQ */
>
>> What led you to conclude that: "the mlx4 hw supports up to 3 CQ"?
>> TX CQ length should be
>
> I was debugging some iser target problems sometimes back.  I could be wrong with 3CQ but it's not far from the hard limit of 4CQ set by current ib/iser code

This specifically originates in a mlx4_core bug in RoCE mode (supports
only 3 EQs). CCing Matan who promised me he would fix it...

Sagi.
--
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

  parent reply	other threads:[~2014-10-21 14:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08  0:41 [PATCH 1/1] IB/iser: Remove hard coded values for cqe and send_wr Jay Kallickal
2014-10-08  5:58 ` Sagi Grimberg
     [not found]   ` <CAEc=gqbKrqK_PdN8XOfkaNZgscMeODL=i6oFU+SwQrMxT2gixg@mail.gmail.com>
     [not found]     ` <CAEc=gqbKrqK_PdN8XOfkaNZgscMeODL=i6oFU+SwQrMxT2gixg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-13  8:15       ` Sagi Grimberg
     [not found] ` <1412728888-13100-1-git-send-email-jkallickal-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2014-10-14  7:50   ` Or Gerlitz
     [not found]     ` <543CD5D6.1020506-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-10-14 21:53       ` Minh Duc Tran
     [not found]         ` <44d2d670-4785-4a76-8c05-f59791c999cf-3RiH6ntJJkP8BX6JNMqfyFjyZtpTMMwT@public.gmane.org>
2014-10-15 22:31           ` Or Gerlitz
     [not found]             ` <CAJ3xEMjXWuZomt98YJiLfUw=rwZ5A+MUbsxEZnGMj8hP7gu0Og-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-15 23:41               ` Minh Duc Tran
     [not found]                 ` <b7d2d454-8db1-467d-8088-bd52fac9b612-3RiH6ntJJkOPfaB/Gd0HpljyZtpTMMwT@public.gmane.org>
2014-10-16  5:31                   ` Or Gerlitz
     [not found]                     ` <CAJ3xEMgQ_spota-K5XiMQm1Gwk19a7=xFvGJ_JM+DfvpOQ_Nzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-19 15:50                       ` Sagi Grimberg
     [not found]                         ` <5443DDC5.6020805-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2014-10-20  8:05                           ` Or Gerlitz
2014-10-19 15:42           ` Sagi Grimberg
     [not found]             ` <5443DBCA.4000002-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2014-10-20  5:36               ` Minh Duc Tran
     [not found]                 ` <ecfd3441-253c-47bf-b2cb-030b2a00f689-3RiH6ntJJkP8BX6JNMqfyFjyZtpTMMwT@public.gmane.org>
2014-10-20  8:01                   ` Or Gerlitz
     [not found]                     ` <CAJ3xEMjbYL9M12UagW52ELdLkHZFnWbKDk0CXZfo_Sf82tjugA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-20 16:14                       ` Sagi Grimberg
     [not found]                         ` <544534DB.4070908-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2014-10-20 20:56                           ` Minh Duc Tran
2014-10-20 18:11                       ` Minh Duc Tran
     [not found]                         ` <eaf7c875-e7e1-43eb-b27a-fbd068aa32f1-3RiH6ntJJkP8BX6JNMqfyFjyZtpTMMwT@public.gmane.org>
2014-10-20 21:06                           ` Or Gerlitz
     [not found]                             ` <CAJ3xEMgnmZD8ONJcnor__eioMtfaO6MYMKfd6nbXncaWYXTG+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-20 21:09                               ` Or Gerlitz
     [not found]                                 ` <CAJ3xEMi9uBB0fFqGj4nUOdYYezLzF135TLH-sswQ0G5hZQvAkA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-21 14:22                                   ` Or Gerlitz
     [not found]                                     ` <54466C39.4070402-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-10-21 14:26                                       ` Or Gerlitz
2014-10-21 21:11                                       ` Minh Duc Tran
     [not found]                                         ` <d89b8c11-5f4f-4a70-b2de-3342c6b628a8-3RiH6ntJJkOPfaB/Gd0HpljyZtpTMMwT@public.gmane.org>
2014-10-22  4:01                                           ` Or Gerlitz
     [not found]                                             ` <54472C2A.7060407-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-10-22  4:29                                               ` Minh Duc Tran
     [not found]                                                 ` <340a8ae7-4597-4514-a69d-9ef0d56a7e6e-3RiH6ntJJkP8BX6JNMqfyFjyZtpTMMwT@public.gmane.org>
2014-10-22  4:54                                                   ` Or Gerlitz
2014-10-21 14:49                   ` Sagi Grimberg [this message]
2014-10-22 11:08                   ` Sagi Grimberg
  -- strict thread matches above, loose matches on Subject: below --
2014-10-14  5:19 Jayamohan Kallickal

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=54467274.7040006@dev.mellanox.co.il \
    --to=sagig-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=Jayamohan.Kallickal-iH1Dq9VlAzfQT0dZR+AlfA@public.gmane.org \
    --cc=MinhDuc.Tran-iH1Dq9VlAzfQT0dZR+AlfA@public.gmane.org \
    --cc=jayamohank-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org \
    --cc=ogerlitz-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