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 DE166A2F6B for ; Tue, 8 Oct 2019 18:34:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8C361D427; Tue, 8 Oct 2019 18:34:04 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id B6ED81C1C3 for ; Tue, 8 Oct 2019 18:33:59 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id w8so8678967plq.5 for ; Tue, 08 Oct 2019 09:33:59 -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=PefKtuj67XVP00td27XmXktyYTet80qgSY8DUi9zOoc=; b=nMeL/LB3RLA4gA89X3od3ZfbQgyS23xhrKJv/pBjlGFwT2gzQdxbBQgmjH5zE/spfL u4Hu70rJXoHOUr0EdJD/L4TR10GLudgQXx63OJ+kaI2JlQ7fHXspkdAVXAUbgje5urOg VTnJX9U+PyNiZgkD5RYtevGHVrCHoC2hkQIqBnrXcXRrSlmlxASx8c0xcE06qKe90Eca FYGUan8TR3e6cVC9tYANQ41FUGXQYiwXHk20n3HSsWQwN21nUI/eCxKt1kTbrFJAp2nZ OwIxerR2z3elml2S2wYNANqknn9V5YNSZR2wr+7/DOsAC2s1AM0395QTBY2igjzzJ3FO ucxg== 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=PefKtuj67XVP00td27XmXktyYTet80qgSY8DUi9zOoc=; b=GY3g2BrB9EZctXNpc+vI2Pysbqlq+3+ysJMM13ObstnYgE8P1m8qzfVSzqRu1oQyGq Panq9HkEXZ/ZvQL+blwjStzEL4ZaA9QdeNs8RL6vyuyxisoBZoK3xln51QTMYODrIw7O wci5zE4SIrGtWHT9br7fQGBSnRpCeuwvwWMMdugnyrxqYQHR9IWj3Eu2HycQCfWWkFpX T461jQzcOa7p9Bi+kQjG4MH8UjBBwQoWbWWkrsv9TGvl23UzOPfzsevOHL3XyoF8iqSG j03vdy4aaRM9wewX5INluWTgpZLyxRAVwKBLcYIxqTcMA/UWG0+nKdgYOblzi3oMfywR ef3A== X-Gm-Message-State: APjAAAVNjIncZ1dao96e6WmBVOZOjiURlweB8ZJu6qQUrk0EMOKaQOM+ PQTRIKNTrEst4vnFsqOT6lbccsnFBGoR5A== X-Google-Smtp-Source: APXvYqxvPDYKwcRlSE8uMRfzbJYhuLUCG9xfK1Lg4CF/ONpC2mSip+TWIYC73aBQZOxnGl8Vh7aEUg== X-Received: by 2002:a17:902:7782:: with SMTP id o2mr6691401pll.165.1570552438283; Tue, 08 Oct 2019 09:33:58 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 18sm17702551pfp.100.2019.10.08.09.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 09:33:57 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz Date: Tue, 8 Oct 2019 09:33:46 -0700 Message-Id: <20191008163350.20779-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191008163350.20779-1-stephen@networkplumber.org> References: <20190928003758.18489-1-stephen@networkplumber.org> <20191008163350.20779-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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" 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 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