From patchwork Fri Jun 3 10:12:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 69238 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp184543qgf; Fri, 3 Jun 2016 03:15:35 -0700 (PDT) X-Received: by 10.36.73.22 with SMTP id z22mr8836452ita.88.1464948935824; Fri, 03 Jun 2016 03:15:35 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g18si6057963iog.23.2016.06.03.03.15.35; Fri, 03 Jun 2016 03:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 52646617BF; Fri, 3 Jun 2016 10:15:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CA50E617CB; Fri, 3 Jun 2016 10:14:11 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 75F07617CB; Fri, 3 Jun 2016 10:14:06 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id 64398617C2 for ; Fri, 3 Jun 2016 10:12:43 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id s64so51433356lfe.0 for ; Fri, 03 Jun 2016 03:12:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WGNJF782Zum+MZr5hf62B13SsVNUXbHm1k9J8buY2VE=; b=Kd5MH0eBHuhX8xC6LJ829OJ1+f9wU2JooV6NxmcW6cqx567ruwVSq9Mmmew4LDjUMr b0KdHZiJgbmY6jkGPozxiIpsvnZ4TQxmKsNPKxw2UwdCw/BDk/hc8UlJdnxAQI3PqN17 5BYdVM3bGRTG42VX3wUbBZUkmT0duflS8avasCXFMFxfhN7+kgqCmWER9p0jJTtvM/N6 pdkHODCQVOvETaH6vQ1K4nc0orbpErl2gpHalDxNIqYqPDq6e31oAEddPWJkfwbPnbXX 8ngZk6WseV6B/X7EHizeQyMDr/91V4J1pTw8dHGflACMOlLSQu3uJD79pQlgHA4fH6By 9pHw== X-Gm-Message-State: ALyK8tJpFQFbAGFDZ4Jw11JoMTO+B1QY3e+TypT6M5kLBQYfODLnkLFq3Bsr32Su+amDT9muOoE= X-Received: by 10.46.71.17 with SMTP id u17mr770895lja.67.1464948762236; Fri, 03 Jun 2016 03:12:42 -0700 (PDT) Received: from maxim-Aspire-VN7-791.d-systems.local ([185.75.190.112]) by smtp.gmail.com with ESMTPSA id 1sm327712ljf.5.2016.06.03.03.12.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Jun 2016 03:12:41 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 3 Jun 2016 13:12:32 +0300 Message-Id: <1464948753-942-4-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 In-Reply-To: <1464948753-942-1-git-send-email-maxim.uvarov@linaro.org> References: <1464948753-942-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 3/4] linux-generic: tm: use odp_abort instead of abort X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_name_table.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/platform/linux-generic/odp_name_table.c b/platform/linux-generic/odp_name_table.c index 690cf7a..4d7fba2 100644 --- a/platform/linux-generic/odp_name_table.c +++ b/platform/linux-generic/odp_name_table.c @@ -184,12 +184,9 @@ static void check_secondary_hash(secondary_hash_tbl_t *secondary_hash_tbl) tbn1 = hash_tbl_entry & ~0x3F; if (hash_tbl_entry != 0) { - if ((hash_tbl_entry >> 48) == 0x7FFF) - ; - else if ((hash_tbl_entry >> 48) == 0) - ; - else - abort(); + if (!((hash_tbl_entry >> 48) == 0x7FFF) || + ((hash_tbl_entry >> 48) == 0)) + ODP_ABORT("hash_tbl_entry error\n"); for (idx2 = 0; idx2 < idx; idx2++) { hash_tbl_entry2 = @@ -197,7 +194,7 @@ static void check_secondary_hash(secondary_hash_tbl_t *secondary_hash_tbl) if (hash_tbl_entry2 != 0) { tbn2 = hash_tbl_entry2 & ~0x3F; if (tbn1 == tbn2) - abort(); + ODP_ABORT("tbn1 == tbn2\n"); } } } @@ -753,7 +750,7 @@ static int name_hash_tbl_delete(name_tbl_entry_t *entry_to_delete, entry_to_delete, entry_cnt); tbn = (*hash_entry_ptr) & ~0x3F; if (tbn == 0xFFFFFFFFFFFFFFC0) - abort(); + ODP_ABORT("tbn overflow\n"); if (rc < 0) return rc; @@ -787,7 +784,7 @@ static int name_hash_tbl_delete(name_tbl_entry_t *entry_to_delete, entry_to_delete, entry_cnt); tbn = (*hash_entry_ptr) & ~0x3F; if (tbn == 0xFFFFFFFFFFFFFFC0) - abort(); + ODP_ABORT("tbn overflow\n"); check_secondary_hash(secondary_hash); if (rc < 0) @@ -836,7 +833,7 @@ static int name_hash_tbl_delete(name_tbl_entry_t *entry_to_delete, entry_to_delete, entry_cnt); tbn = (*hash_entry_ptr) & ~0x3F; if (tbn == 0xFFFFFFFFFFFFFFC0) - abort(); + ODP_ABORT("tbn overflow\n"); check_secondary_hash(secondary_hash); if (rc < 0)