event/octeontx: remove unnecessary port start and stop in Rx adapter

Message ID 20180719114747.25430-1-pbhagavatula@caviumnetworks.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series event/octeontx: remove unnecessary port start and stop in Rx adapter |

Checks

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

Commit Message

Pavan Nikhilesh July 19, 2018, 11:47 a.m. UTC
  Modifying port state is not necessary when starting/stopping Rx adapter
as it is same as starting/stopping ethdev.

Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 drivers/event/octeontx/ssovf_evdev.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
  

Comments

Jerin Jacob July 24, 2018, 3:38 p.m. UTC | #1
-----Original Message-----
> Date: Thu, 19 Jul 2018 17:17:47 +0530
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> To: jerin.jacob@caviumnetworks.com
> Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>,
>  stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] event/octeontx: remove unnecessary port start
>  and stop in Rx adapter
> X-Mailer: git-send-email 2.18.0
> 
> Modifying port state is not necessary when starting/stopping Rx adapter
> as it is same as starting/stopping ethdev.
> 
> Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> ---
>  drivers/event/octeontx/ssovf_evdev.c | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
> index 2df70b52a..f98296f18 100644
> --- a/drivers/event/octeontx/ssovf_evdev.c
> +++ b/drivers/event/octeontx/ssovf_evdev.c
> @@ -476,14 +476,9 @@ static int
>  ssovf_eth_rx_adapter_start(const struct rte_eventdev *dev,
>  					const struct rte_eth_dev *eth_dev)
>  {
> -	int ret;
> -	const struct octeontx_nic *nic = eth_dev->data->dev_private;
>  	RTE_SET_USED(dev);
> +	RTE_SET_USED(eth_dev);
>  
> -	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
> -	if (ret)
> -		return 0;
> -	octeontx_pki_port_start(nic->port_id);
>  	return 0;
>  }
>  
> @@ -492,14 +487,9 @@ static int
>  ssovf_eth_rx_adapter_stop(const struct rte_eventdev *dev,
>  		const struct rte_eth_dev *eth_dev)
>  {
> -	int ret;
> -	const struct octeontx_nic *nic = eth_dev->data->dev_private;
>  	RTE_SET_USED(dev);
> +	RTE_SET_USED(eth_dev);
>  
> -	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
> -	if (ret)
> -		return 0;
> -	octeontx_pki_port_stop(nic->port_id);
>  	return 0;
>  }
>  
> -- 
> 2.18.0
>
  
Jerin Jacob July 25, 2018, 1:14 p.m. UTC | #2
-----Original Message-----
> Date: Tue, 24 Jul 2018 21:08:04 +0530
> From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Cc: dev@dpdk.org, stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] event/octeontx: remove unnecessary port
>  start and stop in Rx adapter
> User-Agent: Mutt/1.10.1 (2018-07-13)
> 
> -----Original Message-----
> > Date: Thu, 19 Jul 2018 17:17:47 +0530
> > From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > To: jerin.jacob@caviumnetworks.com
> > Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>,
> >  stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] event/octeontx: remove unnecessary port start
> >  and stop in Rx adapter
> > X-Mailer: git-send-email 2.18.0
> > 
> > Modifying port state is not necessary when starting/stopping Rx adapter
> > as it is same as starting/stopping ethdev.
> > 
> > Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Fixed check-git-log.sh issues.

Applied to dpdk-next-eventdev/master. Thanks.

> 
> > ---
> >  drivers/event/octeontx/ssovf_evdev.c | 14 ++------------
> >  1 file changed, 2 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
> > index 2df70b52a..f98296f18 100644
> > --- a/drivers/event/octeontx/ssovf_evdev.c
> > +++ b/drivers/event/octeontx/ssovf_evdev.c
> > @@ -476,14 +476,9 @@ static int
> >  ssovf_eth_rx_adapter_start(const struct rte_eventdev *dev,
> >  					const struct rte_eth_dev *eth_dev)
> >  {
> > -	int ret;
> > -	const struct octeontx_nic *nic = eth_dev->data->dev_private;
> >  	RTE_SET_USED(dev);
> > +	RTE_SET_USED(eth_dev);
> >  
> > -	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
> > -	if (ret)
> > -		return 0;
> > -	octeontx_pki_port_start(nic->port_id);
> >  	return 0;
> >  }
> >  
> > @@ -492,14 +487,9 @@ static int
> >  ssovf_eth_rx_adapter_stop(const struct rte_eventdev *dev,
> >  		const struct rte_eth_dev *eth_dev)
> >  {
> > -	int ret;
> > -	const struct octeontx_nic *nic = eth_dev->data->dev_private;
> >  	RTE_SET_USED(dev);
> > +	RTE_SET_USED(eth_dev);
> >  
> > -	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
> > -	if (ret)
> > -		return 0;
> > -	octeontx_pki_port_stop(nic->port_id);
> >  	return 0;
> >  }
> >  
> > -- 
> > 2.18.0
> >
  

Patch

diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 2df70b52a..f98296f18 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -476,14 +476,9 @@  static int
 ssovf_eth_rx_adapter_start(const struct rte_eventdev *dev,
 					const struct rte_eth_dev *eth_dev)
 {
-	int ret;
-	const struct octeontx_nic *nic = eth_dev->data->dev_private;
 	RTE_SET_USED(dev);
+	RTE_SET_USED(eth_dev);
 
-	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
-	if (ret)
-		return 0;
-	octeontx_pki_port_start(nic->port_id);
 	return 0;
 }
 
@@ -492,14 +487,9 @@  static int
 ssovf_eth_rx_adapter_stop(const struct rte_eventdev *dev,
 		const struct rte_eth_dev *eth_dev)
 {
-	int ret;
-	const struct octeontx_nic *nic = eth_dev->data->dev_private;
 	RTE_SET_USED(dev);
+	RTE_SET_USED(eth_dev);
 
-	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
-	if (ret)
-		return 0;
-	octeontx_pki_port_stop(nic->port_id);
 	return 0;
 }