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 20207455FE; Fri, 12 Jul 2024 10:53:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8CC3B402B3; Fri, 12 Jul 2024 10:53:26 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D1967402AE for ; Fri, 12 Jul 2024 10:53:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720774404; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FcwoFqvPID4huvTwi1MpL5UY79Ua8R9Ve6Z3eUIHWAQ=; b=RsJKxpsmzFTFAHEi1wNdg4OsJ6PKAwZGfXeLFywLRKMt4WHIY2uckv/O+zx2zGgu5aqsqq B8QNxqNYCi0pHOkYiZMBoxQJYVSqtm16n+W0zp9BaZO2W/vz5SgH6OYch54EeJ/KDD0gw+ qwf3N1t8Vqo2FNFZqZX13eJuiLecOGc= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-U_sKIinoMwibm_FPN65vcg-1; Fri, 12 Jul 2024 04:53:22 -0400 X-MC-Unique: U_sKIinoMwibm_FPN65vcg-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2ee81ff717fso19437301fa.3 for ; Fri, 12 Jul 2024 01:53:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720774401; x=1721379201; 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=FcwoFqvPID4huvTwi1MpL5UY79Ua8R9Ve6Z3eUIHWAQ=; b=Xtsk1YRIYJ2fvqG5+i3TagZHqJpMLHFXZlI8iPurAQVLMK6lItIGvvjyTza38+gPoV v8xwicL5T9JeGvdxy1j6NH7gs8nb8mB2NFrepJao+5pS+V7yYc0lPpUFitPX/H7ORKTD kydD9+XhGSqiDcsuYaloPTgWgE28gTl3go/mlKMuiYuZGojkdQWG9j3Tx/ssllHKQW6q UuHGNQyMSGY0RdcyUTMyPZRi78mF65snldWg8MlFLQB/XdsKn4BwJaUuyHn4dU6PRCAU n0/fdCsL3T7QJa4E3U16Ty6HBEMV3uSLbt0RRM0KnIGSLPGYJZAFwA/H+5YuNClfLjct +rnA== X-Gm-Message-State: AOJu0YyMUeYuDnBHdeH7yjUjdUc9r0DVEBGprzAG88Z/YlViKN6np44H 3Nw5AOtjvd8iNUpFK407E+oTnuaaiGbcqlVEAXxRMGZMt1itZ6cR0RSWg3dN1+6wgJrl5KpJEJ0 ZOo2nlaPQ3FOK9mLlNyFCKLGXNSPNSS7ndaLmvuD52KSXnyhT1Ma0ZThZVG2ZrDTdcvQjOI3yUd 8bRT0OkeGqCS8scI8= X-Received: by 2002:a05:651c:11c7:b0:2ee:4623:93e with SMTP id 38308e7fff4ca-2eeb30e398cmr70488801fa.20.1720774401333; Fri, 12 Jul 2024 01:53:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXKE6xLRv6JNQUULnaXq8ZSbNeS2b7kcRf9dFDUPsFJa+QJd3JzNAimW+PRS4P4N9adOOoY3vRT7fMo02D1fo= X-Received: by 2002:a05:651c:11c7:b0:2ee:4623:93e with SMTP id 38308e7fff4ca-2eeb30e398cmr70488721fa.20.1720774401023; Fri, 12 Jul 2024 01:53:21 -0700 (PDT) MIME-Version: 1.0 References: <229663bd30b1f64accf51bdefa20f6abf9ee8ad0.1720612158.git.anatoly.burakov@intel.com> In-Reply-To: <229663bd30b1f64accf51bdefa20f6abf9ee8ad0.1720612158.git.anatoly.burakov@intel.com> From: David Marchand Date: Fri, 12 Jul 2024 10:53:09 +0200 Message-ID: Subject: Re: [PATCH v1 1/1] fbarray: fix find_next_n for unaligned length To: Anatoly Burakov Cc: dev@dpdk.org, Tyler Retzlaff , stable@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Hello, On Wed, Jul 10, 2024 at 1:49=E2=80=AFPM Anatoly Burakov wrote: > > When array length is not aligned on a power of 2, we need to mask out the > unaligned bits from the mask whenever we reach the last mask. However, wh= en both > ignore mask (e.g. due to starting at unaligned bit) and last index ignore= mask > are specified, we combine them with an OR, which is incorrect. Fix it to = combine > them with AND instead, and add a unit test covering this case. > > The reverse function does not suffer from this issue because it does not = have to > deal with array end, and array beginning is always aligned. > > Fixes: c44d09811b40 ("eal: add shared indexed file-backed array") > Cc: stable@dpdk.org > > Signed-off-by: Anatoly Burakov Please don't forget to run checkpatch before submitting. I reformatted the commitlog and applied, thanks Anatoly. --=20 David Marchand