From patchwork Tue Apr 9 11:48:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 139210 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B1C643E29; Tue, 9 Apr 2024 13:49:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56F81402EC; Tue, 9 Apr 2024 13:48:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D6EDF402D4 for ; Tue, 9 Apr 2024 13:48:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712663337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6gG2Kj85EPCpPK/EZU7Fo5ti520Wvxifl/1BBlxNHN4=; b=S0r23TjepXWK0p8eLLlFHTZwrrbpO+SSooOLXLI4MsqSAoB2nxH3dtqkmsGG+EkKIfXI37 BMFE4ncZl/clwc8olCRpkujotw30OLTqOo80PW3rwuU5UoMTpjuiwnpqtQFrUQZluxO1GU dsKVmxhdEwFH+zYbtKz+xY+covL+ArM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-stz3KYjoNMGIXtN5X3mPSg-1; Tue, 09 Apr 2024 07:48:55 -0400 X-MC-Unique: stz3KYjoNMGIXtN5X3mPSg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CF642802CB4; Tue, 9 Apr 2024 11:48:54 +0000 (UTC) Received: from max-p1.redhat.com (unknown [10.39.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 746D01121313; Tue, 9 Apr 2024 11:48:53 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, david.marchand@redhat.com, chenbox@nvidia.com Cc: Maxime Coquelin Subject: [PATCH v3 1/5] vhost: rename polling mutex Date: Tue, 9 Apr 2024 13:48:41 +0200 Message-ID: <20240409114845.1336403-2-maxime.coquelin@redhat.com> In-Reply-To: <20240409114845.1336403-1-maxime.coquelin@redhat.com> References: <20240409114845.1336403-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 This trivial patch fixes a typo in fd's manager polling mutex name. Reviewed-by: David Marchand Signed-off-by: Maxime Coquelin --- lib/vhost/fd_man.c | 8 ++++---- lib/vhost/fd_man.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/vhost/fd_man.c b/lib/vhost/fd_man.c index 481e6b900a..67ee1589e1 100644 --- a/lib/vhost/fd_man.c +++ b/lib/vhost/fd_man.c @@ -125,9 +125,9 @@ fdset_add(struct fdset *pfdset, int fd, fd_cb rcb, fd_cb wcb, void *dat) pthread_mutex_lock(&pfdset->fd_mutex); i = pfdset->num < MAX_FDS ? pfdset->num++ : -1; if (i == -1) { - pthread_mutex_lock(&pfdset->fd_pooling_mutex); + pthread_mutex_lock(&pfdset->fd_polling_mutex); fdset_shrink_nolock(pfdset); - pthread_mutex_unlock(&pfdset->fd_pooling_mutex); + pthread_mutex_unlock(&pfdset->fd_polling_mutex); i = pfdset->num < MAX_FDS ? pfdset->num++ : -1; if (i == -1) { pthread_mutex_unlock(&pfdset->fd_mutex); @@ -244,9 +244,9 @@ fdset_event_dispatch(void *arg) numfds = pfdset->num; pthread_mutex_unlock(&pfdset->fd_mutex); - pthread_mutex_lock(&pfdset->fd_pooling_mutex); + pthread_mutex_lock(&pfdset->fd_polling_mutex); val = poll(pfdset->rwfds, numfds, 1000 /* millisecs */); - pthread_mutex_unlock(&pfdset->fd_pooling_mutex); + pthread_mutex_unlock(&pfdset->fd_polling_mutex); if (val < 0) continue; diff --git a/lib/vhost/fd_man.h b/lib/vhost/fd_man.h index 7816fb11ac..4e00f94758 100644 --- a/lib/vhost/fd_man.h +++ b/lib/vhost/fd_man.h @@ -24,7 +24,7 @@ struct fdset { struct pollfd rwfds[MAX_FDS]; struct fdentry fd[MAX_FDS]; pthread_mutex_t fd_mutex; - pthread_mutex_t fd_pooling_mutex; + pthread_mutex_t fd_polling_mutex; int num; /* current fd number of this fdset */ union pipefds {