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 668F7A0524 for ; Fri, 5 Feb 2021 12:20:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F2771606BA; Fri, 5 Feb 2021 12:20:54 +0100 (CET) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id BAAA91606BA for ; Fri, 5 Feb 2021 12:20:53 +0100 (CET) Received: by mail-wr1-f42.google.com with SMTP id d16so7215887wro.11 for ; Fri, 05 Feb 2021 03:20:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TTcfBxE4MEL0M1WjZnN0BMT84q4hyy1DTjHP8MxU+uI=; b=tYUFFoSg+SsOH+5e3Hs7MmokmCyXVMsJqXRoj22OurWPWbmRxQLEYbSueKb0EKMZ/7 NX/cAWNFCHgBz0U6jmPXhp4Emriez49HB0+bq5fgaGqmklLElgA8Mnfv9Z8MEwzU5sDq UW1BVBmVPPLxJBDN9d2dYcLJvqRHedUfjS65cqs+rGFRXR5Jcpj9vXF8uba9fOTgyn6L /d9BjzODbeB13YjcRvM3bz0uK0a00SJMnsAatNcTwT18EdmGFqxy2eXoC/lUl2Z+PrLt SfHZZYe1rPoHQau/2qMtHJvRC3p0U2HkgEDTvjimbJnn3WGsI2RgA6nj+hfrzuug+qY8 I4OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TTcfBxE4MEL0M1WjZnN0BMT84q4hyy1DTjHP8MxU+uI=; b=h4cAtJAmG3gOw3fSDmfkGv8qb3HGk3S9IV4pOV6RckM+9sVkzaCd2yK/h3oVhDbAyp hAf+hskQNXQYkamzdwXMNfa+jTduKWSuL78zXwt36ZB1ZzUhq2ZDWyCaV/O/oPTFv+i9 czvwBQwAhtvMG0MHtnEMngajeuHfyF2FDd60AjB4hPojnZJA1QZhHb32GZmuKkajASWi jlP6atEMDOXnjwTH/fG9j5RBAxxU1uV3Ao9NfeHxltX8d9cG0M4xVn3F21MRSNbJc26i mZL3N5+ZiFjdJw6ipzGoTBuZxh2miHa8eW/Y64w1otWPZ5Kg+8MeIY1WBzskQgXLoPio FvhA== X-Gm-Message-State: AOAM531zaAdzIzcw4mWJaFL318FmDbHGGtkloN9mxkdxPRvXXD62UvKI q1vHQGfLKsOSZ7x4iSNJSqk= X-Google-Smtp-Source: ABdhPJyhtvJxioT6T/zsVVjgOM8geoT+u+ynMFErjf2D2ylo/vIeHXScMcvlPd6rdyqwSCvXvwHEVQ== X-Received: by 2002:a05:6000:1201:: with SMTP id e1mr4530000wrx.112.1612524053586; Fri, 05 Feb 2021 03:20:53 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id n15sm11626175wrx.2.2021.02.05.03.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:20:52 -0800 (PST) From: luca.boccassi@gmail.com To: Ivan Malov Cc: Andrew Rybchenko , Andy Moreton , dpdk stable Date: Fri, 5 Feb 2021 11:15:13 +0000 Message-Id: <20210205111920.1272063-27-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'common/sfc_efx/base: fix signed/unsigned mismatch warnings' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/b79e4c8ad6e52a9deb26372d34d9faa5e5eaabad Thanks. Luca Boccassi --- >From b79e4c8ad6e52a9deb26372d34d9faa5e5eaabad Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Tue, 1 Dec 2020 10:24:21 +0300 Subject: [PATCH] common/sfc_efx/base: fix signed/unsigned mismatch warnings [ upstream commit a0f0b03c817ce14e9dc337c8d9d8770760173dfe ] Fix signed/unsigned mismatch issues found by Windows build. Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API") Fixes: bb71f7e0a35a ("common/sfc_efx/base: add match specs class comparison API") Fixes: e9d5c5fb6872 ("common/sfc_efx/base: avoid reading past buffer") Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/efx_mae.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index cbc1cb28c9..2f5b167275 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -644,7 +644,7 @@ efx_mae_match_spec_field_set( goto fail1; } - if (field_id >= desc_set_nentries) { + if ((unsigned int)field_id >= desc_set_nentries) { rc = EINVAL; goto fail2; } @@ -844,7 +844,8 @@ efx_mae_match_spec_is_valid( if (field_caps == NULL) return (B_FALSE); - for (field_id = 0; field_id < desc_set_nentries; ++field_id) { + for (field_id = 0; (unsigned int)field_id < desc_set_nentries; + ++field_id) { const efx_mae_mv_desc_t *descp = &desc_setp[field_id]; efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id; const uint8_t *m_buf = mvp + descp->emmd_mask_offset; @@ -853,7 +854,7 @@ efx_mae_match_spec_is_valid( if (m_size == 0) continue; /* Skip array gap */ - if (field_cap_id >= field_ncaps) + if ((unsigned int)field_cap_id >= field_ncaps) break; switch (field_caps[field_cap_id].emfc_support) { @@ -1350,14 +1351,15 @@ efx_mae_match_specs_class_cmp( return (0); } - for (field_id = 0; field_id < desc_set_nentries; ++field_id) { + for (field_id = 0; (unsigned int)field_id < desc_set_nentries; + ++field_id) { const efx_mae_mv_desc_t *descp = &desc_setp[field_id]; efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id; if (descp->emmd_mask_size == 0) continue; /* Skip array gap */ - if (field_cap_id >= field_ncaps) + if ((unsigned int)field_cap_id >= field_ncaps) break; if (field_caps[field_cap_id].emfc_mask_affects_class) { -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:30.515338258 +0000 +++ 0027-common-sfc_efx-base-fix-signed-unsigned-mismatch-war.patch 2021-02-05 11:18:28.634687837 +0000 @@ -1 +1 @@ -From a0f0b03c817ce14e9dc337c8d9d8770760173dfe Mon Sep 17 00:00:00 2001 +From b79e4c8ad6e52a9deb26372d34d9faa5e5eaabad Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a0f0b03c817ce14e9dc337c8d9d8770760173dfe ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org