From patchwork Fri Jun 26 22:09:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 191926 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp879192ilg; Fri, 26 Jun 2020 15:10:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZRBnNcapUVeQNCZia6mi7rK19S5ITzC/hzQ9LWlq1cZ0P6D6VwRudMllmo7c01ZmDpGrW X-Received: by 2002:a17:906:6b8d:: with SMTP id l13mr4453508ejr.136.1593209419316; Fri, 26 Jun 2020 15:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593209419; cv=none; d=google.com; s=arc-20160816; b=EZkBseRF6FJwUGfpnkSyVdcD4Hu+A5bxy2dobEVkdnuVrW6CENfUKUkJyksQRhATLm vaIMeOhluyfrt/Xbz+NRVheYr8Dd3Drq+OCZDdRzHN7QIgU8savWzHleZbdDgqCbvKIT GrgTJaFyrR5SyQ1dALtotMwTjJBYU3qKyKI4x6Uf6Mo4wjqRdDukYzFese3ey4gJJx+r rzwMZE4Vgy5fesjtqdt2AzPEy8mxm+avNt8TG8ffO6X7ylNikRxf/po+S02qgS9T/SNw JgaBCgWBy77XcGWsf2EsyCUADyQW3EiXloKLPdEuIlVYVhaKnzGmrTCamamekvIelLxg X0VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=20X9jR38vF47IrNdnIscUw+u14JjEKHIPi5GxIWTrYw=; b=LU10ANPLXQCAZdwSfAZ8FdH901hkwUAuh7uRIpresKEUbr8FOgki+QjKW68O0VWXzS J3VrhZsg9Ryo1nn8fe388WbXf6zkRRF+0FUquNJIGtpbd3oKXvrmot5qzJqYxN6tqlc8 cUbcQSJfNsTFTrQYhOKdfVjRKSGSQD6zMvp6xoEffKRqt0fIHOKAzI3USNRAXGyjSxZE ENWc2Remfq+SCrRMrsuNt+RQ9hoJhzQH9ztD8vLnfl5KpIg3hO5Fe1LkhQfw55odmyis o+6VBrnKSNxK7sbkWGd+SZGuOAD25yAhEDc5qp8AHj1JGdM9kZ8PKZJhgLf9bUYsyX2B y/9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id y16si9643573ejq.260.2020.06.26.15.10.19; Fri, 26 Jun 2020 15:10:19 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 70BC11BED7; Sat, 27 Jun 2020 00:10:04 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 572771BEA3; Sat, 27 Jun 2020 00:10:00 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D4E5D1396; Fri, 26 Jun 2020 15:09:59 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C01B43F6CF; Fri, 26 Jun 2020 15:09:59 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, alialnu@mellanox.com, orgerlitz@mellanox.com, wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com, ferruh.yigit@intel.com Cc: hemant.agrawal@nxp.com, jerinj@marvell.com, viacheslavo@mellanox.com, thomas@monjalon.net, ruifeng.wang@arm.com, phil.yang@arm.com, nd@arm.com, stable@dpdk.org, jfreimann@redhat.com Date: Fri, 26 Jun 2020 17:09:41 -0500 Message-Id: <20200626220943.22526-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200626220943.22526-1-honnappa.nagarahalli@arm.com> References: <20200617144307.9961-1-honnappa.nagarahalli@arm.com> <20200626220943.22526-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 3/5] app/testpmd: enable burst stats for noisy vnf mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Phil Yang Add burst stats for noisy vnf mode. Fixes: 3c156061b938 ("app/testpmd: add noisy neighbour forwarding mode") Cc: stable@dpdk.org Cc: jfreimann@redhat.com Signed-off-by: Phil Yang Reviewed-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang Reviewed-by: Jens Freimann --- app/test-pmd/noisy_vnf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.17.1 diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c index 58c4ee925..24f286da6 100644 --- a/app/test-pmd/noisy_vnf.c +++ b/app/test-pmd/noisy_vnf.c @@ -154,6 +154,9 @@ pkt_burst_noisy_vnf(struct fwd_stream *fs) nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst, nb_pkt_per_burst); +#ifdef RTE_TEST_PMD_RECORD_BURST_STATS + fs->rx_burst_stats.pkt_burst_spread[nb_rx]++; +#endif if (unlikely(nb_rx == 0)) goto flush; fs->rx_packets += nb_rx; @@ -164,6 +167,9 @@ pkt_burst_noisy_vnf(struct fwd_stream *fs) pkts_burst, nb_rx); if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) nb_tx += do_retry(nb_rx, nb_tx, pkts_burst, fs); +#ifdef RTE_TEST_PMD_RECORD_BURST_STATS + fs->tx_burst_stats.pkt_burst_spread[nb_tx]++; +#endif fs->tx_packets += nb_tx; fs->fwd_dropped += drop_pkts(pkts_burst, nb_rx, nb_tx); return; @@ -187,6 +193,9 @@ pkt_burst_noisy_vnf(struct fwd_stream *fs) nb_deqd); if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) nb_tx += do_retry(nb_rx, nb_tx, tmp_pkts, fs); +#ifdef RTE_TEST_PMD_RECORD_BURST_STATS + fs->tx_burst_stats.pkt_burst_spread[nb_tx]++; +#endif fs->fwd_dropped += drop_pkts(tmp_pkts, nb_deqd, nb_tx); } } @@ -211,6 +220,9 @@ pkt_burst_noisy_vnf(struct fwd_stream *fs) tmp_pkts, nb_deqd); if (unlikely(sent < nb_deqd) && fs->retry_enabled) nb_tx += do_retry(nb_rx, nb_tx, tmp_pkts, fs); +#ifdef RTE_TEST_PMD_RECORD_BURST_STATS + fs->tx_burst_stats.pkt_burst_spread[nb_tx]++; +#endif fs->fwd_dropped += drop_pkts(tmp_pkts, nb_deqd, sent); ncf->prev_time = rte_get_timer_cycles(); }