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 E0D8442CC4 for ; Thu, 15 Jun 2023 10:43:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8AD440DDA; Thu, 15 Jun 2023 10:43:05 +0200 (CEST) Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) by mails.dpdk.org (Postfix) with ESMTP id 60D4A40A84 for ; Thu, 15 Jun 2023 10:43:05 +0200 (CEST) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-56cf34a3c72so16936057b3.1 for ; Thu, 15 Jun 2023 01:43:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686818584; x=1689410584; 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=OJQA3okXKGXCYKp2dEQ8mcx4Ypx26811wI4+Uak2clU=; b=O2Q5bBKv+T/Rfur+tVZMJCCZZxlocrjkfaGFLgNVi86jaHCaiM5xRggMpaqMIPUpjn iIkj3gDeQqzPGfz25b3sSL6mjj9f/iohPUuH6oBs6iwk1Se0gxrQNHQqHf/SvzF8z0XQ P1C/Qxj9OE1ohSw7ygZcon94pJAPdrwHpFvFBsTNpJPSIBuM0s+nZgFPop0fHCvjZdES 9BiyhBIqjTJRl2qNx5/ib97zJKxLNdGqZU2W/MOGCxUd2TXFMtyMBYPaYaiLoKb/WC8e aQKrZSVw5M1H7KAW3QgUZdcoCETr1uBIOBQebU333Ss/42RRwFZgWR949RZwNEG8W4qR r9DA== X-Gm-Message-State: AC+VfDzp0zpSW8ElB/JkfuKyJnit2DtLwU08bq/pvI533ycOwxdSy4XR hltVoAxxjpRPjUbS3RjDq6KX2jhxTAiQ21jB X-Google-Smtp-Source: ACHHUZ6NLp0TiTjLnUz1jR9hke/YsICUEyffz3UlJro2YpTr/BI9kI4BnU2vHuirnVi68VFh8WvsdA== X-Received: by 2002:a81:9101:0:b0:56c:f371:557b with SMTP id i1-20020a819101000000b0056cf371557bmr4354005ywg.19.1686818584541; Thu, 15 Jun 2023 01:43:04 -0700 (PDT) Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com. [209.85.128.177]) by smtp.gmail.com with ESMTPSA id g79-20020a0ddd52000000b00570253fc3e5sm489904ywe.105.2023.06.15.01.43.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Jun 2023 01:43:03 -0700 (PDT) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-5701eaf0d04so11124517b3.2 for ; Thu, 15 Jun 2023 01:43:03 -0700 (PDT) X-Received: by 2002:a0d:ca4b:0:b0:56f:f754:513b with SMTP id m72-20020a0dca4b000000b0056ff754513bmr4396322ywd.36.1686818583715; Thu, 15 Jun 2023 01:43:03 -0700 (PDT) MIME-Version: 1.0 References: <20230615062134.1266145-1-chaoyong.he@corigine.com> In-Reply-To: <20230615062134.1266145-1-chaoyong.he@corigine.com> From: Luca Boccassi Date: Thu, 15 Jun 2023 09:42:52 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 20.11] net/nfp: fix Tx descriptor free logic of NFD3 To: Chaoyong He Cc: stable@dpdk.org, oss-drivers@corigine.com, niklas.soderlund@corigine.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, 15 Jun 2023 at 07:22, Chaoyong He wrote: > > [ upstream commit 36d0f4238b2f79850695f49b191ddd4540ff88a6 ] > > In the Tx descriptor free logic of nfd3, the former logic might force > cast a negative number into a very big unsigned number, and which will > cause potential problem in the xmit loop. > > The xmit loop will continue in the place where it should break, and will > overwrite the Tx descriptor which is not free to use by the PMD. > > Fixes: 74a640dac864 ("net/nfp: avoid modulo operations for handling ring = wrapping") > > Signed-off-by: Chaoyong He > Reviewed-by: Niklas S=C3=B6derlund > --- > drivers/net/nfp/nfp_net.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Thanks, applied