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 DF75BA04DD for ; Wed, 18 Nov 2020 17:37:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 09EEEC8C6; Wed, 18 Nov 2020 17:37:32 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 94C49C93C for ; Wed, 18 Nov 2020 17:37:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605717448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FvgN+u4DMiMw+zw31h2bLtBsFoCMz+h6aJaC7yERwcU=; b=QaxwkNBoiKAOux0+Jhe/3fG3FmxLiQsV04ckUaH+q0AjG4RtJXWZjeZrzJEnvIwhOsQaPr skfR+8ZdvfVYxd3rTPc2e/E87UrOXTX19fsoeMkZVrdqEfeiEFCpYSpoDoUgMjAWAmFXGn 3s0rus1RMHmMmMM4PcSsVsFB6DB8yUQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-15-SA_uy8TnMimCG5Usq1p2kQ-1; Wed, 18 Nov 2020 11:37:24 -0500 X-MC-Unique: SA_uy8TnMimCG5Usq1p2kQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 22ECA18C89FA; Wed, 18 Nov 2020 16:37:01 +0000 (UTC) Received: from rh.redhat.com (ovpn-113-249.ams2.redhat.com [10.36.113.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id E185C5C1A3; Wed, 18 Nov 2020 16:36:59 +0000 (UTC) From: Kevin Traynor To: Lukasz Wojciechowski Cc: David Hunt , dpdk stable Date: Wed, 18 Nov 2020 16:35:12 +0000 Message-Id: <20201118163558.1101823-26-ktraynor@redhat.com> In-Reply-To: <20201118163558.1101823-1-ktraynor@redhat.com> References: <20201118163558.1101823-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-stable] patch 'test/distributor: collect return mbufs' has been queued to LTS release 18.11.11 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 LTS release 18.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/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. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/6a938ac29a5f2962ec44bbd947807bedf064da82 Thanks. Kevin. --- >From 6a938ac29a5f2962ec44bbd947807bedf064da82 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 --- test/test/test_distributor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c index d8e007c47b..43fd231904 100644 --- a/test/test/test_distributor.c +++ b/test/test/test_distributor.c @@ -591,4 +591,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) 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__); @@ -606,4 +607,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) 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); -- 2.26.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-18 16:33:38.456246720 +0000 +++ 0026-test-distributor-collect-return-mbufs.patch 2020-11-18 16:33:37.930215063 +0000 @@ -1 +1 @@ -From 79c5e12ac29567ed6c1750f732f04619c2a9cc7a Mon Sep 17 00:00:00 2001 +From 6a938ac29a5f2962ec44bbd947807bedf064da82 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 79c5e12ac29567ed6c1750f732f04619c2a9cc7a ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ - app/test/test_distributor.c | 5 +++++ + test/test/test_distributor.c | 5 +++++ @@ -23,5 +24,5 @@ -diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c -index 4343efed14..3f0aeb7b90 100644 ---- a/app/test/test_distributor.c -+++ b/app/test/test_distributor.c -@@ -592,4 +592,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) +diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c +index d8e007c47b..43fd231904 100644 +--- a/test/test/test_distributor.c ++++ b/test/test/test_distributor.c +@@ -591,4 +591,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) @@ -33 +34 @@ -@@ -607,4 +608,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) +@@ -606,4 +607,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)