From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690051.outbound.protection.outlook.com [40.107.69.51]) by dpdk.org (Postfix) with ESMTP id 850904F90 for ; Mon, 8 Oct 2018 12:42:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XNB1nC3KQ1wVsfWhHDIPDjBoy26daEjQaMgYjCyun64=; b=Da+HmemtbAya9ArA4jiGHT3R2pWR711y8PO7p4Oomk2D3YyTtXrWa8chxtoRc4atXb89or6ATMXmbogBsiMDTJAkt2WGE2cBgqcWyqe8uojQmBUsPU6DE/1sbLWB8U/2Pwat7Rx0TiEBVrsksdM5eXm876szAF4ZJ8KM57sUENw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.com (115.113.156.2) by DM6PR07MB4908.namprd07.prod.outlook.com (2603:10b6:5:a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.27; Mon, 8 Oct 2018 10:42:23 +0000 From: Anoob Joseph To: Bruce Richardson , Pablo de Lara Cc: Anoob Joseph , Jerin Jacob , Narayana Prasad , dev@dpdk.org Date: Mon, 8 Oct 2018 16:11:21 +0530 Message-Id: <1538995285-2040-5-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538995285-2040-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1538995285-2040-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: MA1PR01CA0105.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::21) To DM6PR07MB4908.namprd07.prod.outlook.com (2603:10b6:5:a3::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab27bb25-c6a3-4cb8-8588-08d62d0abcd1 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4908; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4908; 3:B2v1bWLUUzKcYgYDU2nBbz9VkxNL2JP1ZqWG+xOW9Pa+mwuapYJU1uqYfWD1OItfmg6EBu8XrPbz3gSBMRb09FNjQfZ6ilmkB/UpgV/6lv5vEQIvvrPgw+sGixC2SUhCtuA7Cf/J0vPhjiRMqc6G0k3qyKanj4rDn7AyUFxlIvZ1xtk8uSK6JLYxiMfZJijgyhKNqScLdgIfhIGfmI+rY7vAiF1Ei17l4PhdYDkNjAqNlJviolwvO60vEJcWBIbs; 25:A7BJjNw36yGOBWbPhEybu7WCVmMkZWTQ+4DkMaFPuKfACCynLTtrf+mO4Euugd5RHs/H8rval0r5kExlgSdQjDfCKOY5yr075EH5XSeTwDN1RzoZMUXz+eMCGqOxTTho3w3A4++Brb4lFEmKJkXh4Nh3CAkAbhiVX18BTrNGpfNp8qAoE1o0p4tAV7aepDHpmpx31sOufO3oEwa5jrQnvnMMVGEfZJDlqtnOz2JyQ3XqgHGQq1h61UwuQkAhrhdbEZmk+obTJpZb5pZkwRERNAjN3zbJMnBdLmlUAt35fDGTUieP7OmpKhlrg7TBKSTEPqCEBFZVQCknh0Vp0Uljng==; 31:Hq/95Kw6ojjj3oQ6fRyxsSEVUMOB/UeghPA3TdP8+etSnDyg67dU/HN/10ARBqw2Ne+wekb2DYnuR8euvcH4++5XD735cfn6UdvLx+oJKzEO9D3wLumQWSmUNpjbEF2OYEjoV8GAkdmX9ir+c+mnlTCek0xoLTvLUN92+rRcVIPC7WVJpdWo0gdlU99D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microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3002001)(3231355)(944501410)(52105095)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:DM6PR07MB4908; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4908; X-Forefront-PRVS: 081904387B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(376002)(39860400002)(346002)(199004)(189003)(47776003)(316002)(6506007)(386003)(16586007)(106356001)(105586002)(72206003)(2906002)(55236004)(7736002)(6486002)(68736007)(305945005)(66066001)(6512007)(53936002)(81156014)(48376002)(8936002)(50226002)(3846002)(36756003)(50466002)(97736004)(25786009)(6116002)(446003)(486006)(478600001)(476003)(42882007)(11346002)(54906003)(186003)(44832011)(110136005)(5660300001)(4326008)(16526019)(81166006)(51416003)(2616005)(26005)(8676002)(52116002)(76176011)(956004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4908; H:ajoseph83.caveonetworks.com.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB4908; 23:LhV+cDTO+9YgY7nbj81BNtg8I69+rJAZd+1WNDfZh?= =?us-ascii?Q?fnRlaCLN+QI3MmJwMN3TnxYK6VrkIdFQYOKcHAKWNQLCUsMlPCTU+Rogt6Pj?= =?us-ascii?Q?Tbc/BFw3tj+Q7vI7Wrzi17rd1YD3l4MI8DHDKCxDmlMPO/RJzJ9GR0+5qPj0?= =?us-ascii?Q?zEqltj6DoCiGwNvIjUm9pd/XCFY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3axam2Sr2jWBA5CkA7pU70SOP75YCh9kT5sKtWQ==; 5:ONbcLRbOBMvTjVuU5tb8ANzlz+EKEztmr2UY1IJkwV/1vFxLLrYqfi45ckZByQbe5jNPbQbJtEIiKMUyNctA996iuYRLToiV9yiIjcu+PGP5wzDRFwsNXef7RHcJIvTnY0LcvRXEGytRT+OBT+2o/TdeiDMVCA3W7c9bjC4M4/g=; 7:DA5jwd3eWknvPbFLcQs4Yk4Xo9n6vxQDVTMT26TTKg/PYNSrwZedlifSuZ6t2Gor0HeX5gktcUj24mgjLiTKc42WvOVJ5ptjmwO9/60d80qvCp6Hri4bZxyW8MFN63zBQo7ZXSriHmOyyLwBIf1bEMrDy5Htl99yIHJmOXunLzyZy+JxfygwIMLCPPvlBUEW8++Hx83OyiAyuxHitRJvnlDQUT4vakI3B8eHleqPh7OubkT7dgsvtCS5vpl0siUe SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2018 10:42:23.6908 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab27bb25-c6a3-4cb8-8588-08d62d0abcd1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4908 Subject: [dpdk-dev] [PATCH 4/8] examples/l2fwd: replace bare usage of 'unsigned' 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: , X-List-Received-Date: Mon, 08 Oct 2018 10:42:28 -0000 'unsigned int' is preferred over bare usage of 'unsigned' Signed-off-by: Anoob Joseph --- examples/l2fwd/main.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index d2b7034..cbcd604 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -72,8 +72,8 @@ static unsigned int l2fwd_rx_queue_per_lcore = 1; #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT 16 struct lcore_queue_conf { - unsigned n_rx_port; - unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE]; + 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]; @@ -107,7 +107,7 @@ static void print_stats(void) { uint64_t total_packets_dropped, total_packets_tx, total_packets_rx; - unsigned portid; + unsigned int portid; total_packets_dropped = 0; total_packets_tx = 0; @@ -149,7 +149,7 @@ print_stats(void) } static void -l2fwd_mac_updating(struct rte_mbuf *m, unsigned dest_portid) +l2fwd_mac_updating(struct rte_mbuf *m, unsigned int dest_portid) { struct ether_hdr *eth; void *tmp; @@ -165,9 +165,9 @@ l2fwd_mac_updating(struct rte_mbuf *m, unsigned dest_portid) } static void -l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid) +l2fwd_simple_forward(struct rte_mbuf *m, unsigned int portid) { - unsigned dst_port; + unsigned int dst_port; int sent; struct rte_eth_dev_tx_buffer *buffer; @@ -189,9 +189,9 @@ l2fwd_main_loop(void) struct rte_mbuf *pkts_burst[MAX_PKT_BURST]; struct rte_mbuf *m; int sent; - unsigned lcore_id; + unsigned int lcore_id; uint64_t prev_tsc, diff_tsc, cur_tsc, timer_tsc; - unsigned i, j, portid, nb_rx; + unsigned int i, j, portid, nb_rx; struct lcore_queue_conf *qconf; const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * BURST_TX_DRAIN_US; @@ -517,8 +517,8 @@ main(int argc, char **argv) uint16_t nb_ports; uint16_t nb_ports_available = 0; uint16_t portid, last_port; - unsigned lcore_id, rx_lcore_id; - unsigned nb_ports_in_mask = 0; + unsigned int lcore_id, rx_lcore_id; + unsigned int nb_ports_in_mask = 0; unsigned int nb_lcores = 0; unsigned int nb_mbufs; -- 2.7.4