[dpdk-dev] test/eventdev: update the port id to 16 bit

Message ID 1526399325-110111-1-git-send-email-vipin.varghese@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

Varghese, Vipin May 15, 2018, 3:48 p.m. UTC
  port id in test case is update to unsigned int 16 bit, to
prvent compilation faulure when RTE_ETH_MAX port is set more
than 255.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
---
 test/test/test_event_eth_rx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Rao, Nikhil May 15, 2018, 10:23 a.m. UTC | #1
On 5/15/2018 9:18 PM, Vipin Varghese wrote:
> port id in test case is update to unsigned int 16 bit, to
> prvent compilation faulure when RTE_ETH_MAX port is set more
  ^^^^^^^             ^^^^^^^      ^^^^^^^^^^^^^^^
prevent             failure       RTE_MAX_ETHPORTS
> than 255.
> 
> Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
> ---
>   test/test/test_event_eth_rx_adapter.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
> index ab55398..dee632b 100644
> --- a/test/test/test_event_eth_rx_adapter.c
> +++ b/test/test/test_event_eth_rx_adapter.c
> @@ -107,7 +107,7 @@ port_init(uint8_t port, struct rte_mempool *mp)
>   static int
>   init_ports(int num_ports)
>   {
> -	uint8_t portid;
> +	uint16_t portid;
>   	int retval;
>   
>   	default_params.mp = rte_pktmbuf_pool_create("packet_pool",
> 

With above changes to commit message.

Acked-by: Nikhil Rao <nikhil.rao@intel.com>
  
Varghese, Vipin May 15, 2018, 12:24 p.m. UTC | #2
Thanks Nikhil, Have made changes and send a v2 for the same.

> -----Original Message-----

> From: Rao, Nikhil

> Sent: Tuesday, May 15, 2018 3:54 PM

> To: Varghese, Vipin <vipin.varghese@intel.com>; dev@dpdk.org; Jain, Deepak K

> <deepak.k.jain@intel.com>

> Cc: Rao, Nikhil <nikhil.rao@intel.com>

> Subject: Re: [PATCH] test/eventdev: update the port id to 16 bit

> 

> On 5/15/2018 9:18 PM, Vipin Varghese wrote:

> > port id in test case is update to unsigned int 16 bit, to prvent

> > compilation faulure when RTE_ETH_MAX port is set more

>   ^^^^^^^             ^^^^^^^      ^^^^^^^^^^^^^^^

> prevent             failure       RTE_MAX_ETHPORTS

> > than 255.

> >

> > Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>

> > ---

> >   test/test/test_event_eth_rx_adapter.c | 2 +-

> >   1 file changed, 1 insertion(+), 1 deletion(-)

> >

> > diff --git a/test/test/test_event_eth_rx_adapter.c

> > b/test/test/test_event_eth_rx_adapter.c

> > index ab55398..dee632b 100644

> > --- a/test/test/test_event_eth_rx_adapter.c

> > +++ b/test/test/test_event_eth_rx_adapter.c

> > @@ -107,7 +107,7 @@ port_init(uint8_t port, struct rte_mempool *mp)

> >   static int

> >   init_ports(int num_ports)

> >   {

> > -	uint8_t portid;

> > +	uint16_t portid;

> >   	int retval;

> >

> >   	default_params.mp = rte_pktmbuf_pool_create("packet_pool",

> >

> 

> With above changes to commit message.

> 

> Acked-by: Nikhil Rao <nikhil.rao@intel.com>
  

Patch

diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
index ab55398..dee632b 100644
--- a/test/test/test_event_eth_rx_adapter.c
+++ b/test/test/test_event_eth_rx_adapter.c
@@ -107,7 +107,7 @@  port_init(uint8_t port, struct rte_mempool *mp)
 static int
 init_ports(int num_ports)
 {
-	uint8_t portid;
+	uint16_t portid;
 	int retval;
 
 	default_params.mp = rte_pktmbuf_pool_create("packet_pool",