From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18478606A31C for ; Mon, 30 Nov 2026 00:31:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=HHeiyO3t Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2DDE40E3E; Mon, 30 Nov 2026 01:28:36 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTPS id A93E5406FF for ; Mon, 30 Nov 2026 01:28:27 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-cded697ba49so873305a12.1 for ; Sun, 29 Nov 2026 16:28:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1795998506; x=1796603306; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7gGl8ywqDREl6qdDgTRj1YQnwDsXjpgLmdalYs7JyfI=; b=HHeiyO3tHawQZwi6eC0hk46GRUF+brna1U4clCkLAkA44sZaO/ckwyBHWna7rn9XOo NwihYjxg4HqFOCoK3ddEDp5oYxyd+nDD9DC/rdUH+dhd8YigqnXEyaM/7JlJERt0nGMc jqe2Hu9YCE4kk3ziVNAWiQvtFzttCagHywPDBrLrJ8+GNMaaLpOKQWPXcVBGuyxcP1+S iDU7D3q1njKv1qv4HyXUhFhavUNNLmYjZHeO7shPxwpTE6nqvZ3JliYU2mX7ypJW4GRo b5TDlNC8+QOSgusRE1nKDViQRSY5u0uNndSB0P1TjoK1JaPvawEneLE5TqrG08izoWAc TNIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795998506; x=1796603306; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=7gGl8ywqDREl6qdDgTRj1YQnwDsXjpgLmdalYs7JyfI=; b=QSf+VBQoIy3B77AP4YBiYDtMLV76ZOD1Dxl9OkZNVKe4nab5bZF+mpsGNtQwiYRBD0 e+GoBaRSUOflQPiBlskwnTmedHIfheky8kugbU/nAcyHp+dQ3zQILnB5Q5Ff/gzgq4cz LSmfTSZWeAUxFZAc0t3/K/xPYkXLqZ+en7PN6cqH9Yl0ZxxkJrubZlobq8V8N2ko2suz zxegvIful+uHutc9wtLcBo5woEYuJhs0smGpNT4xgRo65stG/Ip/2GOpKnb41KKb4cCK UIqS/ckRGxpBo99cIkeln5ymT6lup4onuLqSKvrYDf1rGt+A2ahflNFaNNfeRqGb9YbX FowA== X-Gm-Message-State: APuU4Z/41FWo5IVDP2Zy43ZQO+szdZBm+a2v0Y613Lnn3wB0bisQpmfw +mzf14soO1uWl5Erp3WQB+5hbOY3HszaBnRplocCIifK3A0KgeS8iEt6kXpQ1xm2Bj5/8kMeCmQ lDpt5D2s= X-Gm-Gg: AZFdTZfT3zrKWHNv63ahyPCMEb6lM3dHJNFtht9ZBjIxRd3Du52xgovXToOgt/RTx73 iwkTP1qHK+F3ZwGYACQn+XnBLIG/hqRl7Kv5c8pcPaII5Wx3sjr1qJHsDtIXDg072unsHVqEGXL qlmrGJ4RPqcgjRqYywL/HwWCZnCt7plG1G4xfSKjKgTBv58j2dYrqpkULrv2T26UQZVSdNDuKj0 nFVBVbGhl2XrQAzczq2x55mLi8KQ9r0Hnv60NGm933PLkVRk0/mR3jCdGjGfRfXBVZZjGYD6HFN r3S9o2okb+rgQ7vYeoWcO0RNtZLFvMn5cRXwW/UCwY8Pw4Cjk14J8+c5gBHJSV33Eci+BOcnxQ/ jlEGxoC0RubKk/P0pzD52ubH/fru7v4VA8TvFxGycGWHbXHpw9OpPtL2m6K2vipWTE8gIF4w8Zu j6Ezbtelb12zbZg2YbG8pfNOaYP/NgjPk6+RDXUSQvnAXG9OvOlKCAJlORVkiJj1+0KoNHQ2VBI alSPiDHeI8ikEeiW2DaFqJn+wK6Kyq+oKX5Wba5Dc/Zr0xALH8CiWiSdfYMmasZrJ7LTvl9nVWQ +c4Kw8BwgAD0XY92CvoRXZEcz3DHVRLg0594qwSycbLwSq/DLpMGkHTxmBFYYOZhaHRF X-Received: by 2002:a17:90b:4a48:b0:3b3:c675:d923 with SMTP id 98e67ed59e1d1-3b41c908109mr29103840a91.28.1795998506125; Sun, 29 Nov 2026 16:28:26 -0800 (PST) Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b44b21e19fsm19455840a91.0.2026.11.29.16.28.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 16:28:25 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Abhinandan Gujjar , Jerin Jacob , Maxime Coquelin , Chenbo Xia Subject: [PATCH 31/37] lib: mark never returning thread functions Date: Sun, 29 Nov 2026 16:27:16 -0800 Message-ID: <20261130002752.2342213-32-stephen@networkplumber.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261130002752.2342213-1-stephen@networkplumber.org> References: <20261130002752.2342213-1-stephen@networkplumber.org> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 rxa_intr_thread() and vhost_user_client_reconnect() loop forever, so the return after the loop can never be reached and clang reports it with -Wunreachable-code-aggressive. Removing the return is not enough: GCC does not notice that the loop never exits and warns that a non void function has no return statement. Mark both functions __rte_noreturn instead, which is what they are, and drop the dead return. Signed-off-by: Stephen Hemminger --- lib/eventdev/rte_event_eth_rx_adapter.c | 4 +--- lib/vhost/socket.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c index 26c0a26db1..ba264d0ba0 100644 --- a/lib/eventdev/rte_event_eth_rx_adapter.c +++ b/lib/eventdev/rte_event_eth_rx_adapter.c @@ -1163,7 +1163,7 @@ rxa_intr_ring_del_entries(struct event_eth_rx_adapter *rx_adapter, * These events are picked up by rxa_intr_ring_dequeue() which is invoked from * the adapter service function. */ -static uint32_t +static __rte_noreturn uint32_t rxa_intr_thread(void *arg) { struct event_eth_rx_adapter *rx_adapter = arg; @@ -1181,8 +1181,6 @@ rxa_intr_thread(void *arg) epoll_events[i].epdata.data); } } - - return 0; } /* Dequeue from interrupt ring and enqueue received diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c index 2d3fe1fd53..dd32bb69e2 100644 --- a/lib/vhost/socket.c +++ b/lib/vhost/socket.c @@ -446,7 +446,7 @@ vhost_user_connect_nonblock(char *path, int fd, struct sockaddr *un, size_t sz) return 0; } -static uint32_t +static __rte_noreturn uint32_t vhost_user_client_reconnect(void *arg __rte_unused) { int ret; @@ -486,8 +486,6 @@ vhost_user_client_reconnect(void *arg __rte_unused) pthread_mutex_unlock(&reconn_list.mutex); sleep(1); } - - return 0; } static int -- 2.53.0