From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7DD8A0350; Fri, 5 Jun 2020 13:49:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E39B41D5D7; Fri, 5 Jun 2020 13:49:42 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id A620F1D5AA for ; Fri, 5 Jun 2020 13:49:41 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id f185so8818187wmf.3 for ; Fri, 05 Jun 2020 04:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=UJBU2HknT/hihuJG20rnyJXBnHSZ1WSrxvLYLLtJl4s=; b=jB+mR+OId7HfNlsGauVIA6oNZy2MllnOwr0hVVDG0twcLKISyx6yp5KgEQGMVunwnU hnbjChoG11Xgr1PG3m7vBXAoFWiGdHj930s9NL3JME5IyfkkP7f2FUC0F3l4vbLY07bB UHCECFvS7c0meB8N+KziPILrFciesQNuPigJwHPPhzO1LVmzmKbgPh9MMQGQFbq6Serc LMVtyhPbRsYMmLMZ/EhNZ0vtopYn3q3Mingcrbuuy8r6lHfqYbwvvTSdAx3+D3ufi7GC wiAFGaHMvrIHdoJHW2rgda1xnFnHXgwRLMLxX+INK9AOkgNXgKXKapOjEEgAzL/cA7EC Zu5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UJBU2HknT/hihuJG20rnyJXBnHSZ1WSrxvLYLLtJl4s=; b=sFx3kkaUacJJlD9NchwaDHAFAQRb04TaOdxW66u4jygFHhwPPvUGCO9LeHwKZ2KN1z jI5jLbXV7OcZcNZUyu36m3ttTfGEP9HXiNHpg7RzpkxK9WVzEtIKnz7hgijAHa2ahR46 FAnp+MjVHoOYvQlaBBEuY/M2ZrUNykZhlsd0yGpb7gf/E1m/4w6gJKXanl9J/mrihZIB zeHNKnW8h4wiGJAeluQbSVIWABhWwftyFHnizCFIwSjX9o2DMf/T4APKJP+jE1G5zaSY W59RoTc2DxjhZqkS9evSDLo+UIighC8yIuo+wKqdEDrPvajQEfIMm9nLRwao6YFhNzsX cGrg== X-Gm-Message-State: AOAM531SoOyeBezW5KvKLY4cU2rCAQ0HHrNFQfBewhExYuBB5CbWk9/u IsRBzlTpVK4m8SPZtnV77yNtc3j1qlruKw== X-Google-Smtp-Source: ABdhPJw+gr+VzXu+JO/McnQBppDivXgZBuqVVKyb4kdJHYUQtUrjJLpPU3rICMSPbryrdaxhbAziUg== X-Received: by 2002:a05:600c:4146:: with SMTP id h6mr2436913wmm.170.1591357781132; Fri, 05 Jun 2020 04:49:41 -0700 (PDT) Received: from localhost.localdomain ([39.40.101.253]) by smtp.gmail.com with ESMTPSA id a14sm12458820wrv.20.2020.06.05.04.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 04:49:40 -0700 (PDT) From: Sarosh Arif To: dev@dpdk.org, reshma.pattan@intel.com Cc: Sarosh Arif , sergio.gonzalez.monroy@intel.com Date: Fri, 5 Jun 2020 16:48:28 +0500 Message-Id: <20200605114828.20372-1-sarosh.arif@emumba.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] examples/packet_ordering: Use rte_exit in case of invalid EAL or application arguments 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_exit should be called when the application exits due to invalid EAL or application arguments. Fixes: 850f3733f840 ("examples/packet_ordering: new sample app") Cc: sergio.gonzalez.monroy@intel.com Signed-off-by: Sarosh Arif --- examples/packet_ordering/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c index b397b318e..edaf810d9 100644 --- a/examples/packet_ordering/main.c +++ b/examples/packet_ordering/main.c @@ -675,7 +675,7 @@ main(int argc, char **argv) /* Initialize EAL */ ret = rte_eal_init(argc, argv); if (ret < 0) - return -1; + rte_exit(EXIT_FAILURE, "Invalid EAL arguments\n"); argc -= ret; argv += ret; @@ -683,7 +683,7 @@ main(int argc, char **argv) /* Parse the application specific arguments */ ret = parse_args(argc, argv); if (ret < 0) - return -1; + rte_exit(EXIT_FAILURE, "Invalid packet_ordering arguments\n"); /* Check if we have enought cores */ if (rte_lcore_count() < 3) -- 2.17.1