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 A8F61A2EDB for ; Mon, 30 Sep 2019 21:21:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F11A48F96; Mon, 30 Sep 2019 21:21:05 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 1F55D37A2 for ; Mon, 30 Sep 2019 21:21:02 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id t14so7920446pgs.3 for ; Mon, 30 Sep 2019 12:21:02 -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=Kcd0kDgCEOitNeWDoOk9NH9UbSwvT/rWWQ0M78ajcZa8gJgqo/TekpOXDTVP/uG9N8 ySoN1APCGfSBSPLb/Jf+rnoSDXfUun9dc1t3JLhPjI24kkFXFa7SN2wZNmNN0lC63fGd Md752RjSxk+e2V7O1vYmWWWZMGUpQhsk4t5kt5opMaI18zSn3FWHsJRrEgbHOPJaEjjG 9R5kIr6XXYaRcOe2jn69hm1XtV92enDK2aRQ9GenOb8nfQxuetcBuPUSORETAnz3bg3k AusilBnz8haYomKWflbQTfdhDxvgkP+5sKA2Nh0QUeMY/enS1hHdBoIJXgBnE6K3qnEl rh9w== 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=jCh7ubAd7m3Rz/JtK1OLutWJNVyQOgqyLgTIMhXG5s1Dk5ory8LtCE22Y/81EpAbeb hWwokt6vTqiH6fJuLtFKGdJTqCC7Gus62A08fr4O+VT+kgwDofTO3qnMQpuo70skq3Fn kg6LodX0hIHcZoXKmKjl+k+ea1hI+dFfgR9jAIDCnUlzrTpPeomEIefqL3/Ey+9CDVHP O18XUiIe9DsFqe52hARqm7Eli1CWbd5etx7cDdeTmTCOVuYMHRI0TdVbanH5c+Zllnq3 wGgNsjPHtkqaoiUR2Z5GSDmwGsPTmJdB6Icfk7E4VuXXmFdJE15BiESWq/uYMnj1YS4U 19IQ== X-Gm-Message-State: APjAAAXq7doyMaVk4y6bI+Yl98v5ABhun1zOX+3at2IKj6RjmZ8LTY1I 7c/RRlNpZOA/7WhTXnTaNyDEu1vo7eAKmA== X-Google-Smtp-Source: APXvYqwEqbcFAAtDlhN96md+9RFz3NCWhlHCx3XGXJBnrvmOzbPQDXDeyzho0UbQWEe2PIcLFchNeg== X-Received: by 2002:a63:408:: with SMTP id 8mr26492636pge.334.1569871260972; Mon, 30 Sep 2019 12:21:00 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c64sm14788304pfc.19.2019.09.30.12.20.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 12:20:59 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 30 Sep 2019 12:20:51 -0700 Message-Id: <20190930192056.26828-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190930192056.26828-1-stephen@networkplumber.org> References: <20190928003758.18489-1-stephen@networkplumber.org> <20190930192056.26828-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 1/6] 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