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 BC888A034F; Sat, 15 May 2021 08:10:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2177C40042; Sat, 15 May 2021 08:10:22 +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 E944540041 for ; Sat, 15 May 2021 08:10:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621059020; 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=KgIzj/QFr3A5B0lsBo3kdrTQ/5vWKarBmiqDArX6xms=; b=cLkoqm2hvBjf4Yyx/hzO+3ycvr0mIJBcP9bH1kCcqKssaafNJ0LNwbS33PIrbl83X0QXH6 7iz3aW6F8Eebv4stp3oTf5/PjmW7wOSG8hs2j0jCiR3+D5sfOY3WD9J+uioIawClP8tGeb zJc8JuDieSwO8lpjsj2+HawETEGP3tA= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-EwYupYIKOZmxE4QYKXSR_w-1; Sat, 15 May 2021 02:10:18 -0400 X-MC-Unique: EwYupYIKOZmxE4QYKXSR_w-1 Received: by mail-ua1-f69.google.com with SMTP id t19-20020ab021530000b029020bc458f62fso621114ual.20 for ; Fri, 14 May 2021 23:10:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KgIzj/QFr3A5B0lsBo3kdrTQ/5vWKarBmiqDArX6xms=; b=eIGGH22bdReV8jo7HrV6R2n7NFQ8BwTPCwD8eDHZJL9TT7PgakrFlxK12wCAcGkb5m PLnmKMxCWCqw5XlX+hNFyQ4Yw9w9Jy9xwpdh0dYAZGwEWIu4zAg7Mu8gqBmdGXUbhBgW XhRsCYnKuHh+ssYcXLx7h4WSB9/sFpMmQGXNeSUFxGJRzrUIVvY1cEIXSe/T/ALNVTB5 nFUaPVDrGrz6PB7h/smR+jAbOaJBnhfwbHUH0gilRjL4FO1lz+rIGZXVo9uROhfNcq+r H7wC8t3aO0nXBFXH6JxkTycZox1rBl7HntquqlnqG94SFYhWqYSuv4YLLJgOBCL3g0V6 XDfw== X-Gm-Message-State: AOAM533KIybwfXnN4vfKLD0dfsj3VNEkkoAuTOH7sr0f0CXrjpdk+iB0 92M6/FmVQKbYF4LqBXL1Sb9r2T+G9uKsiwDALZo2c9LpVeU0zg/Y9YrLjqci5TD2yksPIiq5IYl /I2s//SBCR+b3yyGWMFM= X-Received: by 2002:a05:6102:320d:: with SMTP id r13mr41092221vsf.27.1621059018066; Fri, 14 May 2021 23:10:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxJYhgHd8OwogjeqURhPf/P2O4q/BxhgPOZoOlmJ6waFdBJorX1LIMuRkOZ/h0JPryf/ynKMYuFxkyWiog4I4= X-Received: by 2002:a05:6102:320d:: with SMTP id r13mr41092220vsf.27.1621059017854; Fri, 14 May 2021 23:10:17 -0700 (PDT) MIME-Version: 1.0 References: <83fa6253725a7bc69bccb7897f380422354a2898.1621008025.git.bnemeth@redhat.com> In-Reply-To: <83fa6253725a7bc69bccb7897f380422354a2898.1621008025.git.bnemeth@redhat.com> From: David Marchand Date: Sat, 15 May 2021 08:10:05 +0200 Message-ID: To: Balazs Nemeth Cc: dev , Wei Ling Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] vhost: fix invalid use of stored last used index 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 Sender: "dev" On Fri, May 14, 2021 at 6:02 PM Balazs Nemeth wrote: > > The optimization introduced by commit d18db8049c7c ("vhost: read last > used index once") didn't account for the fact that > vhost_flush_enqueue_shadow_packed increments the last_used_idx. For this > reason, store last_used_idx after the potential call to > vhost_flush_enqueue_shadow_packed. > Bugzilla ID: 699 > Fixes: d18db8049c7c ("vhost: read last used index once") > Signed-off-by: Balazs Nemeth Reviewed-by: David Marchand -- David Marchand