Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7287/?format=api
https://patches.dpdk.org/api/patches/7287/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443593929-1804-2-git-send-email-remy.horton@intel.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1443593929-1804-2-git-send-email-remy.horton@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1443593929-1804-2-git-send-email-remy.horton@intel.com", "date": "2015-09-30T06:18:48", "name": "[dpdk-dev,v1,1/2] l2fwd: Fix coding standard errors", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "27d89cd8e60b99b16f673bd8afe1dbba5d7a97c9", "submitter": { "id": 326, "url": "https://patches.dpdk.org/api/people/326/?format=api", "name": "Remy Horton", "email": "remy.horton@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1443593929-1804-2-git-send-email-remy.horton@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7287/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7287/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 5EBA48DA1;\n\tWed, 30 Sep 2015 08:18:59 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id EFF758D91\n\tfor <dev@dpdk.org>; Wed, 30 Sep 2015 08:18:55 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 29 Sep 2015 23:18:55 -0700", "from rhorton-mobl.ger.corp.intel.com (HELO localhost.ir.intel.com)\n\t([163.33.229.80])\n\tby orsmga002.jf.intel.com with ESMTP; 29 Sep 2015 23:18:54 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.17,611,1437462000\"; d=\"scan'208\";a=\"816032260\"", "From": "Remy Horton <remy.horton@intel.com>", "To": "dev@dpdk.org", "Date": "Wed, 30 Sep 2015 07:18:48 +0100", "Message-Id": "<1443593929-1804-2-git-send-email-remy.horton@intel.com>", "X-Mailer": "git-send-email 1.9.3", "In-Reply-To": "<1443593929-1804-1-git-send-email-remy.horton@intel.com>", "References": "<1443593929-1804-1-git-send-email-remy.horton@intel.com>", "Subject": "[dpdk-dev] [PATCH v1 1/2] l2fwd: Fix coding standard errors", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Fixes to l2fwd code that were causing checkpatch.pl to fail.\n\nFixes: af75078fece3 (\"first public release\")\n\nSigned-off-by: Remy Horton <remy.horton@intel.com>\n---\n examples/l2fwd/main.c | 53 ++++++++++++++++++++++++++++++---------------------\n 1 file changed, 31 insertions(+), 22 deletions(-)", "diff": "diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c\nindex 720fd5a..2f0841d 100644\n--- a/examples/l2fwd/main.c\n+++ b/examples/l2fwd/main.c\n@@ -1,8 +1,7 @@\n /*-\n * BSD LICENSE\n *\n- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n- * All rights reserved.\n+ * Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n@@ -88,7 +87,7 @@ static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;\n static struct ether_addr l2fwd_ports_eth_addr[RTE_MAX_ETHPORTS];\n \n /* mask of enabled ports */\n-static uint32_t l2fwd_enabled_port_mask = 0;\n+static uint32_t l2fwd_enabled_port_mask;\n \n /* list of enabled ports */\n static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS];\n@@ -124,7 +123,7 @@ static const struct rte_eth_conf port_conf = {\n \t},\n };\n \n-struct rte_mempool * l2fwd_pktmbuf_pool = NULL;\n+struct rte_mempool *l2fwd_pktmbuf_pool = NULL;\n \n /* Per-port statistics struct */\n struct l2fwd_port_statistics {\n@@ -139,6 +138,7 @@ struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS];\n #define MAX_TIMER_PERIOD 86400 /* 1 day max */\n static int64_t timer_period = 10 * TIMER_MILLISECOND * 1000; /* default period is 10 seconds */\n \n+\n /* Print out statistics on packets dropped */\n static void\n print_stats(void)\n@@ -151,7 +151,7 @@ print_stats(void)\n \ttotal_packets_rx = 0;\n \n \tconst char clr[] = { 27, '[', '2', 'J', '\\0' };\n-\tconst char topLeft[] = { 27, '[', '1', ';', '1', 'H','\\0' };\n+\tconst char topLeft[] = { 27, '[', '1', ';', '1', 'H', '\\0'};\n \n \t\t/* Clear screen and move to top left */\n \tprintf(\"%s%s\", clr, topLeft);\n@@ -191,7 +191,7 @@ l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n, uint8_t port)\n {\n \tstruct rte_mbuf **m_table;\n \tunsigned ret;\n-\tunsigned queueid =0;\n+\tunsigned queueid = 0;\n \n \tm_table = (struct rte_mbuf **)qconf->tx_mbufs[port].m_table;\n \n@@ -261,7 +261,8 @@ l2fwd_main_loop(void)\n \tuint64_t prev_tsc, diff_tsc, cur_tsc, timer_tsc;\n \tunsigned i, j, portid, nb_rx;\n \tstruct lcore_queue_conf *qconf;\n-\tconst uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * BURST_TX_DRAIN_US;\n+\tconst uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /\n+\t\tUS_PER_S * BURST_TX_DRAIN_US;\n \n \tprev_tsc = 0;\n \ttimer_tsc = 0;\n@@ -357,7 +358,7 @@ l2fwd_usage(const char *prgname)\n \tprintf(\"%s [EAL options] -- -p PORTMASK [-q NQ]\\n\"\n \t \" -p PORTMASK: hexadecimal bitmask of ports to configure\\n\"\n \t \" -q NQ: number of queue (=ports) per lcore (default is 1)\\n\"\n-\t\t \" -T PERIOD: statistics will be refreshed each PERIOD seconds (0 to disable, 10 default, 86400 maximum)\\n\",\n+\t \" -T PERIOD: statistics will be refreshed each PERIOD seconds (0 to disable, 10 default, 86400 maximum)\\n\",\n \t prgname);\n }\n \n@@ -534,6 +535,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t}\n }\n \n+\n int\n main(int argc, char **argv)\n {\n@@ -546,6 +548,8 @@ main(int argc, char **argv)\n \tunsigned lcore_id, rx_lcore_id;\n \tunsigned nb_ports_in_mask = 0;\n \n+\tl2fwd_enabled_port_mask = 0;\n+\n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\n \tif (ret < 0)\n@@ -587,8 +591,7 @@ main(int argc, char **argv)\n \t\tif (nb_ports_in_mask % 2) {\n \t\t\tl2fwd_dst_ports[portid] = last_port;\n \t\t\tl2fwd_dst_ports[last_port] = portid;\n-\t\t}\n-\t\telse\n+\t\t} else\n \t\t\tlast_port = portid;\n \n \t\tnb_ports_in_mask++;\n@@ -624,7 +627,9 @@ main(int argc, char **argv)\n \n \t\tqconf->rx_port_list[qconf->n_rx_port] = portid;\n \t\tqconf->n_rx_port++;\n-\t\tprintf(\"Lcore %u: RX port %u\\n\", rx_lcore_id, (unsigned) portid);\n+\t\tprintf(\"Lcore %u: RX port %u\\n\",\n+\t\t\trx_lcore_id, (unsigned) portid\n+\t\t\t);\n \t}\n \n \tnb_ports_available = nb_ports;\n@@ -633,7 +638,8 @@ main(int argc, char **argv)\n \tfor (portid = 0; portid < nb_ports; portid++) {\n \t\t/* skip ports that are not enabled */\n \t\tif ((l2fwd_enabled_port_mask & (1 << portid)) == 0) {\n-\t\t\tprintf(\"Skipping disabled port %u\\n\", (unsigned) portid);\n+\t\t\tprintf(\"Skipping disabled port %u\\n\",\n+\t\t\t\t(unsigned) portid);\n \t\t\tnb_ports_available--;\n \t\t\tcontinue;\n \t\t}\n@@ -642,10 +648,11 @@ main(int argc, char **argv)\n \t\tfflush(stdout);\n \t\tret = rte_eth_dev_configure(portid, 1, 1, &port_conf);\n \t\tif (ret < 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"Cannot configure device: err=%d, port=%u\\n\",\n-\t\t\t\t ret, (unsigned) portid);\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\"Cannot configure device: err=%d, port=%u\\n\",\n+\t\t\t\tret, (unsigned) portid);\n \n-\t\trte_eth_macaddr_get(portid,&l2fwd_ports_eth_addr[portid]);\n+\t\trte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]);\n \n \t\t/* init one RX queue */\n \t\tfflush(stdout);\n@@ -654,7 +661,8 @@ main(int argc, char **argv)\n \t\t\t\t\t NULL,\n \t\t\t\t\t l2fwd_pktmbuf_pool);\n \t\tif (ret < 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"rte_eth_rx_queue_setup:err=%d, port=%u\\n\",\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\"rte_eth_rx_queue_setup:err=%d, port=%u\\n\",\n \t\t\t\t ret, (unsigned) portid);\n \n \t\t/* init one TX queue on each port */\n@@ -663,20 +671,21 @@ main(int argc, char **argv)\n \t\t\t\trte_eth_dev_socket_id(portid),\n \t\t\t\tNULL);\n \t\tif (ret < 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"rte_eth_tx_queue_setup:err=%d, port=%u\\n\",\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\"rte_eth_tx_queue_setup:err=%d, port=%u\\n\",\n \t\t\t\tret, (unsigned) portid);\n \n \t\t/* Start device */\n \t\tret = rte_eth_dev_start(portid);\n \t\tif (ret < 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"rte_eth_dev_start:err=%d, port=%u\\n\",\n-\t\t\t\t ret, (unsigned) portid);\n-\n-\t\tprintf(\"done: \\n\");\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\"rte_eth_dev_start:err=%d, port=%u\\n\",\n+\t\t\t\tret, (unsigned) portid);\n \n \t\trte_eth_promiscuous_enable(portid);\n \n-\t\tprintf(\"Port %u, MAC address: %02X:%02X:%02X:%02X:%02X:%02X\\n\\n\",\n+\t\tprintf(\"Port %u,\"\n+\t\t\t\" MAC address: %02X:%02X:%02X:%02X:%02X:%02X\\n\\n\",\n \t\t\t\t(unsigned) portid,\n \t\t\t\tl2fwd_ports_eth_addr[portid].addr_bytes[0],\n \t\t\t\tl2fwd_ports_eth_addr[portid].addr_bytes[1],\n", "prefixes": [ "dpdk-dev", "v1", "1/2" ] }{ "id": 7287, "url": "