[dpdk-dev] eventdev: change port_id to uint16_t

Message ID 1525789656-4173-1-git-send-email-lei.a.yao@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yao, Lei A May 8, 2018, 2:27 p.m. UTC
  From: yao <lei.a.yao@intel.com>

From 17.11, port_id is changed from uint8_t to uint16_t.But in eventdev,
it still use the old fashion. This patch fix this issue.

Signed-off-by: Lei Yao <lei.a.yao@intel.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Remy Horton May 10, 2018, 12:58 p.m. UTC | #1
Would have preferred it if the patch also changed the variable name to 
something a bit more descriptive (e.g. port_id, idx_port, ..).

On 08/05/2018 15:27, Lei wrote:
> From: yao <lei.a.yao@intel.com>
>
> From 17.11, port_id is changed from uint8_t to uint16_t.But in eventdev,
> it still use the old fashion. This patch fix this issue.

Reworded using proper tense:

In 17.11 port_id was changed from uint8_t to uint16_t, but eventdev
still uses the old fashion. This patch fixes this issue.


> Signed-off-by: Lei Yao <lei.a.yao@intel.com>

Acked-by: Remy Horton <remy.horton@intel.com>
  
Ferruh Yigit May 10, 2018, 7:59 p.m. UTC | #2
On 5/8/2018 3:27 PM, Lei wrote:
> From: yao <lei.a.yao@intel.com>
> 
> From 17.11, port_id is changed from uint8_t to uint16_t.But in eventdev,
> it still use the old fashion. This patch fix this issue.
> 
> Signed-off-by: Lei Yao <lei.a.yao@intel.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

This issue also cause build error when CONFIG_RTE_MAX_ETHPORTS more than 255

More detail related the build error can be found at:
https://dpdk.org/dev/patchwork/patch/39658/
  
Thomas Monjalon May 11, 2018, 9 a.m. UTC | #3
10/05/2018 21:59, Ferruh Yigit:
> On 5/8/2018 3:27 PM, Lei wrote:
> > From: yao <lei.a.yao@intel.com>
> > 
> > From 17.11, port_id is changed from uint8_t to uint16_t.But in eventdev,
> > it still use the old fashion. This patch fix this issue.
> > 
> > Signed-off-by: Lei Yao <lei.a.yao@intel.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> This issue also cause build error when CONFIG_RTE_MAX_ETHPORTS more than 255
> 
> More detail related the build error can be found at:
> https://dpdk.org/dev/patchwork/patch/39658/

Another patch was been pushed in next-eventdev:
	https://dpdk.org/dev/patchwork/patch/39706/
  

Patch

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index aec2703..c059841 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -186,7 +186,7 @@  wrr_next(struct rte_event_eth_rx_adapter *rx_adapter,
 static int
 eth_poll_wrr_calc(struct rte_event_eth_rx_adapter *rx_adapter)
 {
-	uint8_t d;
+	uint16_t d;
 	uint16_t q;
 	unsigned int i;
 
@@ -855,7 +855,7 @@  rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
 	struct rte_event_eth_rx_adapter *rx_adapter;
 	int ret;
 	int socket_id;
-	uint8_t i;
+	uint16_t i;
 	char mem_name[ETH_RX_ADAPTER_SERVICE_NAME_LEN];
 	const uint8_t default_rss_key[] = {
 		0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,