From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Vasily Philipov <vasilyf@mellanox.com>
Cc: dev@dpdk.org, Nelio Laranjeiro <nelio.laranjeiro@6wind.com>,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/mlx4: fix mbuf poisoning in debug code
Date: Wed, 5 Jul 2017 16:35:47 +0200 [thread overview]
Message-ID: <20170705143547.GA19852@6wind.com> (raw)
In-Reply-To: <513298ea9e590eda85def2ef4bc7029879dbcb32.1499243201.git.vasilyf@mellanox.com>
On Wed, Jul 05, 2017 at 02:49:22PM +0300, Vasily Philipov wrote:
> In debug mode, all mbuf ol_flags are temporarily enabled while sitting in
> the Rx queue to detect otherwise silent data corruption, however some of
> them are special (indirect and control) and must be cleared before
> returning mbufs to the pool to avoid crashing.
>
> Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")
> CC: stable@dpdk.org
>
> Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Thanks Vasily, except for the minor nit below,
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
> drivers/net/mlx4/mlx4.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
> index 16cafae..03c5c98 100644
> --- a/drivers/net/mlx4/mlx4.c
> +++ b/drivers/net/mlx4/mlx4.c
> @@ -3008,6 +3008,13 @@ struct txq_mp2mr_mbuf_check_data {
> NB_SEGS(rep) = 0x2a;
> PORT(rep) = 0x2a;
> rep->ol_flags = -1;
> + /*
> + * Clear special flags in membuf to avoid
"membuf" => "mbuf"
> + * crashing while freeing.
> + */
> + rep->ol_flags &=
> + ~(uint64_t)(IND_ATTACHED_MBUF |
> + CTRL_MBUF_FLAG);
> #endif
> assert(rep->buf_len == seg->buf_len);
> /* Reconfigure sge to use rep instead of seg. */
> --
> 1.8.3.1
>
--
Adrien Mazarguil
6WIND
next prev parent reply other threads:[~2017-07-05 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 11:49 Vasily Philipov
2017-07-05 14:35 ` Adrien Mazarguil [this message]
2017-07-05 14:46 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
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=20170705143547.GA19852@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=nelio.laranjeiro@6wind.com \
--cc=stable@dpdk.org \
--cc=vasilyf@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).