get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/28314/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 28314,
    "url": "https://patches.dpdk.org/api/patches/28314/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170904055734.21354-3-zhiyong.yang@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": "<20170904055734.21354-3-zhiyong.yang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170904055734.21354-3-zhiyong.yang@intel.com",
    "date": "2017-09-04T05:57:32",
    "name": "[dpdk-dev,v2,2/4] examples: increase port_id range",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0dcc8188ad567d513c0b7f6c2a83605ec20e4ccc",
    "submitter": {
        "id": 540,
        "url": "https://patches.dpdk.org/api/people/540/?format=api",
        "name": "Yang, Zhiyong",
        "email": "zhiyong.yang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170904055734.21354-3-zhiyong.yang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/28314/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/28314/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 B2FFB7CF2;\n\tMon,  4 Sep 2017 07:57:54 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 3EB217CAA\n\tfor <dev@dpdk.org>; Mon,  4 Sep 2017 07:57:52 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Sep 2017 22:57:51 -0700",
            "from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.182])\n\tby fmsmga006.fm.intel.com with ESMTP; 03 Sep 2017 22:57:45 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,473,1498546800\"; d=\"scan'208\";a=\"147809958\"",
        "From": "Zhiyong Yang <zhiyong.yang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, ferruh.yigit@intel.com, keith.wiles@intel.com,\n\tstephen@networkplumber.org, Zhiyong Yang <zhiyong.yang@intel.com>",
        "Date": "Mon,  4 Sep 2017 13:57:32 +0800",
        "Message-Id": "<20170904055734.21354-3-zhiyong.yang@intel.com>",
        "X-Mailer": "git-send-email 2.13.3",
        "In-Reply-To": "<20170904055734.21354-1-zhiyong.yang@intel.com>",
        "References": "<20170809084203.17562-1-zhiyong.yang@intel.com>\n\t<20170904055734.21354-1-zhiyong.yang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 2/4] examples: increase port_id range",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "Modify port_id related code in examples accordingly since port_id\ndefinition in lib and pmd changes.\n\nFix some original checkpatch issues and remove some unnecessary\ncast at the same time.\n\nSigned-off-by: Zhiyong Yang <zhiyong.yang@intel.com>\n---\n doc/guides/rel_notes/release_17_11.rst             |   4 +\n examples/bond/main.c                               |  10 +-\n examples/distributor/main.c                        |  28 ++--\n examples/eventdev_pipeline_sw_pmd/main.c           |   2 +-\n examples/exception_path/main.c                     |  39 ++---\n examples/ip_fragmentation/main.c                   |  33 ++---\n examples/ip_pipeline/init.c                        |   4 +-\n examples/ip_reassembly/main.c                      |  34 ++---\n examples/ipv4_multicast/main.c                     |  34 ++---\n examples/kni/main.c                                |  31 ++--\n examples/l2fwd-cat/l2fwd-cat.c                     |  12 +-\n examples/l2fwd-crypto/main.c                       |  30 ++--\n examples/l2fwd-jobstats/main.c                     |  34 ++---\n examples/l2fwd-keepalive/main.c                    |  49 +++----\n examples/l2fwd/main.c                              |  49 +++----\n examples/l3fwd-acl/main.c                          |  11 +-\n examples/l3fwd-power/main.c                        |  62 ++++----\n examples/l3fwd-vf/main.c                           |  53 +++----\n examples/l3fwd/l3fwd.h                             |  10 +-\n examples/l3fwd/l3fwd_common.h                      |   2 +-\n examples/l3fwd/l3fwd_em.c                          |   2 +-\n examples/l3fwd/l3fwd_em.h                          |   6 +-\n examples/l3fwd/l3fwd_em_hlm.h                      |  14 +-\n examples/l3fwd/l3fwd_lpm.c                         |  17 +--\n examples/l3fwd/l3fwd_lpm.h                         |   6 +-\n examples/l3fwd/l3fwd_lpm_neon.h                    |   4 +-\n examples/l3fwd/l3fwd_lpm_sse.h                     |   4 +-\n examples/l3fwd/main.c                              |  30 ++--\n examples/link_status_interrupt/main.c              |  11 +-\n examples/load_balancer/config.c                    |  21 +--\n examples/load_balancer/init.c                      |  40 +++---\n examples/load_balancer/main.h                      |  11 +-\n examples/load_balancer/runtime.c                   |  12 +-\n .../client_server_mp/mp_client/client.c            |  21 +--\n .../client_server_mp/mp_server/args.c              |   4 +-\n .../client_server_mp/mp_server/args.h              |   2 +-\n .../client_server_mp/mp_server/init.c              |  11 +-\n .../client_server_mp/mp_server/main.c              |   2 +-\n .../multi_process/client_server_mp/shared/common.h |   4 +-\n examples/multi_process/l2fwd_fork/main.c           |  14 +-\n examples/netmap_compat/lib/compat_netmap.c         |  52 ++++---\n examples/netmap_compat/lib/compat_netmap.h         |   2 +-\n examples/packet_ordering/main.c                    |  19 +--\n examples/performance-thread/l3fwd-thread/main.c    | 160 +++++++++++----------\n examples/ptpclient/ptpclient.c                     |   4 +-\n examples/qos_sched/args.c                          |  12 +-\n examples/qos_sched/init.c                          |  31 ++--\n examples/qos_sched/main.c                          |  18 ++-\n examples/qos_sched/main.h                          |  24 ++--\n examples/qos_sched/stats.c                         |  16 ++-\n examples/quota_watermark/qw/init.c                 |   4 +-\n examples/quota_watermark/qw/main.c                 |  10 +-\n examples/rxtx_callbacks/main.c                     |   8 +-\n examples/server_node_efd/server/main.c             |   2 +-\n examples/server_node_efd/shared/common.h           |   4 +-\n examples/skeleton/basicfwd.c                       |  12 +-\n examples/vhost/main.c                              |  10 +-\n 57 files changed, 597 insertions(+), 558 deletions(-)",
    "diff": "diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst\nindex 170f4f916..98fd7cb23 100644\n--- a/doc/guides/rel_notes/release_17_11.rst\n+++ b/doc/guides/rel_notes/release_17_11.rst\n@@ -41,6 +41,10 @@ New Features\n      Also, make sure to start the actual text at the margin.\n      =========================================================\n \n+* **Extended port_id range from uint8_t to uint16_t.**\n+\n+  Extended port_id range from 8 bits to 16 bits in order to support more than\n+  256 ports in dpdk.\n \n Resolved Issues\n ---------------\ndiff --git a/examples/bond/main.c b/examples/bond/main.c\nindex 2d019d433..559801ff3 100644\n--- a/examples/bond/main.c\n+++ b/examples/bond/main.c\n@@ -144,7 +144,7 @@\n uint8_t slaves[RTE_MAX_ETHPORTS];\n uint8_t slaves_count;\n \n-static uint8_t BOND_PORT = 0xff;\n+static uint16_t BOND_PORT = 0xffff;\n \n static struct rte_mempool *mbuf_pool;\n \n@@ -171,7 +171,7 @@ static struct rte_eth_conf port_conf = {\n };\n \n static void\n-slave_port_init(uint8_t portid, struct rte_mempool *mbuf_pool)\n+slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)\n {\n \tint retval;\n \tuint16_t nb_rxd = RTE_RX_DESC_DEFAULT;\n@@ -215,7 +215,7 @@ slave_port_init(uint8_t portid, struct rte_mempool *mbuf_pool)\n \tstruct ether_addr addr;\n \n \trte_eth_macaddr_get(portid, &addr);\n-\tprintf(\"Port %u MAC: \", (unsigned)portid);\n+\tprintf(\"Port %u MAC: \", portid);\n \tPRINT_MAC(addr);\n \tprintf(\"\\n\");\n }\n@@ -234,7 +234,7 @@ bond_port_init(struct rte_mempool *mbuf_pool)\n \t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\"Faled to create bond port\\n\");\n \n-\tBOND_PORT = (uint8_t)retval;\n+\tBOND_PORT = retval;\n \n \tretval = rte_eth_dev_configure(BOND_PORT, 1, 1, &port_conf);\n \tif (retval != 0)\n@@ -675,7 +675,7 @@ static void cmd_show_parsed(__attribute__((unused)) void *parsed_result,\n \t\t\t    struct cmdline *cl,\n \t\t\t    __attribute__((unused)) void *data)\n {\n-\tuint8_t slaves[16] = {0};\n+\tuint16_t slaves[16] = {0};\n \tuint8_t len = 16;\n \tstruct ether_addr addr;\n \tuint8_t i = 0;\ndiff --git a/examples/distributor/main.c b/examples/distributor/main.c\nindex 87603d039..24b65e3aa 100644\n--- a/examples/distributor/main.c\n+++ b/examples/distributor/main.c\n@@ -132,7 +132,7 @@ static void print_stats(void);\n  * coming from the mbuf_pool passed as parameter\n  */\n static inline int\n-port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n+port_init(uint16_t port, struct rte_mempool *mbuf_pool)\n {\n \tstruct rte_eth_conf port_conf = port_conf_default;\n \tconst uint16_t rxRings = 1, txRings = rte_lcore_count() - 1;\n@@ -175,13 +175,13 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n \tstruct rte_eth_link link;\n \trte_eth_link_get_nowait(port, &link);\n \twhile (!link.link_status) {\n-\t\tprintf(\"Waiting for Link up on port %\"PRIu8\"\\n\", port);\n+\t\tprintf(\"Waiting for Link up on port %\"PRIu16\"\\n\", port);\n \t\tsleep(1);\n \t\trte_eth_link_get_nowait(port, &link);\n \t}\n \n \tif (!link.link_status) {\n-\t\tprintf(\"Link down on port %\"PRIu8\"\\n\", port);\n+\t\tprintf(\"Link down on port %\"PRIu16\"\\n\", port);\n \t\treturn 0;\n \t}\n \n@@ -189,7 +189,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n \trte_eth_macaddr_get(port, &addr);\n \tprintf(\"Port %u MAC: %02\"PRIx8\" %02\"PRIx8\" %02\"PRIx8\n \t\t\t\" %02\"PRIx8\" %02\"PRIx8\" %02\"PRIx8\"\\n\",\n-\t\t\t(unsigned)port,\n+\t\t\tport,\n \t\t\taddr.addr_bytes[0], addr.addr_bytes[1],\n \t\t\taddr.addr_bytes[2], addr.addr_bytes[3],\n \t\t\taddr.addr_bytes[4], addr.addr_bytes[5]);\n@@ -210,7 +210,7 @@ struct lcore_params {\n static int\n lcore_rx(struct lcore_params *p)\n {\n-\tconst uint8_t nb_ports = rte_eth_dev_count();\n+\tconst uint16_t nb_ports = rte_eth_dev_count();\n \tconst int socket_id = rte_socket_id();\n \tuint8_t port;\n \tstruct rte_mbuf *bufs[BURST_SIZE*2];\n@@ -312,9 +312,9 @@ flush_one_port(struct output_buffer *outbuf, uint8_t outp)\n }\n \n static inline void\n-flush_all_ports(struct output_buffer *tx_buffers, uint8_t nb_ports)\n+flush_all_ports(struct output_buffer *tx_buffers, uint16_t nb_ports)\n {\n-\tuint8_t outp;\n+\tuint16_t outp;\n \n \tfor (outp = 0; outp < nb_ports; outp++) {\n \t\t/* skip ports that are not enabled */\n@@ -384,9 +384,9 @@ static int\n lcore_tx(struct rte_ring *in_r)\n {\n \tstatic struct output_buffer tx_buffers[RTE_MAX_ETHPORTS];\n-\tconst uint8_t nb_ports = rte_eth_dev_count();\n+\tconst uint16_t nb_ports = rte_eth_dev_count();\n \tconst int socket_id = rte_socket_id();\n-\tuint8_t port;\n+\tuint16_t port;\n \n \tfor (port = 0; port < nb_ports; port++) {\n \t\t/* skip ports that are not enabled */\n@@ -668,8 +668,8 @@ main(int argc, char *argv[])\n \tstruct rte_ring *rx_dist_ring;\n \tunsigned lcore_id, worker_id = 0;\n \tunsigned nb_ports;\n-\tuint8_t portid;\n-\tuint8_t nb_ports_available;\n+\tuint16_t portid;\n+\tuint16_t nb_ports_available;\n \tuint64_t t, freq;\n \n \t/* catch ctrl-c so we can print on exit */\n@@ -719,11 +719,11 @@ main(int argc, char *argv[])\n \t\t\tcontinue;\n \t\t}\n \t\t/* init port */\n-\t\tprintf(\"Initializing port %u... done\\n\", (unsigned) portid);\n+\t\tprintf(\"Initializing port %u... done\\n\", portid);\n \n \t\tif (port_init(portid, mbuf_pool) != 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"Cannot initialize port %\"PRIu8\"\\n\",\n-\t\t\t\t\tportid);\n+\t\t\trte_exit(EXIT_FAILURE, \"Cannot initialize port %u\\n\",\n+\t\t\t\t portid);\n \t}\n \n \tif (!nb_ports_available) {\ndiff --git a/examples/eventdev_pipeline_sw_pmd/main.c b/examples/eventdev_pipeline_sw_pmd/main.c\nindex dd75cb7a3..3763082e5 100644\n--- a/examples/eventdev_pipeline_sw_pmd/main.c\n+++ b/examples/eventdev_pipeline_sw_pmd/main.c\n@@ -669,7 +669,7 @@ setup_eventdev(struct prod_data *prod_data,\n \t/* +1 stages is for a SINGLE_LINK TX stage */\n \tconst uint8_t nb_queues = cdata.num_stages + 1;\n \t/* + 2 is one port for producer and one for consumer */\n-\tconst uint8_t nb_ports = cdata.num_workers + 2;\n+\tconst uint16_t nb_ports = cdata.num_workers + 2;\n \tstruct rte_event_dev_config config = {\n \t\t\t.nb_event_queues = nb_queues,\n \t\t\t.nb_event_ports = nb_ports,\ndiff --git a/examples/exception_path/main.c b/examples/exception_path/main.c\nindex e551e6d11..e4d952343 100644\n--- a/examples/exception_path/main.c\n+++ b/examples/exception_path/main.c\n@@ -135,7 +135,7 @@ static uint64_t input_cores_mask = 0;\n static uint64_t output_cores_mask = 0;\n \n /* Array storing port_id that is associated with each lcore */\n-static uint8_t port_ids[RTE_MAX_LCORE];\n+static uint16_t port_ids[RTE_MAX_LCORE];\n \n /* Structure type for recording lcore-specific stats */\n struct stats {\n@@ -360,8 +360,8 @@ static void\n setup_port_lcore_affinities(void)\n {\n \tunsigned long i;\n-\tuint8_t tx_port = 0;\n-\tuint8_t rx_port = 0;\n+\tuint16_t tx_port = 0;\n+\tuint16_t rx_port = 0;\n \n \t/* Setup port_ids[] array, and check masks were ok */\n \tRTE_LCORE_FOREACH(i) {\n@@ -444,24 +444,23 @@ parse_args(int argc, char **argv)\n \n /* Initialise a single port on an Ethernet device */\n static void\n-init_port(uint8_t port)\n+init_port(uint16_t port)\n {\n \tint ret;\n \tuint16_t nb_rxd = NB_RXD;\n \tuint16_t nb_txd = NB_TXD;\n \n \t/* Initialise device and RX/TX queues */\n-\tPRINT_INFO(\"Initialising port %u ...\", (unsigned)port);\n+\tPRINT_INFO(\"Initialising port %u ...\", port);\n \tfflush(stdout);\n \tret = rte_eth_dev_configure(port, 1, 1, &port_conf);\n \tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not configure port%u (%d)\",\n-\t\t            (unsigned)port, ret);\n+\t\tFATAL_ERROR(\"Could not configure port%u (%d)\", port, ret);\n \n \tret = rte_eth_dev_adjust_nb_rx_tx_desc(port, &nb_rxd, &nb_txd);\n \tif (ret < 0)\n \t\tFATAL_ERROR(\"Could not adjust number of descriptors for port%u (%d)\",\n-\t\t\t    (unsigned)port, ret);\n+\t\t\t    port, ret);\n \n \tret = rte_eth_rx_queue_setup(port, 0, nb_rxd,\n \t\t\t\trte_eth_dev_socket_id(port),\n@@ -469,29 +468,30 @@ init_port(uint8_t port)\n \t\t\t\tpktmbuf_pool);\n \tif (ret < 0)\n \t\tFATAL_ERROR(\"Could not setup up RX queue for port%u (%d)\",\n-\t\t            (unsigned)port, ret);\n+\t\t\t\tport, ret);\n \n \tret = rte_eth_tx_queue_setup(port, 0, nb_txd,\n \t\t\t\trte_eth_dev_socket_id(port),\n \t\t\t\tNULL);\n \tif (ret < 0)\n \t\tFATAL_ERROR(\"Could not setup up TX queue for port%u (%d)\",\n-\t\t            (unsigned)port, ret);\n+\t\t\t\tport, ret);\n \n \tret = rte_eth_dev_start(port);\n \tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not start port%u (%d)\", (unsigned)port, ret);\n+\t\tFATAL_ERROR(\"Could not start port%u (%d)\", port, ret);\n \n \trte_eth_promiscuous_enable(port);\n }\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -506,14 +506,14 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up. Speed %u Mbps - %s\\n\",\n+\t\t\t\t\t\tportid, link.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\tprintf(\"Port %u Link Down\\n\",\n+\t\t\t\t\t\tportid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -546,7 +546,8 @@ main(int argc, char** argv)\n {\n \tint ret;\n \tunsigned i,high_port;\n-\tuint8_t nb_sys_ports, port;\n+\tuint8_t nb_sys_ports;\n+\tuint16_t port;\n \n \t/* Associate signal_hanlder function with USR signals */\n \tsignal(SIGUSR1, signal_handler);\ndiff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c\nindex 8c0e17911..de252760f 100644\n--- a/examples/ip_fragmentation/main.c\n+++ b/examples/ip_fragmentation/main.c\n@@ -154,7 +154,7 @@ struct rx_queue {\n \tstruct rte_mempool *indirect_pool;\n \tstruct rte_lpm *lpm;\n \tstruct rte_lpm6 *lpm6;\n-\tuint8_t portid;\n+\tuint16_t portid;\n };\n \n #define MAX_RX_QUEUE_PER_LCORE 16\n@@ -240,7 +240,7 @@ static struct rte_lpm6 *socket_lpm6[RTE_MAX_NUMA_NODES];\n \n /* Send burst of packets on an output interface */\n static inline int\n-send_burst(struct lcore_queue_conf *qconf, uint16_t n, uint8_t port)\n+send_burst(struct lcore_queue_conf *qconf, uint16_t n, uint16_t port)\n {\n \tstruct rte_mbuf **m_table;\n \tint ret;\n@@ -261,11 +261,12 @@ send_burst(struct lcore_queue_conf *qconf, uint16_t n, uint8_t port)\n \n static inline void\n l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf,\n-\t\tuint8_t queueid, uint8_t port_in)\n+\t\tuint8_t queueid, uint16_t port_in)\n {\n \tstruct rx_queue *rxq;\n \tuint32_t i, len, next_hop;\n-\tuint8_t port_out, ipv6;\n+\tuint8_t ipv6;\n+\tuint16_t port_out;\n \tint32_t len2;\n \n \tipv6 = 0;\n@@ -403,7 +404,7 @@ main_loop(__attribute__((unused)) void *dummy)\n \tunsigned lcore_id;\n \tuint64_t prev_tsc, diff_tsc, cur_tsc;\n \tint i, j, nb_rx;\n-\tuint8_t portid;\n+\tuint16_t portid;\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 \n@@ -423,7 +424,7 @@ main_loop(__attribute__((unused)) void *dummy)\n \n \t\tportid = qconf->rx_queue_list[i].portid;\n \t\tRTE_LOG(INFO, IP_FRAG, \" -- lcoreid=%u portid=%d\\n\", lcore_id,\n-\t\t\t\t(int) portid);\n+\t\t\t\tportid);\n \t}\n \n \twhile (1) {\n@@ -600,11 +601,12 @@ print_ethaddr(const char *name, struct ether_addr *eth_addr)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -619,14 +621,13 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up .Speed %u Mbps - %s\\n\",\n+\t\t\t\t\t\tportid, link.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\tprintf(\"Port %d Link Down\\n\", portid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -708,7 +709,7 @@ parse_ptype(struct rte_mbuf *m)\n \n /* callback function to detect packet type for a queue of a port */\n static uint16_t\n-cb_parse_ptype(uint8_t port __rte_unused, uint16_t queue __rte_unused,\n+cb_parse_ptype(uint16_t port __rte_unused, uint16_t queue __rte_unused,\n \t\t   struct rte_mbuf *pkts[], uint16_t nb_pkts,\n \t\t   uint16_t max_pkts __rte_unused,\n \t\t   void *user_param __rte_unused)\n@@ -876,7 +877,7 @@ main(int argc, char **argv)\n \tuint16_t queueid = 0;\n \tunsigned lcore_id = 0, rx_lcore_id = 0;\n \tuint32_t n_tx_queue, nb_lcores;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\n@@ -1035,7 +1036,7 @@ main(int argc, char **argv)\n \tif (init_routing_table() < 0)\n \t\trte_exit(EXIT_FAILURE, \"Cannot init routing table\\n\");\n \n-\tcheck_all_ports_link_status((uint8_t)nb_ports, enabled_port_mask);\n+\tcheck_all_ports_link_status(nb_ports, enabled_port_mask);\n \n \t/* launch per-lcore init on every lcore */\n \trte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);\ndiff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c\nindex 7cde49a47..ca59baf40 100644\n--- a/examples/ip_pipeline/init.c\n+++ b/examples/ip_pipeline/init.c\n@@ -1236,7 +1236,7 @@ app_init_tap(struct app_params *app)\n \n #ifdef RTE_LIBRTE_KNI\n static int\n-kni_config_network_interface(uint8_t port_id, uint8_t if_up) {\n+kni_config_network_interface(uint16_t port_id, uint8_t if_up) {\n \tint ret = 0;\n \n \tif (port_id >= rte_eth_dev_count())\n@@ -1250,7 +1250,7 @@ kni_config_network_interface(uint8_t port_id, uint8_t if_up) {\n }\n \n static int\n-kni_change_mtu(uint8_t port_id, unsigned new_mtu) {\n+kni_change_mtu(uint16_t port_id, unsigned int new_mtu) {\n \tint ret;\n \n \tif (port_id >= rte_eth_dev_count())\ndiff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c\nindex e62636cb4..cadf4c5bd 100644\n--- a/examples/ip_reassembly/main.c\n+++ b/examples/ip_reassembly/main.c\n@@ -166,7 +166,7 @@ struct rx_queue {\n \tstruct rte_mempool *pool;\n \tstruct rte_lpm *lpm;\n \tstruct rte_lpm6 *lpm6;\n-\tuint8_t portid;\n+\tuint16_t portid;\n };\n \n struct tx_lcore_stat {\n@@ -277,7 +277,7 @@ static struct rte_lpm6 *socket_lpm6[RTE_MAX_NUMA_NODES];\n  * send burst of packets on an output interface.\n  */\n static inline uint32_t\n-send_burst(struct lcore_queue_conf *qconf, uint32_t thresh, uint8_t port)\n+send_burst(struct lcore_queue_conf *qconf, uint32_t thresh, uint16_t port)\n {\n \tuint32_t fill, len, k, n;\n \tstruct mbuf_table *txmb;\n@@ -307,7 +307,7 @@ send_burst(struct lcore_queue_conf *qconf, uint32_t thresh, uint8_t port)\n \n /* Enqueue a single packet, and send burst if queue is filled */\n static inline int\n-send_single_packet(struct rte_mbuf *m, uint8_t port)\n+send_single_packet(struct rte_mbuf *m, uint16_t port)\n {\n \tuint32_t fill, lcore_id, len;\n \tstruct lcore_queue_conf *qconf;\n@@ -337,7 +337,7 @@ send_single_packet(struct rte_mbuf *m, uint8_t port)\n }\n \n static inline void\n-reassemble(struct rte_mbuf *m, uint8_t portid, uint32_t queue,\n+reassemble(struct rte_mbuf *m, uint16_t portid, uint32_t queue,\n \tstruct lcore_queue_conf *qconf, uint64_t tms)\n {\n \tstruct ether_hdr *eth_hdr;\n@@ -346,7 +346,7 @@ reassemble(struct rte_mbuf *m, uint8_t portid, uint32_t queue,\n \tstruct rx_queue *rxq;\n \tvoid *d_addr_bytes;\n \tuint32_t next_hop;\n-\tuint8_t dst_port;\n+\tuint16_t dst_port;\n \n \trxq = &qconf->rx_queue_list[queue];\n \n@@ -454,7 +454,7 @@ main_loop(__attribute__((unused)) void *dummy)\n \tunsigned lcore_id;\n \tuint64_t diff_tsc, cur_tsc, prev_tsc;\n \tint i, j, nb_rx;\n-\tuint8_t portid;\n+\tuint16_t portid;\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 \n@@ -473,7 +473,7 @@ main_loop(__attribute__((unused)) void *dummy)\n \tfor (i = 0; i < qconf->n_rx_queue; i++) {\n \n \t\tportid = qconf->rx_queue_list[i].portid;\n-\t\tRTE_LOG(INFO, IP_RSMBL, \" -- lcoreid=%u portid=%hhu\\n\", lcore_id,\n+\t\tRTE_LOG(INFO, IP_RSMBL, \" -- lcoreid=%u portid=%u\\n\", lcore_id,\n \t\t\tportid);\n \t}\n \n@@ -732,11 +732,12 @@ print_ethaddr(const char *name, const struct ether_addr *eth_addr)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -751,14 +752,13 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up. Speed %u Mbps - %s\\n\",\n+\t\t\t\t\t\tportid, link.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\tprintf(\"Port %d Link Down\\n\", portid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -987,7 +987,7 @@ queue_dump_stat(void)\n \t\tqconf = &lcore_queue_conf[lcore];\n \t\tfor (i = 0; i < qconf->n_rx_queue; i++) {\n \n-\t\t\tfprintf(stdout, \" -- lcoreid=%u portid=%hhu \"\n+\t\t\tfprintf(stdout, \" -- lcoreid=%u portid=%u \"\n \t\t\t\t\"frag tbl stat:\\n\",\n \t\t\t\tlcore,  qconf->rx_queue_list[i].portid);\n \t\t\trte_ip_frag_table_statistics_dump(stdout,\n@@ -1024,7 +1024,7 @@ main(int argc, char **argv)\n \tuint16_t queueid;\n \tunsigned lcore_id = 0, rx_lcore_id = 0;\n \tuint32_t n_tx_queue, nb_lcores;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\n@@ -1177,7 +1177,7 @@ main(int argc, char **argv)\n \tif (init_routing_table() < 0)\n \t\trte_exit(EXIT_FAILURE, \"Cannot init routing table\\n\");\n \n-\tcheck_all_ports_link_status((uint8_t)nb_ports, enabled_port_mask);\n+\tcheck_all_ports_link_status(nb_ports, enabled_port_mask);\n \n \tsignal(SIGUSR1, signal_handler);\n \tsignal(SIGTERM, signal_handler);\ndiff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c\nindex 9a13d3530..d635e166a 100644\n--- a/examples/ipv4_multicast/main.c\n+++ b/examples/ipv4_multicast/main.c\n@@ -116,7 +116,7 @@ static struct ether_addr ports_eth_addr[MAX_PORTS];\n /* mask of enabled ports */\n static uint32_t enabled_port_mask = 0;\n \n-static uint8_t nb_ports = 0;\n+static uint16_t nb_ports;\n \n static int rx_queue_per_lcore = 1;\n \n@@ -195,7 +195,7 @@ static struct mcast_group_params mcast_group_table[] = {\n \n /* Send burst of packets on an output interface */\n static void\n-send_burst(struct lcore_queue_conf *qconf, uint8_t port)\n+send_burst(struct lcore_queue_conf *qconf, uint16_t port)\n {\n \tstruct rte_mbuf **m_table;\n \tuint16_t n, queueid;\n@@ -312,7 +312,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)\n  */\n static inline void\n mcast_send_pkt(struct rte_mbuf *pkt, struct ether_addr *dest_addr,\n-\t\tstruct lcore_queue_conf *qconf, uint8_t port)\n+\t\tstruct lcore_queue_conf *qconf, uint16_t port)\n {\n \tstruct ether_hdr *ethdr;\n \tuint16_t len;\n@@ -343,7 +343,7 @@ mcast_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf)\n \tstruct ipv4_hdr *iphdr;\n \tuint32_t dest_addr, port_mask, port_num, use_clone;\n \tint32_t hash;\n-\tuint8_t port;\n+\tuint16_t port;\n \tunion {\n \t\tuint64_t as_int;\n \t\tstruct ether_addr as_addr;\n@@ -375,7 +375,7 @@ mcast_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf)\n \n \t/* Mark all packet's segments as referenced port_num times */\n \tif (use_clone == 0)\n-\t\trte_pktmbuf_refcnt_update(m, (uint16_t)port_num);\n+\t\trte_pktmbuf_refcnt_update(m, port_num);\n \n \t/* construct destination ethernet address */\n \tdst_eth_addr.as_int = ETHER_ADDR_FOR_IPV4_MCAST(dest_addr);\n@@ -407,7 +407,7 @@ static inline void\n send_timeout_burst(struct lcore_queue_conf *qconf)\n {\n \tuint64_t cur_tsc;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tconst uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * BURST_TX_DRAIN_US;\n \n \tcur_tsc = rte_rdtsc();\n@@ -428,7 +428,7 @@ main_loop(__rte_unused void *dummy)\n \tstruct rte_mbuf *pkts_burst[MAX_PKT_BURST];\n \tunsigned lcore_id;\n \tint i, j, nb_rx;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tstruct lcore_queue_conf *qconf;\n \n \tlcore_id = rte_lcore_id();\n@@ -447,8 +447,8 @@ main_loop(__rte_unused void *dummy)\n \tfor (i = 0; i < qconf->n_rx_queue; i++) {\n \n \t\tportid = qconf->rx_queue_list[i];\n-\t\tRTE_LOG(INFO, IPv4_MULTICAST, \" -- lcoreid=%u portid=%d\\n\",\n-\t\t    lcore_id, (int) portid);\n+\t\tRTE_LOG(INFO, IPv4_MULTICAST, \" -- lcoreid=%u portid=%u\\n\",\n+\t\t\tlcore_id, portid);\n \t}\n \n \twhile (1) {\n@@ -610,11 +610,12 @@ init_mcast_hash(void)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -629,14 +630,13 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up. Speed %u Mbps - %s\\n\",\n+\t\t\t\t\tportid, link.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\tprintf(\"Port %d Link Down\\n\", portid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -673,7 +673,7 @@ main(int argc, char **argv)\n \tuint16_t queueid;\n \tunsigned lcore_id = 0, rx_lcore_id = 0;\n \tuint32_t n_tx_queue, nb_lcores;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\ndiff --git a/examples/kni/main.c b/examples/kni/main.c\nindex e3bc2fb78..cde4c3904 100644\n--- a/examples/kni/main.c\n+++ b/examples/kni/main.c\n@@ -110,7 +110,7 @@\n  * Structure of port parameters\n  */\n struct kni_port_params {\n-\tuint8_t port_id;/* Port ID */\n+\tuint16_t port_id;/* Port ID */\n \tunsigned lcore_rx; /* lcore ID for RX */\n \tunsigned lcore_tx; /* lcore ID for TX */\n \tuint32_t nb_lcore_k; /* Number of lcores for KNI multi kernel threads */\n@@ -162,8 +162,8 @@ struct kni_interface_stats {\n /* kni device statistics array */\n static struct kni_interface_stats kni_stats[RTE_MAX_ETHPORTS];\n \n-static int kni_change_mtu(uint8_t port_id, unsigned new_mtu);\n-static int kni_config_network_interface(uint8_t port_id, uint8_t if_up);\n+static int kni_change_mtu(uint16_t port_id, unsigned int new_mtu);\n+static int kni_config_network_interface(uint16_t port_id, uint8_t if_up);\n \n static rte_atomic32_t kni_stop = RTE_ATOMIC32_INIT(0);\n \n@@ -171,7 +171,7 @@ static rte_atomic32_t kni_stop = RTE_ATOMIC32_INIT(0);\n static void\n print_stats(void)\n {\n-\tuint8_t i;\n+\tuint16_t i;\n \n \tprintf(\"\\n**KNI example application statistics**\\n\"\n \t       \"======  ==============  ============  ============  ============  ============\\n\"\n@@ -238,7 +238,8 @@ kni_burst_free_mbufs(struct rte_mbuf **pkts, unsigned num)\n static void\n kni_ingress(struct kni_port_params *p)\n {\n-\tuint8_t i, port_id;\n+\tuint8_t i;\n+\tuint16_t port_id;\n \tunsigned nb_rx, num;\n \tuint32_t nb_kni;\n \tstruct rte_mbuf *pkts_burst[PKT_BURST_SZ];\n@@ -274,7 +275,8 @@ kni_ingress(struct kni_port_params *p)\n static void\n kni_egress(struct kni_port_params *p)\n {\n-\tuint8_t i, port_id;\n+\tuint8_t i;\n+\tuint16_t port_id;\n \tunsigned nb_tx, num;\n \tuint32_t nb_kni;\n \tstruct rte_mbuf *pkts_burst[PKT_BURST_SZ];\n@@ -416,7 +418,8 @@ parse_config(const char *arg)\n \tint i, j, nb_token;\n \tchar *str_fld[_NUM_FLD];\n \tunsigned long int_fld[_NUM_FLD];\n-\tuint8_t port_id, nb_kni_port_params = 0;\n+\tuint16_t port_id;\n+\tuint16_t nb_kni_port_params = 0;\n \n \tmemset(&kni_port_params_array, 0, sizeof(kni_port_params_array));\n \twhile (((p = strchr(p0, '(')) != NULL) &&\n@@ -445,7 +448,7 @@ parse_config(const char *arg)\n \t\t}\n \n \t\ti = 0;\n-\t\tport_id = (uint8_t)int_fld[i++];\n+\t\tport_id = int_fld[i++];\n \t\tif (port_id >= RTE_MAX_ETHPORTS) {\n \t\t\tprintf(\"Port ID %d could not exceed the maximum %d\\n\",\n \t\t\t\t\t\tport_id, RTE_MAX_ETHPORTS);\n@@ -698,7 +701,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \n /* Callback for request of changing MTU */\n static int\n-kni_change_mtu(uint8_t port_id, unsigned new_mtu)\n+kni_change_mtu(uint16_t port_id, unsigned int new_mtu)\n {\n \tint ret;\n \tstruct rte_eth_conf conf;\n@@ -741,7 +744,7 @@ kni_change_mtu(uint8_t port_id, unsigned new_mtu)\n \n /* Callback for request of configuring network interface up/down */\n static int\n-kni_config_network_interface(uint8_t port_id, uint8_t if_up)\n+kni_config_network_interface(uint16_t port_id, uint8_t if_up)\n {\n \tint ret = 0;\n \n@@ -766,7 +769,7 @@ kni_config_network_interface(uint8_t port_id, uint8_t if_up)\n }\n \n static int\n-kni_alloc(uint8_t port_id)\n+kni_alloc(uint16_t port_id)\n {\n \tuint8_t i;\n \tstruct rte_kni *kni;\n@@ -790,7 +793,7 @@ kni_alloc(uint8_t port_id)\n \t\t} else\n \t\t\tsnprintf(conf.name, RTE_KNI_NAMESIZE,\n \t\t\t\t\t\t\"vEth%u\", port_id);\n-\t\tconf.group_id = (uint16_t)port_id;\n+\t\tconf.group_id = port_id;\n \t\tconf.mbuf_size = MAX_PACKET_SZ;\n \t\t/*\n \t\t * The first KNI device associated to a port\n@@ -825,7 +828,7 @@ kni_alloc(uint8_t port_id)\n }\n \n static int\n-kni_free_kni(uint8_t port_id)\n+kni_free_kni(uint16_t port_id)\n {\n \tuint8_t i;\n \tstruct kni_port_params **p = kni_port_params_array;\n@@ -848,7 +851,7 @@ int\n main(int argc, char** argv)\n {\n \tint ret;\n-\tuint8_t nb_sys_ports, port;\n+\tuint16_t nb_sys_ports, port;\n \tunsigned i;\n \n \t/* Associate signal_hanlder function with USR signals */\ndiff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c\nindex c293bd9c9..b10ac896f 100644\n--- a/examples/l2fwd-cat/l2fwd-cat.c\n+++ b/examples/l2fwd-cat/l2fwd-cat.c\n@@ -59,7 +59,7 @@ static const struct rte_eth_conf port_conf_default = {\n  * coming from the mbuf_pool passed as a parameter.\n  */\n static inline int\n-port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n+port_init(uint16_t port, struct rte_mempool *mbuf_pool)\n {\n \tstruct rte_eth_conf port_conf = port_conf_default;\n \tconst uint16_t rx_rings = 1, tx_rings = 1;\n@@ -106,7 +106,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n \trte_eth_macaddr_get(port, &addr);\n \tprintf(\"Port %u MAC: %02\" PRIx8 \" %02\" PRIx8 \" %02\" PRIx8\n \t\t\t   \" %02\" PRIx8 \" %02\" PRIx8 \" %02\" PRIx8 \"\\n\",\n-\t\t\t(unsigned)port,\n+\t\t\tport,\n \t\t\taddr.addr_bytes[0], addr.addr_bytes[1],\n \t\t\taddr.addr_bytes[2], addr.addr_bytes[3],\n \t\t\taddr.addr_bytes[4], addr.addr_bytes[5]);\n@@ -124,8 +124,8 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n static __attribute__((noreturn)) void\n lcore_main(void)\n {\n-\tconst uint8_t nb_ports = rte_eth_dev_count();\n-\tuint8_t port;\n+\tconst uint16_t nb_ports = rte_eth_dev_count();\n+\tuint16_t port;\n \n \t/*\n \t * Check that the port is on the same NUMA node as the polling thread\n@@ -181,7 +181,7 @@ main(int argc, char *argv[])\n {\n \tstruct rte_mempool *mbuf_pool;\n \tunsigned nb_ports;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \n \t/* Initialize the Environment Abstraction Layer (EAL). */\n \tint ret = rte_eal_init(argc, argv);\n@@ -217,7 +217,7 @@ main(int argc, char *argv[])\n \t/* Initialize all ports. */\n \tfor (portid = 0; portid < nb_ports; portid++)\n \t\tif (port_init(portid, mbuf_pool) != 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"Cannot init port %\"PRIu8 \"\\n\",\n+\t\t\trte_exit(EXIT_FAILURE, \"Cannot init port %\"PRIu16 \"\\n\",\n \t\t\t\t\tportid);\n \n \tif (rte_lcore_count() > 1)\ndiff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c\nindex f020be32d..121ef6b90 100644\n--- a/examples/l2fwd-crypto/main.c\n+++ b/examples/l2fwd-crypto/main.c\n@@ -566,7 +566,7 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m,\n /* Send the burst of packets on an output interface */\n static int\n l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n,\n-\t\tuint8_t port)\n+\t\t uint16_t port)\n {\n \tstruct rte_mbuf **pkt_buffer;\n \tunsigned ret;\n@@ -587,7 +587,7 @@ l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n,\n \n /* Enqueue packets for TX and prepare them to be sent */\n static int\n-l2fwd_send_packet(struct rte_mbuf *m, uint8_t port)\n+l2fwd_send_packet(struct rte_mbuf *m, uint16_t port)\n {\n \tunsigned lcore_id, len;\n \tstruct lcore_queue_conf *qconf;\n@@ -629,14 +629,14 @@ static void\n l2fwd_simple_forward(struct rte_mbuf *m, unsigned int portid,\n \t\tstruct l2fwd_crypto_options *options)\n {\n-\tunsigned int dst_port;\n+\tuint16_t dst_port;\n \n \tdst_port = l2fwd_dst_ports[portid];\n \n \tif (options->mac_updating)\n \t\tl2fwd_mac_updating(m, dst_port);\n \n-\tl2fwd_send_packet(m, (uint8_t) dst_port);\n+\tl2fwd_send_packet(m, dst_port);\n }\n \n /** Generate random key */\n@@ -2319,7 +2319,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,\n static int\n initialize_ports(struct l2fwd_crypto_options *options)\n {\n-\tuint8_t last_portid, portid;\n+\tuint16_t last_portid, portid;\n \tunsigned enabled_portcount = 0;\n \tunsigned nb_ports = rte_eth_dev_count();\n \n@@ -2340,12 +2340,12 @@ initialize_ports(struct l2fwd_crypto_options *options)\n \t\t\tcontinue;\n \n \t\t/* init port */\n-\t\tprintf(\"Initializing port %u... \", (unsigned) portid);\n+\t\tprintf(\"Initializing port %u... \", portid);\n \t\tfflush(stdout);\n \t\tretval = rte_eth_dev_configure(portid, 1, 1, &port_conf);\n \t\tif (retval < 0) {\n \t\t\tprintf(\"Cannot configure device: err=%d, port=%u\\n\",\n-\t\t\t\t  retval, (unsigned) portid);\n+\t\t\t\t  retval, portid);\n \t\t\treturn -1;\n \t\t}\n \n@@ -2353,7 +2353,7 @@ initialize_ports(struct l2fwd_crypto_options *options)\n \t\t\t\t\t\t\t  &nb_txd);\n \t\tif (retval < 0) {\n \t\t\tprintf(\"Cannot adjust number of descriptors: err=%d, port=%u\\n\",\n-\t\t\t\tretval, (unsigned) portid);\n+\t\t\t\tretval, portid);\n \t\t\treturn -1;\n \t\t}\n \n@@ -2364,7 +2364,7 @@ initialize_ports(struct l2fwd_crypto_options *options)\n \t\t\t\t\t     NULL, l2fwd_pktmbuf_pool);\n \t\tif (retval < 0) {\n \t\t\tprintf(\"rte_eth_rx_queue_setup:err=%d, port=%u\\n\",\n-\t\t\t\t\tretval, (unsigned) portid);\n+\t\t\t\t\tretval, portid);\n \t\t\treturn -1;\n \t\t}\n \n@@ -2375,7 +2375,7 @@ initialize_ports(struct l2fwd_crypto_options *options)\n \t\t\t\tNULL);\n \t\tif (retval < 0) {\n \t\t\tprintf(\"rte_eth_tx_queue_setup:err=%d, port=%u\\n\",\n-\t\t\t\tretval, (unsigned) portid);\n+\t\t\t\tretval, portid);\n \n \t\t\treturn -1;\n \t\t}\n@@ -2384,7 +2384,7 @@ initialize_ports(struct l2fwd_crypto_options *options)\n \t\tretval = rte_eth_dev_start(portid);\n \t\tif (retval < 0) {\n \t\t\tprintf(\"rte_eth_dev_start:err=%d, port=%u\\n\",\n-\t\t\t\t\tretval, (unsigned) portid);\n+\t\t\t\t\tretval, portid);\n \t\t\treturn -1;\n \t\t}\n \n@@ -2393,7 +2393,7 @@ initialize_ports(struct l2fwd_crypto_options *options)\n \t\trte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]);\n \n \t\tprintf(\"Port %u, MAC address: %02X:%02X:%02X:%02X:%02X:%02X\\n\\n\",\n-\t\t\t\t(unsigned) portid,\n+\t\t\t\tportid,\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 \t\t\t\tl2fwd_ports_eth_addr[portid].addr_bytes[2],\n@@ -2469,8 +2469,8 @@ main(int argc, char **argv)\n {\n \tstruct lcore_queue_conf *qconf;\n \tstruct l2fwd_crypto_options options;\n-\n-\tuint8_t nb_ports, nb_cryptodevs, portid, cdev_id;\n+\tuint16_t nb_ports, portid;\n+\tuint8_t nb_cryptodevs, cdev_id;\n \tunsigned lcore_id, rx_lcore_id;\n \tint ret, enabled_cdevcount, enabled_portcount;\n \tuint8_t enabled_cdevs[RTE_CRYPTO_MAX_DEVS] = {0};\n@@ -2547,7 +2547,7 @@ main(int argc, char **argv)\n \t\tqconf->rx_port_list[qconf->nb_rx_ports] = portid;\n \t\tqconf->nb_rx_ports++;\n \n-\t\tprintf(\"Lcore %u: RX port %u\\n\", rx_lcore_id, (unsigned)portid);\n+\t\tprintf(\"Lcore %u: RX port %u\\n\", rx_lcore_id, portid);\n \t}\n \n \t/* Enable Crypto devices */\ndiff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c\nindex 989362067..9511156d8 100644\n--- a/examples/l2fwd-jobstats/main.c\n+++ b/examples/l2fwd-jobstats/main.c\n@@ -776,9 +776,9 @@ main(int argc, char **argv)\n \tunsigned nb_ports_in_mask = 0;\n \tint ret;\n \tchar name[RTE_JOBSTATS_NAMESIZE];\n-\tuint8_t nb_ports;\n-\tuint8_t nb_ports_available;\n-\tuint8_t portid, last_port;\n+\tuint16_t nb_ports;\n+\tuint16_t nb_ports_available;\n+\tuint16_t portid, last_port;\n \tuint8_t i;\n \n \t/* init EAL */\n@@ -861,7 +861,7 @@ 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\", rx_lcore_id, portid);\n \t}\n \n \tnb_ports_available = nb_ports;\n@@ -870,24 +870,24 @@ 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\", portid);\n \t\t\tnb_ports_available--;\n \t\t\tcontinue;\n \t\t}\n \t\t/* init port */\n-\t\tprintf(\"Initializing port %u... \", (unsigned) portid);\n+\t\tprintf(\"Initializing port %u... \", portid);\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\t\t  ret, portid);\n \n \t\tret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd,\n \t\t\t\t\t\t       &nb_txd);\n \t\tif (ret < 0)\n \t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t \"Cannot adjust number of descriptors: err=%d, port=%u\\n\",\n-\t\t\t\t ret, (unsigned) portid);\n+\t\t\t\t ret, portid);\n \n \t\trte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]);\n \n@@ -899,7 +899,7 @@ main(int argc, char **argv)\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\t\t  ret, (unsigned) portid);\n+\t\t\t\t  ret, portid);\n \n \t\t/* init one TX queue on each port */\n \t\tfflush(stdout);\n@@ -907,8 +907,9 @@ 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\t\tret, (unsigned) portid);\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\"rte_eth_tx_queue_setup:err=%d, port=%u\\n\",\n+\t\t\t\tret, portid);\n \n \t\t/* Initialize TX buffers */\n \t\ttx_buffer[portid] = rte_zmalloc_socket(\"tx_buffer\",\n@@ -916,7 +917,7 @@ main(int argc, char **argv)\n \t\t\t\trte_eth_dev_socket_id(portid));\n \t\tif (tx_buffer[portid] == NULL)\n \t\t\trte_exit(EXIT_FAILURE, \"Cannot allocate buffer for tx on port %u\\n\",\n-\t\t\t\t\t(unsigned) portid);\n+\t\t\t\t\tportid);\n \n \t\trte_eth_tx_buffer_init(tx_buffer[portid], MAX_PKT_BURST);\n \n@@ -924,21 +925,22 @@ main(int argc, char **argv)\n \t\t\t\trte_eth_tx_buffer_count_callback,\n \t\t\t\t&port_statistics[portid].dropped);\n \t\tif (ret < 0)\n-\t\t\t\trte_exit(EXIT_FAILURE, \"Cannot set error callback for \"\n-\t\t\t\t\t\t\"tx buffer on port %u\\n\", (unsigned) portid);\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\"Cannot set error callback for tx buffer on port %u\\n\",\n+\t\t\t\t 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+\t\t\t\t  ret, portid);\n \n \t\tprintf(\"done:\\n\");\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\t\t\t(unsigned) portid,\n+\t\t\t\tportid,\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 \t\t\t\tl2fwd_ports_eth_addr[portid].addr_bytes[2],\ndiff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c\nindex 83bc542c1..3f7024fcc 100644\n--- a/examples/l2fwd-keepalive/main.c\n+++ b/examples/l2fwd-keepalive/main.c\n@@ -157,7 +157,7 @@ print_stats(__attribute__((unused)) struct rte_timer *ptr_timer,\n \t__attribute__((unused)) void *ptr_data)\n {\n \tuint64_t total_packets_dropped, total_packets_tx, total_packets_rx;\n-\tunsigned portid;\n+\tuint16_t portid;\n \n \ttotal_packets_dropped = 0;\n \ttotal_packets_tx = 0;\n@@ -299,7 +299,7 @@ l2fwd_main_loop(void)\n \t\tfor (i = 0; i < qconf->n_rx_port; i++) {\n \n \t\t\tportid = qconf->rx_port_list[i];\n-\t\t\tnb_rx = rte_eth_rx_burst((uint8_t) portid, 0,\n+\t\t\tnb_rx = rte_eth_rx_burst(portid, 0,\n \t\t\t\t\t\t pkts_burst, MAX_PKT_BURST);\n \n \t\t\tport_statistics[portid].rx += nb_rx;\n@@ -479,11 +479,12 @@ l2fwd_parse_args(int argc, char **argv)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -498,14 +499,14 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up. Speed %u Mbps - %s\\n\",\n+\t\t\t\t\t\tportid, link.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n \t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\t\tportid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -560,9 +561,9 @@ main(int argc, char **argv)\n \tstruct lcore_queue_conf *qconf;\n \tstruct rte_eth_dev_info dev_info;\n \tint ret;\n-\tuint8_t nb_ports;\n-\tuint8_t nb_ports_available;\n-\tuint8_t portid, last_port;\n+\tuint16_t nb_ports;\n+\tuint16_t nb_ports_available;\n+\tuint16_t portid, last_port;\n \tunsigned lcore_id, rx_lcore_id;\n \tunsigned nb_ports_in_mask = 0;\n \tstruct sigaction signal_handler;\n@@ -653,7 +654,7 @@ main(int argc, char **argv)\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\",\n-\t\t\trx_lcore_id, (unsigned) portid);\n+\t\t\trx_lcore_id, portid);\n \t}\n \n \tnb_ports_available = nb_ports;\n@@ -662,26 +663,25 @@ 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\",\n-\t\t\t\t(unsigned) portid);\n+\t\t\tprintf(\"Skipping disabled port %u\\n\", portid);\n \t\t\tnb_ports_available--;\n \t\t\tcontinue;\n \t\t}\n \t\t/* init port */\n-\t\tprintf(\"Initializing port %u... \", (unsigned) portid);\n+\t\tprintf(\"Initializing port %u... \", portid);\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,\n \t\t\t\t\"Cannot configure device: err=%d, port=%u\\n\",\n-\t\t\t\tret, (unsigned) portid);\n+\t\t\t\tret, portid);\n \n \t\tret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd,\n \t\t\t\t\t\t       &nb_txd);\n \t\tif (ret < 0)\n \t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\"Cannot adjust number of descriptors: err=%d, port=%u\\n\",\n-\t\t\t\tret, (unsigned) portid);\n+\t\t\t\tret, portid);\n \n \t\trte_eth_macaddr_get(portid, &l2fwd_ports_eth_addr[portid]);\n \n@@ -694,7 +694,7 @@ main(int argc, char **argv)\n \t\tif (ret < 0)\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\tret, (unsigned) portid);\n+\t\t\t\tret, portid);\n \n \t\t/* init one TX queue on each port */\n \t\tfflush(stdout);\n@@ -704,7 +704,7 @@ main(int argc, char **argv)\n \t\tif (ret < 0)\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+\t\t\t\tret, portid);\n \n \t\t/* Initialize TX buffers */\n \t\ttx_buffer[portid] = rte_zmalloc_socket(\"tx_buffer\",\n@@ -712,7 +712,7 @@ main(int argc, char **argv)\n \t\t\t\trte_eth_dev_socket_id(portid));\n \t\tif (tx_buffer[portid] == NULL)\n \t\t\trte_exit(EXIT_FAILURE, \"Cannot allocate buffer for tx on port %u\\n\",\n-\t\t\t\t\t(unsigned) portid);\n+\t\t\t\t\t\tportid);\n \n \t\trte_eth_tx_buffer_init(tx_buffer[portid], MAX_PKT_BURST);\n \n@@ -720,21 +720,22 @@ main(int argc, char **argv)\n \t\t\t\trte_eth_tx_buffer_count_callback,\n \t\t\t\t&port_statistics[portid].dropped);\n \t\tif (ret < 0)\n-\t\t\t\trte_exit(EXIT_FAILURE, \"Cannot set error callback for \"\n-\t\t\t\t\t\t\"tx buffer on port %u\\n\", (unsigned) portid);\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\"Cannot set error callback for tx buffer on port %u\\n\",\n+\t\t\t\t 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,\n \t\t\t\t\"rte_eth_dev_start:err=%d, port=%u\\n\",\n-\t\t\t\t  ret, (unsigned) portid);\n+\t\t\t\t  ret, portid);\n \n \t\trte_eth_promiscuous_enable(portid);\n \n \t\tprintf(\"Port %u, MAC address: \"\n \t\t\t\"%02X:%02X:%02X:%02X:%02X:%02X\\n\\n\",\n-\t\t\t(unsigned) portid,\n+\t\t\tportid,\n \t\t\tl2fwd_ports_eth_addr[portid].addr_bytes[0],\n \t\t\tl2fwd_ports_eth_addr[portid].addr_bytes[1],\n \t\t\tl2fwd_ports_eth_addr[portid].addr_bytes[2],\ndiff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c\nindex 142633584..290d7c118 100644\n--- a/examples/l2fwd/main.c\n+++ b/examples/l2fwd/main.c\n@@ -304,7 +304,7 @@ l2fwd_main_loop(void)\n \t\tfor (i = 0; i < qconf->n_rx_port; i++) {\n \n \t\t\tportid = qconf->rx_port_list[i];\n-\t\t\tnb_rx = rte_eth_rx_burst((uint8_t) portid, 0,\n+\t\t\tnb_rx = rte_eth_rx_burst(portid, 0,\n \t\t\t\t\t\t pkts_burst, MAX_PKT_BURST);\n \n \t\t\tport_statistics[portid].rx += nb_rx;\n@@ -480,11 +480,12 @@ l2fwd_parse_args(int argc, char **argv)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -503,14 +504,13 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up. Speed %u Mbps - %s\\n\",\n+\t\t\t\t\t\tportid, link.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\tprintf(\"Port %d Link Down\\n\", portid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -553,9 +553,9 @@ main(int argc, char **argv)\n \tstruct lcore_queue_conf *qconf;\n \tstruct rte_eth_dev_info dev_info;\n \tint ret;\n-\tuint8_t nb_ports;\n-\tuint8_t nb_ports_available;\n-\tuint8_t portid, last_port;\n+\tuint16_t nb_ports;\n+\tuint16_t nb_ports_available;\n+\tuint16_t portid, last_port;\n \tunsigned lcore_id, rx_lcore_id;\n \tunsigned nb_ports_in_mask = 0;\n \n@@ -644,7 +644,7 @@ 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\", rx_lcore_id, portid);\n \t}\n \n \tnb_ports_available = nb_ports;\n@@ -653,26 +653,26 @@ 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\", portid);\n \t\t\tnb_ports_available--;\n \t\t\tcontinue;\n \t\t}\n \t\t/* init port */\n-\t\tprintf(\"Initializing port %u... \", (unsigned) portid);\n+\t\tprintf(\"Initializing port %u... \", portid);\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\t\t  ret, portid);\n \n \t\tret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd,\n \t\t\t\t\t\t       &nb_txd);\n \t\tif (ret < 0)\n \t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t \"Cannot adjust number of descriptors: err=%d, port=%u\\n\",\n-\t\t\t\t ret, (unsigned) portid);\n+\t\t\t\t ret, 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@@ -682,7 +682,7 @@ main(int argc, char **argv)\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\t\t  ret, (unsigned) portid);\n+\t\t\t\t  ret, portid);\n \n \t\t/* init one TX queue on each port */\n \t\tfflush(stdout);\n@@ -691,7 +691,7 @@ main(int argc, char **argv)\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\t\tret, (unsigned) portid);\n+\t\t\t\tret, portid);\n \n \t\t/* Initialize TX buffers */\n \t\ttx_buffer[portid] = rte_zmalloc_socket(\"tx_buffer\",\n@@ -699,7 +699,7 @@ main(int argc, char **argv)\n \t\t\t\trte_eth_dev_socket_id(portid));\n \t\tif (tx_buffer[portid] == NULL)\n \t\t\trte_exit(EXIT_FAILURE, \"Cannot allocate buffer for tx on port %u\\n\",\n-\t\t\t\t\t(unsigned) portid);\n+\t\t\t\t\tportid);\n \n \t\trte_eth_tx_buffer_init(tx_buffer[portid], MAX_PKT_BURST);\n \n@@ -707,21 +707,22 @@ main(int argc, char **argv)\n \t\t\t\trte_eth_tx_buffer_count_callback,\n \t\t\t\t&port_statistics[portid].dropped);\n \t\tif (ret < 0)\n-\t\t\t\trte_exit(EXIT_FAILURE, \"Cannot set error callback for \"\n-\t\t\t\t\t\t\"tx buffer on port %u\\n\", (unsigned) portid);\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\"Cannot set error callback for tx buffer on port %u\\n\",\n+\t\t\t\t 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+\t\t\t\t  ret, portid);\n \n \t\tprintf(\"done: \\n\");\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\t\t\t(unsigned) portid,\n+\t\t\t\tportid,\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 \t\t\t\tl2fwd_ports_eth_addr[portid].addr_bytes[2],\ndiff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c\nindex 8eff4de41..21e17502e 100644\n--- a/examples/l3fwd-acl/main.c\n+++ b/examples/l3fwd-acl/main.c\n@@ -121,7 +121,7 @@ static int promiscuous_on; /**< Ports set in promiscuous mode off by default. */\n static int numa_on = 1; /**< NUMA is enabled by default. */\n \n struct lcore_rx_queue {\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint8_t queue_id;\n } __rte_cache_aligned;\n \n@@ -131,7 +131,7 @@ struct lcore_rx_queue {\n \n #define MAX_LCORE_PARAMS 1024\n struct lcore_params {\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint8_t queue_id;\n \tuint8_t lcore_id;\n } __rte_cache_aligned;\n@@ -1358,7 +1358,8 @@ main_loop(__attribute__((unused)) void *dummy)\n \tunsigned lcore_id;\n \tuint64_t prev_tsc, diff_tsc, cur_tsc;\n \tint i, nb_rx;\n-\tuint8_t portid, queueid;\n+\tuint16_t portid;\n+\tuint8_t queueid;\n \tstruct lcore_conf *qconf;\n \tint socketid;\n \tconst uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1)\n@@ -1381,7 +1382,7 @@ main_loop(__attribute__((unused)) void *dummy)\n \t\tportid = qconf->rx_queue_list[i].port_id;\n \t\tqueueid = qconf->rx_queue_list[i].queue_id;\n \t\tRTE_LOG(INFO, L3FWD,\n-\t\t\t\" -- lcoreid=%u portid=%hhu rxqueueid=%hhu\\n\",\n+\t\t\t\" -- lcoreid=%u portid=%u rxqueueid=%hhu\\n\",\n \t\t\tlcore_id, portid, queueid);\n \t}\n \n@@ -1481,7 +1482,7 @@ check_lcore_params(void)\n static int\n check_port_config(const unsigned nb_ports)\n {\n-\tunsigned portid;\n+\tuint16_t portid;\n \tuint16_t i;\n \n \tfor (i = 0; i < nb_lcore_params; ++i) {\ndiff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c\nindex fd442f5ef..f60649bd9 100644\n--- a/examples/l3fwd-power/main.c\n+++ b/examples/l3fwd-power/main.c\n@@ -174,7 +174,7 @@ enum freq_scale_hint_t\n };\n \n struct lcore_rx_queue {\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint8_t queue_id;\n \tenum freq_scale_hint_t freq_up_hint;\n \tuint32_t zero_rx_packet_count;\n@@ -190,7 +190,7 @@ struct lcore_rx_queue {\n \n #define MAX_LCORE_PARAMS 1024\n struct lcore_params {\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint8_t queue_id;\n \tuint8_t lcore_id;\n } __rte_cache_aligned;\n@@ -308,8 +308,8 @@ static lookup_struct_t *ipv6_l3fwd_lookup_struct[NB_SOCKETS];\n #define IPV6_L3FWD_NUM_ROUTES \\\n \t(sizeof(ipv6_l3fwd_route_array) / sizeof(ipv6_l3fwd_route_array[0]))\n \n-static uint8_t ipv4_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned;\n-static uint8_t ipv6_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned;\n+static uint16_t ipv4_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned;\n+static uint16_t ipv6_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned;\n #endif\n \n #if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM)\n@@ -370,14 +370,14 @@ static struct rte_timer power_timers[RTE_MAX_LCORE];\n \n static inline uint32_t power_idle_heuristic(uint32_t zero_rx_packet_count);\n static inline enum freq_scale_hint_t power_freq_scaleup_heuristic( \\\n-\t\t\tunsigned lcore_id, uint8_t port_id, uint16_t queue_id);\n+\t\tunsigned int lcore_id, uint16_t port_id, uint16_t queue_id);\n \n /* exit signal handler */\n static void\n signal_exit_now(int sigtype)\n {\n \tunsigned lcore_id;\n-\tunsigned int portid, nb_ports;\n+\tuint16_t portid, nb_ports;\n \tint ret;\n \n \tif (sigtype == SIGINT) {\n@@ -523,8 +523,8 @@ print_ipv6_key(struct ipv6_5tuple key)\n \t        key.port_dst, key.port_src, key.proto);\n }\n \n-static inline uint8_t\n-get_ipv4_dst_port(struct ipv4_hdr *ipv4_hdr, uint8_t portid,\n+static inline uint16_t\n+get_ipv4_dst_port(struct ipv4_hdr *ipv4_hdr, uint16_t portid,\n \t\tlookup_struct_t * ipv4_l3fwd_lookup_struct)\n {\n \tstruct ipv4_5tuple key;\n@@ -559,11 +559,11 @@ get_ipv4_dst_port(struct ipv4_hdr *ipv4_hdr, uint8_t portid,\n \n \t/* Find destination port */\n \tret = rte_hash_lookup(ipv4_l3fwd_lookup_struct, (const void *)&key);\n-\treturn (uint8_t)((ret < 0)? portid : ipv4_l3fwd_out_if[ret]);\n+\treturn ((ret < 0) ? portid : ipv4_l3fwd_out_if[ret]);\n }\n \n-static inline uint8_t\n-get_ipv6_dst_port(struct ipv6_hdr *ipv6_hdr,  uint8_t portid,\n+static inline uint16_t\n+get_ipv6_dst_port(struct ipv6_hdr *ipv6_hdr, uint16_t portid,\n \t\t\tlookup_struct_t *ipv6_l3fwd_lookup_struct)\n {\n \tstruct ipv6_5tuple key;\n@@ -599,18 +599,18 @@ get_ipv6_dst_port(struct ipv6_hdr *ipv6_hdr,  uint8_t portid,\n \n \t/* Find destination port */\n \tret = rte_hash_lookup(ipv6_l3fwd_lookup_struct, (const void *)&key);\n-\treturn (uint8_t)((ret < 0)? portid : ipv6_l3fwd_out_if[ret]);\n+\treturn ((ret < 0) ? portid : ipv6_l3fwd_out_if[ret]);\n }\n #endif\n \n #if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM)\n-static inline uint8_t\n-get_ipv4_dst_port(struct ipv4_hdr *ipv4_hdr, uint8_t portid,\n+static inline uint16_t\n+get_ipv4_dst_port(struct ipv4_hdr *ipv4_hdr, uint16_t portid,\n \t\tlookup_struct_t *ipv4_l3fwd_lookup_struct)\n {\n \tuint32_t next_hop;\n \n-\treturn (uint8_t) ((rte_lpm_lookup(ipv4_l3fwd_lookup_struct,\n+\treturn ((rte_lpm_lookup(ipv4_l3fwd_lookup_struct,\n \t\t\trte_be_to_cpu_32(ipv4_hdr->dst_addr), &next_hop) == 0)?\n \t\t\tnext_hop : portid);\n }\n@@ -634,7 +634,7 @@ parse_ptype_one(struct rte_mbuf *m)\n }\n \n static uint16_t\n-cb_parse_ptype(uint8_t port __rte_unused, uint16_t queue __rte_unused,\n+cb_parse_ptype(uint16_t port __rte_unused, uint16_t queue __rte_unused,\n \t       struct rte_mbuf *pkts[], uint16_t nb_pkts,\n \t       uint16_t max_pkts __rte_unused,\n \t       void *user_param __rte_unused)\n@@ -648,7 +648,7 @@ cb_parse_ptype(uint8_t port __rte_unused, uint16_t queue __rte_unused,\n }\n \n static int\n-add_cb_parse_ptype(uint8_t portid, uint16_t queueid)\n+add_cb_parse_ptype(uint16_t portid, uint16_t queueid)\n {\n \tprintf(\"Port %d: softly parse packet type info\\n\", portid);\n \tif (rte_eth_add_rx_callback(portid, queueid, cb_parse_ptype, NULL))\n@@ -665,7 +665,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid,\n \tstruct ether_hdr *eth_hdr;\n \tstruct ipv4_hdr *ipv4_hdr;\n \tvoid *d_addr_bytes;\n-\tuint8_t dst_port;\n+\tuint16_t dst_port;\n \n \teth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);\n \n@@ -758,7 +758,7 @@ power_idle_heuristic(uint32_t zero_rx_packet_count)\n \n static inline enum freq_scale_hint_t\n power_freq_scaleup_heuristic(unsigned lcore_id,\n-\t\t\t     uint8_t port_id,\n+\t\t\t     uint16_t port_id,\n \t\t\t     uint16_t queue_id)\n {\n /**\n@@ -805,7 +805,8 @@ sleep_until_rx_interrupt(int num)\n {\n \tstruct rte_epoll_event event[num];\n \tint n, i;\n-\tuint8_t port_id, queue_id;\n+\tuint16_t port_id;\n+\tuint8_t queue_id;\n \tvoid *data;\n \n \tRTE_LOG(INFO, L3FWD_POWER,\n@@ -832,7 +833,8 @@ static void turn_on_intr(struct lcore_conf *qconf)\n {\n \tint i;\n \tstruct lcore_rx_queue *rx_queue;\n-\tuint8_t port_id, queue_id;\n+\tuint8_t queue_id;\n+\tuint16_t port_id;\n \n \tfor (i = 0; i < qconf->n_rx_queue; ++i) {\n \t\trx_queue = &(qconf->rx_queue_list[i]);\n@@ -848,7 +850,8 @@ static void turn_on_intr(struct lcore_conf *qconf)\n static int event_register(struct lcore_conf *qconf)\n {\n \tstruct lcore_rx_queue *rx_queue;\n-\tuint8_t portid, queueid;\n+\tuint8_t queueid;\n+\tuint16_t portid;\n \tuint32_t data;\n \tint ret;\n \tint i;\n@@ -879,7 +882,8 @@ main_loop(__attribute__((unused)) void *dummy)\n \tuint64_t prev_tsc, diff_tsc, cur_tsc;\n \tuint64_t prev_tsc_power = 0, cur_tsc_power, diff_tsc_power;\n \tint i, j, nb_rx;\n-\tuint8_t portid, queueid;\n+\tuint8_t queueid;\n+\tuint16_t portid;\n \tstruct lcore_conf *qconf;\n \tstruct lcore_rx_queue *rx_queue;\n \tenum freq_scale_hint_t lcore_scaleup_hint;\n@@ -904,7 +908,7 @@ main_loop(__attribute__((unused)) void *dummy)\n \tfor (i = 0; i < qconf->n_rx_queue; i++) {\n \t\tportid = qconf->rx_queue_list[i].port_id;\n \t\tqueueid = qconf->rx_queue_list[i].queue_id;\n-\t\tRTE_LOG(INFO, L3FWD_POWER, \" -- lcoreid=%u portid=%hhu \"\n+\t\tRTE_LOG(INFO, L3FWD_POWER, \" -- lcoreid=%u portid=%u \"\n \t\t\t\"rxqueueid=%hhu\\n\", lcore_id, portid, queueid);\n \t}\n \n@@ -1541,11 +1545,12 @@ init_mem(unsigned nb_mbuf)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -1651,7 +1656,8 @@ main(int argc, char **argv)\n \tuint64_t hz;\n \tuint32_t n_tx_queue, nb_lcores;\n \tuint32_t dev_rxq_num, dev_txq_num;\n-\tuint8_t portid, nb_rx_queue, queue, socketid;\n+\tuint8_t nb_rx_queue, queue, socketid;\n+\tuint16_t portid;\n \tuint16_t org_rxq_intr = port_conf.intr_conf.rxq;\n \n \t/* catch SIGINT and restore cpufreq governor to ondemand */\n@@ -1751,7 +1757,7 @@ main(int argc, char **argv)\n \t\t\t\trte_eth_dev_socket_id(portid));\n \t\t\tif (qconf->tx_buffer[portid] == NULL)\n \t\t\t\trte_exit(EXIT_FAILURE, \"Can't allocate tx buffer for port %u\\n\",\n-\t\t\t\t\t\t(unsigned) portid);\n+\t\t\t\t\t portid);\n \n \t\t\trte_eth_tx_buffer_init(qconf->tx_buffer[portid], MAX_PKT_BURST);\n \t\t}\ndiff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c\nindex 34e4a6bef..a7fa26aed 100644\n--- a/examples/l3fwd-vf/main.c\n+++ b/examples/l3fwd-vf/main.c\n@@ -155,7 +155,7 @@ struct mbuf_table {\n };\n \n struct lcore_rx_queue {\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint8_t queue_id;\n } __rte_cache_aligned;\n \n@@ -165,7 +165,7 @@ struct lcore_rx_queue {\n \n #define MAX_LCORE_PARAMS 1024\n struct lcore_params {\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint8_t queue_id;\n \tuint8_t lcore_id;\n } __rte_cache_aligned;\n@@ -300,7 +300,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];\n static rte_spinlock_t spinlock_conf[RTE_MAX_ETHPORTS] = {RTE_SPINLOCK_INITIALIZER};\n /* Send burst of packets on an output interface */\n static inline int\n-send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port)\n+send_burst(struct lcore_conf *qconf, uint16_t n, uint16_t port)\n {\n \tstruct rte_mbuf **m_table;\n \tint ret;\n@@ -324,7 +324,7 @@ send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port)\n \n /* Enqueue a single packet, and send burst if queue is filled */\n static inline int\n-send_single_packet(struct rte_mbuf *m, uint8_t port)\n+send_single_packet(struct rte_mbuf *m, uint16_t port)\n {\n \tuint32_t lcore_id;\n \tuint16_t len;\n@@ -396,8 +396,9 @@ print_key(struct ipv4_5tuple key)\n \t       (unsigned)key.ip_dst, (unsigned)key.ip_src, key.port_dst, key.port_src, key.proto);\n }\n \n-static inline uint8_t\n-get_dst_port(struct ipv4_hdr *ipv4_hdr,  uint8_t portid, lookup_struct_t * l3fwd_lookup_struct)\n+static inline uint16_t\n+get_dst_port(struct ipv4_hdr *ipv4_hdr, uint16_t portid,\n+\t      lookup_struct_t *l3fwd_lookup_struct)\n {\n \tstruct ipv4_5tuple key;\n \tstruct tcp_hdr *tcp;\n@@ -430,29 +431,31 @@ get_dst_port(struct ipv4_hdr *ipv4_hdr,  uint8_t portid, lookup_struct_t * l3fwd\n \n \t/* Find destination port */\n \tret = rte_hash_lookup(l3fwd_lookup_struct, (const void *)&key);\n-\treturn (uint8_t)((ret < 0)? portid : l3fwd_out_if[ret]);\n+\treturn ((ret < 0) ? portid : l3fwd_out_if[ret]);\n }\n #endif\n \n #if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM)\n-static inline uint8_t\n-get_dst_port(struct ipv4_hdr *ipv4_hdr,  uint8_t portid, lookup_struct_t * l3fwd_lookup_struct)\n+static inline uint32_t\n+get_dst_port(struct ipv4_hdr *ipv4_hdr, uint16_t portid,\n+\t      lookup_struct_t *l3fwd_lookup_struct)\n {\n \tuint32_t next_hop;\n \n-\treturn (uint8_t) ((rte_lpm_lookup(l3fwd_lookup_struct,\n-\t\t\trte_be_to_cpu_32(ipv4_hdr->dst_addr), &next_hop) == 0)?\n-\t\t\tnext_hop : portid);\n+\treturn ((rte_lpm_lookup(l3fwd_lookup_struct,\n+\t\trte_be_to_cpu_32(ipv4_hdr->dst_addr), &next_hop) == 0) ?\n+\t\tnext_hop : portid);\n }\n #endif\n \n static inline void\n-l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, lookup_struct_t * l3fwd_lookup_struct)\n+l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid,\n+\t\t      lookup_struct_t *l3fwd_lookup_struct)\n {\n \tstruct ether_hdr *eth_hdr;\n \tstruct ipv4_hdr *ipv4_hdr;\n \tvoid *tmp;\n-\tuint8_t dst_port;\n+\tuint16_t dst_port;\n \n \teth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);\n \n@@ -496,7 +499,8 @@ main_loop(__attribute__((unused)) void *dummy)\n \tunsigned lcore_id;\n \tuint64_t prev_tsc, diff_tsc, cur_tsc;\n \tint i, j, nb_rx;\n-\tuint8_t portid, queueid;\n+\tuint16_t portid;\n+\tuint8_t queueid;\n \tstruct lcore_conf *qconf;\n \tconst uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * BURST_TX_DRAIN_US;\n \n@@ -513,11 +517,10 @@ main_loop(__attribute__((unused)) void *dummy)\n \tRTE_LOG(INFO, L3FWD, \"entering main loop on lcore %u\\n\", lcore_id);\n \n \tfor (i = 0; i < qconf->n_rx_queue; i++) {\n-\n \t\tportid = qconf->rx_queue_list[i].port_id;\n \t\tqueueid = qconf->rx_queue_list[i].queue_id;\n-\t\tRTE_LOG(INFO, L3FWD, \" -- lcoreid=%u portid=%hhu rxqueueid=%hhu\\n\", lcore_id,\n-\t\t\tportid, queueid);\n+\t\tRTE_LOG(INFO, L3FWD, \" --lcoreid=%u portid=%u rxqueueid=%u\\n\",\n+\t\tlcore_id, portid, queueid);\n \t}\n \n \twhile (1) {\n@@ -606,7 +609,7 @@ check_lcore_params(void)\n static int\n check_port_config(const unsigned nb_ports)\n {\n-\tunsigned portid;\n+\tuint16_t portid;\n \tuint16_t i;\n \n \tfor (i = 0; i < nb_lcore_params; ++i) {\n@@ -624,7 +627,7 @@ check_port_config(const unsigned nb_ports)\n }\n \n static uint8_t\n-get_port_n_rx_queues(const uint8_t port)\n+get_port_n_rx_queues(const uint16_t port)\n {\n \tint queue = -1;\n \tuint16_t i;\n@@ -676,8 +679,8 @@ print_usage(const char *prgname)\n static void\n signal_handler(int signum)\n {\n-\tuint8_t portid;\n-\tuint8_t nb_ports = rte_eth_dev_count();\n+\tuint16_t portid;\n+\tuint16_t nb_ports = rte_eth_dev_count();\n \n \t/* When we receive a SIGINT signal */\n \tif (signum == SIGINT) {\n@@ -749,7 +752,7 @@ parse_config(const char *q_arg)\n \t\t\t\tnb_lcore_params);\n \t\t\treturn -1;\n \t\t}\n-\t\tlcore_params_array[nb_lcore_params].port_id = (uint8_t)int_fld[FLD_PORT];\n+\t\tlcore_params_array[nb_lcore_params].port_id = int_fld[FLD_PORT];\n \t\tlcore_params_array[nb_lcore_params].queue_id = (uint8_t)int_fld[FLD_QUEUE];\n \t\tlcore_params_array[nb_lcore_params].lcore_id = (uint8_t)int_fld[FLD_LCORE];\n \t\t++nb_lcore_params;\n@@ -953,11 +956,11 @@ main(int argc, char **argv)\n \tstruct rte_eth_txconf *txconf;\n \tint ret;\n \tunsigned nb_ports;\n-\tuint16_t queueid;\n+\tuint16_t queueid, portid;\n \tunsigned lcore_id;\n \tuint32_t nb_lcores;\n \tuint16_t n_tx_queue;\n-\tuint8_t portid, nb_rx_queue, queue, socketid;\n+\tuint8_t nb_rx_queue, queue, socketid;\n \n \tsignal(SIGINT, signal_handler);\n \t/* init EAL */\ndiff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h\nindex 011ba148b..4bb15943c 100644\n--- a/examples/l3fwd/l3fwd.h\n+++ b/examples/l3fwd/l3fwd.h\n@@ -83,7 +83,7 @@ struct mbuf_table {\n };\n \n struct lcore_rx_queue {\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint8_t queue_id;\n } __rte_cache_aligned;\n \n@@ -117,7 +117,7 @@ extern struct lcore_conf lcore_conf[RTE_MAX_LCORE];\n \n /* Send burst of packets on an output interface */\n static inline int\n-send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port)\n+send_burst(struct lcore_conf *qconf, uint16_t n, uint16_t port)\n {\n \tstruct rte_mbuf **m_table;\n \tint ret;\n@@ -139,7 +139,7 @@ send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port)\n /* Enqueue a single packet, and send burst if queue is filled */\n static inline int\n send_single_packet(struct lcore_conf *qconf,\n-\t\tstruct rte_mbuf *m, uint8_t port)\n+\t\t   struct rte_mbuf *m, uint16_t port)\n {\n \tuint16_t len;\n \n@@ -212,11 +212,11 @@ int\n lpm_check_ptype(int portid);\n \n uint16_t\n-em_cb_parse_ptype(uint8_t port, uint16_t queue, struct rte_mbuf *pkts[],\n+em_cb_parse_ptype(uint16_t port, uint16_t queue, struct rte_mbuf *pkts[],\n \t\t  uint16_t nb_pkts, uint16_t max_pkts, void *user_param);\n \n uint16_t\n-lpm_cb_parse_ptype(uint8_t port, uint16_t queue, struct rte_mbuf *pkts[],\n+lpm_cb_parse_ptype(uint16_t port, uint16_t queue, struct rte_mbuf *pkts[],\n \t\t   uint16_t nb_pkts, uint16_t max_pkts, void *user_param);\n \n int\ndiff --git a/examples/l3fwd/l3fwd_common.h b/examples/l3fwd/l3fwd_common.h\nindex 2867365d0..7002a43a4 100644\n--- a/examples/l3fwd/l3fwd_common.h\n+++ b/examples/l3fwd/l3fwd_common.h\n@@ -207,7 +207,7 @@ static const struct {\n };\n \n static __rte_always_inline void\n-send_packetsx4(struct lcore_conf *qconf, uint8_t port, struct rte_mbuf *m[],\n+send_packetsx4(struct lcore_conf *qconf, uint16_t port, struct rte_mbuf *m[],\n \t\tuint32_t num)\n {\n \tuint32_t len, j, n;\ndiff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c\nindex 53d081bd7..df38a1362 100644\n--- a/examples/l3fwd/l3fwd_em.c\n+++ b/examples/l3fwd/l3fwd_em.c\n@@ -628,7 +628,7 @@ em_parse_ptype(struct rte_mbuf *m)\n }\n \n uint16_t\n-em_cb_parse_ptype(uint8_t port __rte_unused, uint16_t queue __rte_unused,\n+em_cb_parse_ptype(uint16_t port __rte_unused, uint16_t queue __rte_unused,\n \t\t  struct rte_mbuf *pkts[], uint16_t nb_pkts,\n \t\t  uint16_t max_pkts __rte_unused,\n \t\t  void *user_param __rte_unused)\ndiff --git a/examples/l3fwd/l3fwd_em.h b/examples/l3fwd/l3fwd_em.h\nindex d509a1fcd..3ca241899 100644\n--- a/examples/l3fwd/l3fwd_em.h\n+++ b/examples/l3fwd/l3fwd_em.h\n@@ -35,12 +35,12 @@\n #define __L3FWD_EM_H__\n \n static __rte_always_inline void\n-l3fwd_em_simple_forward(struct rte_mbuf *m, uint8_t portid,\n+l3fwd_em_simple_forward(struct rte_mbuf *m, uint16_t portid,\n \t\tstruct lcore_conf *qconf)\n {\n \tstruct ether_hdr *eth_hdr;\n \tstruct ipv4_hdr *ipv4_hdr;\n-\tuint8_t dst_port;\n+\tuint16_t dst_port;\n \tuint32_t tcp_or_udp;\n \tuint32_t l3_ptypes;\n \n@@ -112,7 +112,7 @@ l3fwd_em_simple_forward(struct rte_mbuf *m, uint8_t portid,\n  */\n static inline void\n l3fwd_em_no_opt_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,\n-\t\t\tuint8_t portid, struct lcore_conf *qconf)\n+\t\t\t      uint16_t portid, struct lcore_conf *qconf)\n {\n \tint32_t j;\n \ndiff --git a/examples/l3fwd/l3fwd_em_hlm.h b/examples/l3fwd/l3fwd_em_hlm.h\nindex 520672d51..2be61cd48 100644\n--- a/examples/l3fwd/l3fwd_em_hlm.h\n+++ b/examples/l3fwd/l3fwd_em_hlm.h\n@@ -52,7 +52,7 @@\n \n static __rte_always_inline void\n em_get_dst_port_ipv4xN(struct lcore_conf *qconf, struct rte_mbuf *m[],\n-\t\tuint8_t portid, uint16_t dst_port[])\n+\t\t\tuint16_t portid, uint16_t dst_port[])\n {\n \tint i;\n \tint32_t ret[EM_HASH_LOOKUP_COUNT];\n@@ -68,7 +68,7 @@ em_get_dst_port_ipv4xN(struct lcore_conf *qconf, struct rte_mbuf *m[],\n \t\t\t     EM_HASH_LOOKUP_COUNT, ret);\n \n \tfor (i = 0; i < EM_HASH_LOOKUP_COUNT; i++) {\n-\t\tdst_port[i] = (uint8_t) ((ret[i] < 0) ?\n+\t\tdst_port[i] = ((ret[i] < 0) ?\n \t\t\t\tportid : ipv4_l3fwd_out_if[ret[i]]);\n \n \t\tif (dst_port[i] >= RTE_MAX_ETHPORTS ||\n@@ -79,7 +79,7 @@ em_get_dst_port_ipv4xN(struct lcore_conf *qconf, struct rte_mbuf *m[],\n \n static __rte_always_inline void\n em_get_dst_port_ipv6xN(struct lcore_conf *qconf, struct rte_mbuf *m[],\n-\t\tuint8_t portid, uint16_t dst_port[])\n+\t\t\tuint16_t portid, uint16_t dst_port[])\n {\n \tint i;\n \tint32_t ret[EM_HASH_LOOKUP_COUNT];\n@@ -95,7 +95,7 @@ em_get_dst_port_ipv6xN(struct lcore_conf *qconf, struct rte_mbuf *m[],\n \t\t\t     EM_HASH_LOOKUP_COUNT, ret);\n \n \tfor (i = 0; i < EM_HASH_LOOKUP_COUNT; i++) {\n-\t\tdst_port[i] = (uint8_t) ((ret[i] < 0) ?\n+\t\tdst_port[i] = ((ret[i] < 0) ?\n \t\t\t\tportid : ipv6_l3fwd_out_if[ret[i]]);\n \n \t\tif (dst_port[i] >= RTE_MAX_ETHPORTS ||\n@@ -106,9 +106,9 @@ em_get_dst_port_ipv6xN(struct lcore_conf *qconf, struct rte_mbuf *m[],\n \n static __rte_always_inline uint16_t\n em_get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt,\n-\t\tuint8_t portid)\n+\t\tuint16_t portid)\n {\n-\tuint8_t next_hop;\n+\tuint16_t next_hop;\n \tstruct ipv4_hdr *ipv4_hdr;\n \tstruct ipv6_hdr *ipv6_hdr;\n \tuint32_t tcp_or_udp;\n@@ -158,7 +158,7 @@ em_get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt,\n  */\n static inline void\n l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,\n-\t\tuint8_t portid, struct lcore_conf *qconf)\n+\t\t       uint16_t portid, struct lcore_conf *qconf)\n {\n \tint32_t i, j, pos;\n \tuint16_t dst_port[MAX_PKT_BURST];\ndiff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c\nindex ff1e40355..f7ea7be63 100644\n--- a/examples/l3fwd/l3fwd_lpm.c\n+++ b/examples/l3fwd/l3fwd_lpm.c\n@@ -105,7 +105,7 @@ struct rte_lpm *ipv4_l3fwd_lpm_lookup_struct[NB_SOCKETS];\n struct rte_lpm6 *ipv6_l3fwd_lpm_lookup_struct[NB_SOCKETS];\n \n static inline uint16_t\n-lpm_get_ipv4_dst_port(void *ipv4_hdr,  uint8_t portid, void *lookup_struct)\n+lpm_get_ipv4_dst_port(void *ipv4_hdr, uint16_t portid, void *lookup_struct)\n {\n \tuint32_t next_hop;\n \tstruct rte_lpm *ipv4_l3fwd_lookup_struct =\n@@ -117,7 +117,7 @@ lpm_get_ipv4_dst_port(void *ipv4_hdr,  uint8_t portid, void *lookup_struct)\n }\n \n static inline uint16_t\n-lpm_get_ipv6_dst_port(void *ipv6_hdr,  uint8_t portid, void *lookup_struct)\n+lpm_get_ipv6_dst_port(void *ipv6_hdr, uint16_t portid, void *lookup_struct)\n {\n \tuint32_t next_hop;\n \tstruct rte_lpm6 *ipv6_l3fwd_lookup_struct =\n@@ -130,7 +130,7 @@ lpm_get_ipv6_dst_port(void *ipv6_hdr,  uint8_t portid, void *lookup_struct)\n \n static __rte_always_inline uint16_t\n lpm_get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt,\n-\t\tuint8_t portid)\n+\t\t uint16_t portid)\n {\n \tstruct ipv6_hdr *ipv6_hdr;\n \tstruct ipv4_hdr *ipv4_hdr;\n@@ -162,7 +162,7 @@ lpm_get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt,\n  */\n static __rte_always_inline uint16_t\n lpm_get_dst_port_with_ipv4(const struct lcore_conf *qconf, struct rte_mbuf *pkt,\n-\tuint32_t dst_ipv4, uint8_t portid)\n+\t\t\t   uint32_t dst_ipv4, uint16_t portid)\n {\n \tuint32_t next_hop;\n \tstruct ipv6_hdr *ipv6_hdr;\n@@ -203,7 +203,8 @@ lpm_main_loop(__attribute__((unused)) void *dummy)\n \tunsigned lcore_id;\n \tuint64_t prev_tsc, diff_tsc, cur_tsc;\n \tint i, nb_rx;\n-\tuint8_t portid, queueid;\n+\tuint16_t portid;\n+\tuint8_t queueid;\n \tstruct lcore_conf *qconf;\n \tconst uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /\n \t\tUS_PER_S * BURST_TX_DRAIN_US;\n@@ -225,7 +226,7 @@ lpm_main_loop(__attribute__((unused)) void *dummy)\n \t\tportid = qconf->rx_queue_list[i].port_id;\n \t\tqueueid = qconf->rx_queue_list[i].queue_id;\n \t\tRTE_LOG(INFO, L3FWD,\n-\t\t\t\" -- lcoreid=%u portid=%hhu rxqueueid=%hhu\\n\",\n+\t\t\t\" -- lcoreid=%u portid=%u rxqueueid=%hhu\\n\",\n \t\t\tlcore_id, portid, queueid);\n \t}\n \n@@ -259,7 +260,7 @@ lpm_main_loop(__attribute__((unused)) void *dummy)\n \t\t\tportid = qconf->rx_queue_list[i].port_id;\n \t\t\tqueueid = qconf->rx_queue_list[i].queue_id;\n \t\t\tnb_rx = rte_eth_rx_burst(portid, queueid, pkts_burst,\n-\t\t\t\tMAX_PKT_BURST);\n+\t\t\t\t\t\t MAX_PKT_BURST);\n \t\t\tif (nb_rx == 0)\n \t\t\t\tcontinue;\n \n@@ -413,7 +414,7 @@ lpm_parse_ptype(struct rte_mbuf *m)\n }\n \n uint16_t\n-lpm_cb_parse_ptype(uint8_t port __rte_unused, uint16_t queue __rte_unused,\n+lpm_cb_parse_ptype(uint16_t port __rte_unused, uint16_t queue __rte_unused,\n \t\t   struct rte_mbuf *pkts[], uint16_t nb_pkts,\n \t\t   uint16_t max_pkts __rte_unused,\n \t\t   void *user_param __rte_unused)\ndiff --git a/examples/l3fwd/l3fwd_lpm.h b/examples/l3fwd/l3fwd_lpm.h\nindex 55c3e8329..92f613b22 100644\n--- a/examples/l3fwd/l3fwd_lpm.h\n+++ b/examples/l3fwd/l3fwd_lpm.h\n@@ -35,8 +35,8 @@\n #define __L3FWD_LPM_H__\n \n static __rte_always_inline void\n-l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint8_t portid,\n-\t\tstruct lcore_conf *qconf)\n+l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid,\n+\t\t\t struct lcore_conf *qconf)\n {\n \tstruct ether_hdr *eth_hdr;\n \tstruct ipv4_hdr *ipv4_hdr;\n@@ -104,7 +104,7 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint8_t portid,\n \n static inline void\n l3fwd_lpm_no_opt_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,\n-\t\t\t\tuint8_t portid, struct lcore_conf *qconf)\n+\t\t\t       uint16_t portid, struct lcore_conf *qconf)\n {\n \tint32_t j;\n \ndiff --git a/examples/l3fwd/l3fwd_lpm_neon.h b/examples/l3fwd/l3fwd_lpm_neon.h\nindex baedbfe84..85f314d1e 100644\n--- a/examples/l3fwd/l3fwd_lpm_neon.h\n+++ b/examples/l3fwd/l3fwd_lpm_neon.h\n@@ -82,7 +82,7 @@ static inline void\n processx4_step2(const struct lcore_conf *qconf,\n \t\tint32x4_t dip,\n \t\tuint32_t ipv4_flag,\n-\t\tuint8_t portid,\n+\t\tuint16_t portid,\n \t\tstruct rte_mbuf *pkt[FWDSTEP],\n \t\tuint16_t dprt[FWDSTEP])\n {\n@@ -115,7 +115,7 @@ processx4_step2(const struct lcore_conf *qconf,\n  */\n static inline void\n l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,\n-\t\t\tuint8_t portid, struct lcore_conf *qconf)\n+\t\t\tuint16_t portid, struct lcore_conf *qconf)\n {\n \tint32_t i = 0, j = 0;\n \tuint16_t dst_port[MAX_PKT_BURST];\ndiff --git a/examples/l3fwd/l3fwd_lpm_sse.h b/examples/l3fwd/l3fwd_lpm_sse.h\nindex 4e294c844..d474396ed 100644\n--- a/examples/l3fwd/l3fwd_lpm_sse.h\n+++ b/examples/l3fwd/l3fwd_lpm_sse.h\n@@ -79,7 +79,7 @@ static inline void\n processx4_step2(const struct lcore_conf *qconf,\n \t\t__m128i dip,\n \t\tuint32_t ipv4_flag,\n-\t\tuint8_t portid,\n+\t\tuint16_t portid,\n \t\tstruct rte_mbuf *pkt[FWDSTEP],\n \t\tuint16_t dprt[FWDSTEP])\n {\n@@ -112,7 +112,7 @@ processx4_step2(const struct lcore_conf *qconf,\n  */\n static inline void\n l3fwd_lpm_send_packets(int nb_rx, struct rte_mbuf **pkts_burst,\n-\t\t\tuint8_t portid, struct lcore_conf *qconf)\n+\t\t\tuint16_t portid, struct lcore_conf *qconf)\n {\n \tint32_t j;\n \tuint16_t dst_port[MAX_PKT_BURST];\ndiff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c\nindex 81995fdbe..a5e55baae 100644\n--- a/examples/l3fwd/main.c\n+++ b/examples/l3fwd/main.c\n@@ -124,7 +124,7 @@ uint32_t hash_entry_number = HASH_ENTRY_NUMBER_DEFAULT;\n struct lcore_conf lcore_conf[RTE_MAX_LCORE];\n \n struct lcore_params {\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint8_t queue_id;\n \tuint8_t lcore_id;\n } __rte_cache_aligned;\n@@ -245,7 +245,7 @@ check_lcore_params(void)\n static int\n check_port_config(const unsigned nb_ports)\n {\n-\tunsigned portid;\n+\tuint16_t portid;\n \tuint16_t i;\n \n \tfor (i = 0; i < nb_lcore_params; ++i) {\n@@ -263,7 +263,7 @@ check_port_config(const unsigned nb_ports)\n }\n \n static uint8_t\n-get_port_n_rx_queues(const uint8_t port)\n+get_port_n_rx_queues(const uint16_t port)\n {\n \tint queue = -1;\n \tuint16_t i;\n@@ -445,7 +445,7 @@ parse_config(const char *q_arg)\n static void\n parse_eth_dest(const char *optarg)\n {\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tchar *port_end;\n \tuint8_t c, *dest, peer_addr[6];\n \n@@ -750,11 +750,12 @@ init_mem(unsigned nb_mbuf)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -773,14 +774,13 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up. Speed %u Mbps -%s\\n\",\n+\t\t\t\t\t\tportid, link.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\tprintf(\"Port %d Link Down\\n\", portid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -818,7 +818,7 @@ signal_handler(int signum)\n }\n \n static int\n-prepare_ptype_parser(uint8_t portid, uint16_t queueid)\n+prepare_ptype_parser(uint16_t portid, uint16_t queueid)\n {\n \tif (parse_ptype) {\n \t\tprintf(\"Port %d: softly parse packet type info\\n\", portid);\n@@ -847,10 +847,10 @@ main(int argc, char **argv)\n \tstruct rte_eth_txconf *txconf;\n \tint ret;\n \tunsigned nb_ports;\n-\tuint16_t queueid;\n+\tuint16_t queueid, portid;\n \tunsigned lcore_id;\n \tuint32_t n_tx_queue, nb_lcores;\n-\tuint8_t portid, nb_rx_queue, queue, socketid;\n+\tuint8_t nb_rx_queue, queue, socketid;\n \n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\n@@ -1048,7 +1048,7 @@ main(int argc, char **argv)\n \t}\n \n \n-\tcheck_all_ports_link_status((uint8_t)nb_ports, enabled_port_mask);\n+\tcheck_all_ports_link_status(nb_ports, enabled_port_mask);\n \n \tret = 0;\n \t/* launch per-lcore init on every lcore */\ndiff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c\nindex f4e3969a6..4600841ae 100644\n--- a/examples/link_status_interrupt/main.c\n+++ b/examples/link_status_interrupt/main.c\n@@ -145,7 +145,7 @@ print_stats(void)\n {\n \tstruct rte_eth_link link;\n \tuint64_t total_packets_dropped, total_packets_tx, total_packets_rx;\n-\tunsigned portid;\n+\tuint16_t portid;\n \n \ttotal_packets_dropped = 0;\n \ttotal_packets_tx = 0;\n@@ -165,7 +165,7 @@ print_stats(void)\n \t\t\tcontinue;\n \n \t\tmemset(&link, 0, sizeof(link));\n-\t\trte_eth_link_get_nowait((uint8_t)portid, &link);\n+\t\trte_eth_link_get_nowait(portid, &link);\n \t\tprintf(\"\\nStatistics for port %u ------------------------------\"\n \t\t\t   \"\\nLink status: %25s\"\n \t\t\t   \"\\nLink speed: %26u\"\n@@ -175,7 +175,7 @@ print_stats(void)\n \t\t\t   \"\\nPackets dropped: %21\"PRIu64,\n \t\t\t   portid,\n \t\t\t   (link.link_status ? \"Link up\" : \"Link down\"),\n-\t\t\t   (unsigned)link.link_speed,\n+\t\t\t   link.link_speed,\n \t\t\t   (link.link_duplex == ETH_LINK_FULL_DUPLEX ? \\\n \t\t\t\t\t\"full-duplex\" : \"half-duplex\"),\n \t\t\t   port_statistics[portid].tx,\n@@ -470,7 +470,7 @@ lsi_parse_args(int argc, char **argv)\n  *  int.\n  */\n static int\n-lsi_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param,\n+lsi_event_callback(uint16_t port_id, enum rte_eth_event_type type, void *param,\n \t\t    void *ret_param)\n {\n \tstruct rte_eth_link link;\n@@ -498,7 +498,8 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\ndiff --git a/examples/load_balancer/config.c b/examples/load_balancer/config.c\nindex 503250951..d7ba2ae45 100644\n--- a/examples/load_balancer/config.c\n+++ b/examples/load_balancer/config.c\n@@ -240,8 +240,8 @@ parse_arg_rx(const char *arg)\n \t\tif (lp->io.rx.n_nic_queues >= APP_MAX_NIC_RX_QUEUES_PER_IO_LCORE) {\n \t\t\treturn -9;\n \t\t}\n-\t\tlp->io.rx.nic_queues[lp->io.rx.n_nic_queues].port = (uint8_t) port;\n-\t\tlp->io.rx.nic_queues[lp->io.rx.n_nic_queues].queue = (uint8_t) queue;\n+\t\tlp->io.rx.nic_queues[lp->io.rx.n_nic_queues].port = port;\n+\t\tlp->io.rx.nic_queues[lp->io.rx.n_nic_queues].queue = queue;\n \t\tlp->io.rx.n_nic_queues ++;\n \n \t\tn_tuples ++;\n@@ -318,7 +318,7 @@ parse_arg_tx(const char *arg)\n \t\tif (lp->io.tx.n_nic_ports >= APP_MAX_NIC_TX_PORTS_PER_IO_LCORE) {\n \t\t\treturn -9;\n \t\t}\n-\t\tlp->io.tx.nic_ports[lp->io.tx.n_nic_ports] = (uint8_t) port;\n+\t\tlp->io.tx.nic_ports[lp->io.tx.n_nic_ports] = port;\n \t\tlp->io.tx.n_nic_ports ++;\n \n \t\tn_tuples ++;\n@@ -488,9 +488,9 @@ app_check_lpm_table(void)\n static int\n app_check_every_rx_port_is_tx_enabled(void)\n {\n-\tuint8_t port;\n+\tuint16_t port;\n \n-\tfor (port = 0; port < APP_MAX_NIC_PORTS; port ++) {\n+\tfor (port = 0; port < APP_MAX_NIC_PORTS; port++) {\n \t\tif ((app_get_nic_rx_queues_per_port(port) > 0) && (app.nic_tx_port_mask[port] == 0)) {\n \t\t\treturn -1;\n \t\t}\n@@ -762,7 +762,7 @@ app_parse_args(int argc, char **argv)\n }\n \n int\n-app_get_nic_rx_queues_per_port(uint8_t port)\n+app_get_nic_rx_queues_per_port(uint16_t port)\n {\n \tuint32_t i, count;\n \n@@ -781,7 +781,7 @@ app_get_nic_rx_queues_per_port(uint8_t port)\n }\n \n int\n-app_get_lcore_for_nic_rx(uint8_t port, uint8_t queue, uint32_t *lcore_out)\n+app_get_lcore_for_nic_rx(uint16_t port, uint8_t queue, uint32_t *lcore_out)\n {\n \tuint32_t lcore;\n \n@@ -808,7 +808,7 @@ app_get_lcore_for_nic_rx(uint8_t port, uint8_t queue, uint32_t *lcore_out)\n }\n \n int\n-app_get_lcore_for_nic_tx(uint8_t port, uint32_t *lcore_out)\n+app_get_lcore_for_nic_tx(uint16_t port, uint32_t *lcore_out)\n {\n \tuint32_t lcore;\n \n@@ -896,12 +896,13 @@ app_get_lcores_worker(void)\n void\n app_print_params(void)\n {\n-\tunsigned port, queue, lcore, rule, i, j;\n+\tuint16_t port;\n+\tunsigned int queue, lcore, rule, i, j;\n \n \t/* Print NIC RX configuration */\n \tprintf(\"NIC RX ports: \");\n \tfor (port = 0; port < APP_MAX_NIC_PORTS; port ++) {\n-\t\tuint32_t n_rx_queues = app_get_nic_rx_queues_per_port((uint8_t) port);\n+\t\tuint32_t n_rx_queues = app_get_nic_rx_queues_per_port(port);\n \n \t\tif (n_rx_queues == 0) {\n \t\t\tcontinue;\ndiff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c\nindex 717232e6e..692d33458 100644\n--- a/examples/load_balancer/init.c\n+++ b/examples/load_balancer/init.c\n@@ -308,7 +308,7 @@ app_init_rings_tx(void)\n \t\t\t\tcontinue;\n \t\t\t}\n \n-\t\t\tif (app_get_lcore_for_nic_tx((uint8_t) port, &lcore_io) < 0) {\n+\t\t\tif (app_get_lcore_for_nic_tx(port, &lcore_io) < 0) {\n \t\t\t\trte_panic(\"Algorithmic error (no I/O core to handle TX of port %u)\\n\",\n \t\t\t\t\tport);\n \t\t\t}\n@@ -359,11 +359,12 @@ app_init_rings_tx(void)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \tuint32_t n_rx_queues, n_tx_queues;\n \n@@ -383,14 +384,14 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up - speed %uMbps - %s\\n\",\n+\t\t\t\t\t\tportid,\n+\t\t\t\t\t\tlink.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\tprintf(\"Port %d Link Down\\n\", portid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -422,12 +423,13 @@ app_init_nics(void)\n {\n \tunsigned socket;\n \tuint32_t lcore;\n-\tuint8_t port, queue;\n+\tuint16_t port;\n+\tuint8_t queue;\n \tint ret;\n \tuint32_t n_rx_queues, n_tx_queues;\n \n \t/* Init NIC ports and queues, then start the ports */\n-\tfor (port = 0; port < APP_MAX_NIC_PORTS; port ++) {\n+\tfor (port = 0; port < APP_MAX_NIC_PORTS; port++) {\n \t\tstruct rte_mempool *pool;\n \t\tuint16_t nic_rx_ring_size;\n \t\tuint16_t nic_tx_ring_size;\n@@ -440,14 +442,14 @@ app_init_nics(void)\n \t\t}\n \n \t\t/* Init port */\n-\t\tprintf(\"Initializing NIC port %u ...\\n\", (unsigned) port);\n+\t\tprintf(\"Initializing NIC port %u ...\\n\", port);\n \t\tret = rte_eth_dev_configure(\n \t\t\tport,\n \t\t\t(uint8_t) n_rx_queues,\n \t\t\t(uint8_t) n_tx_queues,\n \t\t\t&port_conf);\n \t\tif (ret < 0) {\n-\t\t\trte_panic(\"Cannot init NIC port %u (%d)\\n\", (unsigned) port, ret);\n+\t\t\trte_panic(\"Cannot init NIC port %u (%d)\\n\", port, ret);\n \t\t}\n \t\trte_eth_promiscuous_enable(port);\n \n@@ -457,7 +459,7 @@ app_init_nics(void)\n \t\t\tport, &nic_rx_ring_size, &nic_tx_ring_size);\n \t\tif (ret < 0) {\n \t\t\trte_panic(\"Cannot adjust number of descriptors for port %u (%d)\\n\",\n-\t\t\t\t(unsigned) port, ret);\n+\t\t\t\t  port, ret);\n \t\t}\n \t\tapp.nic_rx_ring_size = nic_rx_ring_size;\n \t\tapp.nic_tx_ring_size = nic_tx_ring_size;\n@@ -473,8 +475,7 @@ app_init_nics(void)\n \t\t\tpool = app.lcore_params[lcore].pool;\n \n \t\t\tprintf(\"Initializing NIC port %u RX queue %u ...\\n\",\n-\t\t\t\t(unsigned) port,\n-\t\t\t\t(unsigned) queue);\n+\t\t\t\tport, queue);\n \t\t\tret = rte_eth_rx_queue_setup(\n \t\t\t\tport,\n \t\t\t\tqueue,\n@@ -484,9 +485,7 @@ app_init_nics(void)\n \t\t\t\tpool);\n \t\t\tif (ret < 0) {\n \t\t\t\trte_panic(\"Cannot init RX queue %u for port %u (%d)\\n\",\n-\t\t\t\t\t(unsigned) queue,\n-\t\t\t\t\t(unsigned) port,\n-\t\t\t\t\tret);\n+\t\t\t\t\t  queue, port, ret);\n \t\t\t}\n \t\t}\n \n@@ -495,7 +494,7 @@ app_init_nics(void)\n \t\t\tapp_get_lcore_for_nic_tx(port, &lcore);\n \t\t\tsocket = rte_lcore_to_socket_id(lcore);\n \t\t\tprintf(\"Initializing NIC port %u TX queue 0 ...\\n\",\n-\t\t\t\t(unsigned) port);\n+\t\t\t\tport);\n \t\t\tret = rte_eth_tx_queue_setup(\n \t\t\t\tport,\n \t\t\t\t0,\n@@ -504,8 +503,7 @@ app_init_nics(void)\n \t\t\t\tNULL);\n \t\t\tif (ret < 0) {\n \t\t\t\trte_panic(\"Cannot init TX queue 0 for port %d (%d)\\n\",\n-\t\t\t\t\tport,\n-\t\t\t\t\tret);\n+\t\t\t\t\t   port, ret);\n \t\t\t}\n \t\t}\n \ndiff --git a/examples/load_balancer/main.h b/examples/load_balancer/main.h\nindex dc407555d..bef2ba041 100644\n--- a/examples/load_balancer/main.h\n+++ b/examples/load_balancer/main.h\n@@ -248,7 +248,7 @@ struct app_lcore_params_io {\n \tstruct {\n \t\t/* NIC */\n \t\tstruct {\n-\t\t\tuint8_t port;\n+\t\t\tuint16_t port;\n \t\t\tuint8_t queue;\n \t\t} nic_queues[APP_MAX_NIC_RX_QUEUES_PER_IO_LCORE];\n \t\tuint32_t n_nic_queues;\n@@ -275,7 +275,7 @@ struct app_lcore_params_io {\n \t\tstruct rte_ring *rings[APP_MAX_NIC_PORTS][APP_MAX_WORKER_LCORES];\n \n \t\t/* NIC */\n-\t\tuint8_t nic_ports[APP_MAX_NIC_TX_PORTS_PER_IO_LCORE];\n+\t\tuint16_t nic_ports[APP_MAX_NIC_TX_PORTS_PER_IO_LCORE];\n \t\tuint32_t n_nic_ports;\n \n \t\t/* Internal buffers */\n@@ -368,9 +368,10 @@ void app_print_usage(void);\n void app_init(void);\n int app_lcore_main_loop(void *arg);\n \n-int app_get_nic_rx_queues_per_port(uint8_t port);\n-int app_get_lcore_for_nic_rx(uint8_t port, uint8_t queue, uint32_t *lcore_out);\n-int app_get_lcore_for_nic_tx(uint8_t port, uint32_t *lcore_out);\n+int app_get_nic_rx_queues_per_port(uint16_t port);\n+int app_get_lcore_for_nic_rx(uint16_t port, uint8_t queue,\n+\t\t\t      uint32_t *lcore_out);\n+int app_get_lcore_for_nic_tx(uint16_t port, uint32_t *lcore_out);\n int app_is_socket_used(uint32_t socket);\n uint32_t app_get_lcores_io_rx(void);\n uint32_t app_get_lcores_worker(void);\ndiff --git a/examples/load_balancer/runtime.c b/examples/load_balancer/runtime.c\nindex e54b78510..b342e755f 100644\n--- a/examples/load_balancer/runtime.c\n+++ b/examples/load_balancer/runtime.c\n@@ -188,7 +188,7 @@ app_lcore_io_rx(\n \tuint32_t i;\n \n \tfor (i = 0; i < lp->rx.n_nic_queues; i ++) {\n-\t\tuint8_t port = lp->rx.nic_queues[i].port;\n+\t\tuint16_t port = lp->rx.nic_queues[i].port;\n \t\tuint8_t queue = lp->rx.nic_queues[i].queue;\n \t\tuint32_t n_mbufs, j;\n \n@@ -213,7 +213,7 @@ app_lcore_io_rx(\n \n \t\t\tprintf(\"I/O RX %u in (NIC port %u): NIC drop ratio = %.2f avg burst size = %.2f\\n\",\n \t\t\t\tlcore,\n-\t\t\t\t(unsigned) port,\n+\t\t\t\tport,\n \t\t\t\t(double) stats.imissed / (double) (stats.imissed + stats.ipackets),\n \t\t\t\t((double) lp->rx.nic_queues_count[i]) / ((double) lp->rx.nic_queues_iters[i]));\n \t\t\tlp->rx.nic_queues_iters[i] = 0;\n@@ -339,7 +339,7 @@ app_lcore_io_tx(\n \t\tuint32_t i;\n \n \t\tfor (i = 0; i < lp->tx.n_nic_ports; i ++) {\n-\t\t\tuint8_t port = lp->tx.nic_ports[i];\n+\t\t\tuint16_t port = lp->tx.nic_ports[i];\n \t\t\tstruct rte_ring *ring = lp->tx.rings[port][worker];\n \t\t\tuint32_t n_mbufs, n_pkts;\n \t\t\tint ret;\n@@ -395,7 +395,7 @@ app_lcore_io_tx(\n \n \t\t\t\tprintf(\"\\t\\t\\tI/O TX %u out (port %u): avg burst size = %.2f\\n\",\n \t\t\t\t\tlcore,\n-\t\t\t\t\t(unsigned) port,\n+\t\t\t\t\tport,\n \t\t\t\t\t((double) lp->tx.nic_ports_count[port]) / ((double) lp->tx.nic_ports_iters[port]));\n \t\t\t\tlp->tx.nic_ports_iters[port] = 0;\n \t\t\t\tlp->tx.nic_ports_count[port] = 0;\n@@ -418,7 +418,7 @@ app_lcore_io_tx(\n static inline void\n app_lcore_io_tx_flush(struct app_lcore_params_io *lp)\n {\n-\tuint8_t port;\n+\tuint16_t port;\n \tuint32_t i;\n \n \tfor (i = 0; i < lp->tx.n_nic_ports; i++) {\n@@ -569,7 +569,7 @@ app_lcore_worker(\n \t\t\tif (lp->rings_out_iters[port] == APP_STATS){\n \t\t\t\tprintf(\"\\t\\tWorker %u out (NIC port %u): enq success rate = %.2f\\n\",\n \t\t\t\t\t(unsigned) lp->worker_id,\n-\t\t\t\t\t(unsigned) port,\n+\t\t\t\t\tport,\n \t\t\t\t\t((double) lp->rings_out_count[port]) / ((double) lp->rings_out_iters[port]));\n \t\t\t\tlp->rings_out_iters[port] = 0;\n \t\t\t\tlp->rings_out_count[port] = 0;\ndiff --git a/examples/multi_process/client_server_mp/mp_client/client.c b/examples/multi_process/client_server_mp/mp_client/client.c\nindex f8453e57a..075e0fe75 100644\n--- a/examples/multi_process/client_server_mp/mp_client/client.c\n+++ b/examples/multi_process/client_server_mp/mp_client/client.c\n@@ -74,7 +74,7 @@ static uint8_t client_id = 0;\n #define MBQ_CAPACITY 32\n \n /* maps input ports to output ports for packets */\n-static uint8_t output_ports[RTE_MAX_ETHPORTS];\n+static uint16_t output_ports[RTE_MAX_ETHPORTS];\n \n /* buffers up a set of packet that are ready to send */\n struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];\n@@ -150,7 +150,7 @@ static void\n flush_tx_error_callback(struct rte_mbuf **unsent, uint16_t count,\n \t\tvoid *userdata) {\n \tint i;\n-\tuint8_t port_id = (uintptr_t)userdata;\n+\tuint16_t port_id = (uintptr_t)userdata;\n \n \ttx_stats->tx_drop[port_id] += count;\n \n@@ -161,7 +161,7 @@ flush_tx_error_callback(struct rte_mbuf **unsent, uint16_t count,\n }\n \n static void\n-configure_tx_buffer(uint8_t port_id, uint16_t size)\n+configure_tx_buffer(uint16_t port_id, uint16_t size)\n {\n \tint ret;\n \n@@ -171,15 +171,16 @@ configure_tx_buffer(uint8_t port_id, uint16_t size)\n \t\t\trte_eth_dev_socket_id(port_id));\n \tif (tx_buffer[port_id] == NULL)\n \t\trte_exit(EXIT_FAILURE, \"Cannot allocate buffer for tx on port %u\\n\",\n-\t\t\t\t(unsigned) port_id);\n+\t\t\t port_id);\n \n \trte_eth_tx_buffer_init(tx_buffer[port_id], size);\n \n \tret = rte_eth_tx_buffer_set_err_callback(tx_buffer[port_id],\n \t\t\tflush_tx_error_callback, (void *)(intptr_t)port_id);\n \tif (ret < 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"Cannot set error callback for \"\n-\t\t\t\t\t\"tx buffer on port %u\\n\", (unsigned) port_id);\n+\t\trte_exit(EXIT_FAILURE,\n+\t\t\"Cannot set error callback for tx buffer on port %u\\n\",\n+\t\t\t port_id);\n }\n \n /*\n@@ -193,10 +194,10 @@ configure_output_ports(const struct port_info *ports)\n \tint i;\n \tif (ports->num_ports > RTE_MAX_ETHPORTS)\n \t\trte_exit(EXIT_FAILURE, \"Too many ethernet ports. RTE_MAX_ETHPORTS = %u\\n\",\n-\t\t\t\t(unsigned)RTE_MAX_ETHPORTS);\n-\tfor (i = 0; i < ports->num_ports - 1; i+=2){\n-\t\tuint8_t p1 = ports->id[i];\n-\t\tuint8_t p2 = ports->id[i+1];\n+\t\t\t RTE_MAX_ETHPORTS);\n+\tfor (i = 0; i < ports->num_ports - 1; i += 2) {\n+\t\tuint16_t p1 = ports->id[i];\n+\t\tuint16_t p2 = ports->id[i + 1];\n \t\toutput_ports[p1] = p2;\n \t\toutput_ports[p2] = p1;\n \ndiff --git a/examples/multi_process/client_server_mp/mp_server/args.c b/examples/multi_process/client_server_mp/mp_server/args.c\nindex bf8c666c2..a65884fd9 100644\n--- a/examples/multi_process/client_server_mp/mp_server/args.c\n+++ b/examples/multi_process/client_server_mp/mp_server/args.c\n@@ -74,7 +74,7 @@ parse_portmask(uint8_t max_ports, const char *portmask)\n {\n \tchar *end = NULL;\n \tunsigned long pm;\n-\tuint8_t count = 0;\n+\tuint16_t count = 0;\n \n \tif (portmask == NULL || *portmask == '\\0')\n \t\treturn -1;\n@@ -128,7 +128,7 @@ parse_num_clients(const char *clients)\n  * on error.\n  */\n int\n-parse_app_args(uint8_t max_ports, int argc, char *argv[])\n+parse_app_args(uint16_t max_ports, int argc, char *argv[])\n {\n \tint option_index, opt;\n \tchar **argvopt = argv;\ndiff --git a/examples/multi_process/client_server_mp/mp_server/args.h b/examples/multi_process/client_server_mp/mp_server/args.h\nindex 23af1bd38..33888b894 100644\n--- a/examples/multi_process/client_server_mp/mp_server/args.h\n+++ b/examples/multi_process/client_server_mp/mp_server/args.h\n@@ -34,6 +34,6 @@\n #ifndef _ARGS_H_\n #define _ARGS_H_\n \n-int parse_app_args(uint8_t max_ports, int argc, char *argv[]);\n+int parse_app_args(uint16_t max_ports, int argc, char *argv[]);\n \n #endif /* ifndef _ARGS_H_ */\ndiff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c\nindex 0bc929217..cacf4e0d5 100644\n--- a/examples/multi_process/client_server_mp/mp_server/init.c\n+++ b/examples/multi_process/client_server_mp/mp_server/init.c\n@@ -114,7 +114,7 @@ init_mbuf_pools(void)\n  * - start the port and report its status to stdout\n  */\n static int\n-init_port(uint8_t port_num)\n+init_port(uint16_t port_num)\n {\n \t/* for port configuration all features are off by default */\n \tconst struct rte_eth_conf port_conf = {\n@@ -129,7 +129,7 @@ init_port(uint8_t port_num)\n \tuint16_t q;\n \tint retval;\n \n-\tprintf(\"Port %u init ... \", (unsigned)port_num);\n+\tprintf(\"Port %u init ... \", port_num);\n \tfflush(stdout);\n \n \t/* Standard DPDK port initialisation - config port, then set up\n@@ -200,11 +200,12 @@ init_shm_rings(void)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -262,7 +263,7 @@ init(int argc, char *argv[])\n {\n \tint retval;\n \tconst struct rte_memzone *mz;\n-\tuint8_t i, total_ports;\n+\tuint16_t i, total_ports;\n \n \t/* init EAL, parsing EAL args */\n \tretval = rte_eal_init(argc, argv);\ndiff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c\nindex 7055b543a..121383f8c 100644\n--- a/examples/multi_process/client_server_mp/mp_server/main.c\n+++ b/examples/multi_process/client_server_mp/mp_server/main.c\n@@ -88,7 +88,7 @@ struct client_rx_buf {\n static struct client_rx_buf *cl_rx_buf;\n \n static const char *\n-get_printable_mac_addr(uint8_t port)\n+get_printable_mac_addr(uint16_t port)\n {\n \tstatic const char err_address[] = \"00:00:00:00:00:00\";\n \tstatic char addresses[RTE_MAX_ETHPORTS][sizeof(err_address)];\ndiff --git a/examples/multi_process/client_server_mp/shared/common.h b/examples/multi_process/client_server_mp/shared/common.h\nindex 631c46325..35a3b01d0 100644\n--- a/examples/multi_process/client_server_mp/shared/common.h\n+++ b/examples/multi_process/client_server_mp/shared/common.h\n@@ -57,8 +57,8 @@ struct tx_stats{\n } __rte_cache_aligned;\n \n struct port_info {\n-\tuint8_t num_ports;\n-\tuint8_t id[RTE_MAX_ETHPORTS];\n+\tuint16_t num_ports;\n+\tuint16_t id[RTE_MAX_ETHPORTS];\n \tvolatile struct rx_stats rx_stats;\n \tvolatile struct tx_stats tx_stats[MAX_CLIENTS];\n };\ndiff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c\nindex f8a626ba7..5d7a9566c 100644\n--- a/examples/multi_process/l2fwd_fork/main.c\n+++ b/examples/multi_process/l2fwd_fork/main.c\n@@ -140,7 +140,8 @@ struct lcore_resource_struct {\n \t/* ring[1] for slave send ack, master read */\n \tstruct rte_ring *ring[2];\n \tint port_num;\t\t\t\t\t/* Total port numbers */\n-\tuint8_t port[RTE_MAX_ETHPORTS]; /* Port id for that lcore to receive packets */\n+\t/* Port id for that lcore to receive packets */\n+\tuint16_t port[RTE_MAX_ETHPORTS];\n }__attribute__((packed)) __rte_cache_aligned;\n \n static struct lcore_resource_struct lcore_resource[RTE_MAX_LCORE];\n@@ -871,11 +872,12 @@ l2fwd_parse_args(int argc, char **argv)\n \n /* Check the link status of all ports in up to 9s, and print them finally */\n static void\n-check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n+check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -930,9 +932,9 @@ main(int argc, char **argv)\n \tstruct lcore_queue_conf *qconf;\n \tstruct rte_eth_dev_info dev_info;\n \tint ret;\n-\tuint8_t nb_ports;\n-\tuint8_t nb_ports_available;\n-\tuint8_t portid, last_port;\n+\tuint16_t nb_ports;\n+\tuint16_t nb_ports_available;\n+\tuint16_t portid, last_port;\n \tunsigned rx_lcore_id;\n \tunsigned nb_ports_in_mask = 0;\n \tunsigned i;\ndiff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c\nindex af2d9f3f7..98fbd74d1 100644\n--- a/examples/netmap_compat/lib/compat_netmap.c\n+++ b/examples/netmap_compat/lib/compat_netmap.c\n@@ -129,7 +129,7 @@ static void netmap_unregif(uint32_t idx, uint32_t port);\n \n \n static int32_t\n-ifname_to_portid(const char *ifname, uint8_t *port)\n+ifname_to_portid(const char *ifname, uint16_t *port)\n {\n \tchar *endptr;\n \tuint64_t portid;\n@@ -140,7 +140,7 @@ ifname_to_portid(const char *ifname, uint8_t *port)\n \t\t\tportid >= RTE_DIM(ports) || errno != 0)\n \t\treturn -EINVAL;\n \n-\t*port = (uint8_t)portid;\n+\t*port = portid;\n \treturn 0;\n }\n \n@@ -222,10 +222,10 @@ fd_release(int32_t fd)\n }\n \n static int\n-check_nmreq(struct nmreq *req, uint8_t *port)\n+check_nmreq(struct nmreq *req, uint16_t *port)\n {\n \tint32_t rc;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \n \tif (req == NULL)\n \t\treturn -EINVAL;\n@@ -242,7 +242,7 @@ check_nmreq(struct nmreq *req, uint8_t *port)\n \t}\n \n \tif (ports[portid].pool == NULL) {\n-\t    \tRTE_LOG(ERR, USER1, \"Misconfigured portid %hhu\\n\", portid);\n+\t\tRTE_LOG(ERR, USER1, \"Misconfigured portid %u\\n\", portid);\n \t\treturn -EINVAL;\n \t}\n \n@@ -262,7 +262,7 @@ check_nmreq(struct nmreq *req, uint8_t *port)\n static int\n ioctl_niocginfo(__rte_unused int fd, void * param)\n {\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tstruct nmreq *req;\n \tint32_t rc;\n \n@@ -283,7 +283,7 @@ ioctl_niocginfo(__rte_unused int fd, void * param)\n }\n \n static void\n-netmap_ring_setup(struct netmap_ring *ring, uint8_t port, uint32_t ringid,\n+netmap_ring_setup(struct netmap_ring *ring, uint16_t port, uint32_t ringid,\n \tuint32_t num_slots)\n {\n \tuint32_t j;\n@@ -305,7 +305,7 @@ netmap_ring_setup(struct netmap_ring *ring, uint8_t port, uint32_t ringid,\n }\n \n static int\n-netmap_regif(struct nmreq *req, uint32_t idx, uint8_t port)\n+netmap_regif(struct nmreq *req, uint32_t idx, uint16_t port)\n {\n \tstruct netmap_if *nmif;\n \tstruct netmap_ring *ring;\n@@ -313,7 +313,7 @@ netmap_regif(struct nmreq *req, uint32_t idx, uint8_t port)\n \tint32_t rc;\n \n \tif (ports[port].fd < RTE_DIM(fd_port)) {\n-\t    \tRTE_LOG(ERR, USER1, \"port %hhu already in use by fd: %u\\n\",\n+\t\tRTE_LOG(ERR, USER1, \"port %u already in use by fd: %u\\n\",\n \t\t\tport, IDX_TO_FD(ports[port].fd));\n \t\treturn -EBUSY;\n \t}\n@@ -399,7 +399,7 @@ netmap_regif(struct nmreq *req, uint32_t idx, uint8_t port)\n static int\n ioctl_niocregif(int32_t fd, void * param)\n {\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tint32_t rc;\n \tuint32_t idx;\n \tstruct nmreq *req;\n@@ -422,7 +422,7 @@ netmap_unregif(uint32_t idx, uint32_t port)\n {\n \tfd_port[idx].port = FD_PORT_RSRV;\n \tports[port].fd = UINT32_MAX;\n-\trte_eth_dev_stop((uint8_t)port);\n+\trte_eth_dev_stop(port);\n }\n \n /**\n@@ -460,7 +460,7 @@ ioctl_niocunregif(int fd)\n  * packets as it can hold coming from its dpdk port.\n  */\n static inline int\n-rx_sync_ring(struct netmap_ring *ring, uint8_t port, uint16_t ring_number,\n+rx_sync_ring(struct netmap_ring *ring, uint16_t port, uint16_t ring_number,\n \tuint16_t max_burst)\n {\n \tint32_t i, n_rx;\n@@ -513,7 +513,7 @@ rx_sync_if(uint32_t port)\n \n \tfor (i = 0; i < nifp->ni_rx_rings + 1; i++) {\n \t\tr = NETMAP_RXRING(nifp, i);\n-\t\trx_sync_ring(r, (uint8_t)port, (uint16_t)i, burst);\n+\t\trx_sync_ring(r, port, (uint16_t)i, burst);\n \t\trc += r->avail;\n \t}\n \n@@ -542,7 +542,7 @@ ioctl_niocrxsync(int fd)\n  * buffers into rte_mbufs and sending them out on the rings's dpdk port.\n  */\n static int\n-tx_sync_ring(struct netmap_ring *ring, uint8_t port, uint16_t ring_number,\n+tx_sync_ring(struct netmap_ring *ring, uint16_t port, uint16_t ring_number,\n \tstruct rte_mempool *pool, uint16_t max_burst)\n {\n \tuint32_t i, n_tx;\n@@ -608,7 +608,7 @@ tx_sync_if(uint32_t port)\n \n \tfor (i = 0; i < nifp->ni_tx_rings + 1; i++) {\n \t\tr = NETMAP_TXRING(nifp, i);\n-\t\ttx_sync_ring(r, (uint8_t)port, (uint16_t)i, mp, burst);\n+\t\ttx_sync_ring(r, port, (uint16_t)i, mp, burst);\n \t\trc += r->avail;\n \t}\n \n@@ -686,7 +686,7 @@ rte_netmap_init(const struct rte_netmap_conf *conf)\n \n \n int\n-rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)\n+rte_netmap_init_port(uint16_t portid, const struct rte_netmap_port_conf *conf)\n {\n \tint32_t ret;\n \tuint16_t i;\n@@ -696,17 +696,17 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)\n \t\t\tportid >= RTE_DIM(ports) ||\n \t\t\tconf->nr_tx_rings > netmap.conf.max_rings ||\n \t\t\tconf->nr_rx_rings > netmap.conf.max_rings) {\n-\t\tRTE_LOG(ERR, USER1, \"%s(%hhu): invalid parameters\\n\",\n+\t\tRTE_LOG(ERR, USER1, \"%s(%u): invalid parameters\\n\",\n \t\t\t__func__, portid);\n \t\treturn -EINVAL;\n \t}\n \n-\t\trx_slots = (uint16_t)rte_align32pow2(conf->nr_rx_slots);\n-\t\ttx_slots = (uint16_t)rte_align32pow2(conf->nr_tx_slots);\n+\trx_slots = (uint16_t)rte_align32pow2(conf->nr_rx_slots);\n+\ttx_slots = (uint16_t)rte_align32pow2(conf->nr_tx_slots);\n \n \tif (tx_slots > netmap.conf.max_slots ||\n \t\t\trx_slots > netmap.conf.max_slots) {\n-\t\tRTE_LOG(ERR, USER1, \"%s(%hhu): invalid parameters\\n\",\n+\t\tRTE_LOG(ERR, USER1, \"%s(%u): invalid parameters\\n\",\n \t\t\t__func__, portid);\n \t\treturn -EINVAL;\n \t}\n@@ -715,15 +715,15 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)\n \t\tconf->nr_tx_rings, conf->eth_conf);\n \n \tif (ret < 0) {\n-\t    RTE_LOG(ERR, USER1, \"Couldn't configure port %hhu\\n\", portid);\n-\t    return ret;\n+\t\tRTE_LOG(ERR, USER1, \"Couldn't configure port %u\\n\", portid);\n+\t\treturn ret;\n \t}\n \n \tret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &rx_slots, &tx_slots);\n \n \tif (ret < 0) {\n \t\tRTE_LOG(ERR, USER1,\n-\t\t\t\"Couldn't ot adjust number of descriptors for port %hhu\\n\",\n+\t\t\t\"Couldn't ot adjust number of descriptors for port %u\\n\",\n \t\t\tportid);\n \t\treturn ret;\n \t}\n@@ -734,8 +734,7 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)\n \n \t\tif (ret < 0) {\n \t\t\tRTE_LOG(ERR, USER1,\n-\t\t\t\t\"Couldn't configure TX queue %\"PRIu16\" of \"\n-\t\t\t\t\"port %\"PRIu8\"\\n\",\n+\t\t\t\t\"fail to configure TX queue %u of port %u\\n\",\n \t\t\t\ti, portid);\n \t\t\treturn ret;\n \t\t}\n@@ -745,8 +744,7 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)\n \n \t\tif (ret < 0) {\n \t\t\tRTE_LOG(ERR, USER1,\n-\t\t\t\t\"Couldn't configure RX queue %\"PRIu16\" of \"\n-\t\t\t\t\"port %\"PRIu8\"\\n\",\n+\t\t\t\t\"fail to configure RX queue %u of port %u\\n\",\n \t\t\t\ti, portid);\n \t\t\treturn ret;\n \t\t}\ndiff --git a/examples/netmap_compat/lib/compat_netmap.h b/examples/netmap_compat/lib/compat_netmap.h\nindex 3dc7a2f40..76b2d2b4c 100644\n--- a/examples/netmap_compat/lib/compat_netmap.h\n+++ b/examples/netmap_compat/lib/compat_netmap.h\n@@ -67,7 +67,7 @@ struct rte_netmap_port_conf {\n };\n \n int rte_netmap_init(const struct rte_netmap_conf *conf);\n-int rte_netmap_init_port(uint8_t portid,\n+int rte_netmap_init_port(uint16_t portid,\n \tconst struct rte_netmap_port_conf *conf);\n \n int rte_netmap_close(int fd);\ndiff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c\nindex b26c33df5..3add7be47 100644\n--- a/examples/packet_ordering/main.c\n+++ b/examples/packet_ordering/main.c\n@@ -269,21 +269,22 @@ configure_tx_buffers(struct rte_eth_dev_tx_buffer *tx_buffer[])\n \t\t\t\trte_eth_dev_socket_id(port_id));\n \t\tif (tx_buffer[port_id] == NULL)\n \t\t\trte_exit(EXIT_FAILURE, \"Cannot allocate buffer for tx on port %u\\n\",\n-\t\t\t\t\t(unsigned) port_id);\n+\t\t\t\t port_id);\n \n \t\trte_eth_tx_buffer_init(tx_buffer[port_id], MAX_PKTS_BURST);\n \n \t\tret = rte_eth_tx_buffer_set_err_callback(tx_buffer[port_id],\n \t\t\t\tflush_tx_error_callback, NULL);\n \t\tif (ret < 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"Cannot set error callback for \"\n-\t\t\t\t\t\"tx buffer on port %u\\n\", (unsigned) port_id);\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\"Cannot set error callback for tx buffer on port %u\\n\",\n+\t\t\t\t port_id);\n \t}\n \treturn 0;\n }\n \n static inline int\n-configure_eth_port(uint8_t port_id)\n+configure_eth_port(uint16_t port_id)\n {\n \tstruct ether_addr addr;\n \tconst uint16_t rxRings = 1, txRings = 1;\n@@ -326,7 +327,7 @@ configure_eth_port(uint8_t port_id)\n \trte_eth_macaddr_get(port_id, &addr);\n \tprintf(\"Port %u MAC: %02\"PRIx8\" %02\"PRIx8\" %02\"PRIx8\n \t\t\t\" %02\"PRIx8\" %02\"PRIx8\" %02\"PRIx8\"\\n\",\n-\t\t\t(unsigned)port_id,\n+\t\t\tport_id,\n \t\t\taddr.addr_bytes[0], addr.addr_bytes[1],\n \t\t\taddr.addr_bytes[2], addr.addr_bytes[3],\n \t\t\taddr.addr_bytes[4], addr.addr_bytes[5]);\n@@ -401,7 +402,7 @@ rx_thread(struct rte_ring *ring_out)\n \tuint32_t seqn = 0;\n \tuint16_t i, ret = 0;\n \tuint16_t nb_rx_pkts;\n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tstruct rte_mbuf *pkts[MAX_PKTS_BURST];\n \n \tRTE_LOG(INFO, REORDERAPP, \"%s() started on lcore %u\\n\", __func__,\n@@ -632,8 +633,8 @@ main(int argc, char **argv)\n \tint ret;\n \tunsigned nb_ports;\n \tunsigned int lcore_id, last_lcore_id, master_lcore_id;\n-\tuint8_t port_id;\n-\tuint8_t nb_ports_available;\n+\tuint16_t port_id;\n+\tuint16_t nb_ports_available;\n \tstruct worker_thread_args worker_args = {NULL, NULL};\n \tstruct send_thread_args send_args = {NULL, NULL};\n \tstruct rte_ring *rx_to_workers;\n@@ -687,7 +688,7 @@ main(int argc, char **argv)\n \t\t\tcontinue;\n \t\t}\n \t\t/* init port */\n-\t\tprintf(\"Initializing port %u... done\\n\", (unsigned) port_id);\n+\t\tprintf(\"Initializing port %u... done\\n\", port_id);\n \n \t\tif (configure_eth_port(port_id) != 0)\n \t\t\trte_exit(EXIT_FAILURE, \"Cannot initialize port %\"PRIu8\"\\n\",\ndiff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c\nindex 7954b9744..521a4af0e 100644\n--- a/examples/performance-thread/l3fwd-thread/main.c\n+++ b/examples/performance-thread/l3fwd-thread/main.c\n@@ -140,7 +140,7 @@ parse_ptype(struct rte_mbuf *m)\n }\n \n static uint16_t\n-cb_parse_ptype(__rte_unused uint8_t port, __rte_unused uint16_t queue,\n+cb_parse_ptype(__rte_unused uint16_t port, __rte_unused uint16_t queue,\n \t\tstruct rte_mbuf *pkts[], uint16_t nb_pkts,\n \t\t__rte_unused uint16_t max_pkts, __rte_unused void *user_param)\n {\n@@ -277,7 +277,7 @@ struct mbuf_table {\n };\n \n struct lcore_rx_queue {\n-\tuint8_t port_id;\n+\tuint32_t port_id;\n \tuint8_t queue_id;\n } __rte_cache_aligned;\n \n@@ -287,7 +287,7 @@ struct lcore_rx_queue {\n \n #define MAX_LCORE_PARAMS       1024\n struct rx_thread_params {\n-\tuint8_t port_id;\n+\tuint32_t port_id;\n \tuint8_t queue_id;\n \tuint8_t lcore_id;\n \tuint8_t thread_id;\n@@ -636,7 +636,7 @@ struct thread_tx_conf {\n \tstruct thread_conf conf;\n \n \tuint16_t tx_queue_id[RTE_MAX_LCORE];\n-\tstruct mbuf_table tx_mbufs[RTE_MAX_LCORE];\n+\tstruct mbuf_table tx_mbufs[RTE_MAX_ETHPORTS];\n \n \tstruct rte_ring *ring;\n \tstruct lthread_cond **ready;\n@@ -648,7 +648,7 @@ struct thread_tx_conf tx_thread[MAX_TX_THREAD];\n \n /* Send burst of packets on an output interface */\n static inline int\n-send_burst(struct thread_tx_conf *qconf, uint16_t n, uint8_t port)\n+send_burst(struct thread_tx_conf *qconf, uint16_t n, uint16_t port)\n {\n \tstruct rte_mbuf **m_table;\n \tint ret;\n@@ -669,7 +669,7 @@ send_burst(struct thread_tx_conf *qconf, uint16_t n, uint8_t port)\n \n /* Enqueue a single packet, and send burst if queue is filled */\n static inline int\n-send_single_packet(struct rte_mbuf *m, uint8_t port)\n+send_single_packet(struct rte_mbuf *m, uint16_t port)\n {\n \tuint16_t len;\n \tstruct thread_tx_conf *qconf;\n@@ -696,8 +696,7 @@ send_single_packet(struct rte_mbuf *m, uint8_t port)\n #if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \\\n \t(ENABLE_MULTI_BUFFER_OPTIMIZE == 1))\n static __rte_always_inline void\n-send_packetsx4(uint8_t port,\n-\tstruct rte_mbuf *m[], uint32_t num)\n+send_packetsx4(uint16_t port, struct rte_mbuf *m[], uint32_t num)\n {\n \tuint32_t len, j, n;\n \tstruct thread_tx_conf *qconf;\n@@ -832,9 +831,9 @@ is_valid_ipv4_pkt(struct ipv4_hdr *pkt, uint32_t link_len)\n static __m128i mask0;\n static __m128i mask1;\n static __m128i mask2;\n-static inline uint8_t\n-get_ipv4_dst_port(void *ipv4_hdr, uint8_t portid,\n-\t\tlookup_struct_t *ipv4_l3fwd_lookup_struct)\n+static inline uint16_t\n+get_ipv4_dst_port(void *ipv4_hdr, uint16_t portid,\n+\t\t  lookup_struct_t *ipv4_l3fwd_lookup_struct)\n {\n \tint ret = 0;\n \tunion ipv4_5tuple_host key;\n@@ -846,12 +845,12 @@ get_ipv4_dst_port(void *ipv4_hdr, uint8_t portid,\n \tkey.xmm = _mm_and_si128(data, mask0);\n \t/* Find destination port */\n \tret = rte_hash_lookup(ipv4_l3fwd_lookup_struct, (const void *)&key);\n-\treturn (uint8_t)((ret < 0) ? portid : ipv4_l3fwd_out_if[ret]);\n+\treturn ((ret < 0) ? portid : ipv4_l3fwd_out_if[ret]);\n }\n \n-static inline uint8_t\n-get_ipv6_dst_port(void *ipv6_hdr, uint8_t portid,\n-\t\tlookup_struct_t *ipv6_l3fwd_lookup_struct)\n+static inline uint16_t\n+get_ipv6_dst_port(void *ipv6_hdr, uint16_t portid,\n+\t\t  lookup_struct_t *ipv6_l3fwd_lookup_struct)\n {\n \tint ret = 0;\n \tunion ipv6_5tuple_host key;\n@@ -873,36 +872,36 @@ get_ipv6_dst_port(void *ipv6_hdr, uint8_t portid,\n \n \t/* Find destination port */\n \tret = rte_hash_lookup(ipv6_l3fwd_lookup_struct, (const void *)&key);\n-\treturn (uint8_t)((ret < 0) ? portid : ipv6_l3fwd_out_if[ret]);\n+\treturn ((ret < 0) ? portid : ipv6_l3fwd_out_if[ret]);\n }\n #endif\n \n #if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM)\n \n-static inline uint8_t\n-get_ipv4_dst_port(void *ipv4_hdr, uint8_t portid,\n+static inline uint16_t\n+get_ipv4_dst_port(void *ipv4_hdr, uint16_t portid,\n \t\tlookup_struct_t *ipv4_l3fwd_lookup_struct)\n {\n \tuint32_t next_hop;\n \n-\treturn (uint8_t)((rte_lpm_lookup(ipv4_l3fwd_lookup_struct,\n+\treturn ((rte_lpm_lookup(ipv4_l3fwd_lookup_struct,\n \t\trte_be_to_cpu_32(((struct ipv4_hdr *)ipv4_hdr)->dst_addr),\n \t\t&next_hop) == 0) ? next_hop : portid);\n }\n \n-static inline uint8_t\n-get_ipv6_dst_port(void *ipv6_hdr,  uint8_t portid,\n-\t\tlookup6_struct_t *ipv6_l3fwd_lookup_struct)\n+static inline uint16_t\n+get_ipv6_dst_port(void *ipv6_hdr,  uint16_t portid,\n+\t\t  lookup6_struct_t *ipv6_l3fwd_lookup_struct)\n {\n \tuint32_t next_hop;\n \n-\treturn (uint8_t) ((rte_lpm6_lookup(ipv6_l3fwd_lookup_struct,\n-\t\t\t((struct ipv6_hdr *)ipv6_hdr)->dst_addr, &next_hop) == 0) ?\n-\t\t\tnext_hop : portid);\n+\treturn ((rte_lpm6_lookup(ipv6_l3fwd_lookup_struct,\n+\t\t((struct ipv6_hdr *)ipv6_hdr)->dst_addr, &next_hop) == 0) ?\n+\t\tnext_hop : portid);\n }\n #endif\n \n-static inline void l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid)\n+static inline void l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid)\n \t\t__attribute__((unused));\n \n #if ((APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH) && \\\n@@ -919,11 +918,11 @@ static inline void l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid)\n #define EXCLUDE_8TH_PKT 0x7f\n \n static inline void\n-simple_ipv4_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid)\n+simple_ipv4_fwd_8pkts(struct rte_mbuf *m[8], uint16_t portid)\n {\n \tstruct ether_hdr *eth_hdr[8];\n \tstruct ipv4_hdr *ipv4_hdr[8];\n-\tuint8_t dst_port[8];\n+\tuint16_t dst_port[8];\n \tint32_t ret[8];\n \tunion ipv4_5tuple_host key[8];\n \t__m128i data[8];\n@@ -1042,14 +1041,14 @@ simple_ipv4_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid)\n \n \trte_hash_lookup_bulk(RTE_PER_LCORE(lcore_conf)->ipv4_lookup_struct,\n \t\t\t&key_array[0], 8, ret);\n-\tdst_port[0] = (uint8_t) ((ret[0] < 0) ? portid : ipv4_l3fwd_out_if[ret[0]]);\n-\tdst_port[1] = (uint8_t) ((ret[1] < 0) ? portid : ipv4_l3fwd_out_if[ret[1]]);\n-\tdst_port[2] = (uint8_t) ((ret[2] < 0) ? portid : ipv4_l3fwd_out_if[ret[2]]);\n-\tdst_port[3] = (uint8_t) ((ret[3] < 0) ? portid : ipv4_l3fwd_out_if[ret[3]]);\n-\tdst_port[4] = (uint8_t) ((ret[4] < 0) ? portid : ipv4_l3fwd_out_if[ret[4]]);\n-\tdst_port[5] = (uint8_t) ((ret[5] < 0) ? portid : ipv4_l3fwd_out_if[ret[5]]);\n-\tdst_port[6] = (uint8_t) ((ret[6] < 0) ? portid : ipv4_l3fwd_out_if[ret[6]]);\n-\tdst_port[7] = (uint8_t) ((ret[7] < 0) ? portid : ipv4_l3fwd_out_if[ret[7]]);\n+\tdst_port[0] = ((ret[0] < 0) ? portid : ipv4_l3fwd_out_if[ret[0]]);\n+\tdst_port[1] = ((ret[1] < 0) ? portid : ipv4_l3fwd_out_if[ret[1]]);\n+\tdst_port[2] = ((ret[2] < 0) ? portid : ipv4_l3fwd_out_if[ret[2]]);\n+\tdst_port[3] = ((ret[3] < 0) ? portid : ipv4_l3fwd_out_if[ret[3]]);\n+\tdst_port[4] = ((ret[4] < 0) ? portid : ipv4_l3fwd_out_if[ret[4]]);\n+\tdst_port[5] = ((ret[5] < 0) ? portid : ipv4_l3fwd_out_if[ret[5]]);\n+\tdst_port[6] = ((ret[6] < 0) ? portid : ipv4_l3fwd_out_if[ret[6]]);\n+\tdst_port[7] = ((ret[7] < 0) ? portid : ipv4_l3fwd_out_if[ret[7]]);\n \n \tif (dst_port[0] >= RTE_MAX_ETHPORTS ||\n \t\t\t(enabled_port_mask & 1 << dst_port[0]) == 0)\n@@ -1146,10 +1145,10 @@ static inline void get_ipv6_5tuple(struct rte_mbuf *m0, __m128i mask0,\n }\n \n static inline void\n-simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid)\n+simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint16_t portid)\n {\n \tint32_t ret[8];\n-\tuint8_t dst_port[8];\n+\tuint16_t dst_port[8];\n \tstruct ether_hdr *eth_hdr[8];\n \tunion ipv6_5tuple_host key[8];\n \n@@ -1196,14 +1195,14 @@ simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid)\n \n \trte_hash_lookup_bulk(RTE_PER_LCORE(lcore_conf)->ipv6_lookup_struct,\n \t\t\t&key_array[0], 4, ret);\n-\tdst_port[0] = (uint8_t) ((ret[0] < 0) ? portid : ipv6_l3fwd_out_if[ret[0]]);\n-\tdst_port[1] = (uint8_t) ((ret[1] < 0) ? portid : ipv6_l3fwd_out_if[ret[1]]);\n-\tdst_port[2] = (uint8_t) ((ret[2] < 0) ? portid : ipv6_l3fwd_out_if[ret[2]]);\n-\tdst_port[3] = (uint8_t) ((ret[3] < 0) ? portid : ipv6_l3fwd_out_if[ret[3]]);\n-\tdst_port[4] = (uint8_t) ((ret[4] < 0) ? portid : ipv6_l3fwd_out_if[ret[4]]);\n-\tdst_port[5] = (uint8_t) ((ret[5] < 0) ? portid : ipv6_l3fwd_out_if[ret[5]]);\n-\tdst_port[6] = (uint8_t) ((ret[6] < 0) ? portid : ipv6_l3fwd_out_if[ret[6]]);\n-\tdst_port[7] = (uint8_t) ((ret[7] < 0) ? portid : ipv6_l3fwd_out_if[ret[7]]);\n+\tdst_port[0] = ((ret[0] < 0) ? portid : ipv6_l3fwd_out_if[ret[0]]);\n+\tdst_port[1] = ((ret[1] < 0) ? portid : ipv6_l3fwd_out_if[ret[1]]);\n+\tdst_port[2] = ((ret[2] < 0) ? portid : ipv6_l3fwd_out_if[ret[2]]);\n+\tdst_port[3] = ((ret[3] < 0) ? portid : ipv6_l3fwd_out_if[ret[3]]);\n+\tdst_port[4] = ((ret[4] < 0) ? portid : ipv6_l3fwd_out_if[ret[4]]);\n+\tdst_port[5] = ((ret[5] < 0) ? portid : ipv6_l3fwd_out_if[ret[5]]);\n+\tdst_port[6] = ((ret[6] < 0) ? portid : ipv6_l3fwd_out_if[ret[6]]);\n+\tdst_port[7] = ((ret[7] < 0) ? portid : ipv6_l3fwd_out_if[ret[7]]);\n \n \tif (dst_port[0] >= RTE_MAX_ETHPORTS ||\n \t\t\t(enabled_port_mask & 1 << dst_port[0]) == 0)\n@@ -1250,24 +1249,24 @@ simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid)\n \tether_addr_copy(&ports_eth_addr[dst_port[6]], &eth_hdr[6]->s_addr);\n \tether_addr_copy(&ports_eth_addr[dst_port[7]], &eth_hdr[7]->s_addr);\n \n-\tsend_single_packet(m[0], (uint8_t)dst_port[0]);\n-\tsend_single_packet(m[1], (uint8_t)dst_port[1]);\n-\tsend_single_packet(m[2], (uint8_t)dst_port[2]);\n-\tsend_single_packet(m[3], (uint8_t)dst_port[3]);\n-\tsend_single_packet(m[4], (uint8_t)dst_port[4]);\n-\tsend_single_packet(m[5], (uint8_t)dst_port[5]);\n-\tsend_single_packet(m[6], (uint8_t)dst_port[6]);\n-\tsend_single_packet(m[7], (uint8_t)dst_port[7]);\n+\tsend_single_packet(m[0], dst_port[0]);\n+\tsend_single_packet(m[1], dst_port[1]);\n+\tsend_single_packet(m[2], dst_port[2]);\n+\tsend_single_packet(m[3], dst_port[3]);\n+\tsend_single_packet(m[4], dst_port[4]);\n+\tsend_single_packet(m[5], dst_port[5]);\n+\tsend_single_packet(m[6], dst_port[6]);\n+\tsend_single_packet(m[7], dst_port[7]);\n \n }\n #endif /* APP_LOOKUP_METHOD */\n \n static __rte_always_inline void\n-l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid)\n+l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid)\n {\n \tstruct ether_hdr *eth_hdr;\n \tstruct ipv4_hdr *ipv4_hdr;\n-\tuint8_t dst_port;\n+\tuint16_t dst_port;\n \n \teth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);\n \n@@ -1379,7 +1378,7 @@ rfc1812_process(struct ipv4_hdr *ipv4_hdr, uint16_t *dp, uint32_t ptype)\n \t(ENABLE_MULTI_BUFFER_OPTIMIZE == 1))\n \n static __rte_always_inline uint16_t\n-get_dst_port(struct rte_mbuf *pkt, uint32_t dst_ipv4, uint8_t portid)\n+get_dst_port(struct rte_mbuf *pkt, uint32_t dst_ipv4, uint16_t portid)\n {\n \tuint32_t next_hop;\n \tstruct ipv6_hdr *ipv6_hdr;\n@@ -1406,7 +1405,7 @@ get_dst_port(struct rte_mbuf *pkt, uint32_t dst_ipv4, uint8_t portid)\n }\n \n static inline void\n-process_packet(struct rte_mbuf *pkt, uint16_t *dst_port, uint8_t portid)\n+process_packet(struct rte_mbuf *pkt, uint16_t *dst_port, uint16_t portid)\n {\n \tstruct ether_hdr *eth_hdr;\n \tstruct ipv4_hdr *ipv4_hdr;\n@@ -1473,7 +1472,7 @@ processx4_step1(struct rte_mbuf *pkt[FWDSTEP],\n static inline void\n processx4_step2(__m128i dip,\n \t\tuint32_t ipv4_flag,\n-\t\tuint8_t portid,\n+\t\tuint16_t portid,\n \t\tstruct rte_mbuf *pkt[FWDSTEP],\n \t\tuint16_t dprt[FWDSTEP])\n {\n@@ -1716,7 +1715,8 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, __m128i dp1, __m128i dp2)\n \n static void\n process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,\n-\t\tuint8_t portid) {\n+\t\tuint16_t portid)\n+{\n \n \tint j;\n \n@@ -2091,7 +2091,7 @@ lthread_tx(void *args)\n \tstruct lthread *lt;\n \n \tunsigned lcore_id;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tstruct thread_tx_conf *tx_conf;\n \n \ttx_conf = (struct thread_tx_conf *)args;\n@@ -2138,7 +2138,8 @@ lthread_rx(void *dummy)\n \tint ret;\n \tuint16_t nb_rx;\n \tint i;\n-\tuint8_t portid, queueid;\n+\tuint16_t portid;\n+\tuint8_t queueid;\n \tint worker_id;\n \tint len[RTE_MAX_LCORE] = { 0 };\n \tint old_len, new_len;\n@@ -2164,8 +2165,8 @@ lthread_rx(void *dummy)\n \n \t\tportid = rx_conf->rx_queue_list[i].port_id;\n \t\tqueueid = rx_conf->rx_queue_list[i].queue_id;\n-\t\tRTE_LOG(INFO, L3FWD, \" -- lcoreid=%u portid=%hhu rxqueueid=%hhu\\n\",\n-\t\t\t\trte_lcore_id(), portid, queueid);\n+\t\tRTE_LOG(INFO, L3FWD, \"-- lcoreid=%u portid=%u rxqueueid=%u\\n\",\n+\t\t\trte_lcore_id(), portid, queueid);\n \t}\n \n \t/*\n@@ -2323,7 +2324,7 @@ pthread_tx(void *dummy)\n \tstruct rte_mbuf *pkts_burst[MAX_PKT_BURST];\n \tuint64_t prev_tsc, diff_tsc, cur_tsc;\n \tint nb_rx;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tstruct thread_tx_conf *tx_conf;\n \n \tconst uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /\n@@ -2392,7 +2393,8 @@ pthread_rx(void *dummy)\n \tuint32_t n;\n \tuint32_t nb_rx;\n \tunsigned lcore_id;\n-\tuint8_t portid, queueid;\n+\tuint16_t portid;\n+\tuint8_t queueid;\n \tstruct rte_mbuf *pkts_burst[MAX_PKT_BURST];\n \n \tstruct thread_rx_conf *rx_conf;\n@@ -2411,8 +2413,9 @@ pthread_rx(void *dummy)\n \n \t\tportid = rx_conf->rx_queue_list[i].port_id;\n \t\tqueueid = rx_conf->rx_queue_list[i].queue_id;\n-\t\tRTE_LOG(INFO, L3FWD, \" -- lcoreid=%u portid=%hhu rxqueueid=%hhu\\n\",\n-\t\t\t\tlcore_id, portid, queueid);\n+\t\tRTE_LOG(INFO, L3FWD,\n+\t\t\t\" -- lcoreid=%u portid=%u rxqueueid=%hhu\\n\",\n+\t\t\tlcore_id, portid, queueid);\n \t}\n \n \tworker_id = 0;\n@@ -2769,7 +2772,7 @@ parse_rx_config(const char *q_arg)\n \t\t\treturn -1;\n \t\t}\n \t\trx_thread_params_array[nb_rx_thread_params].port_id =\n-\t\t\t\t(uint8_t)int_fld[FLD_PORT];\n+\t\t\t\tint_fld[FLD_PORT];\n \t\trx_thread_params_array[nb_rx_thread_params].queue_id =\n \t\t\t\t(uint8_t)int_fld[FLD_QUEUE];\n \t\trx_thread_params_array[nb_rx_thread_params].lcore_id =\n@@ -2853,7 +2856,7 @@ parse_stat_lcore(const char *stat_lcore)\n static void\n parse_eth_dest(const char *optarg)\n {\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tchar *port_end;\n \tuint8_t c, *dest, peer_addr[6];\n \n@@ -3440,7 +3443,8 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n {\n #define CHECK_INTERVAL 100 /* 100ms */\n #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint8_t portid, count, all_ports_up, print_flag = 0;\n+\tuint16_t portid;\n+\tuint8_t count, all_ports_up, print_flag = 0;\n \tstruct rte_eth_link link;\n \n \tprintf(\"\\nChecking link status\");\n@@ -3455,14 +3459,13 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)\n \t\t\t/* print link status if flag set */\n \t\t\tif (print_flag == 1) {\n \t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\"Port %d Link Up - speed %u \"\n-\t\t\t\t\t\t\"Mbps - %s\\n\", (uint8_t)portid,\n-\t\t\t\t\t\t(unsigned)link.link_speed,\n+\t\t\t\t\tprintf(\n+\t\t\t\t\t\"Port%d Link Up. Speed %u Mbps - %s\\n\",\n+\t\t\t\t\t\tportid, link.link_speed,\n \t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n \t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n \t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\",\n-\t\t\t\t\t\t(uint8_t)portid);\n+\t\t\t\t\tprintf(\"Port %d Link Down\\n\", portid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t/* clear all_ports_up flag if any link down */\n@@ -3497,10 +3500,11 @@ main(int argc, char **argv)\n \tint ret;\n \tint i;\n \tunsigned nb_ports;\n-\tuint16_t queueid;\n+\tuint16_t queueid, portid;\n \tunsigned lcore_id;\n \tuint32_t n_tx_queue, nb_lcores;\n-\tuint8_t portid, nb_rx_queue, queue, socketid;\n+\tuint8_t nb_rx_queue, queue, socketid;\n+\n \n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\ndiff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c\nindex ddfcdb832..c495e7508 100644\n--- a/examples/ptpclient/ptpclient.c\n+++ b/examples/ptpclient/ptpclient.c\n@@ -158,12 +158,12 @@ struct ptpv2_data_slave_ordinary {\n \tstruct clock_id master_clock_id;\n \tstruct timeval new_adj;\n \tint64_t delta;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tuint16_t seqID_SYNC;\n \tuint16_t seqID_FOLLOWUP;\n \tuint8_t ptpset;\n \tuint8_t kernel_time_set;\n-\tuint8_t current_ptp_port;\n+\tuint16_t current_ptp_port;\n };\n \n static struct ptpv2_data_slave_ordinary ptp_data;\ndiff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c\nindex 2350d64f4..203a34704 100644\n--- a/examples/qos_sched/args.c\n+++ b/examples/qos_sched/args.c\n@@ -252,8 +252,8 @@ app_parse_flow_conf(const char *conf_str)\n \n \tpconf = &qos_conf[nb_pfc];\n \n-\tpconf->rx_port = (uint8_t)vals[0];\n-\tpconf->tx_port = (uint8_t)vals[1];\n+\tpconf->rx_port = vals[0];\n+\tpconf->tx_port = vals[1];\n \tpconf->rx_core = (uint8_t)vals[2];\n \tpconf->wt_core = (uint8_t)vals[3];\n \tif (ret == 5)\n@@ -267,19 +267,19 @@ app_parse_flow_conf(const char *conf_str)\n \t}\n \n \tif (pconf->rx_port >= RTE_MAX_ETHPORTS) {\n-\t\tRTE_LOG(ERR, APP, \"pfc %u: invalid rx port %\"PRIu8\" index\\n\",\n+\t\tRTE_LOG(ERR, APP, \"pfc %u: invalid rx port %\"PRIu16\" index\\n\",\n \t\t\t\tnb_pfc, pconf->rx_port);\n \t\treturn -1;\n \t}\n \tif (pconf->tx_port >= RTE_MAX_ETHPORTS) {\n-\t\tRTE_LOG(ERR, APP, \"pfc %u: invalid tx port %\"PRIu8\" index\\n\",\n+\t\tRTE_LOG(ERR, APP, \"pfc %u: invalid tx port %\"PRIu16\" index\\n\",\n \t\t\t\tnb_pfc, pconf->tx_port);\n \t\treturn -1;\n \t}\n \n \tmask = 1lu << pconf->rx_port;\n \tif (app_used_rx_port_mask & mask) {\n-\t\tRTE_LOG(ERR, APP, \"pfc %u: rx port %\"PRIu8\" is used already\\n\",\n+\t\tRTE_LOG(ERR, APP, \"pfc %u: rx port %\"PRIu16\" is used already\\n\",\n \t\t\t\tnb_pfc, pconf->rx_port);\n \t\treturn -1;\n \t}\n@@ -288,7 +288,7 @@ app_parse_flow_conf(const char *conf_str)\n \n \tmask = 1lu << pconf->tx_port;\n \tif (app_used_tx_port_mask & mask) {\n-\t\tRTE_LOG(ERR, APP, \"pfc %u: port %\"PRIu8\" is used already\\n\",\n+\t\tRTE_LOG(ERR, APP, \"pfc %u: port %\"PRIu16\" is used already\\n\",\n \t\t\t\tnb_pfc, pconf->tx_port);\n \t\treturn -1;\n \t}\ndiff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c\nindex a82cbd7d5..004ac54e7 100644\n--- a/examples/qos_sched/init.c\n+++ b/examples/qos_sched/init.c\n@@ -100,7 +100,7 @@ static const struct rte_eth_conf port_conf = {\n };\n \n static int\n-app_init_port(uint8_t portid, struct rte_mempool *mp)\n+app_init_port(uint16_t portid, struct rte_mempool *mp)\n {\n \tint ret;\n \tstruct rte_eth_link link;\n@@ -127,19 +127,21 @@ app_init_port(uint8_t portid, struct rte_mempool *mp)\n \ttx_conf.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOOFFLOADS;\n \n \t/* init port */\n-\tRTE_LOG(INFO, APP, \"Initializing port %\"PRIu8\"... \", portid);\n+\tRTE_LOG(INFO, APP, \"Initializing port %\"PRIu16\"... \", portid);\n \tfflush(stdout);\n \tret = rte_eth_dev_configure(portid, 1, 1, &port_conf);\n \tif (ret < 0)\n-\t\trte_exit(EXIT_FAILURE, \"Cannot configure device: \"\n-\t\t\t\t\"err=%d, port=%\"PRIu8\"\\n\", ret, portid);\n+\t\trte_exit(EXIT_FAILURE,\n+\t\t\t \"Cannot configure device: err=%d, port=%u\\n\",\n+\t\t\t ret, portid);\n \n \trx_size = ring_conf.rx_size;\n \ttx_size = ring_conf.tx_size;\n \tret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &rx_size, &tx_size);\n \tif (ret < 0)\n-\t\trte_exit(EXIT_FAILURE, \"rte_eth_dev_adjust_nb_rx_tx_desc: \"\n-\t\t\t\t\"err=%d, port=%\"PRIu8\"\\n\", ret, portid);\n+\t\trte_exit(EXIT_FAILURE,\n+\t\t\t \"rte_eth_dev_adjust_nb_rx_tx_desc: err=%d,port=%u\\n\",\n+\t\t\t ret, portid);\n \tring_conf.rx_size = rx_size;\n \tring_conf.tx_size = tx_size;\n \n@@ -148,22 +150,25 @@ app_init_port(uint8_t portid, struct rte_mempool *mp)\n \tret = rte_eth_rx_queue_setup(portid, 0, (uint16_t)ring_conf.rx_size,\n \t\trte_eth_dev_socket_id(portid), &rx_conf, mp);\n \tif (ret < 0)\n-\t\trte_exit(EXIT_FAILURE, \"rte_eth_tx_queue_setup: \"\n-\t\t\t\t\"err=%d, port=%\"PRIu8\"\\n\", ret, portid);\n+\t\trte_exit(EXIT_FAILURE,\n+\t\t\t \"rte_eth_tx_queue_setup: err=%d, port=%u\\n\",\n+\t\t\t ret, portid);\n \n \t/* init one TX queue */\n \tfflush(stdout);\n \tret = rte_eth_tx_queue_setup(portid, 0,\n \t\t(uint16_t)ring_conf.tx_size, rte_eth_dev_socket_id(portid), &tx_conf);\n \tif (ret < 0)\n-\t\trte_exit(EXIT_FAILURE, \"rte_eth_tx_queue_setup: err=%d, \"\n-\t\t\t\t\"port=%\"PRIu8\" queue=%d\\n\", ret, portid, 0);\n+\t\trte_exit(EXIT_FAILURE,\n+\t\t\t \"rte_eth_tx_queue_setup: err=%d, port=%u queue=%d\\n\",\n+\t\t\t ret, portid, 0);\n \n \t/* Start device */\n \tret = rte_eth_dev_start(portid);\n \tif (ret < 0)\n-\t\trte_exit(EXIT_FAILURE, \"rte_pmd_port_start: \"\n-\t\t\t\t\"err=%d, port=%\"PRIu8\"\\n\", ret, portid);\n+\t\trte_exit(EXIT_FAILURE,\n+\t\t\t \"rte_pmd_port_start: err=%d, port=%u\\n\",\n+\t\t\t ret, portid);\n \n \tprintf(\"done: \");\n \n@@ -256,7 +261,7 @@ app_init_sched_port(uint32_t portid, uint32_t socketid)\n \tuint32_t pipe, subport;\n \tint err;\n \n-\trte_eth_link_get((uint8_t)portid, &link);\n+\trte_eth_link_get(portid, &link);\n \n \tport_params.socket = socketid;\n \tport_params.rate = (uint64_t) link.link_speed * 1000 * 1000 / 8;\ndiff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c\nindex e10cfd448..60caa8b77 100644\n--- a/examples/qos_sched/main.c\n+++ b/examples/qos_sched/main.c\n@@ -125,8 +125,7 @@ app_main_loop(__attribute__((unused))void *dummy)\n \t/* initialize mbuf memory */\n \tif (mode == APP_RX_MODE) {\n \t\tfor (i = 0; i < rx_idx; i++) {\n-\t\t\tRTE_LOG(INFO, APP, \"flow %u lcoreid %u \"\n-\t\t\t\t\t\"reading port %\"PRIu8\"\\n\",\n+\t\t\tRTE_LOG(INFO, APP, \"flow%u lcoreid%u reading port%u\\n\",\n \t\t\t\t\ti, lcore_id, rx_confs[i]->rx_port);\n \t\t}\n \n@@ -140,9 +139,9 @@ app_main_loop(__attribute__((unused))void *dummy)\n \t\t\tif (wt_confs[i]->m_table == NULL)\n \t\t\t\trte_panic(\"flow %u unable to allocate memory buffer\\n\", i);\n \n-\t\t\tRTE_LOG(INFO, APP, \"flow %u lcoreid %u sched+write \"\n-\t\t\t\t\t\"port %\"PRIu8\"\\n\",\n-\t\t\t\t\ti, lcore_id, wt_confs[i]->tx_port);\n+\t\t\tRTE_LOG(INFO, APP,\n+\t\t\t\t\"flow %u lcoreid %u sched+write port %u\\n\",\n+\t\t\t\ti, lcore_id, wt_confs[i]->tx_port);\n \t\t}\n \n \t\tapp_mixed_thread(wt_confs);\n@@ -155,9 +154,8 @@ app_main_loop(__attribute__((unused))void *dummy)\n \t\t\tif (tx_confs[i]->m_table == NULL)\n \t\t\t\trte_panic(\"flow %u unable to allocate memory buffer\\n\", i);\n \n-\t\t\tRTE_LOG(INFO, APP, \"flow %u lcoreid %u \"\n-\t\t\t\t\t\"writing port %\"PRIu8\"\\n\",\n-\t\t\t\t\ti, lcore_id, tx_confs[i]->tx_port);\n+\t\t\tRTE_LOG(INFO, APP, \"flow%u lcoreid%u write port%u\\n\",\n+\t\t\t\ti, lcore_id, tx_confs[i]->tx_port);\n \t\t}\n \n \t\tapp_tx_thread(tx_confs);\n@@ -186,7 +184,7 @@ app_stat(void)\n \t\tstruct flow_conf *flow = &qos_conf[i];\n \n \t\trte_eth_stats_get(flow->rx_port, &stats);\n-\t\tprintf(\"\\nRX port %\"PRIu8\": rx: %\"PRIu64 \" err: %\"PRIu64\n+\t\tprintf(\"\\nRX port %\"PRIu16\": rx: %\"PRIu64 \" err: %\"PRIu64\n \t\t\t\t\" no_mbuf: %\"PRIu64 \"\\n\",\n \t\t\t\tflow->rx_port,\n \t\t\t\tstats.ipackets - rx_stats[i].ipackets,\n@@ -195,7 +193,7 @@ app_stat(void)\n \t\tmemcpy(&rx_stats[i], &stats, sizeof(stats));\n \n \t\trte_eth_stats_get(flow->tx_port, &stats);\n-\t\tprintf(\"TX port %\"PRIu8\": tx: %\" PRIu64 \" err: %\" PRIu64 \"\\n\",\n+\t\tprintf(\"TX port %\"PRIu16\": tx: %\" PRIu64 \" err: %\" PRIu64 \"\\n\",\n \t\t\t\tflow->tx_port,\n \t\t\t\tstats.opackets - tx_stats[i].opackets,\n \t\t\t\tstats.oerrors - tx_stats[i].oerrors);\ndiff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h\nindex 8d02e1ade..77b6e3ee7 100644\n--- a/examples/qos_sched/main.h\n+++ b/examples/qos_sched/main.h\n@@ -106,8 +106,8 @@ struct thread_conf\n \tuint32_t n_mbufs;\n \tstruct rte_mbuf **m_table;\n \n-\tuint8_t rx_port;\n-\tuint8_t tx_port;\n+\tuint16_t rx_port;\n+\tuint16_t tx_port;\n \tuint16_t rx_queue;\n \tuint16_t tx_queue;\n \tstruct rte_ring *rx_ring;\n@@ -125,8 +125,8 @@ struct flow_conf\n \tuint32_t rx_core;\n \tuint32_t wt_core;\n \tuint32_t tx_core;\n-\tuint8_t rx_port;\n-\tuint8_t tx_port;\n+\tuint16_t rx_port;\n+\tuint16_t tx_port;\n \tuint16_t rx_queue;\n \tuint16_t tx_queue;\n \tstruct rte_ring *rx_ring;\n@@ -188,13 +188,15 @@ void app_worker_thread(struct thread_conf **qconf);\n void app_mixed_thread(struct thread_conf **qconf);\n \n void app_stat(void);\n-int subport_stat(uint8_t port_id, uint32_t subport_id);\n-int pipe_stat(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id);\n-int qavg_q(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc, uint8_t q);\n-int qavg_tcpipe(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc);\n-int qavg_pipe(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id);\n-int qavg_tcsubport(uint8_t port_id, uint32_t subport_id, uint8_t tc);\n-int qavg_subport(uint8_t port_id, uint32_t subport_id);\n+int subport_stat(uint16_t port_id, uint32_t subport_id);\n+int pipe_stat(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id);\n+int qavg_q(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id,\n+\t   uint8_t tc, uint8_t q);\n+int qavg_tcpipe(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id,\n+\t\tuint8_t tc);\n+int qavg_pipe(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id);\n+int qavg_tcsubport(uint16_t port_id, uint32_t subport_id, uint8_t tc);\n+int qavg_subport(uint16_t port_id, uint32_t subport_id);\n \n #ifdef __cplusplus\n }\ndiff --git a/examples/qos_sched/stats.c b/examples/qos_sched/stats.c\nindex 5c894455b..4e97a022e 100644\n--- a/examples/qos_sched/stats.c\n+++ b/examples/qos_sched/stats.c\n@@ -37,7 +37,8 @@\n #include \"main.h\"\n \n int\n-qavg_q(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc, uint8_t q)\n+qavg_q(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc,\n+\tuint8_t q)\n {\n         struct rte_sched_queue_stats stats;\n         struct rte_sched_port *port;\n@@ -74,7 +75,8 @@ qavg_q(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc, uint8\n }\n \n int\n-qavg_tcpipe(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc)\n+qavg_tcpipe(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id,\n+\t     uint8_t tc)\n {\n         struct rte_sched_queue_stats stats;\n         struct rte_sched_port *port;\n@@ -114,7 +116,7 @@ qavg_tcpipe(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc)\n }\n \n int\n-qavg_pipe(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id)\n+qavg_pipe(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id)\n {\n         struct rte_sched_queue_stats stats;\n         struct rte_sched_port *port;\n@@ -153,7 +155,7 @@ qavg_pipe(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id)\n }\n \n int\n-qavg_tcsubport(uint8_t port_id, uint32_t subport_id, uint8_t tc)\n+qavg_tcsubport(uint16_t port_id, uint32_t subport_id, uint8_t tc)\n {\n         struct rte_sched_queue_stats stats;\n         struct rte_sched_port *port;\n@@ -195,7 +197,7 @@ qavg_tcsubport(uint8_t port_id, uint32_t subport_id, uint8_t tc)\n }\n \n int\n-qavg_subport(uint8_t port_id, uint32_t subport_id)\n+qavg_subport(uint16_t port_id, uint32_t subport_id)\n {\n         struct rte_sched_queue_stats stats;\n         struct rte_sched_port *port;\n@@ -237,7 +239,7 @@ qavg_subport(uint8_t port_id, uint32_t subport_id)\n }\n \n int\n-subport_stat(uint8_t port_id, uint32_t subport_id)\n+subport_stat(uint16_t port_id, uint32_t subport_id)\n {\n         struct rte_sched_subport_stats stats;\n         struct rte_sched_port *port;\n@@ -273,7 +275,7 @@ subport_stat(uint8_t port_id, uint32_t subport_id)\n }\n \n int\n-pipe_stat(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id)\n+pipe_stat(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id)\n {\n         struct rte_sched_queue_stats stats;\n         struct rte_sched_port *port;\ndiff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c\nindex 083a37a92..415b68bb9 100644\n--- a/examples/quota_watermark/qw/init.c\n+++ b/examples/quota_watermark/qw/init.c\n@@ -156,12 +156,12 @@ void init_ring(int lcore_id, uint8_t port_id)\n void\n pair_ports(void)\n {\n-\tuint8_t i, j;\n+\tuint16_t i, j;\n \n \t/* Pair ports with their \"closest neighbour\" in the portmask */\n \tfor (i = 0; i < RTE_MAX_ETHPORTS; i++)\n \t\tif (is_bit_set(i, portmask))\n-\t\t\tfor (j = (uint8_t) (i + 1); j < RTE_MAX_ETHPORTS; j++)\n+\t\t\tfor (j = i + 1; j < RTE_MAX_ETHPORTS; j++)\n \t\t\t\tif (is_bit_set(j, portmask)) {\n \t\t\t\t\tport_pairs[i] = j;\n \t\t\t\t\tport_pairs[j] = i;\ndiff --git a/examples/quota_watermark/qw/main.c b/examples/quota_watermark/qw/main.c\nindex d4fcfde48..e5ecdb1cf 100644\n--- a/examples/quota_watermark/qw/main.c\n+++ b/examples/quota_watermark/qw/main.c\n@@ -155,7 +155,7 @@ receive_stage(__attribute__((unused)) void *args)\n {\n \tint i, ret;\n \n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \tuint16_t nb_rx_pkts;\n \n \tunsigned int lcore_id;\n@@ -216,7 +216,7 @@ pipeline_stage(__attribute__((unused)) void *args)\n \tint i, ret;\n \tint nb_dq_pkts;\n \n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \n \tunsigned int lcore_id, previous_lcore_id;\n \tunsigned int free;\n@@ -279,8 +279,8 @@ send_stage(__attribute__((unused)) void *args)\n {\n \tuint16_t nb_dq_pkts;\n \n-\tuint8_t port_id;\n-\tuint8_t dest_port_id;\n+\tuint16_t port_id;\n+\tuint16_t dest_port_id;\n \n \tunsigned int lcore_id, previous_lcore_id;\n \n@@ -324,7 +324,7 @@ main(int argc, char **argv)\n \tint ret;\n \tunsigned int lcore_id, master_lcore_id, last_lcore_id;\n \n-\tuint8_t port_id;\n+\tuint16_t port_id;\n \n \trte_log_set_global_level(RTE_LOG_INFO);\n \ndiff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c\nindex 669924055..e66f16f25 100644\n--- a/examples/rxtx_callbacks/main.c\n+++ b/examples/rxtx_callbacks/main.c\n@@ -59,7 +59,7 @@ static struct {\n \n \n static uint16_t\n-add_timestamps(uint8_t port __rte_unused, uint16_t qidx __rte_unused,\n+add_timestamps(uint16_t port __rte_unused, uint16_t qidx __rte_unused,\n \t\tstruct rte_mbuf **pkts, uint16_t nb_pkts,\n \t\tuint16_t max_pkts __rte_unused, void *_ __rte_unused)\n {\n@@ -72,7 +72,7 @@ add_timestamps(uint8_t port __rte_unused, uint16_t qidx __rte_unused,\n }\n \n static uint16_t\n-calc_latency(uint8_t port __rte_unused, uint16_t qidx __rte_unused,\n+calc_latency(uint16_t port __rte_unused, uint16_t qidx __rte_unused,\n \t\tstruct rte_mbuf **pkts, uint16_t nb_pkts, void *_ __rte_unused)\n {\n \tuint64_t cycles = 0;\n@@ -97,7 +97,7 @@ calc_latency(uint8_t port __rte_unused, uint16_t qidx __rte_unused,\n  * coming from the mbuf_pool passed as parameter\n  */\n static inline int\n-port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n+port_init(uint16_t port, struct rte_mempool *mbuf_pool)\n {\n \tstruct rte_eth_conf port_conf = port_conf_default;\n \tconst uint16_t rx_rings = 1, tx_rings = 1;\n@@ -195,7 +195,7 @@ int\n main(int argc, char *argv[])\n {\n \tstruct rte_mempool *mbuf_pool;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \n \t/* init EAL */\n \tint ret = rte_eal_init(argc, argv);\ndiff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c\nindex dcdc0a48b..382a2ded8 100644\n--- a/examples/server_node_efd/server/main.c\n+++ b/examples/server_node_efd/server/main.c\n@@ -95,7 +95,7 @@ struct efd_stats {\n static struct node_rx_buf *cl_rx_buf;\n \n static const char *\n-get_printable_mac_addr(uint8_t port)\n+get_printable_mac_addr(uint16_t port)\n {\n \tstatic const char err_address[] = \"00:00:00:00:00:00\";\n \tstatic char addresses[RTE_MAX_ETHPORTS][sizeof(err_address)];\ndiff --git a/examples/server_node_efd/shared/common.h b/examples/server_node_efd/shared/common.h\nindex 8a1347993..b1e0abe52 100644\n--- a/examples/server_node_efd/shared/common.h\n+++ b/examples/server_node_efd/shared/common.h\n@@ -65,9 +65,9 @@ struct filter_stats {\n \n struct shared_info {\n \tuint8_t num_nodes;\n-\tuint8_t num_ports;\n+\tuint16_t num_ports;\n \tuint32_t num_flows;\n-\tuint8_t id[RTE_MAX_ETHPORTS];\n+\tuint16_t id[RTE_MAX_ETHPORTS];\n \tstruct rx_stats rx_stats;\n \tstruct tx_stats tx_stats[MAX_NODES];\n \tstruct filter_stats filter_stats[MAX_NODES];\ndiff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c\nindex b4d50de89..e623754cf 100644\n--- a/examples/skeleton/basicfwd.c\n+++ b/examples/skeleton/basicfwd.c\n@@ -57,7 +57,7 @@ static const struct rte_eth_conf port_conf_default = {\n  * coming from the mbuf_pool passed as a parameter.\n  */\n static inline int\n-port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n+port_init(uint16_t port, struct rte_mempool *mbuf_pool)\n {\n \tstruct rte_eth_conf port_conf = port_conf_default;\n \tconst uint16_t rx_rings = 1, tx_rings = 1;\n@@ -104,7 +104,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n \trte_eth_macaddr_get(port, &addr);\n \tprintf(\"Port %u MAC: %02\" PRIx8 \" %02\" PRIx8 \" %02\" PRIx8\n \t\t\t   \" %02\" PRIx8 \" %02\" PRIx8 \" %02\" PRIx8 \"\\n\",\n-\t\t\t(unsigned)port,\n+\t\t\tport,\n \t\t\taddr.addr_bytes[0], addr.addr_bytes[1],\n \t\t\taddr.addr_bytes[2], addr.addr_bytes[3],\n \t\t\taddr.addr_bytes[4], addr.addr_bytes[5]);\n@@ -122,8 +122,8 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)\n static __attribute__((noreturn)) void\n lcore_main(void)\n {\n-\tconst uint8_t nb_ports = rte_eth_dev_count();\n-\tuint8_t port;\n+\tconst uint16_t nb_ports = rte_eth_dev_count();\n+\tuint16_t port;\n \n \t/*\n \t * Check that the port is on the same NUMA node as the polling thread\n@@ -179,7 +179,7 @@ main(int argc, char *argv[])\n {\n \tstruct rte_mempool *mbuf_pool;\n \tunsigned nb_ports;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \n \t/* Initialize the Environment Abstraction Layer (EAL). */\n \tint ret = rte_eal_init(argc, argv);\n@@ -204,7 +204,7 @@ main(int argc, char *argv[])\n \t/* Initialize all ports. */\n \tfor (portid = 0; portid < nb_ports; portid++)\n \t\tif (port_init(portid, mbuf_pool) != 0)\n-\t\t\trte_exit(EXIT_FAILURE, \"Cannot init port %\"PRIu8 \"\\n\",\n+\t\t\trte_exit(EXIT_FAILURE, \"Cannot init port %\"PRIu16 \"\\n\",\n \t\t\t\t\tportid);\n \n \tif (rte_lcore_count() > 1)\ndiff --git a/examples/vhost/main.c b/examples/vhost/main.c\nindex 4d1589d06..89a61f0e5 100644\n--- a/examples/vhost/main.c\n+++ b/examples/vhost/main.c\n@@ -177,7 +177,7 @@ static struct rte_eth_conf vmdq_conf_default = {\n };\n \n static unsigned lcore_ids[RTE_MAX_LCORE];\n-static uint8_t ports[RTE_MAX_ETHPORTS];\n+static uint16_t ports[RTE_MAX_ETHPORTS];\n static unsigned num_ports = 0; /**< The number of ports specified in command line */\n static uint16_t num_pf_queues, num_vmdq_queues;\n static uint16_t vmdq_pool_base, vmdq_queue_base;\n@@ -265,7 +265,7 @@ validate_num_devices(uint32_t max_nb_devices)\n  * coming from the mbuf_pool passed as parameter\n  */\n static inline int\n-port_init(uint8_t port)\n+port_init(uint16_t port)\n {\n \tstruct rte_eth_dev_info dev_info;\n \tstruct rte_eth_conf port_conf;\n@@ -392,7 +392,7 @@ port_init(uint8_t port)\n \tRTE_LOG(INFO, VHOST_PORT, \"Max virtio devices supported: %u\\n\", num_devices);\n \tRTE_LOG(INFO, VHOST_PORT, \"Port %u MAC: %02\"PRIx8\" %02\"PRIx8\" %02\"PRIx8\n \t\t\t\" %02\"PRIx8\" %02\"PRIx8\" %02\"PRIx8\"\\n\",\n-\t\t\t(unsigned)port,\n+\t\t\tport,\n \t\t\tvmdq_ports_eth_addr[port].addr_bytes[0],\n \t\t\tvmdq_ports_eth_addr[port].addr_bytes[1],\n \t\t\tvmdq_ports_eth_addr[port].addr_bytes[2],\n@@ -667,7 +667,7 @@ us_vhost_parse_args(int argc, char **argv)\n \n \tfor (i = 0; i < RTE_MAX_ETHPORTS; i++) {\n \t\tif (enabled_port_mask & (1 << i))\n-\t\t\tports[num_ports++] = (uint8_t)i;\n+\t\t\tports[num_ports++] = i;\n \t}\n \n \tif ((num_ports ==  0) || (num_ports > MAX_SUP_PORTS)) {\n@@ -1443,7 +1443,7 @@ main(int argc, char *argv[])\n \tunsigned lcore_id, core_id = 0;\n \tunsigned nb_ports, valid_num_ports;\n \tint ret, i;\n-\tuint8_t portid;\n+\tuint16_t portid;\n \tstatic pthread_t tid;\n \tchar thread_name[RTE_MAX_THREAD_NAME_LEN];\n \tuint64_t flags = 0;\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "2/4"
    ]
}