From: Zhiyong Yang <zhiyong.yang@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Zhiyong Yang <zhiyong.yang@intel.com>
Subject: [dpdk-dev] [PATCH 2/8] net/i40e: fix port id type
Date: Fri, 13 Oct 2017 21:16:55 +0800 [thread overview]
Message-ID: <20171013131701.38147-3-zhiyong.yang@intel.com> (raw)
In-Reply-To: <20171013131701.38147-1-zhiyong.yang@intel.com>
Some functions applied were still developed on top of uint8_t port_id,
however port_id has been increased range to uint16_t. The patch fixes
the issue.
Fixes: f8244c6399d9 ("ethdev: increase port id range")
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/i40e/rte_pmd_i40e.c | 8 ++++----
drivers/net/i40e/rte_pmd_i40e.h | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 71327d1b9..f40c463aa 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11065,7 +11065,7 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
struct rte_pmd_i40e_proto_info *proto)
{
struct rte_pmd_i40e_ptype_mapping *ptype_mapping;
- uint8_t port_id = dev->data->port_id;
+ uint16_t port_id = dev->data->port_id;
uint32_t ptype_num;
struct rte_pmd_i40e_ptype_info *ptype;
uint32_t buff_size;
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 3155cf8d9..b113eb4c3 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2295,7 +2295,7 @@ int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
}
int
-rte_pmd_i40e_add_vf_mac_addr(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
struct ether_addr *mac_addr)
{
struct rte_eth_dev *dev;
@@ -2338,7 +2338,7 @@ rte_pmd_i40e_add_vf_mac_addr(uint8_t port, uint16_t vf_id,
return 0;
}
-int rte_pmd_i40e_flow_type_mapping_reset(uint8_t port)
+int rte_pmd_i40e_flow_type_mapping_reset(uint16_t port)
{
struct rte_eth_dev *dev;
@@ -2355,7 +2355,7 @@ int rte_pmd_i40e_flow_type_mapping_reset(uint8_t port)
}
int rte_pmd_i40e_flow_type_mapping_get(
- uint8_t port,
+ uint16_t port,
struct rte_pmd_i40e_flow_type_mapping *mapping_items)
{
struct rte_eth_dev *dev;
@@ -2381,7 +2381,7 @@ int rte_pmd_i40e_flow_type_mapping_get(
int
rte_pmd_i40e_flow_type_mapping_update(
- uint8_t port,
+ uint16_t port,
struct rte_pmd_i40e_flow_type_mapping *mapping_items,
uint16_t count,
uint8_t exclusive)
diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index f18251be7..467b415b9 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -759,7 +759,7 @@ int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
* - (-ENODEV) if *port* invalid.
* - (-EINVAL) if *vf* or *mac_addr* is invalid.
*/
-int rte_pmd_i40e_add_vf_mac_addr(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
struct ether_addr *mac_addr);
#define RTE_PMD_I40E_PCTYPE_MAX 64
@@ -788,7 +788,7 @@ struct rte_pmd_i40e_flow_type_mapping {
* set other PCTYPEs maps to PCTYPE_INVALID.
*/
int rte_pmd_i40e_flow_type_mapping_update(
- uint8_t port,
+ uint16_t port,
struct rte_pmd_i40e_flow_type_mapping *mapping_items,
uint16_t count,
uint8_t exclusive);
@@ -805,7 +805,7 @@ int rte_pmd_i40e_flow_type_mapping_update(
* RTE_PMD_I40E_FLOW_TYPE_MAX items
*/
int rte_pmd_i40e_flow_type_mapping_get(
- uint8_t port,
+ uint16_t port,
struct rte_pmd_i40e_flow_type_mapping *mapping_items);
/**
@@ -815,7 +815,7 @@ int rte_pmd_i40e_flow_type_mapping_get(
* @param port
* pointer to port identifier of the device
*/
-int rte_pmd_i40e_flow_type_mapping_reset(uint8_t port);
+int rte_pmd_i40e_flow_type_mapping_reset(uint16_t port);
/**
* On the PF, find VF index based on VF MAC address
--
2.13.3
next prev parent reply other threads:[~2017-10-13 13:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 13:16 [dpdk-dev] [PATCH 0/8] " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 1/8] net/bonding: " Zhiyong Yang
2017-10-13 13:16 ` Zhiyong Yang [this message]
2017-10-13 13:16 ` [dpdk-dev] [PATCH 3/8] net/fm10k: " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 4/8] net/mrvl: " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 5/8] app: " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 6/8] test: " Zhiyong Yang
2017-10-13 13:17 ` [dpdk-dev] [PATCH 7/8] examples: " Zhiyong Yang
2017-10-13 13:17 ` [dpdk-dev] [PATCH 8/8] doc: update " Zhiyong Yang
2017-10-13 15:41 ` Mcnamara, John
2017-10-16 1:32 ` Yang, Zhiyong
2017-10-18 9:13 ` Van Haaren, Harry
2017-10-13 18:25 ` [dpdk-dev] [PATCH 0/8] fix " Ferruh Yigit
2017-10-13 18:26 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171013131701.38147-3-zhiyong.yang@intel.com \
--to=zhiyong.yang@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).