DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lpm: set errno on creation error
@ 2017-10-24 13:28 Igor Ryzhov
  2017-10-24 14:20 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Igor Ryzhov @ 2017-10-24 13:28 UTC (permalink / raw)
  To: dev

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
---
 lib/librte_lpm/rte_lpm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 64c074e..140dbb2 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -218,6 +218,7 @@ rte_lpm_create_v20(const char *name, int socket_id, int max_rules,
 	te = rte_zmalloc("LPM_TAILQ_ENTRY", sizeof(*te), 0);
 	if (te == NULL) {
 		RTE_LOG(ERR, LPM, "Failed to allocate tailq entry\n");
+		rte_errno = ENOMEM;
 		goto exit;
 	}
 
@@ -227,6 +228,7 @@ rte_lpm_create_v20(const char *name, int socket_id, int max_rules,
 	if (lpm == NULL) {
 		RTE_LOG(ERR, LPM, "LPM memory allocation failed\n");
 		rte_free(te);
+		rte_errno = ENOMEM;
 		goto exit;
 	}
 
@@ -292,6 +294,7 @@ rte_lpm_create_v1604(const char *name, int socket_id,
 	te = rte_zmalloc("LPM_TAILQ_ENTRY", sizeof(*te), 0);
 	if (te == NULL) {
 		RTE_LOG(ERR, LPM, "Failed to allocate tailq entry\n");
+		rte_errno = ENOMEM;
 		goto exit;
 	}
 
@@ -301,6 +304,7 @@ rte_lpm_create_v1604(const char *name, int socket_id,
 	if (lpm == NULL) {
 		RTE_LOG(ERR, LPM, "LPM memory allocation failed\n");
 		rte_free(te);
+		rte_errno = ENOMEM;
 		goto exit;
 	}
 
@@ -312,6 +316,7 @@ rte_lpm_create_v1604(const char *name, int socket_id,
 		rte_free(lpm);
 		lpm = NULL;
 		rte_free(te);
+		rte_errno = ENOMEM;
 		goto exit;
 	}
 
@@ -324,6 +329,7 @@ rte_lpm_create_v1604(const char *name, int socket_id,
 		rte_free(lpm);
 		lpm = NULL;
 		rte_free(te);
+		rte_errno = ENOMEM;
 		goto exit;
 	}
 
-- 
2.6.4

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

* Re: [dpdk-dev] [PATCH] lpm: set errno on creation error
  2017-10-24 13:28 [dpdk-dev] [PATCH] lpm: set errno on creation error Igor Ryzhov
@ 2017-10-24 14:20 ` Bruce Richardson
  2017-10-24 19:36   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2017-10-24 14:20 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev

On Tue, Oct 24, 2017 at 04:28:30PM +0300, Igor Ryzhov wrote:
> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> ---
>  lib/librte_lpm/rte_lpm.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [dpdk-dev] [PATCH] lpm: set errno on creation error
  2017-10-24 14:20 ` Bruce Richardson
@ 2017-10-24 19:36   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-10-24 19:36 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev, Bruce Richardson

24/10/2017 16:20, Bruce Richardson:
> On Tue, Oct 24, 2017 at 04:28:30PM +0300, Igor Ryzhov wrote:
> > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> > ---
> >  lib/librte_lpm/rte_lpm.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-24 13:28 [dpdk-dev] [PATCH] lpm: set errno on creation error Igor Ryzhov
2017-10-24 14:20 ` Bruce Richardson
2017-10-24 19:36   ` Thomas Monjalon

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