From patchwork Fri Oct 13 13:16:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Zhiyong" X-Patchwork-Id: 30364 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ACE371B6F5; Fri, 13 Oct 2017 15:17:16 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 75B751B6DE for ; Fri, 13 Oct 2017 15:17:12 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2017 06:17:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,371,1503385200"; d="scan'208";a="909624284" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.182]) by FMSMGA003.fm.intel.com with ESMTP; 13 Oct 2017 06:17:11 -0700 From: Zhiyong Yang To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Zhiyong Yang Date: Fri, 13 Oct 2017 21:16:58 +0800 Message-Id: <20171013131701.38147-6-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20171013131701.38147-1-zhiyong.yang@intel.com> References: <20171013131701.38147-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH 5/8] app: fix port id type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang --- app/pdump/main.c | 2 +- app/test-pmd/cmdline.c | 52 ++++++++++++++++++++++++++------------------------ 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index 3d8e50273..66272f59a 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -131,7 +131,7 @@ struct pdump_stats { struct pdump_tuples { /* cli params */ - uint8_t port; + uint16_t port; char *device_id; uint16_t queue; char rx_dev[TX_STREAM_SIZE]; diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index bb19d726f..bb01e989a 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1942,7 +1942,7 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = { /* *** configure port rxq/txq start/stop *** */ struct cmd_config_rxtx_queue { cmdline_fixed_string_t port; - uint8_t portid; + portid_t portid; cmdline_fixed_string_t rxtxq; uint16_t qid; cmdline_fixed_string_t opname; @@ -2010,7 +2010,7 @@ cmd_config_rxtx_queue_parsed(void *parsed_result, cmdline_parse_token_string_t cmd_config_rxtx_queue_port = TOKEN_STRING_INITIALIZER(struct cmd_config_rxtx_queue, port, "port"); cmdline_parse_token_num_t cmd_config_rxtx_queue_portid = - TOKEN_NUM_INITIALIZER(struct cmd_config_rxtx_queue, portid, UINT8); + TOKEN_NUM_INITIALIZER(struct cmd_config_rxtx_queue, portid, UINT16); cmdline_parse_token_string_t cmd_config_rxtx_queue_rxtxq = TOKEN_STRING_INITIALIZER(struct cmd_config_rxtx_queue, rxtxq, "rxq#txq"); cmdline_parse_token_num_t cmd_config_rxtx_queue_qid = @@ -5237,7 +5237,7 @@ struct cmd_set_bond_mac_addr_result { cmdline_fixed_string_t set; cmdline_fixed_string_t bonding; cmdline_fixed_string_t mac_addr; - uint8_t port_num; + uint16_t port_num; struct ether_addr address; }; @@ -5267,7 +5267,8 @@ cmdline_parse_token_string_t cmd_set_bond_mac_addr_mac = TOKEN_STRING_INITIALIZER(struct cmd_set_bond_mac_addr_result, mac_addr, "mac_addr"); cmdline_parse_token_num_t cmd_set_bond_mac_addr_portnum = - TOKEN_NUM_INITIALIZER(struct cmd_set_bond_mac_addr_result, port_num, UINT8); + TOKEN_NUM_INITIALIZER(struct cmd_set_bond_mac_addr_result, + port_num, UINT16); cmdline_parse_token_etheraddr_t cmd_set_bond_mac_addr_addr = TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_bond_mac_addr_result, address); @@ -5291,7 +5292,7 @@ struct cmd_set_bond_mon_period_result { cmdline_fixed_string_t set; cmdline_fixed_string_t bonding; cmdline_fixed_string_t mon_period; - uint8_t port_num; + uint16_t port_num; uint32_t period_ms; }; @@ -5325,7 +5326,7 @@ cmdline_parse_token_string_t cmd_set_bond_mon_period_mon_period = mon_period, "mon_period"); cmdline_parse_token_num_t cmd_set_bond_mon_period_portnum = TOKEN_NUM_INITIALIZER(struct cmd_set_bond_mon_period_result, - port_num, UINT8); + port_num, UINT16); cmdline_parse_token_num_t cmd_set_bond_mon_period_period_ms = TOKEN_NUM_INITIALIZER(struct cmd_set_bond_mon_period_result, period_ms, UINT32); @@ -5350,7 +5351,7 @@ struct cmd_set_bonding_agg_mode_policy_result { cmdline_fixed_string_t set; cmdline_fixed_string_t bonding; cmdline_fixed_string_t agg_mode; - uint8_t port_num; + uint16_t port_num; cmdline_fixed_string_t policy; }; @@ -5393,7 +5394,7 @@ cmdline_parse_token_string_t cmd_set_bonding_agg_mode_agg_mode = cmdline_parse_token_num_t cmd_set_bonding_agg_mode_portnum = TOKEN_NUM_INITIALIZER(struct cmd_set_bonding_agg_mode_policy_result, - port_num, UINT8); + port_num, UINT16); cmdline_parse_token_string_t cmd_set_bonding_agg_mode_policy_string = TOKEN_STRING_INITIALIZER( @@ -5607,7 +5608,7 @@ struct cmd_set_promisc_mode_result { cmdline_fixed_string_t set; cmdline_fixed_string_t promisc; cmdline_fixed_string_t port_all; /* valid if "allports" argument == 1 */ - uint8_t port_num; /* valid if "allports" argument == 0 */ + uint16_t port_num; /* valid if "allports" argument == 0 */ cmdline_fixed_string_t mode; }; @@ -5687,7 +5688,7 @@ struct cmd_set_allmulti_mode_result { cmdline_fixed_string_t set; cmdline_fixed_string_t allmulti; cmdline_fixed_string_t port_all; /* valid if "allports" argument == 1 */ - uint8_t port_num; /* valid if "allports" argument == 0 */ + uint16_t port_num; /* valid if "allports" argument == 0 */ cmdline_fixed_string_t mode; }; @@ -5731,7 +5732,7 @@ cmdline_parse_token_string_t cmd_setallmulti_portall = "all"); cmdline_parse_token_num_t cmd_setallmulti_portnum = TOKEN_NUM_INITIALIZER(struct cmd_set_allmulti_mode_result, port_num, - UINT8); + UINT16); cmdline_parse_token_string_t cmd_setallmulti_mode = TOKEN_STRING_INITIALIZER(struct cmd_set_allmulti_mode_result, mode, "on#off"); @@ -6497,7 +6498,7 @@ struct cmd_showport_result { cmdline_fixed_string_t show; cmdline_fixed_string_t port; cmdline_fixed_string_t what; - uint8_t portnum; + uint16_t portnum; }; static void cmd_showport_parsed(void *parsed_result, @@ -6535,7 +6536,7 @@ cmdline_parse_token_string_t cmd_showport_what = TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what, "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap"); cmdline_parse_token_num_t cmd_showport_portnum = - TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8); + TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT16); cmdline_parse_inst_t cmd_showport = { .f = cmd_showport_parsed, @@ -6557,7 +6558,7 @@ struct cmd_showqueue_result { cmdline_fixed_string_t show; cmdline_fixed_string_t type; cmdline_fixed_string_t what; - uint8_t portnum; + uint16_t portnum; uint16_t queuenum; }; @@ -6581,7 +6582,7 @@ cmdline_parse_token_string_t cmd_showqueue_type = cmdline_parse_token_string_t cmd_showqueue_what = TOKEN_STRING_INITIALIZER(struct cmd_showqueue_result, what, "info"); cmdline_parse_token_num_t cmd_showqueue_portnum = - TOKEN_NUM_INITIALIZER(struct cmd_showqueue_result, portnum, UINT8); + TOKEN_NUM_INITIALIZER(struct cmd_showqueue_result, portnum, UINT16); cmdline_parse_token_num_t cmd_showqueue_queuenum = TOKEN_NUM_INITIALIZER(struct cmd_showqueue_result, queuenum, UINT16); @@ -6969,7 +6970,7 @@ cmdline_parse_inst_t cmd_quit = { struct cmd_mac_addr_result { cmdline_fixed_string_t mac_addr_cmd; cmdline_fixed_string_t what; - uint8_t port_num; + uint16_t port_num; struct ether_addr address; }; @@ -7001,7 +7002,8 @@ cmdline_parse_token_string_t cmd_mac_addr_what = TOKEN_STRING_INITIALIZER(struct cmd_mac_addr_result, what, "add#remove#set"); cmdline_parse_token_num_t cmd_mac_addr_portnum = - TOKEN_NUM_INITIALIZER(struct cmd_mac_addr_result, port_num, UINT8); + TOKEN_NUM_INITIALIZER(struct cmd_mac_addr_result, port_num, + UINT16); cmdline_parse_token_etheraddr_t cmd_mac_addr_addr = TOKEN_ETHERADDR_INITIALIZER(struct cmd_mac_addr_result, address); @@ -7460,7 +7462,7 @@ struct cmd_vf_mac_addr_result { cmdline_fixed_string_t mac_addr_cmd; cmdline_fixed_string_t what; cmdline_fixed_string_t port; - uint8_t port_num; + uint16_t port_num; cmdline_fixed_string_t vf; uint8_t vf_num; struct ether_addr address; @@ -7503,7 +7505,7 @@ cmdline_parse_token_string_t cmd_vf_mac_addr_port = port,"port"); cmdline_parse_token_num_t cmd_vf_mac_addr_portnum = TOKEN_NUM_INITIALIZER(struct cmd_vf_mac_addr_result, - port_num, UINT8); + port_num, UINT16); cmdline_parse_token_string_t cmd_vf_mac_addr_vf = TOKEN_STRING_INITIALIZER(struct cmd_vf_mac_addr_result, vf,"vf"); @@ -7629,7 +7631,7 @@ cmdline_parse_inst_t cmd_vf_rxvlan_filter = { struct cmd_queue_rate_limit_result { cmdline_fixed_string_t set; cmdline_fixed_string_t port; - uint8_t port_num; + uint16_t port_num; cmdline_fixed_string_t queue; uint8_t queue_num; cmdline_fixed_string_t rate; @@ -7661,7 +7663,7 @@ cmdline_parse_token_string_t cmd_queue_rate_limit_port = port, "port"); cmdline_parse_token_num_t cmd_queue_rate_limit_portnum = TOKEN_NUM_INITIALIZER(struct cmd_queue_rate_limit_result, - port_num, UINT8); + port_num, UINT16); cmdline_parse_token_string_t cmd_queue_rate_limit_queue = TOKEN_STRING_INITIALIZER(struct cmd_queue_rate_limit_result, queue, "queue"); @@ -7696,7 +7698,7 @@ cmdline_parse_inst_t cmd_queue_rate_limit = { struct cmd_vf_rate_limit_result { cmdline_fixed_string_t set; cmdline_fixed_string_t port; - uint8_t port_num; + uint16_t port_num; cmdline_fixed_string_t vf; uint8_t vf_num; cmdline_fixed_string_t rate; @@ -7731,7 +7733,7 @@ cmdline_parse_token_string_t cmd_vf_rate_limit_port = port, "port"); cmdline_parse_token_num_t cmd_vf_rate_limit_portnum = TOKEN_NUM_INITIALIZER(struct cmd_vf_rate_limit_result, - port_num, UINT8); + port_num, UINT16); cmdline_parse_token_string_t cmd_vf_rate_limit_vf = TOKEN_STRING_INITIALIZER(struct cmd_vf_rate_limit_result, vf, "vf"); @@ -11285,7 +11287,7 @@ cmdline_parse_inst_t cmd_set_fdir_input_set = { struct cmd_mcast_addr_result { cmdline_fixed_string_t mcast_addr_cmd; cmdline_fixed_string_t what; - uint8_t port_num; + uint16_t port_num; struct ether_addr mc_addr; }; @@ -11315,7 +11317,7 @@ cmdline_parse_token_string_t cmd_mcast_addr_what = TOKEN_STRING_INITIALIZER(struct cmd_mcast_addr_result, what, "add#remove"); cmdline_parse_token_num_t cmd_mcast_addr_portnum = - TOKEN_NUM_INITIALIZER(struct cmd_mcast_addr_result, port_num, UINT8); + TOKEN_NUM_INITIALIZER(struct cmd_mcast_addr_result, port_num, UINT16); cmdline_parse_token_etheraddr_t cmd_mcast_addr_addr = TOKEN_ETHERADDR_INITIALIZER(struct cmd_mac_addr_result, address);