From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47566A0A02; Fri, 26 Mar 2021 11:48:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D08B1140D78; Fri, 26 Mar 2021 11:48:12 +0100 (CET) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id E8136140D4C for ; Fri, 26 Mar 2021 11:48:09 +0100 (CET) Received: by mail-lf1-f49.google.com with SMTP id 75so7019687lfa.2 for ; Fri, 26 Mar 2021 03:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LkF61Cd8iLw9FFgbij1peG6pjd8MKRup2N1W8AJasK8=; b=go6HlPG/QmKxwuv/XunewLkXec3AKrJgCTVYsPpKqPJqTnq+aPxD0tcKNHBUM0YaZK CHsXEOHNCMBjsqLrnvTuNcnPjAMg3eN+jsHUflNcnx0bjGz/41NoZuAfmh8Wp8PFnZne 5msrUMSsRq5s7tL/FQBjObALw/j8Q9c2qY4hlXhqJbs2GB5B0krp3Ljn4tbdGNHsqvEN Lj23FKKKPVtq4YfvrKnVG6u6hA2vDT36S6Ibq2L86flDkz2TCJdqlp/+qk9LvhBcnaXv 6GILAUObTIShb2oL8sqA4G4ViIvLL3UL1sHZ5jG6dFxhqOa3MMtDmpVPoDoVAC7Dlweo vxcQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=LkF61Cd8iLw9FFgbij1peG6pjd8MKRup2N1W8AJasK8=; b=dNOy2crmUy0COSqQFI3iiP5lEjNOzRsH6AZwRTHQZTe+TApDiNxSslgM9mazCDJ2JT CuDeWLzEF3hU2ObHTBJbLZOM0z4VqzBAEXZ0MaZBivO+ZLmNGRB84hqgL/2H+uu5ziJj vr8vrGEW9TcI4tuVRH3X5JQvOgc+pfUquFGydsT55Kyo0qpCgLAY0lGMBXVmFZa9gdTr lS9swYdIMI+looN96mCVo68OnUIgmVVryZngZNzLFmOzFHcajXbsQyz+YHPihzXQlmlZ WNj2pfvPws8flFkRbpQo5YwO3/Vja1Q1LFZh5DZK5XpA7BvvxZqUWQJjVzagH4JVNVuT 7cqA== X-Gm-Message-State: AOAM531r9o0Y87eezifgodp7ib/bdHvVT7cc0vRqRcdK0JB0+C9qIMOO l8L8/bUDjIgorNJkoQVuyArrfYW4YPwysQ== X-Google-Smtp-Source: ABdhPJytJRMPJNMlsgEV4jGV3lIzXx+1CQGL0FWsYzomO2bt26OW+Vj2XPAubKyRepm7py6NmTBz1g== X-Received: by 2002:a19:a408:: with SMTP id q8mr8367911lfc.144.1616755689204; Fri, 26 Mar 2021 03:48:09 -0700 (PDT) Received: from mkPC.int.semihalf.com (host-193.106.246.138.static.3s.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id e15sm829956lfs.83.2021.03.26.03.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 03:48:08 -0700 (PDT) From: Michal Krawczyk To: dev@dpdk.org Cc: Stanislaw Kardach , Michal Krawczyk Date: Fri, 26 Mar 2021 11:47:59 +0100 Message-Id: <20210326104759.280175-3-mk@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210326104759.280175-1-mk@semihalf.com> References: <20210326104759.280175-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/2] test: proceed if timer subsystem was initialized X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" From: Stanislaw Kardach rte_timer_subsystem_init() may return -EALREADY if the timer subsystem was already initialized. This can happen i.e. in PMD code (see eth_ena_dev_init). This is not an error, rather a notification as the initialization function simply returns without any action taken. Signed-off-by: Stanislaw Kardach Reviewed-by: Michal Krawczyk --- app/test/test.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/test/test.c b/app/test/test.c index 624dd48042..864523ed61 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -134,8 +134,13 @@ main(int argc, char **argv) goto out; } + argv += ret; + + prgname = argv[0]; + #ifdef RTE_LIB_TIMER - if (rte_timer_subsystem_init() < 0) { + ret = rte_timer_subsystem_init(); + if (ret < 0 && ret != -EALREADY) { ret = -1; goto out; } @@ -146,10 +151,6 @@ main(int argc, char **argv) goto out; } - argv += ret; - - prgname = argv[0]; - recursive_call = getenv(RECURSIVE_ENV_VAR); if (recursive_call != NULL) { ret = do_recursive_call(); -- 2.25.1