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 EA5DF45F6A; Tue, 28 Jan 2025 19:54:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C092140151; Tue, 28 Jan 2025 19:54:56 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 22D9C40144 for ; Tue, 28 Jan 2025 19:54:56 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2166f1e589cso38111745ad.3 for ; Tue, 28 Jan 2025 10:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1738090495; x=1738695295; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=EfhReEAFUM4WdSTxpgNJzLfR9QcQSRNX4HP+ifyhWhs=; b=Bbw/aHFZ6VwXMskRgmD7j7WAgItjQks8ACkGhc9L4gtI3cyjG8D2z8Ip19BW7Iqd0Q e46LPldTEMrewNVVBu0GEELbtJWYJI2+5bt1QQAgA5OxH5PFf6HiRkQt35IvpgeG6PxK 88XcOosAQwS6aBwh0X083PnemfmuHZl9PRRBvxngI2m+toNMHyh2KLZdYKQ/EnqtEt+y jIRPViY2ysgqT28v5m7OLinKEm0ULc0jv2FIhMFB8lFnF8GI6eB6jJMOnAS92iCtDtJw HTxqwVHcojQB3JhURDB6vVfs8V7YjBe8HXX7flScDHsOHJ8gUidKAVWGji/RNBm5xTVN pbhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738090495; x=1738695295; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EfhReEAFUM4WdSTxpgNJzLfR9QcQSRNX4HP+ifyhWhs=; b=ZCRRdFEZI/YrQ+qUZ1HlUta6unPGDL1wFAy8IM80E21B8U1edmuXacCXahpzwZixjp 0o8gYGSgVhpgiflDzM3muZhe3ZZSXoqjkOwbPC3HYsIIyMNKDLxGpND1TxEhhhVO3dST NfZvZWQxJHOTE5VL/gSUxogd9thpKb1ISfK7ruBRyNjCjAH4DlbtkcoQVDQjymDWVD71 NQhjjDz2IyjeVH4FYIqyVFVnnXlHpmf6R/RZi7yv7WZ2q+02Bfeme2K4mjRu8J+Ece+2 8XjBoHgIV9pQSt5SSN0MwjhY2sCfOD60KSy57lUZaRbgFko4GN0mgD/O+F9vQw9ONolj ukZA== X-Gm-Message-State: AOJu0YxVk1DrbTtYGmcpynGyeaC46haeToPZdEERmDEzRJGMaq2qEl24 BHu2z3OqpCnBUv8v84OFexs0Vdeckg+WgFAwAtAIcom8Mv0lVK8Cb5KSY0ZTaUk= X-Gm-Gg: ASbGncuLus08MsgWskbjV0ge59XxcjrOxQBzF9yHNP21Z9TgZDkczrs6cn35GURwhtZ 1gQA+mIBHsg7LpfUIXnBsysUliYOj6zfqHGepI+LiSoVBaM9tGs4nwC8VyjnZUHS0YC9zyZPvw7 FVXk+i3d8AtoV4x4rlbWuXhC8yeH0MQLY2YweKOk8sBqaq2d+VPySae9eyY/wmamBQlphwowPm9 1QTDr3A4Dc/+auC7MF41eOr6ChQvYSnvtKP2LI3feeD58HpaL1xAIRngVso0Wey9OSuxBU1AMdI mEDZv8LKLitnoM39s/hXe/MpbKfaSgWSB/mXYgxT/j601Gw3+mlTLzU4CdCkruyBeWN9 X-Google-Smtp-Source: AGHT+IELcmr0HcF+Xd0faM7gG+VuNUZTK6ClFZjZFORBivGrnE4uzdQSzXRo/pKcZrN88L/12l5kow== X-Received: by 2002:a05:6a00:c88:b0:727:3c37:d5fb with SMTP id d2e1a72fcca58-72fd0c70535mr379794b3a.16.1738090493680; Tue, 28 Jan 2025 10:54:53 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72f8a77c545sm9605434b3a.123.2025.01.28.10.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 10:54:53 -0800 (PST) Date: Tue, 28 Jan 2025 10:54:51 -0800 From: Stephen Hemminger To: Serhii Iliushyk Cc: dev@dpdk.org, mko-plv@napatech.com, ckm@napatech.com, Danylo Vodopianov Subject: Re: [PATCH v1 02/31] net/ntnic: add thread check return code Message-ID: <20250128105451.01f61a9a@hermes.local> In-Reply-To: <20250121170814.3252171-3-sil-plv@napatech.com> References: <20250121170814.3252171-1-sil-plv@napatech.com> <20250121170814.3252171-3-sil-plv@napatech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 21 Jan 2025 18:07:40 +0100 Serhii Iliushyk wrote: > From: Danylo Vodopianov > > CI found couple coverity problems which were fixed in this commit. > > CID: 448965 Error handling issues (CHECKED_RETURN). > > Thread return code check was added. > > Coverity issue: 448965 > Fixes: a1ba8c473f5c ("net/ntnic: add statistics poll") > > Signed-off-by: Danylo Vodopianov > --- > drivers/net/ntnic/ntnic_ethdev.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c > index 2a2643a106..620d023a71 100644 > --- a/drivers/net/ntnic/ntnic_ethdev.c > +++ b/drivers/net/ntnic/ntnic_ethdev.c > @@ -2516,8 +2516,11 @@ static int init_shutdown(void) > NT_LOG(DBG, NTNIC, "Starting shutdown handler"); > kill_pmd = 0; > previous_handler = signal(SIGINT, signal_handler_func_int); > - THREAD_CREATE(&shutdown_tid, shutdown_thread, NULL); > - > + int ret = THREAD_CREATE(&shutdown_tid, shutdown_thread, NULL); > + if (ret != 0) { > + NT_LOG(ERR, NTNIC, "Failed to create shutdown thread, error code: %d", ret); > + return -1; > + } > /* > * 1 time calculation of 1 sec stat update rtc cycles to prevent stat poll > * flooding by OVS from multiple virtual port threads - no need to be precise This whole init thread and shutdown logic is broken. There are vendor NFV applications that expect to be able to do. rte_eal_init() signal(SIGINT, my_shutdown_func) This kind of problem was reported years ago with the TAP device, and it had to change to use a different signal.