From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by dpdk.org (Postfix) with ESMTP id 606671B7FD for ; Tue, 24 Oct 2017 15:29:53 +0200 (CEST) Received: by mail-lf0-f65.google.com with SMTP id w21so24053434lfc.6 for ; Tue, 24 Oct 2017 06:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=a8xq/I010ZZLUP9PoInMLUNKALNfGMCaBuN/2vSjLF8=; b=TmnpI1kwyEXuChfBdWnGjH/S5wqv3oN8b7+LjkO3qOFR4XGRB57J7mRckLTgDQuMqB SDHgyMFyxW4CAe3DzZfNiGflNqimY1zbrl1IXYxNrTJYlQI/Npy6sg9gKcGxj/O4xPE+ yjpqc+My6ja5B+SYcBeIF2pb81TnYnR/1Kg1KI+Uqqg/pmIjAqWAFIqMOxx3UQILjivs BG8h5ROVzTaBmfzIba8ThJJWhT95ODvFqjwKcMwXaphI7wHCnpuLd+WftnE97A1QQtz2 KOEqfUDk1VYnfqJ6zszF+R1Q7nak6JNi78dWz/RL7WhQ8idPIgXMdISCtGH5wraB2K8i C2Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=a8xq/I010ZZLUP9PoInMLUNKALNfGMCaBuN/2vSjLF8=; b=iFKVhUu8aqpvRoClmUmociYKA8TIIY3YB2xgn9XZ5NsJ+yOKU2QJRxGfr9jNQTXdWQ bVspESxEiNoF9UWtloiZEHHid/TWh3krk7RLgH9UgEOvDVMm3QFjeKdO4aJEiGNbcXFQ fOR/f6imsttVqUL3MA+zhYWjeNQgHkNxaRyXfNUoYwsn+jVL+G8pL8Ymk6HGAGkmwKc+ sm42Hj3nLlSvmm7GK3+scS1K9o0Xexd5tJNndHN2abpZBlCbWraLohb8gYa7jvvKcjUa 66u9qDr0dChNZiHRYqazWnKV0nPsaqtkQ7hyq6L1rvwPAlwXBxlu9dKAh2oI+CphS9HR FGMg== X-Gm-Message-State: AMCzsaX5udfo2IlBkpaREdUkWJnp8zqp+ev6uepxmYzoKfauAU8XDD5B bD8c0KsA7ysyY+jJaFOk4cb5zMRa X-Google-Smtp-Source: ABhQp+Sy7dI+Vnupt8L/ATyWhIDXxcqjb+3MwkSAjySvGXJk1eZ9P6dn3437yl1tyHmZRurUensVpg== X-Received: by 10.25.225.19 with SMTP id y19mr5640866lfg.38.1508851792522; Tue, 24 Oct 2017 06:29:52 -0700 (PDT) Received: from localhost.localdomain ([195.34.30.205]) by smtp.gmail.com with ESMTPSA id l88sm60614lfi.36.2017.10.24.06.29.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Oct 2017 06:29:51 -0700 (PDT) From: Igor Ryzhov To: dev@dpdk.org Date: Tue, 24 Oct 2017 16:29:45 +0300 Message-Id: <1508851785-54623-1-git-send-email-iryzhov@nfware.com> X-Mailer: git-send-email 2.6.4 Subject: [dpdk-dev] [PATCH] lpm6: set errno on creation error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2017 13:29:53 -0000 Signed-off-by: Igor Ryzhov --- lib/librte_lpm/rte_lpm6.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c index b4a7df3..5ca322c 100644 --- a/lib/librte_lpm/rte_lpm6.c +++ b/lib/librte_lpm/rte_lpm6.c @@ -191,6 +191,7 @@ rte_lpm6_create(const char *name, int socket_id, te = rte_zmalloc("LPM6_TAILQ_ENTRY", sizeof(*te), 0); if (te == NULL) { RTE_LOG(ERR, LPM, "Failed to allocate tailq entry!\n"); + rte_errno = ENOMEM; goto exit; } @@ -201,6 +202,7 @@ rte_lpm6_create(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; } @@ -212,6 +214,7 @@ rte_lpm6_create(const char *name, int socket_id, rte_free(lpm); lpm = NULL; rte_free(te); + rte_errno = ENOMEM; goto exit; } -- 2.6.4