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 59C49A04DD for ; Wed, 28 Oct 2020 11:56:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 53252CABF; Wed, 28 Oct 2020 11:56:13 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by dpdk.org (Postfix) with ESMTP id 184C3CADA for ; Wed, 28 Oct 2020 11:56:11 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id c194so4101928wme.2 for ; Wed, 28 Oct 2020 03:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zMg7pRmn3KGffDxNQLdwIyU/VfrvT3L47JdE8QFIWGQ=; b=pm8vfeffI1FHzHEZGpkRwf+Wf8eMal/TJ5104hMWOcjNHNNbOMmn8K+PR7nGmp3PiB RupaWCxO5ZLS5mddE19gzu0HblkwrVYqGRLF0Zv332rbjD2/mxTEOE3z7685ooR32eNQ ScvRgmOi6KYeEiYNhrJmpp8YCUqgL+6/PvO+BuzgWJo/9Ta8CGJmaHRz5ZXRqh5RTyU5 v6Hw6+iqmAEidqAr5MpgwtI8i0hDjsyzh2Qd2i2IOH7IG4VvQhl+xc3+SjPkHbSfUOXu bEpUOEf/4a06d/o+XjAMbbk3TmFn3ybY0LKUN9MnqHEDOnITPohrj6+pQBOEZWGWBsQw PnQQ== 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=zMg7pRmn3KGffDxNQLdwIyU/VfrvT3L47JdE8QFIWGQ=; b=a/HrmMlIKsCb0mP3MA902OHxWfVzil7Bpgm6bGOS8YvNAi2z9Do/o89NRy8JQcLS36 cab9cclNkyuAW+7QPdy+moCGgjov/y8OzDtvdcv5gTX/J5asnBrQ1HnH/flSb9YcUduo dAEvKomKkk/1QhBwGplyHlWF/29sPkk3Yxl98P/C4AXyrUGXS7zTJ//DFW85BAr1b8s8 fMW4i3rybCu5RII7ZxAYENxykmR+7OL//K/4W9Wra0wfmFt0fwf6+psMBvIMneoUAHN9 OHhFvdO/aGx0meOC/ShcvItSAc3SJSR2PiMzrMh2RCA2i+rIOzErhYw3oxoI+NK42wNy kuoQ== X-Gm-Message-State: AOAM530oCH7j/rv2BFL7vpiF6bAozE/HF3iAPNux+dCmCFc4R0xuXzuP /pg2MvfbfHpz12Emmvq5Up0BL3rxihRuXiBp X-Google-Smtp-Source: ABdhPJzzamx6V3WR5yZziasxmVWhjK8KeZMPpVtCWn4d9NzK8qYMF+GS/Ig6ydks/v4dqEVIuB96BQ== X-Received: by 2002:a7b:c401:: with SMTP id k1mr7376684wmi.120.1603882569809; Wed, 28 Oct 2020 03:56:09 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o4sm6348756wrv.8.2020.10.28.03.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:56:08 -0700 (PDT) From: luca.boccassi@gmail.com To: Lukasz Wojciechowski Cc: David Hunt , dpdk stable Date: Wed, 28 Oct 2020 10:45:49 +0000 Message-Id: <20201028104606.3504127-190-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test/distributor: collect return mbufs' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 3a30ad139a83687e015de9dadc762013d45e3be4 Mon Sep 17 00:00:00 2001 From: Lukasz Wojciechowski Date: Sat, 17 Oct 2020 05:06:53 +0200 Subject: [PATCH] test/distributor: collect return mbufs [ upstream commit 79c5e12ac29567ed6c1750f732f04619c2a9cc7a ] During quit_workers function distributor's main core processes some packets to wake up pending worker cores so they can quit. As quit_workers acts also as a cleanup procedure for next test case it should also collect these packets returned by workers' handlers, so the cyclic buffer with returned packets in distributor remains empty. Fixes: c3eabff124e6 ("distributor: add unit tests") Fixes: c0de0eb82e40 ("distributor: switch over to new API") Signed-off-by: Lukasz Wojciechowski Acked-by: David Hunt --- app/test/test_distributor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index 6e5bdc3f60..7219925521 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -591,6 +591,7 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) const unsigned num_workers = rte_lcore_count() - 1; unsigned i; struct rte_mbuf *bufs[RTE_MAX_LCORE]; + struct rte_mbuf *returns[RTE_MAX_LCORE]; if (rte_mempool_get_bulk(p, (void *)bufs, num_workers) != 0) { printf("line %d: Error getting mbufs from pool\n", __LINE__); return; @@ -606,6 +607,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) rte_distributor_flush(d); rte_eal_mp_wait_lcore(); + while (rte_distributor_returned_pkts(d, returns, RTE_MAX_LCORE)) + ; + + rte_distributor_clear_returns(d); rte_mempool_put_bulk(p, (void *)bufs, num_workers); quit = 0; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:17.597055959 +0000 +++ 0190-test-distributor-collect-return-mbufs.patch 2020-10-28 10:35:11.800834381 +0000 @@ -1,8 +1,10 @@ -From 79c5e12ac29567ed6c1750f732f04619c2a9cc7a Mon Sep 17 00:00:00 2001 +From 3a30ad139a83687e015de9dadc762013d45e3be4 Mon Sep 17 00:00:00 2001 From: Lukasz Wojciechowski Date: Sat, 17 Oct 2020 05:06:53 +0200 Subject: [PATCH] test/distributor: collect return mbufs +[ upstream commit 79c5e12ac29567ed6c1750f732f04619c2a9cc7a ] + During quit_workers function distributor's main core processes some packets to wake up pending worker cores so they can quit. As quit_workers acts also as a cleanup procedure for next test @@ -12,7 +14,6 @@ Fixes: c3eabff124e6 ("distributor: add unit tests") Fixes: c0de0eb82e40 ("distributor: switch over to new API") -Cc: stable@dpdk.org Signed-off-by: Lukasz Wojciechowski Acked-by: David Hunt @@ -21,7 +22,7 @@ 1 file changed, 5 insertions(+) diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c -index 4343efed14..3f0aeb7b90 100644 +index 6e5bdc3f60..7219925521 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -591,6 +591,7 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)