DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Mordechay Haimovsky <motih@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/mlx4: verify Tx max sges
Date: Wed, 10 Jan 2018 15:19:03 +0000	[thread overview]
Message-ID: <VI1PR05MB3149033259A1AB1AD6D3E359C3110@VI1PR05MB3149.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20180105165317.GV4256@6wind.com>

Friday, January 5, 2018 6:53 PM, Adrien Mazarguil:
> > Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> 
> Except for a really minor nit below:
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Applied to next-net-mlx with the suggested fix. Thanks 

> 
> > ---
> >  drivers/net/mlx4/mlx4.c     | 1 +
> >  drivers/net/mlx4/mlx4_prm.h | 5 ++++-
> >  2 files changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index
> > 4bc4a6f..61c5bf4 100644
> > --- a/drivers/net/mlx4/mlx4.c
> > +++ b/drivers/net/mlx4/mlx4.c
> > @@ -505,6 +505,7 @@ struct mlx4_conf {
> >  		rte_errno = ENODEV;
> >  		goto error;
> >  	}
> > +	assert(device_attr.max_sge >= MLX4_MAX_SGE);
> >  	for (i = 0; i < device_attr.phys_port_cnt; i++) {
> >  		uint32_t port = i + 1; /* ports are indexed from one */
> >  		struct ibv_context *ctx = NULL;
> > diff --git a/drivers/net/mlx4/mlx4_prm.h b/drivers/net/mlx4/mlx4_prm.h
> > index 217ea50..b382d59 100644
> > --- a/drivers/net/mlx4/mlx4_prm.h
> > +++ b/drivers/net/mlx4/mlx4_prm.h
> > @@ -53,7 +53,10 @@
> >  #define MLX4_TXBB_SIZE (1 << MLX4_TXBB_SHIFT)
> >
> >  /* Typical TSO descriptor with 16 gather entries is 352 bytes. */
> > -#define MLX4_MAX_WQE_SIZE 512
> > +#define MLX4_MAX_SGE 32
> > +#define MLX4_MAX_WQE_SIZE \
> > +	(MLX4_MAX_SGE * sizeof(struct mlx4_wqe_data_seg) + \
> > +	sizeof(struct mlx4_wqe_ctrl_seg))
> 
> One extra indent space is needed before sizeof to align with parenthesis
> contents.
> 
> --
> Adrien Mazarguil
> 6WIND

  reply	other threads:[~2018-01-10 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 16:12 Moti Haimovsky
2018-01-05 16:53 ` Adrien Mazarguil
2018-01-10 15:19   ` Shahaf Shuler [this message]
2018-01-10 15:19 ` [dpdk-dev] [PATCH V2] " Moti Haimovsky

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=VI1PR05MB3149033259A1AB1AD6D3E359C3110@VI1PR05MB3149.eurprd05.prod.outlook.com \
    --to=shahafs@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=motih@mellanox.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;
as well as URLs for NNTP newsgroup(s).