From patchwork Mon Jun 3 17:32:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 54227 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 55B2B1B9B6; Mon, 3 Jun 2019 19:33:40 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 3C62D1B9AA for ; Mon, 3 Jun 2019 19:33:39 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x53HKXht000364; Mon, 3 Jun 2019 10:33:38 -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=pfpt0818; bh=ijzYL0Ku/2Y00XCmccif29m/A0CHt96e5KYRmknveas=; b=I7MHp5CZnsNbEuDt7VqK83b2XwedggZOFSGQ/BKofS0gAimeC213XPjNVMcwf/iGcbrb fnrw6nIFgQ7vhkLIpKBr2UKyO5OzHEMqzbUnWsuJtMVaY5GuNO3lorcUSvIyrkYcnAOp cQ2Pxeu7CA6jGma6JVvcVNaSG+m2GwHDFKno8dDcwvaevlltSm1q5BmbFDoQ2c25M3Bb KyxQyN1Mo10X0l3+Uca4ll7DioVemPS9n1q7Ve9dwhd8p9F7LYRsm2yyWZ4QmB8kIdEh OvZZR8LjOguPBytraCesOP3yiwTL77DPjCkBdkBaMTQ61XbqXVudkWn8L8cmRyQlTCpu BQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2sw2wmhdad-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2019 10:33:37 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 3 Jun 2019 10:33:36 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 3 Jun 2019 10:33:36 -0700 Received: from ajoseph83.caveonetworks.com.com (unknown [10.29.45.56]) by maili.marvell.com (Postfix) with ESMTP id DA33C3F703F; Mon, 3 Jun 2019 10:33:31 -0700 (PDT) From: Anoob Joseph To: Jerin Jacob , Nikhil Rao , "Erik Gabriel Carrillo" , Abhinandan Gujjar , Bruce Richardson , Pablo de Lara CC: Anoob Joseph , Narayana Prasad , , Lukasz Bartosik , Pavan Nikhilesh , Hemant Agrawal , "Nipun Gupta" , Harry van Haaren , =?utf-8?q?Mattias_R=C3=B6nnblom?= , Liang Ma Date: Mon, 3 Jun 2019 23:02:03 +0530 Message-ID: <1559583160-13944-4-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559583160-13944-1-git-send-email-anoobj@marvell.com> References: <1559583160-13944-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-03_13:, , signatures=0 Subject: [dpdk-dev] [PATCH 03/39] examples/l2fwd-event: move structures to common header 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" Moving structures to common header. Signed-off-by: Anoob Joseph Signed-off-by: Lukasz Bartosik --- examples/l2fwd-event/l2fwd_common.h | 12 ++++++++++++ examples/l2fwd-event/main.c | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/l2fwd-event/l2fwd_common.h b/examples/l2fwd-event/l2fwd_common.h index ce13bbb..a7bb5af 100644 --- a/examples/l2fwd-event/l2fwd_common.h +++ b/examples/l2fwd-event/l2fwd_common.h @@ -22,4 +22,16 @@ #define MAX_TIMER_PERIOD 86400 /* 1 day max */ +struct lcore_queue_conf { + unsigned int n_rx_port; + unsigned int rx_port_list[MAX_RX_QUEUE_PER_LCORE]; +} __rte_cache_aligned; + +/* Per-port statistics struct */ +struct l2fwd_port_statistics { + uint64_t tx; + uint64_t rx; + uint64_t dropped; +} __rte_cache_aligned; + #endif /* _L2FWD_COMMON_H_ */ diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c index 9514485..1551c7f 100644 --- a/examples/l2fwd-event/main.c +++ b/examples/l2fwd-event/main.c @@ -61,10 +61,6 @@ static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS]; static unsigned int l2fwd_rx_queue_per_lcore = 1; -struct lcore_queue_conf { - unsigned int n_rx_port; - unsigned int rx_port_list[MAX_RX_QUEUE_PER_LCORE]; -} __rte_cache_aligned; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS]; @@ -80,12 +76,6 @@ static struct rte_eth_conf port_conf = { struct rte_mempool *l2fwd_pktmbuf_pool; -/* Per-port statistics struct */ -struct l2fwd_port_statistics { - uint64_t tx; - uint64_t rx; - uint64_t dropped; -} __rte_cache_aligned; struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; /* A tsc-based timer responsible for triggering statistics printout */