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 4265CA2F67 for ; Fri, 4 Oct 2019 23:48:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B48B11C2EC; Fri, 4 Oct 2019 23:47:52 +0200 (CEST) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 1577C1C2DE for ; Fri, 4 Oct 2019 23:47:50 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id i14so4458382pgt.11 for ; Fri, 04 Oct 2019 14:47:50 -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=Td38DgTRx/bm0AJ/kHSq0/3gf8DTJhvDAp0UPv4Qi0a3c8Y7Oc+1FefTIlm951L0vn untY0FWvsmkkGmM87RdYrMFS5UpZ3RjSw3eazP9ul3o6ISDf2ijGWakr03NS9p2QLYfy g4BYocUHIqF5JGHwPgInRFX7+YgmwC6X9B/Oe5pm8HI3F1Hfgm1hXhYLQaB1seUmZ64J db/C9EoD2I64DRfk9IcVTfPkGwA+LUhbocZceIYN+AA32YZK3gGuq+dVZiG83ZGvtF0K hK7xCFE9ERBCSHmQPBOio4p4VbHiFqNmvQhP0zW28BREPiGePElzZO1kciytLhNUuize cLeg== 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=OPN/h+LqTSe+EU8SSUAnajGUoJQbLa19uzBZ58EDZ0Q3L4+ck3VRW1OU3Nv/ZpDFQu Qzv/2w0iflc4r7gXWNschTpswxoN4S/aS9RrvnPEHPO6abSWNHHxS2pr3nEGy85YCTEj MVLQweS/g1oBwoGYOowe5BEskaqx9O5FsitUaVxZPTxx9UjMFQKGHG5625LWAGTtF2ph 95E7j+LgoyetIuD4jR0B1uPqdP76+7bWQeJfCJiYzNQRl7AVdXbu6Fvf2LMVy/MWRyyi kdAVdOQUePLq9sNsIMF2nNOxA+GPnDXnZlH96PtoQdQKVtTPeBOH32TahJ7GEgoGD+k4 iKqw== X-Gm-Message-State: APjAAAU3/LwkDP0+kyziJrZS/tomAsoTJMtIPrsmFyVLLJ3K/sJGmZhq kKeTi6X0l8tt3ov80Der9HUlh9C59gXRDg== X-Google-Smtp-Source: APXvYqzvGiRHS3eE78idOnyBcAdpOXkZDhhPrcsic8Kc9vMXuZFHL7rSN48BzNcMu7a5n8TS6XnllA== X-Received: by 2002:a63:487:: with SMTP id 129mr17869523pge.14.1570225669641; Fri, 04 Oct 2019 14:47:49 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q71sm6191355pjb.26.2019.10.04.14.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2019 14:47:47 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 4 Oct 2019 14:47:40 -0700 Message-Id: <20191004214743.24686-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191004214743.24686-1-stephen@networkplumber.org> References: <20190928003758.18489-1-stephen@networkplumber.org> <20191004214743.24686-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 1/4] 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