From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 27C6CA0096 for ; Wed, 8 May 2019 18:02:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 051D8493D; Wed, 8 May 2019 18:02:46 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 239FE37B7 for ; Wed, 8 May 2019 18:02:44 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E2FEC00296E; Wed, 8 May 2019 16:02:43 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-210.ams2.redhat.com [10.36.117.210]) by smtp.corp.redhat.com (Postfix) with ESMTP id B456260C82; Wed, 8 May 2019 16:02:42 +0000 (UTC) From: Kevin Traynor To: Yongseok Koh Cc: dpdk stable Date: Wed, 8 May 2019 17:02:02 +0100 Message-Id: <20190508160233.2648-5-ktraynor@redhat.com> In-Reply-To: <20190508160233.2648-1-ktraynor@redhat.com> References: <20190508160233.2648-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 08 May 2019 16:02:43 +0000 (UTC) Subject: [dpdk-stable] patch 'examples/multi_process: fix buffer underrun' has been queued to LTS release 18.11.2 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/14/19. 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/c35f7d9bc396b94556820bb148c5393d4bfbb8d7 Thanks. Kevin Traynor --- >From c35f7d9bc396b94556820bb148c5393d4bfbb8d7 Mon Sep 17 00:00:00 2001 From: Yongseok Koh Date: Wed, 10 Apr 2019 12:41:54 -0700 Subject: [PATCH] examples/multi_process: fix buffer underrun [ upstream commit 7c22ccdd91bc91e60f1ee32a3c79192a172dc5ea ] For client_server_mp, the total number of buffers for the mbuf mempool should be correctly calculated. Otherwise, having more clients will stop traffic. Fixes: af75078fece3 ("first public release") Signed-off-by: Yongseok Koh --- .../multi_process/client_server_mp/mp_server/init.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c index 30c8e44bc..3af5dc699 100644 --- a/examples/multi_process/client_server_mp/mp_server/init.c +++ b/examples/multi_process/client_server_mp/mp_server/init.c @@ -38,6 +38,4 @@ #include "init.h" -#define MBUFS_PER_CLIENT 1536 -#define MBUFS_PER_PORT 1536 #define MBUF_CACHE_SIZE 512 @@ -64,6 +62,13 @@ static int init_mbuf_pools(void) { - const unsigned num_mbufs = (num_clients * MBUFS_PER_CLIENT) \ - + (ports->num_ports * MBUFS_PER_PORT); + const unsigned int num_mbufs_server = + RTE_MP_RX_DESC_DEFAULT * ports->num_ports; + const unsigned int num_mbufs_client = + num_clients * (CLIENT_QUEUE_RINGSIZE + + RTE_MP_TX_DESC_DEFAULT * ports->num_ports); + const unsigned int num_mbufs_mp_cache = + (num_clients + 1) * MBUF_CACHE_SIZE; + const unsigned int num_mbufs = + num_mbufs_server + num_mbufs_client + num_mbufs_mp_cache; /* don't pass single-producer/single-consumer flags to mbuf create as it -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-05-08 16:33:57.759756307 +0100 +++ 0005-examples-multi_process-fix-buffer-underrun.patch 2019-05-08 16:33:57.359579845 +0100 @@ -1 +1 @@ -From 7c22ccdd91bc91e60f1ee32a3c79192a172dc5ea Mon Sep 17 00:00:00 2001 +From c35f7d9bc396b94556820bb148c5393d4bfbb8d7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7c22ccdd91bc91e60f1ee32a3c79192a172dc5ea ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org