From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Raslan Darawsheh <rasland@mellanox.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix handling of small mbuf sizes
Date: Fri, 28 Oct 2016 14:19:06 +0200 [thread overview]
Message-ID: <20161028121906.GW5733@6wind.com> (raw)
In-Reply-To: <937aac679e571c4fff8ab720f4dd910fe10a283e.1477296585.git.rasland@mellanox.com>
On Mon, Oct 24, 2016 at 11:10:59AM +0300, Raslan Darawsheh wrote:
> When mbufs are smaller than MRU, multi-segment support must be enabled to
> default set when not in promiscuous or allmulticast modes.
>
> Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support")
>
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_rxq.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index 4dc5cc3..62253ed 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -946,6 +946,12 @@ rxq_ctrl_setup(struct rte_eth_dev *dev, struct rxq_ctrl *rxq_ctrl,
> (void)conf; /* Thresholds configuration (ignored). */
> /* Enable scattered packets support for this queue if necessary. */
> assert(mb_len >= RTE_PKTMBUF_HEADROOM);
> + /* If smaller than MRU, multi-segment support must be enabled. */
> + if (mb_len < (priv->mtu > dev->data->dev_conf.rxmode.max_rx_pkt_len ?
> + dev->data->dev_conf.rxmode.max_rx_pkt_len :
> + priv->mtu
> + ))
Let's move poor "))" to the end of the previous line.
> + dev->data->dev_conf.rxmode.jumbo_frame = 1;
> if ((dev->data->dev_conf.rxmode.jumbo_frame) &&
> (dev->data->dev_conf.rxmode.max_rx_pkt_len >
> (mb_len - RTE_PKTMBUF_HEADROOM))) {
> --
> 1.9.1
Besides the above comment:
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
--
Adrien Mazarguil
6WIND
next prev parent reply other threads:[~2016-10-28 12:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 8:10 Raslan Darawsheh
2016-10-28 12:19 ` Adrien Mazarguil [this message]
2016-11-07 17:22 ` Thomas Monjalon
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=20161028121906.GW5733@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=rasland@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).