From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BDCDFA0544; Mon, 10 Oct 2022 14:31:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D680742BB7; Mon, 10 Oct 2022 14:31:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 7685742BB6 for ; Mon, 10 Oct 2022 14:31:38 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 299LW37F022452; Mon, 10 Oct 2022 05:31:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=gT/uUqRcdxqnbDZJT339z6qaGaCPecmKMBuvE9LEhts=; b=gcOxzEjK2ESzbX9u5G0ZpyEJ0UoOxD8AUEBQWzB6/h52BHYH275zxF52mYjWl/Ys5qbQ KsKCDRQVzRwCeZxg9tzETeTWapRXnkxtCpeUVwOjhMZUXmW+km7ag5OGFbN2D5F2R5uf GdXEMcODUmztP4eiwLNaiiONAdsjlYLxv4yXVEedbzDvopKUxoEU57tCLlNQvMu7Q3uZ cfdJQQpMAzQfyGoqI4R4pSVJurFGwyR9r/UNVGexL94h6aGJNdtGP0gNmnBc9GUOrvbG Cfn3qcg00y6y7D2GQ9sM/lhuLmTZGjeanIt3zu9sXcj93GZKNbN2vPJJ+kcO3w3N+Gq5 AQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3k36jpnpjv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 10 Oct 2022 05:31:37 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 10 Oct 2022 05:31:35 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 10 Oct 2022 05:31:35 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 3333D3F709D; Mon, 10 Oct 2022 05:31:32 -0700 (PDT) From: Volodymyr Fialko To: , Radu Nicolau , Akhil Goyal CC: , , , Volodymyr Fialko Subject: [PATCH v2 4/6] examples/ipsec-secgw: add stats for event mode Date: Mon, 10 Oct 2022 14:31:00 +0200 Message-ID: <20221010123102.3962719-5-vfialko@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010123102.3962719-1-vfialko@marvell.com> References: <20220804103626.102688-1-vfialko@marvell.com> <20221010123102.3962719-1-vfialko@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: UoK4KpmenkdexZx2P5GnTXNjmvZ2n5ZG X-Proofpoint-ORIG-GUID: UoK4KpmenkdexZx2P5GnTXNjmvZ2n5ZG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-10_06,2022-10-10_02,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add per core statistic(rx/tx) counters for event mode worker. Signed-off-by: Volodymyr Fialko --- examples/ipsec-secgw/ipsec_worker.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c index 074c7a22d6..034103bdf6 100644 --- a/examples/ipsec-secgw/ipsec_worker.c +++ b/examples/ipsec-secgw/ipsec_worker.c @@ -508,7 +508,7 @@ process_ipsec_ev_inbound(struct ipsec_ctx *ctx, struct route_table *rt, drop_pkt_and_exit: RTE_LOG(ERR, IPSEC, "Inbound packet dropped\n"); - rte_pktmbuf_free(pkt); + free_pkts(&pkt, 1); ev->mbuf = NULL; return PKT_DROPPED; } @@ -620,7 +620,7 @@ process_ipsec_ev_outbound(struct ipsec_ctx *ctx, struct route_table *rt, drop_pkt_and_exit: RTE_LOG(ERR, IPSEC, "Outbound packet dropped\n"); - rte_pktmbuf_free(pkt); + free_pkts(&pkt, 1); ev->mbuf = NULL; return PKT_DROPPED; } @@ -853,6 +853,7 @@ ipsec_ev_vector_process(struct lcore_conf_ev_tx_int_port_wrkr *lconf, pkt = vec->mbufs[0]; ev_vector_attr_init(vec); + core_stats_update_rx(vec->nb_elem); if (is_unprotected_port(pkt->port)) ret = process_ipsec_ev_inbound_vector(&lconf->inbound, &lconf->rt, vec); @@ -861,6 +862,7 @@ ipsec_ev_vector_process(struct lcore_conf_ev_tx_int_port_wrkr *lconf, &lconf->rt, vec); if (likely(ret > 0)) { + core_stats_update_tx(vec->nb_elem); vec->nb_elem = ret; ret = rte_event_eth_tx_adapter_enqueue(links[0].eventdev_id, links[0].event_port_id, ev, 1, 0); @@ -1181,6 +1183,7 @@ ipsec_wrkr_non_burst_int_port_app_mode(struct eh_event_link_info *links, ipsec_ev_vector_process(&lconf, links, &ev); continue; case RTE_EVENT_TYPE_ETHDEV: + core_stats_update_rx(1); if (is_unprotected_port(ev.mbuf->port)) ret = process_ipsec_ev_inbound(&lconf.inbound, &lconf.rt, links, &ev); @@ -1202,6 +1205,7 @@ ipsec_wrkr_non_burst_int_port_app_mode(struct eh_event_link_info *links, continue; } + core_stats_update_tx(1); /* * Since tx internal port is available, events can be * directly enqueued to the adapter and it would be -- 2.25.1