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 60C25A0093 for ; Tue, 19 May 2020 15:14:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 566F81D702; Tue, 19 May 2020 15:14:41 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 670D81D702 for ; Tue, 19 May 2020 15:14:39 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id e16so15852778wra.7 for ; Tue, 19 May 2020 06:14:39 -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=tHUcZGNz/Q1bTTEe4ztJIiPaTWznh8dxzBK3RX4fvKM=; b=mHgjvIKNZ0oDGiUx+Q/AogmbhobUx4vqipRtDh6cv0iEQvh31vVFe704+4PZMoFWyr cMgW8EbArZ1QOcLaQ/xbNjsWinPsl9mBbSwDJtV1OaCf8SqL8fofGKak+s4POWhxIBC7 Uwfwb3IG1MWh0dDr3NRFhU74cyDRSkoFrt6XuX8S1incvai7Sjq7MOyLDndFpeiDqfZ8 bPw5w6ITuIsOaEYYcbxbpMqOgse6BfaCLrspz6EUSyntutgzUlvJU1lVlEdRMJuXqkKN PQnGdMKHcdEGuW47InV4D49wQydezYIcxksYP6YOU/iyjqZOy1zYFIv89+A/dMBU2BPf mDyg== 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=tHUcZGNz/Q1bTTEe4ztJIiPaTWznh8dxzBK3RX4fvKM=; b=pz+aRa9NhtQE8m27mGIqh5d2vtgZq21VL0MQHYVezNaI54LAwt8dWRawkaUW75hwDv +3eJfTHoL8Vf+qCWmfodcXh0wk2bDfeXfaseyEIZvNt7pWBZXvfgwO3Rtu21g/Gncuc4 j8SxS999nIJ4xwJsZrKbTmChsNbFW/UmE/kpbNkar9U9xO2UOZPnzsxi2oHbyjYEorjz FYPh7BrknuDUvMX2AVCUEHrna6CFrDfpsGk6xCXV0TV8QXI6zPnzzoLXrGmUKM6+wwIa TThLZKwObC9p1hz1PfqNm7QnKTpnSzNzLCKASAtqKB1u2KYZ29e6YmjPqkmtTl9tuEBs PgKg== X-Gm-Message-State: AOAM5303KOBZNJ8v4DtsjvILQ1RN/hD+u76IlirlECPYquf///dKbfeT DszOEBRxYM0+OLZPizJtY9Zhqm3lTDVqO86o X-Google-Smtp-Source: ABdhPJxlPeAq/iovk75+m0ELFMTDFjl9+IaniREnyMy2IAE7yRLQPvzC9xaCzImSlRDwlV07rxrg0Q== X-Received: by 2002:adf:9166:: with SMTP id j93mr24517973wrj.289.1589894079170; Tue, 19 May 2020 06:14:39 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o15sm15917746wrw.65.2020.05.19.06.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:14:38 -0700 (PDT) From: luca.boccassi@gmail.com To: Louise Kilheeney Cc: Xi Zhang , dpdk stable Date: Tue, 19 May 2020 14:05:01 +0100 Message-Id: <20200519130549.112823-166-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/l2fwd-keepalive: fix mbuf pool size' has been queued to stable release 19.11.3 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.3 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/21/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 f0ac3aa2d2e7d04bf184f89ab310d02edce8f316 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 b36834974e..eda703e684 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -44,7 +44,7 @@ #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1 -#define NB_MBUF 8192 +#define NB_MBUF_PER_PORT 3000 #define MAX_PKT_BURST 32 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */ @@ -536,6 +536,7 @@ main(int argc, char **argv) uint16_t portid, last_port; 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; @@ -561,16 +562,19 @@ main(int argc, char **argv) if (ret < 0) 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++) l2fwd_dst_ports[portid] = 0; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:51.271603050 +0100 +++ 0166-examples-l2fwd-keepalive-fix-mbuf-pool-size.patch 2020-05-19 14:04:44.508653666 +0100 @@ -1,15 +1,16 @@ -From 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 Mon Sep 17 00:00:00 2001 +From f0ac3aa2d2e7d04bf184f89ab310d02edce8f316 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") -Cc: stable@dpdk.org Signed-off-by: Louise Kilheeney Tested-by: Xi Zhang @@ -18,7 +19,7 @@ 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c -index 2ae5a3c6a9..32482158d6 100644 +index b36834974e..eda703e684 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -44,7 +44,7 @@