All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yuval Mintz <Yuval.Mintz@cavium.com>,
	davem@davemloft.net, netdev@vger.kernel.org
Cc: Michal Kalderon <Michal.Kalderon@cavium.com>
Subject: Re: [PATCH net-next 2/5] qed: Fix TM block ILT allocation
Date: Mon, 3 Apr 2017 14:46:20 +0300	[thread overview]
Message-ID: <7b179126-2a66-8696-98f9-3f3dca7a6d9e@cogentembedded.com> (raw)
In-Reply-To: <1491211273-10910-3-git-send-email-Yuval.Mintz@cavium.com>

On 4/3/2017 12:21 PM, Yuval Mintz wrote:

> From: Michal Kalderon <Michal.Kalderon@cavium.com>
>
> When configuring the HW timers block we should set the number of CIDs
> up until the last CID that require timers, instead of only those CIDs
> whose protocol needs timers support.
>
> Today, the protocols that require HW timers' support have their CIDs
> before any other protocol, but that would change in future [when we
> add iWARP support].
>
> Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
> ---
>  drivers/net/ethernet/qlogic/qed/qed_cxt.c | 32 ++++++++++++++++++++++++-------
>  1 file changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
> index 1012b3c..259dafa 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
> @@ -303,16 +303,34 @@ struct qed_tm_iids {
>  	u32 per_vf_tids;
>  };
>
> -static void qed_cxt_tm_iids(struct qed_cxt_mngr *p_mngr,
> +static void qed_cxt_tm_iids(struct qed_hwfn *p_hwfn,
> +			    struct qed_cxt_mngr *p_mngr,
>  			    struct qed_tm_iids *iids)
>  {
> -	u32 i, j;
> -
> -	for (i = 0; i < MAX_CONN_TYPES; i++) {
> +	bool tm_vf_required = false;
> +	bool tm_required = false;
> +	int i, j;
> +
> +	/* Timers is a special case -> we don't count how many cids require

    S/is/are/. CIDs?

> +	 * timers but what's the max cid that will be used by the timer block.
> +	 * therefore we traverse in reverse order, and once we hit a protocol
> +	 * that requires the timers memory, we'll sum all the protocols up
> +	 * to that one.
> +	 */
> +	for (i = MAX_CONN_TYPES - 1; i >= 0; i--) {
[...]

MBR, Sergei

  reply	other threads:[~2017-04-03 11:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03  9:21 [PATCH net-next 0/5] qed: QM & ILT changes Yuval Mintz
2017-04-03  9:21 ` [PATCH net-next 1/5] qed: Revise QM cofiguration Yuval Mintz
2017-04-03  9:21 ` [PATCH net-next 2/5] qed: Fix TM block ILT allocation Yuval Mintz
2017-04-03 11:46   ` Sergei Shtylyov [this message]
2017-04-03 13:58     ` Mintz, Yuval
2017-04-03  9:21 ` [PATCH net-next 3/5] qed: Correct TM ILT lines in presence of VFs Yuval Mintz
2017-04-03  9:21 ` [PATCH net-next 4/5] qed: RoCE doesn't need to use SRC Yuval Mintz
2017-04-03  9:21 ` [PATCH net-next 5/5] qed: Manage with less memory regions for RoCE Yuval Mintz
2017-04-04  2:16 ` [PATCH net-next 0/5] qed: QM & ILT changes David Miller

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=7b179126-2a66-8696-98f9-3f3dca7a6d9e@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=Michal.Kalderon@cavium.com \
    --cc=Yuval.Mintz@cavium.com \
    --cc=davem@davemloft.net \
    --cc=netdev@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.