From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40D1FA32A1 for ; Thu, 24 Oct 2019 10:39:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 175371E87D; Thu, 24 Oct 2019 10:39:03 +0200 (CEST) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by dpdk.org (Postfix) with ESMTP id 079231E87C for ; Thu, 24 Oct 2019 10:39:01 +0200 (CEST) Received: by mail-ed1-f53.google.com with SMTP id y8so5709567edu.5 for ; Thu, 24 Oct 2019 01:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=OqpCOwIB7myiBIWYHJuNVZjW5fUwzHZZr2JNp4oCHQw=; b=YHQfQKhgGRBqHxnEZqoAFRR8uk4KQz4TSfcATOYbBk0wCTo74q1juh2gMTzaNBlHAZ KHbFkzrsPCOsmgWfp62CDRr/+Thay+rZLnkyiDE69p1PZpDMz5VOXNXVjEgu9rh3Oe+U g4LeCSDrD5xWansEEWtW6AprIEjtageAsU9KdBUuBDnerhXAYWcQKXL91C5fIjeh9W2n qBehUMbIPRvSFkRXBbup6h7FWQJkGjie8atPdDSiPKoijQVrCKOh3zePUhXPnBVzWfMW QOZ8ZZyaI0mDyETsrg8RJioL5jloE9dhLsNEYknnUW/JLFTDApcomPppGQb3F4Czec87 AtwA== 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:content-transfer-encoding; bh=OqpCOwIB7myiBIWYHJuNVZjW5fUwzHZZr2JNp4oCHQw=; b=NFFVSFva9RPOBcTAhJJP3gZ/9MIAWaHA1e/Zvl79W90vvwRaITNNtWq50H43msDDBB K+Mbx72akZZLPhv4ZOk0Qq+eXCFn/kPoZ3woXWabIQ2xo18ncuXm7pwcHfmXWSt+A59L +I333A7tXIEgSC/d0xVrCVjgjYnQXL86b48mkKZ64XAApfoT2Zd7k1u8BSs87CA09LLe 2+r32TaS33DAVrS4rh6XVQuiGWRyQb4oqXOldg+wUGwPOtmj+/ypBN/NW9fUSuK/vs3J P3Ottoe7W2j64x7+5n27wIu+txQjwDj9Erc27SFeZQX4F8L8sq66BYrWGP7LM/3kUl1h mWyA== X-Gm-Message-State: APjAAAVRVqxnDfWahCllocMw55Mgivh1XDdRfUdD11HOJVuQt5wTKgPW AtbMXbrSGWibQJk2xV6qMuDmePQ75nMOuLDxIvm/9ZVVIyM= X-Google-Smtp-Source: APXvYqx1spxAEYYpF6ZP8YBXETGOBazkccHd7WmAHguJxQ94NXnAfwaLrAiGc5LSgqsQB+gQ7FDhiKc6nDZxx3T773Q= X-Received: by 2002:a17:906:7097:: with SMTP id b23mr37561114ejk.252.1571906340707; Thu, 24 Oct 2019 01:39:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Micha=C5=82_Krawczyk?= Date: Thu, 24 Oct 2019 10:38:50 +0200 Message-ID: To: kumaraparameshwaran rathinavel Cc: dev@dpdk.org, "Chauskin, Igor" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] Admin Queue ENA X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" sob., 19 pa=C5=BA 2019 o 20:26 kumaraparameshwaran rathinavel napisa=C5=82(a): > > Hi All, > > In the ENA poll mode driver I see that every request in the admin queue i= s > associated with a completion context and this is preallocated during the > device initialisation. When the completion context is used we check for > occupied to be true in the 16.X version if the occupied flag is set to tr= ue > we assert and in the latest version I see that this is an error log. But > there is a time window where if the completion context would be available > to the other consumer but still the old consumer did not set the occupied > to false. The new consumer holds the admin queue lock to get the completi= on > context but the update by the old consumer to set the the occupied flag i= s > not done under lock. So should we make sure that the new consumer should > get the completion context only when the occupied flag is set to false. A= ny > thoughts on this? Hi Param, Both the producer and the consumer are holding the spinlock while getting the completion context. If you see any situation where it isn't (besides the release function), please let me know. As it is protected by the lock, returning error while completion context is occupied (and it shouldn't) it fine, as it will stop the admin queue and allow the DPDK user application to execute the reset of the device. Thanks, Michal > If required I can try to make a patch where the completion context would = be > available only after setting the occupied flag to false. > > Thanks, > Param.