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 91993A04A3 for ; Fri, 5 Jun 2020 20:26:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87D711D510; Fri, 5 Jun 2020 20:26:46 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 03F211D51A for ; Fri, 5 Jun 2020 20:26:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591381604; 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=oMLXHu4C/K5q44M6hLWxPPhWVedLhpR/tw4tumxejds=; b=UOwbMmY3fkt15BFVEwD2etEl6nnZp2nJE0bPkqmQv8zLjwnKWLF+pSM2QAVM4eU020jlyV zenUsIIyQHQhH5zl89O64WfX42EKwdYPY/z5NE2DsQTp8NOYnl2Bkb2omWx010gfaMBNdA 7hXfUqj4cNcM8WR8JikH6kiSpow2UQw= 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-57-aNvXzEm0MXWwOqzPxwWvtg-1; Fri, 05 Jun 2020 14:26:40 -0400 X-MC-Unique: aNvXzEm0MXWwOqzPxwWvtg-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDAC58730EC; Fri, 5 Jun 2020 18:26:38 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06BD2610F2; Fri, 5 Jun 2020 18:26:37 +0000 (UTC) From: Kevin Traynor To: Louise Kilheeney Cc: Xi Zhang , dpdk stable Date: Fri, 5 Jun 2020 19:24:20 +0100 Message-Id: <20200605182525.22483-23-ktraynor@redhat.com> In-Reply-To: <20200605182525.22483-1-ktraynor@redhat.com> References: <20200605182525.22483-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/l2fwd-keepalive: fix mbuf pool size' has been queued to LTS release 18.11.9 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.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/10/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/4e817507780e4547491c22d2f1d240706e364c98 Thanks. Kevin. --- >From 4e817507780e4547491c22d2f1d240706e364c98 Mon Sep 17 00:00:00 2001 From: Louise Kilheeney Date: Mon, 27 Apr 2020 15:57:43 +0100 Subject: [PATCH] examples/l2fwd-keepalive: fix mbuf pool size [ upstream commit 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 ] MBUF pool of size 8192 was causing packet loss when using four ports. To fix this issue this patch specifies the number of MBUF's per port instead of having one set MBUF pool size, this way it will adapt to any number of ports. Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application") Signed-off-by: Louise Kilheeney Tested-by: Xi Zhang --- examples/l2fwd-keepalive/main.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c index 0bf2b53364..16c0a1c034 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -45,5 +45,5 @@ #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1 -#define NB_MBUF 8192 +#define NB_MBUF_PER_PORT 3000 #define MAX_PKT_BURST 32 @@ -529,4 +529,5 @@ main(int argc, char **argv) unsigned lcore_id, rx_lcore_id; unsigned nb_ports_in_mask = 0; + unsigned int total_nb_mbufs; struct sigaction signal_handler; struct rte_keepalive_shm *ka_shm; @@ -554,14 +555,17 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "Invalid L2FWD arguments\n"); - /* create the mbuf pool */ - l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32, - 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id()); - if (l2fwd_pktmbuf_pool == NULL) - rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n"); - nb_ports = rte_eth_dev_count_avail(); if (nb_ports == 0) rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n"); + /* create the mbuf pool */ + total_nb_mbufs = NB_MBUF_PER_PORT * nb_ports; + + l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", + total_nb_mbufs, 32, 0, RTE_MBUF_DEFAULT_BUF_SIZE, + rte_socket_id()); + if (l2fwd_pktmbuf_pool == NULL) + rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n"); + /* reset l2fwd_dst_ports */ for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++) -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-06-05 19:20:52.163682394 +0100 +++ 0023-examples-l2fwd-keepalive-fix-mbuf-pool-size.patch 2020-06-05 19:20:50.747042245 +0100 @@ -1 +1 @@ -From 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 Mon Sep 17 00:00:00 2001 +From 4e817507780e4547491c22d2f1d240706e364c98 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 2ae5a3c6a9..32482158d6 100644 +index 0bf2b53364..16c0a1c034 100644 @@ -31 +32 @@ -@@ -537,4 +537,5 @@ main(int argc, char **argv) +@@ -529,4 +529,5 @@ main(int argc, char **argv) @@ -37 +38 @@ -@@ -562,14 +563,17 @@ main(int argc, char **argv) +@@ -554,14 +555,17 @@ main(int argc, char **argv)