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 B3F9541D73; Thu, 2 Mar 2023 13:35:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96F0140E2D; Thu, 2 Mar 2023 13:35:39 +0100 (CET) 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 D464D40E09 for ; Thu, 2 Mar 2023 13:35:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677760535; 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: in-reply-to:in-reply-to:references:references; bh=HhUHlu+sdAhs2s5G3MKZCD765/IRlkaDp5NQReIGDSU=; b=OF+7Pp+69ERenpdKreerbu5QJenCzsvtfI0xqAAGskHV0fiyFsD5mv1UCOfy8OVnB6WRRH nSBDlMFdRvv7wlLvYynpuLtFq5RrN8EPOuIwGiafrFsynSveUjnx6v4FPswxY/Wcjb27Gi lbayZzGV2wOGzCU4mx3bpfBz+fQn5pA= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-278-MmEZ2CuiOmeQ7YhqrFEGIw-1; Thu, 02 Mar 2023 07:35:31 -0500 X-MC-Unique: MmEZ2CuiOmeQ7YhqrFEGIw-1 Received: by mail-pl1-f197.google.com with SMTP id n1-20020a170902968100b0019cf3c5728fso8024381plp.19 for ; Thu, 02 Mar 2023 04:35:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677760530; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HhUHlu+sdAhs2s5G3MKZCD765/IRlkaDp5NQReIGDSU=; b=4w4U40ptOKv4Vbkr3hXwVSZvUZ8seAcMh1KfZwlfttY3TNo3odRAjsU41YNl37NDVN s6Kc6CIMYvBLSfXVvYXxVVQ0ZIa6BNGSmsQwnYnt2/KsfjupKH8mk1f4d23TwopB6N3o ZyRBmfD4g+zsA9Tu4TOExGaGo/C/6hX5rvAAjdqYUDfXFhoyYLJQpvR5ABrX1bokfgoT LGFTNM7u/g2dVOVO9FPl0IB3BAyl0Xo4fTYy8qarHnu+CIh22ry5xLfbpDRJxaxCFiOm VPbQWWJZ3cnNHlZ2abuIl+Jw6sDYMYwCCxy5FvoGB24qtaypoqC442BNxIR9HJc3UFJS 07DA== X-Gm-Message-State: AO0yUKV3x+FN4j757ujXH4JbZU4kFYhBWispnGmjbhBtqKSH0PQ0xya+ 3c8wYtPk+6/b9xp1gAOzKBHzxOXEfqsuw9v+OMoB50pILq8FmztKDnsVmQMK4ajFO7OUM7cOgU+ kuVoigCf2KxXbFEcVnU5/iefy X-Received: by 2002:a17:90a:9f90:b0:234:b4ad:d598 with SMTP id o16-20020a17090a9f9000b00234b4add598mr3980026pjp.7.1677760530557; Thu, 02 Mar 2023 04:35:30 -0800 (PST) X-Google-Smtp-Source: AK7set/TGT+rj86Y8Vkf7CakMOAxL9TFF6e1baHqfE5UbYKtbL68GfpTO/l+sXqb+qN8bmgaiFeAaVez4wJcKPJa8iY= X-Received: by 2002:a17:90a:9f90:b0:234:b4ad:d598 with SMTP id o16-20020a17090a9f9000b00234b4add598mr3980021pjp.7.1677760530266; Thu, 02 Mar 2023 04:35:30 -0800 (PST) MIME-Version: 1.0 References: <20230224081642.2566619-1-david.marchand@redhat.com> <20230224151143.3274897-1-david.marchand@redhat.com> <20230224151143.3274897-12-david.marchand@redhat.com> <5b970932-7994-88ef-d0e4-1375c1b26150@redhat.com> In-Reply-To: <5b970932-7994-88ef-d0e4-1375c1b26150@redhat.com> From: David Marchand Date: Thu, 2 Mar 2023 13:35:19 +0100 Message-ID: Subject: Re: [PATCH v2 11/20] net/virtio: annotate lock for guest announce To: Maxime Coquelin Cc: "Xia, Chenbo" , "dev@dpdk.org" , "thomas@monjalon.net" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Thu, Mar 2, 2023 at 10:28 AM Maxime Coquelin wrote: > 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? I'll handle it, either during this release, or the next one. This code has always been ugly, this can wait one more release. -- David Marchand