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 5797FA0524 for ; Fri, 5 Feb 2021 12:32:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 51C991889FE; Fri, 5 Feb 2021 12:32:31 +0100 (CET) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mails.dpdk.org (Postfix) with ESMTP id DEDD11889F8 for ; Fri, 5 Feb 2021 12:32:28 +0100 (CET) Received: by mail-wr1-f44.google.com with SMTP id v15so7319419wrx.4 for ; Fri, 05 Feb 2021 03:32:28 -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=E2Zw9AJeXUzAEqZYoSurr1OxTqgw7UyEqe+jw6oCdY8=; b=mt+iIhixZo4ZKAJVwddRmaG5HxRy+dBAAMaMmbTc8GwKAzxhnNkZgeYp8ED3CqDp8K tSBMqNmiyzGX3v1DIgR4OhTW6fLK75Ks1Y/TER0d1aglySbAdtjGbKAPUo/PIoQX72wJ U0lde4f+V2QKk2PKn/9gw+Z2G7kiJOkHPTY8img/8k0cLr/KyaId0pK+PO4IMyNdc8iQ Kud37ar9tshhiJI0TOtuUi1CcjMyvupCvt8JcP4P3J1/G+X+MlstdU5HpH1GjwczRcGu SRjn891gfPG88WogdqCD8u+COmdk+s/0lXGUYTCWeCsBmLcbe0YQPYdDswDDfHuKXtyb qS4Q== 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=E2Zw9AJeXUzAEqZYoSurr1OxTqgw7UyEqe+jw6oCdY8=; b=AyU17vBZJNJAEoPhSMJmXgb6rAczqngW2GehGGu/SbU647+yz3LULK4rPYkWqw2z1k xR+b08IAKyrkDWahQ36897PQ2StLFuutraTknrhqfLkJDKzischu+lsnWhzEXFGQdsP3 NTNtOJWntDDbWIOiBvhg2AZ0jBhNDhwsAmvrXsce6KLq+jGdlRMo2RCWU9Lir6YeztKe lNQICGZDOximys3WXyO0OFDanS3xojKFDGK6R04FWcdhk6eZEpLpWf7xNaYvhSygwcQc LEkxNvE39fqh1jakr+hj3qgRKrsoUn0NjA2zqWURbKnwURh41k6Dmr2Ah5TZNFqXEO5u AhsQ== X-Gm-Message-State: AOAM531OLPtdqDBlWCJ5q6XrrjwaDU0GnU5JoY6fGBdhU+DVRiC2k6WF gET/lIUEUL9R1r2fOdbLJlw= X-Google-Smtp-Source: ABdhPJx0sBZMFp/2kRv08bHyqadqiT1jy4qCJa8y4WV5FFKyNJBj4dAgNJiaQxDt+/TeXFaznTqzpw== X-Received: by 2002:adf:e4c3:: with SMTP id v3mr2272480wrm.210.1612524748727; Fri, 05 Feb 2021 03:32:28 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id e12sm12052579wrs.67.2021.02.05.03.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:32:28 -0800 (PST) From: luca.boccassi@gmail.com To: Ivan Malov Cc: Andy Moreton , Andrew Rybchenko , dpdk stable Date: Fri, 5 Feb 2021 11:17:05 +0000 Message-Id: <20210205111920.1272063-139-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 MPORT related byte order handling' 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/7e813f306102a74f9655b5cb3d01324fb0f25bb9 Thanks. Luca Boccassi --- >From 7e813f306102a74f9655b5cb3d01324fb0f25bb9 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Mon, 28 Dec 2020 06:00:23 +0300 Subject: [PATCH] common/sfc_efx/base: fix MPORT related byte order handling [ upstream commit f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f ] MPORT values derived by helper functions are little-endian. At the same time, MCDIs which consume these values perform one more host-order to little-endian conversion internally. Fix the helper functions to return host-order MPORT values. Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec") Fixes: bb024542fffd ("common/sfc_efx/base: add API for adding action drop") Fixes: 097058033f03 ("common/sfc_efx/base: add API to get mport of PF/VF") Reported-by: Andy Moreton Reviewed-by: Andy Moreton Reviewed-by: Andrew Rybchenko Signed-off-by: Ivan Malov --- drivers/common/sfc_efx/base/efx_mae.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index a54d5f6e6c..22f29d454c 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -593,7 +593,13 @@ efx_mae_mport_by_phy_port( MAE_MPORT_SELECTOR_PPORT_ID, phy_port); memset(mportp, 0, sizeof (*mportp)); - mportp->sel = dword.ed_u32[0]; + /* + * The constructed DWORD is little-endian, + * but the resulting value is meant to be + * passed to MCDIs, where it will undergo + * host-order to little endian conversion. + */ + mportp->sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0); return (0); @@ -630,7 +636,13 @@ efx_mae_mport_by_pcie_function( MAE_MPORT_SELECTOR_FUNC_VF_ID, vf); memset(mportp, 0, sizeof (*mportp)); - mportp->sel = dword.ed_u32[0]; + /* + * The constructed DWORD is little-endian, + * but the resulting value is meant to be + * passed to MCDIs, where it will undergo + * host-order to little endian conversion. + */ + mportp->sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0); return (0); @@ -1319,7 +1331,13 @@ efx_mae_action_set_populate_drop( EFX_POPULATE_DWORD_1(dword, MAE_MPORT_SELECTOR_FLAT, MAE_MPORT_SELECTOR_NULL); - mport.sel = dword.ed_u32[0]; + /* + * The constructed DWORD is little-endian, + * but the resulting value is meant to be + * passed to MCDIs, where it will undergo + * host-order to little endian conversion. + */ + mport.sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0); arg = (const uint8_t *)&mport.sel; -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:35.374446275 +0000 +++ 0139-common-sfc_efx-base-fix-MPORT-related-byte-order-han.patch 2021-02-05 11:18:29.022695225 +0000 @@ -1 +1 @@ -From f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f Mon Sep 17 00:00:00 2001 +From 7e813f306102a74f9655b5cb3d01324fb0f25bb9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org