From patchwork Wed Jun 17 14:43:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 190861 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp516413ilo; Wed, 17 Jun 2020 07:43:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVpCg7PksjRsCDq+TSAPxre2Qj+reNOjAGnTB3c48DB2CteWibfq8y23bk4Uh+zJk8qlGr X-Received: by 2002:a5d:5605:: with SMTP id l5mr8616869wrv.318.1592405037208; Wed, 17 Jun 2020 07:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592405037; cv=none; d=google.com; s=arc-20160816; b=YTlDxlckYQAFDTjqfB6tkThT/iPpTcJkM1uPDzy4fQzVBUsr+1+czs4E4o+vs8DdUq B2Cd+enuIqSpSdKkAd0Q885eqcXZ5d63PKAwWP0FPwT5JKVG7yLqF0Qvp0De6MhfOTAl 6kZn+uV3Py87AXt2+DDabuW8lPa5XlpVTfhWnJl6QDgZCzDw+zbmXCccsFH9+vKAU2Xf CkGdWayj4VkkjiFRNHhRRkoCk7ifMxEO9J3oFeUjSPlPBFfBX9PcVy9JABtdeJpCMdOr i0PWIlkaiQD6DOSzCdsqc0sLlJ83GgDcKT8pho+4xB2ZnrDSX478w9ZN/V8PfmXE6M0/ 95bA== 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=AgbMxrbE4jC2UlqYna1ssmpX5mFqpGjpMzH89fsnx/k=; b=nn9TJTwMCoLbglKQEZO9itBPI2BkJFoDGIdrOmd515QB0a/CL4GQ4noRdgxLWhcNQO R6t9Ae+pyUA7X1RhubO24lepZB7KDDJc2GB+3cyqo8jjoW52da7P9rgufQQipsOObCg6 UUxnCyyxJa5Dyw+KkkhoLQLxrlgJTqa/pc6DYgfrHP0E252YnsEb8s2TYYNL5V5T91Qi x85EUwr4UIJnFGWlT4+D1C7yRnfUoogngSAa3i0J7kQBQnHSHrzpPV87EaTnJvebfnSr JBOOFZMMMTIpf15wo7gB90IblW7Ht4XAehyh40LDGmX6D0zaJMrVSGi/yXBqBI+bbccf ad2g== 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 v132si6272410wma.122.2020.06.17.07.43.56; Wed, 17 Jun 2020 07:43:57 -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 7F14B14583; Wed, 17 Jun 2020 16:43:49 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 672814CA7; Wed, 17 Jun 2020 16:43:46 +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 E089811FB; Wed, 17 Jun 2020 07:43:45 -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 D5AEE3F73C; Wed, 17 Jun 2020 07:43:45 -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 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: Wed, 17 Jun 2020 09:43:05 -0500 Message-Id: <20200617144307.9961-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200617144307.9961-1-honnappa.nagarahalli@arm.com> References: <20200617144307.9961-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH 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 --- app/test-pmd/noisy_vnf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.17.1 Reviewed-by: Jens Freimann 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(); }