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 97D4141D3D; Thu, 2 Mar 2023 10:29:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88F8C41151; Thu, 2 Mar 2023 10:29:00 +0100 (CET) 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 B5D1B40DFB for ; Thu, 2 Mar 2023 10:28:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677749338; 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=m+K+xpp31yVuc0iDVoucufmq4kTQM6sDFeSIC29xjEI=; b=G1drPwuOkwnKA8xzM7ihLMEn3rbwB9/MtcEVeuHkTHrMMxQwPhRZgcW4UtK4c7wESBqNWa QHH6jWc58Xv3Mp3hmpFeLU5H4WMsYRaqmml80DPWkvME3KXIqG3MDvtuzwTDZuNRl7iR68 PpZooOJarmLXg8tVwIub5DCfbBl9hEI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-169-_4KPPUmIMw2PXzL2CGfA4Q-1; Thu, 02 Mar 2023 04:28:54 -0500 X-MC-Unique: _4KPPUmIMw2PXzL2CGfA4Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25B1F803CBB; Thu, 2 Mar 2023 09:28:54 +0000 (UTC) Received: from [10.39.208.28] (unknown [10.39.208.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C9B18C16027; Thu, 2 Mar 2023 09:28:52 +0000 (UTC) Message-ID: <5b970932-7994-88ef-d0e4-1375c1b26150@redhat.com> Date: Thu, 2 Mar 2023 10:28:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v2 11/20] net/virtio: annotate lock for guest announce To: David Marchand , "Xia, Chenbo" Cc: "dev@dpdk.org" , "thomas@monjalon.net" References: <20230224081642.2566619-1-david.marchand@redhat.com> <20230224151143.3274897-1-david.marchand@redhat.com> <20230224151143.3274897-12-david.marchand@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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 3/2/23 10:26, David Marchand wrote: > On Mon, Feb 27, 2023 at 5:28 PM Maxime Coquelin > wrote: >> As discussed with David off-list, I think we could simplify and inline >> virtio_dev_pause()/virtio_dev_resume() into virtio_notify_peers() since >> there are no other users of these functions (see below). > > I was looking at doing this and, as we discussed offlist, realised > what the "inject" code was doing. > > I don't like the idea of keeping virtio_inject_pkts as a helper. > This is tightly linked to the hw->started + usleep() trick, and this > code has no check about its requirement on hw->started == 0. > I'd rather "inline" and remove this helper too. Makes sense, do you want to submit it or are you willing me to do it? > As a second step, I wrote a fix using an additional lock per txq to > remove this usleep() thing. > Though I think it is too late to consider merging this new change in > the release. > WDYT? I agree this is too late for this release. Let's try this for v23.07. Thanks, Maxime