From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BC5B01B108 for ; Wed, 21 Nov 2018 17:06:05 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 251C230842AE; Wed, 21 Nov 2018 16:06:05 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 138EE608E7; Wed, 21 Nov 2018 16:06:03 +0000 (UTC) From: Kevin Traynor To: Andy Moreton Cc: Andrew Rybchenko , dpdk stable Date: Wed, 21 Nov 2018 16:04:03 +0000 Message-Id: <20181121160440.9014-13-ktraynor@redhat.com> In-Reply-To: <20181121160440.9014-1-ktraynor@redhat.com> References: <20181121160440.9014-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 21 Nov 2018 16:06:05 +0000 (UTC) Subject: [dpdk-stable] patch 'net/sfc/base: fix ID retrieval in v3 licensing' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 16:06:06 -0000 Hi, FYI, your patch has been queued to stable release 18.08.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 11/26/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From be987c78a6c018b7b484004bdefa63d96113ba22 Mon Sep 17 00:00:00 2001 From: Andy Moreton Date: Mon, 10 Sep 2018 10:33:25 +0100 Subject: [PATCH] net/sfc/base: fix ID retrieval in v3 licensing [ upstream commit 416aa7f1c98acfaf996a54f63fd2a02dc5ef3a73 ] Fixes: 05fce2ce8451 ("net/sfc/base: import libefx licensing") Fixes: f67e4719147d ("net/sfc/base: fix coding style") Signed-off-by: Andy Moreton Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/efx_lic.c | 39 ++++++++-------------------------- 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/drivers/net/sfc/base/efx_lic.c b/drivers/net/sfc/base/efx_lic.c index 1ca1bf477..e2097b6b4 100644 --- a/drivers/net/sfc/base/efx_lic.c +++ b/drivers/net/sfc/base/efx_lic.c @@ -984,24 +984,12 @@ efx_mcdi_licensing_v3_get_id( efx_mcdi_req_t req; EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LICENSING_GET_ID_V3_IN_LEN, - MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN); + MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX); efx_rc_t rc; req.emr_cmd = MC_CMD_LICENSING_GET_ID_V3; - - if (bufferp == NULL) { - /* Request id type and length only */ - req.emr_in_buf = bufferp; - req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN; - req.emr_out_buf = bufferp; - req.emr_out_length = MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN; - } else { - /* Request full buffer */ - req.emr_in_buf = bufferp; - req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN; - req.emr_out_buf = bufferp; - req.emr_out_length = - MIN(buffer_size, MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX); - (void) memset(bufferp, 0, req.emr_out_length); - } + req.emr_in_buf = payload; + req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN; + req.emr_out_buf = payload; + req.emr_out_length = MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX; efx_mcdi_execute_quiet(enp, &req); @@ -1021,17 +1009,8 @@ efx_mcdi_licensing_v3_get_id( MCDI_OUT_DWORD(req, LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH); - if (bufferp == NULL) { - /* - * Modify length requirements to indicate to caller the extra - * buffering needed to read the complete output. - */ - *lengthp += MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN; - } else { - /* Shift ID down to start of buffer */ - memmove(bufferp, - bufferp + MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST, - *lengthp); - memset(bufferp + (*lengthp), 0, - MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST); + if (bufferp != NULL) { + memcpy(bufferp, + payload + MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST, + MIN(buffer_size, *lengthp)); } -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-21 15:59:13.961806814 +0000 +++ 0013-net-sfc-base-fix-ID-retrieval-in-v3-licensing.patch 2018-11-21 15:59:13.000000000 +0000 @@ -1,11 +1,12 @@ -From 416aa7f1c98acfaf996a54f63fd2a02dc5ef3a73 Mon Sep 17 00:00:00 2001 +From be987c78a6c018b7b484004bdefa63d96113ba22 Mon Sep 17 00:00:00 2001 From: Andy Moreton Date: Mon, 10 Sep 2018 10:33:25 +0100 Subject: [PATCH] net/sfc/base: fix ID retrieval in v3 licensing +[ upstream commit 416aa7f1c98acfaf996a54f63fd2a02dc5ef3a73 ] + Fixes: 05fce2ce8451 ("net/sfc/base: import libefx licensing") Fixes: f67e4719147d ("net/sfc/base: fix coding style") -Cc: stable@dpdk.org Signed-off-by: Andy Moreton Signed-off-by: Andrew Rybchenko @@ -14,7 +15,7 @@ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/drivers/net/sfc/base/efx_lic.c b/drivers/net/sfc/base/efx_lic.c -index 2a6da2647..4081aef1b 100644 +index 1ca1bf477..e2097b6b4 100644 --- a/drivers/net/sfc/base/efx_lic.c +++ b/drivers/net/sfc/base/efx_lic.c @@ -984,24 +984,12 @@ efx_mcdi_licensing_v3_get_id(