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 AFD26A2EEB for ; Mon, 7 Oct 2019 17:44:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C940D1C1C6; Mon, 7 Oct 2019 17:43:56 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 1E8D81C12E for ; Mon, 7 Oct 2019 17:43:53 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id 205so8928171pfw.2 for ; Mon, 07 Oct 2019 08:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q4INw0jXclEiki3qquDLRi7spTdZl6ftU0aD9i1ySi8=; b=w39jcvWnhb75zw/m6b761+fDHyUtt2tSg/AXwTsyUXAit3tLZKVx/6YgLJGh6v8K/O DgKZ7oL4+nHM2C+zlJjQ0halP8s50XgxVSaZ5cmamVJS0Nv5BBoNUxR92/oeKO1WasTu UXrLsbB1LzptcSvOSyL0X1UNOjpsZBHpR3NsQkOKQAOYaiqFHaU6DeyNwcYnb+r0IyWr 0O7z1ccMEyAYRf/aZQ18TFG7DesjjAXGBIJdgUFRJdrWTg0KCPtSIzaBadxtXzdfvFCr sPOWY8WAjqalA/YU1seam+fhOFrGGxAA0Q30mUDR0pOdLFzeuiY7uSTMQZ0arL1dIAng KVYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q4INw0jXclEiki3qquDLRi7spTdZl6ftU0aD9i1ySi8=; b=Fxlbr51zs619bh6yjn9dTQuUutBhVIZ21WoVKj75NdE2Zfclt1qsnGqDdLXqSG7eaS TXEKPJQ10adUT/jnCXmKT33ZhzgjnGPNbFfOmxw4D7vone60U7YXhDLgVU7hLr4A+1lC zcmrhpGTrCDjdeEVDNtVtqopXe/sIeroCpAb0D0JOdA5BIdd2MsjHdI+MY6nxbqWSxhs ysCTqup9iYclPyGFl5G2sK5Dh51r6K6kPSPTdTDMf3slrDUO60N3uZw9oZi181mL+kz0 86gcon25bqQq9GLkwfeUSV3VbXqAW4xxPMSUUvIVr2jgXTixHU6+8tyUSoTKtxV4Gm+i 3MLg== X-Gm-Message-State: APjAAAWolechHlCiqv2B1K1LyR4PH3jlIz2rZKG9Yt+IdRsdcvOQpiSs cuB+M44/AlKf1Wjyzx5uthwyW6eElt6kmg== X-Google-Smtp-Source: APXvYqxtUEz1IAlESN02whKzbn4S7WKkYYXZHJPee+BSamaQaQDzDYg6H4OPqALlzLgqSP0XjDp3xQ== X-Received: by 2002:a17:90a:ad81:: with SMTP id s1mr34972529pjq.27.1570463031798; Mon, 07 Oct 2019 08:43:51 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id k5sm20779345pfp.109.2019.10.07.08.43.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 08:43:50 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 7 Oct 2019 08:43:39 -0700 Message-Id: <20191007154343.8556-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191007154343.8556-1-stephen@networkplumber.org> References: <20190928003758.18489-1-stephen@networkplumber.org> <20191007154343.8556-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 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" 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. Fixes: f1022aba76a5 ("app/test: rename mbuf variable") Signed-off-by: Stephen Hemminger --- 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