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 5A051426C3; Thu, 5 Oct 2023 16:17:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3B4C4028A; Thu, 5 Oct 2023 16:17:08 +0200 (CEST) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by mails.dpdk.org (Postfix) with ESMTP id E43B04014F for ; Thu, 5 Oct 2023 16:17:06 +0200 (CEST) Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-4180b417309so5869351cf.0 for ; Thu, 05 Oct 2023 07:17:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696515426; x=1697120226; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OmOmcag+eiSA5temhGTrEOPddTyJWSiaha97TOQwiGI=; b=X6GHh2ejsybzSFob9Cj/gIemcBLKw4ddi3WI99L3ptSFy5SSFkKv4PKezUn2MaZ9V0 UTTuonKRDCfYv5SLV6I7pQ6cupYa23Hgi/BCwpk3pFtdvUQnxC4ZbaF2f6AtuzOgWcrU YDC/umlXNGt4+P5Sgd6AsANL3WHnxICa85lWDpKBJj+YLFYVeNUKZTg5CEg8PWRU2dTh q3XaZkuAwANMmdVXmvXt9AEAloMsgIOu4m7luNnxvXayzDPbXTLkQbyZhqnn5M0FA5WA +1XahJxWe6kWcno1mCWXP0QgQA/IwCPlslzdyTfItlLzhEviR7BiZS/2ROshTJ+u+s+S e0Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696515426; x=1697120226; h=content-transfer-encoding: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=OmOmcag+eiSA5temhGTrEOPddTyJWSiaha97TOQwiGI=; b=l8gXmDZOGGjba9sYf8yjxp0nvh1VUBU9dUR7Rcgc8ynh8TExQs+8nImCiX4Os3bZqQ 5VQe8plZazN6MjUReWFRniIUuWALQQRlKld4V+pqzn08aGoKEGlTHiWfDjv3Jce5G7nq 6aYb52lc4n14wx0Yrl9dce/Z3z1Sab5ImGn1/mNMJl+v53Pt/m/Df9Fq+MEYEialXYD0 ZQ0Pj04i0o/x+HitYnX0yI/vB588vEIvHjy2R+bJimeJwwF7NE7d5Hnw9oTn0diHx4QG 8ZFmuSlV19OIEECVWjuiBroCuDR9zWt99DZ3OCXPndHJC5VDSbCoFT97PBc2Hs5CWMYe 9F4Q== X-Gm-Message-State: AOJu0Ywd4UciszNydJ5on/5D7dzrvBF3l/MITCJR66iO/vkhO4kmSU1R vHAfJ9TX3k3dBGQ63UOFggyyhB2y1gwFPGiH2JUgt3DGMRE= X-Google-Smtp-Source: AGHT+IHP+iRpij59ZaPx7aMWcnHxR3bLsTSWJ0XrTBZ80GI4DO6cotfKeG8AXF2mX+2Pgl88wXPk15O3YTpX5+jtWfQ= X-Received: by 2002:a05:622a:1051:b0:417:b545:e962 with SMTP id f17-20020a05622a105100b00417b545e962mr5929018qte.7.1696515426049; Thu, 05 Oct 2023 07:17:06 -0700 (PDT) MIME-Version: 1.0 References: <20231005062513.29467-1-hkalra@marvell.com> <20231005062513.29467-2-hkalra@marvell.com> In-Reply-To: <20231005062513.29467-2-hkalra@marvell.com> From: Jerin Jacob Date: Thu, 5 Oct 2023 19:46:39 +0530 Message-ID: Subject: Re: [PATCH 2/2] common/cnxk: fix race condition between up and down mbox To: Harman Kalra Cc: jerinj@marvell.com, Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, Oct 5, 2023 at 12:06=E2=80=AFPM Harman Kalra w= rote: > > Fixing a possible case for race condition where an up mbox > interrupt over writes the down mbox message. > Although mbox_wait_for_zero() makes sure no up/down message > is pending before raising an up mbox interrupt. But there is a > small window were a VF may send a down mbox request to PF after > mbox_wait_for_zero() and before PF attempts to send a up > message to same VF. In such scenario interrupt register which has > down message bit set will get overwritten by up message bit. > > As a solution, read interrupt register and OR the status with > required up/down bit before writing to the interrupt register. > > Fixes: fa4ee2d43188 ("common/cnxk: sync between mbox up and down messages= ") Cc: stable@dpdk.org > > Signed-off-by: Harman Kalra Series applied to dpdk-next-net-mrvl/for-next-net. Thanks