From patchwork Tue Jun 11 13:39:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 140927 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 28941424CD; Tue, 11 Jun 2024 15:40:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 839D04067C; Tue, 11 Jun 2024 15:40:11 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id A0CD44021F for ; Tue, 11 Jun 2024 15:40:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718113210; 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=/9+TMbHix+Vm2cBCVE/9hx0DFnwiSd2cSBZVHtpIxLs=; b=Kje9U4PptoLtWdOPd0La5S81CZiuHp8F5XLuOqcH+g8I8HAVlhlyLuZ+UEcO32YiLZTlm2 R/5hGHR9/L5djJPE2s1uFPPJlPJMQ2BwsuKsjreYAGSr+rbuqwPykZ+j/gWOQ1UOkLzJRc xd/dPPgAoVetAkfSl01hcg9R1qsawb0= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-450-LQjGsJf5P96o04-epedknw-1; Tue, 11 Jun 2024 09:40:06 -0400 X-MC-Unique: LQjGsJf5P96o04-epedknw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B007F19560AB; Tue, 11 Jun 2024 13:40:05 +0000 (UTC) Received: from max-p1.redhat.com (unknown [10.39.208.15]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D0A981956087; Tue, 11 Jun 2024 13:40:03 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, david.marchand@redhat.com, chenbox@nvidia.com Cc: Maxime Coquelin Subject: [PATCH v4 1/5] vhost: rename polling mutex Date: Tue, 11 Jun 2024 15:39:53 +0200 Message-ID: <20240611133957.72032-2-maxime.coquelin@redhat.com> In-Reply-To: <20240611133957.72032-1-maxime.coquelin@redhat.com> References: <20240611133957.72032-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 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 {