From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2461DA3168 for ; Thu, 17 Oct 2019 07:01:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE79C1E4EA; Thu, 17 Oct 2019 07:01:17 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6E7421DFF1 for ; Thu, 17 Oct 2019 07:01:16 +0200 (CEST) Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CC38C59451 for ; Thu, 17 Oct 2019 05:01:15 +0000 (UTC) Received: by mail-ua1-f72.google.com with SMTP id 46so220785uar.5 for ; Wed, 16 Oct 2019 22:01:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rx0k7hVR+XnKAMCVZqUnib+XqfF8SWZpkD+vdYEabQQ=; b=GTBuL6Hcln81EKQnt/W60t4ZuzWgfSsRHpo0iuAjH3wfJCrVlJu4JGecKX4IbqG89W Es7Hjtx/ga/SGDOYLo0i+D/Cmfx9gWNXaQNpXPIXQq+8ajB/bjhO5cyvaMa6jLsg7eXz LNOr4tGhBJpBS4VMkKDWCvnXBnWfhrxTnWWK3dmJFAT1UU5PwQRBn9otQOu/CyWtiiBM BNLSjx19maF9xcKKDvAlAmu5uB2dYAzT6bFJDYvJLZzvvf3alk2BjEMcHQowArZvgETe 2HrmUWBzrFDewA9CGbs9fLUKDKp88pvfzr1kLp/yxua2y+5X6ZoUsDa4alj207NcVKb1 GVXw== X-Gm-Message-State: APjAAAVDIZA7oZK4z0vpjnrCk2Y6jp5qvV1t0UXFMvVkcdnMeuki5ykw 301CPqr+y+ghbu2PoL31ll1zD2V1wpPVT+5TjVYT7tn/PXZ1yKTtvhXGKr2Km+lB3WLFumibLQL tZ/tnO5l3UvdJiSQPYnw= X-Received: by 2002:a67:e88b:: with SMTP id x11mr825742vsn.180.1571288474816; Wed, 16 Oct 2019 22:01:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3fPiSoYTGDV7lvhNUKP9VzUa6sAvljyZi4FDG15R6upvl+Me0ZAe76Vqwn9ymhQW3oC4X6mBMqGE8sX8x2oQ= X-Received: by 2002:a67:e88b:: with SMTP id x11mr825731vsn.180.1571288474583; Wed, 16 Oct 2019 22:01:14 -0700 (PDT) MIME-Version: 1.0 References: <20190928003758.18489-1-stephen@networkplumber.org> <20191008163350.20779-1-stephen@networkplumber.org> <20191008163350.20779-2-stephen@networkplumber.org> In-Reply-To: <20191008163350.20779-2-stephen@networkplumber.org> From: David Marchand Date: Thu, 17 Oct 2019 07:01:03 +0200 Message-ID: To: Stephen Hemminger Cc: dev , Olivier Matz , Aaron Conole Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v6 1/5] mbuf: don't generate invalid mbuf in clone test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 8, 2019 at 6:34 PM Stephen Hemminger wrote: > > The test for cloning changed mbuf would generate an mbuf > whose length and segments were invalid. This would cause a crash > if test was run with mbuf debugging enabled. It could be interesting to add calls to rte_mbuf_check() (not dependent on the debug build option) at key points in this test. > > Fixes: f1022aba76a5 ("app/test: rename mbuf variable") Wrong Fixes: tag. Fixes: 4ccd2bb3a9e2 ("app/test: enhance mbuf refcnt check") Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org > Signed-off-by: Stephen Hemminger > Acked-by: Olivier Matz > --- > app/test/test_mbuf.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c > index 2a97afe2044a..aafad0cf6206 100644 > --- a/app/test/test_mbuf.c > +++ b/app/test/test_mbuf.c > @@ -332,8 +332,11 @@ testclone_testupdate_testdetach(struct rte_mempool *pktmbuf_pool) > m->next = rte_pktmbuf_alloc(pktmbuf_pool); > if (m->next == NULL) > GOTO_FAIL("Next Pkt Null\n"); > + m->nb_segs = 2; > > rte_pktmbuf_append(m->next, sizeof(uint32_t)); > + m->pkt_len = 2 * sizeof(uint32_t); > + > data = rte_pktmbuf_mtod(m->next, unaligned_uint32_t *); > *data = MAGIC_DATA; > > -- > 2.20.1 > Applied, thanks. -- David Marchand