DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH branch-16.11] net/i40e: return errno when interrupt setup fails
@ 2017-10-19 13:22 Aaron Conole
  2017-10-19 14:03 ` Yuanhan Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Conole @ 2017-10-19 13:22 UTC (permalink / raw)
  To: dev, stable
  Cc: Michał Mirosław, Jingjing Wu, Luca Boccassi, Yuanhan Liu

From: Michał Mirosław <michal.miroslaw@atendesoftware.pl>

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
---
This is cherry picked from commit d75547718c87 ("net/i40e: return errno
when interrupt setup fails") and applies cleanly.  This is just a
backport request.

 drivers/net/i40e/i40e_ethdev.c               | 5 +++--
 lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 65e10f3..191e858 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1704,8 +1704,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	     !RTE_ETH_DEV_SRIOV(dev).active) &&
 	    dev->data->dev_conf.intr_conf.rxq != 0) {
 		intr_vector = dev->data->nb_rx_queues;
-		if (rte_intr_efd_enable(intr_handle, intr_vector))
-			return -1;
+		ret = rte_intr_efd_enable(intr_handle, intr_vector);
+		if (ret)
+			return ret;
 	}
 
 	if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 368863f..25797e4 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -1157,7 +1157,7 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
 				RTE_LOG(ERR, EAL,
 					"can't setup eventfd, error %i (%s)\n",
 					errno, strerror(errno));
-				return -1;
+				return -errno;
 			}
 			intr_handle->efds[i] = fd;
 		}
-- 
2.9.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH branch-16.11] net/i40e: return errno when interrupt setup fails
  2017-10-19 13:22 [dpdk-dev] [PATCH branch-16.11] net/i40e: return errno when interrupt setup fails Aaron Conole
@ 2017-10-19 14:03 ` Yuanhan Liu
  2017-10-19 14:37   ` Aaron Conole
  0 siblings, 1 reply; 3+ messages in thread
From: Yuanhan Liu @ 2017-10-19 14:03 UTC (permalink / raw)
  To: Aaron Conole
  Cc: dev, stable, Michał Mirosław, Jingjing Wu, Luca Boccassi

On Thu, Oct 19, 2017 at 09:22:30AM -0400, Aaron Conole wrote:
> From: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
> 
> Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
> Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> This is cherry picked from commit d75547718c87 ("net/i40e: return errno
> when interrupt setup fails") and applies cleanly.  This is just a
> backport request.

Thanks for the backport! A minor note is that for backport commits, we'd
like to add something like following in the commit log, for back-tracking
where the backport commit comes from:

[ backported from upstream commit d75547718c873899b7f26616c50df7936a8f45e8 ]

But no worry, I think Luca could handle that while apply. Luca will start
maintain 16.11 LTS since now (v16.11.4).

	--yliu
> 
>  drivers/net/i40e/i40e_ethdev.c               | 5 +++--
>  lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 65e10f3..191e858 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -1704,8 +1704,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
>  	     !RTE_ETH_DEV_SRIOV(dev).active) &&
>  	    dev->data->dev_conf.intr_conf.rxq != 0) {
>  		intr_vector = dev->data->nb_rx_queues;
> -		if (rte_intr_efd_enable(intr_handle, intr_vector))
> -			return -1;
> +		ret = rte_intr_efd_enable(intr_handle, intr_vector);
> +		if (ret)
> +			return ret;
>  	}
>  
>  	if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
> diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
> index 368863f..25797e4 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
> @@ -1157,7 +1157,7 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
>  				RTE_LOG(ERR, EAL,
>  					"can't setup eventfd, error %i (%s)\n",
>  					errno, strerror(errno));
> -				return -1;
> +				return -errno;
>  			}
>  			intr_handle->efds[i] = fd;
>  		}
> -- 
> 2.9.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH branch-16.11] net/i40e: return errno when interrupt setup fails
  2017-10-19 14:03 ` Yuanhan Liu
@ 2017-10-19 14:37   ` Aaron Conole
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Conole @ 2017-10-19 14:37 UTC (permalink / raw)
  To: Yuanhan Liu
  Cc: dev, stable, Michał Mirosław, Jingjing Wu, Luca Boccassi

Yuanhan Liu <yliu@fridaylinux.org> writes:

> On Thu, Oct 19, 2017 at 09:22:30AM -0400, Aaron Conole wrote:
>> From: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
>> 
>> Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
>> Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
>> ---
>> This is cherry picked from commit d75547718c87 ("net/i40e: return errno
>> when interrupt setup fails") and applies cleanly.  This is just a
>> backport request.
>
> Thanks for the backport! A minor note is that for backport commits, we'd
> like to add something like following in the commit log, for back-tracking
> where the backport commit comes from:
>
> [ backported from upstream commit d75547718c873899b7f26616c50df7936a8f45e8 ]

Will do.  Since this is just a git cherry-pick, feel free to ignore the
actual patch submitted, and "do the right thing" if it's easier.

I'll follow that form in the future.

> But no worry, I think Luca could handle that while apply. Luca will start
> maintain 16.11 LTS since now (v16.11.4).

Luca++

> 	--yliu
>> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-19 14:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 13:22 [dpdk-dev] [PATCH branch-16.11] net/i40e: return errno when interrupt setup fails Aaron Conole
2017-10-19 14:03 ` Yuanhan Liu
2017-10-19 14:37   ` Aaron Conole

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).