From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3A043A051C for ; Tue, 11 Feb 2020 12:28:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 30E6B2B9C; Tue, 11 Feb 2020 12:28:39 +0100 (CET) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by dpdk.org (Postfix) with ESMTP id 6E7301BFA1 for ; Tue, 11 Feb 2020 12:28:37 +0100 (CET) Received: by mail-wr1-f41.google.com with SMTP id k11so11858952wrd.9 for ; Tue, 11 Feb 2020 03:28:37 -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=5rYM5Eta0LgS3KvRv5BPe+TCaYE3z1CstjYRQQdLsW0=; b=MLPG7TceWLikp5fSv1ITczVOP2ab1DarfEjZmLTC8fdyDJqcReCCn+pnimJbH7wO7c VATTB+7KiWuuCWPiVB1es12C7yUi0Cul7+7LXcZWm8LFghJ7onhv5A+G6iwOdnptM2xE sxiT8vPOplE3EzrleoJEYh72DOrsDErRzxhqbALlBdMWqoa30m5Jfa78YHOkI2kwpCq3 fNYgCltsS/o517XHJl+Z3yy9bLjNZnPCu1kciW8daRVkHvy4sZx8u7wqfDNTZUhup0qG rWAGJb81Ri/68j8CD5f5Z9RV1kU8qyt3pAs+s66GC3EnpfNKQ1+c5yyIBY3cJu0pgYST ecVA== 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=5rYM5Eta0LgS3KvRv5BPe+TCaYE3z1CstjYRQQdLsW0=; b=V9mMGkKa8z6+yL2z+TiHDan8FDXG+URxqMXgoQWhQNSTFb+41cJobDOa6ynmUFzgCw 6zJVruUY8jcplNEoUfpQ/4gGZKmOLcX1j5dhiCVFCINCrLfcm7dOqwJwsdQDO0x+y3Fh tsuZQVz2Mtm5q1Mpwf1jrrwHz1tln4uz+vHjGZMarxcGgvDjmBWcINS9kXDaOVwxB/+/ ah+I3W2IQfS6QFvBnOoKIG+noVm8bdWl0Gv+gs0Q88YqXDeGquh6NfsXkec7Awouw4Gh kWwq2po5oJpqYsHqJdopjuUb6robxKwdXKb/7kGyqc7Cz7CUNP2snqsEH0/cTi1H56jD PBtA== X-Gm-Message-State: APjAAAWe6QVz9dyzDkK7ZCdzaBwp2OL7UwWuQz3++wKshP+B6iascmja aCtFMppQZ9XcGDfSnEDv711losLEa1U= X-Google-Smtp-Source: APXvYqyABjWTiYfjIh97C5Rx5cuk7U9Kjpvz4Q2kzzniQDesy7WT7z0nvevdpV4OWkyj1EKZbNwRww== X-Received: by 2002:adf:ecd0:: with SMTP id s16mr7937919wro.325.1581420517114; Tue, 11 Feb 2020 03:28:37 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id l15sm4864176wrv.39.2020.02.11.03.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:28:36 -0800 (PST) From: luca.boccassi@gmail.com To: "Wei Hu (Xavier)" Cc: Chengwen Feng , dpdk stable Date: Tue, 11 Feb 2020 11:20:26 +0000 Message-Id: <20200211112216.3929-80-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix ring vector related mailbox command format' has been queued to stable release 19.11.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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.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/13/20. 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. Thanks. Luca Boccassi --- >From 6195f043bc8023fb64769f499750f7056fa0a558 Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Thu, 9 Jan 2020 11:15:56 +0800 Subject: [PATCH] net/hns3: fix ring vector related mailbox command format [ upstream commit c05e0c5b74277e6e72a3b4ad8ae62bce0f03ce80 ] The format of the ring vector related mailbox commands between driver and firmware is different from those of other mailbox commands in hns3 network engine. This patch fixes the error mailbox command format about the vector of the rings, the related command opcode as below: HNS3_MBX_MAP_RING_TO_VECTOR HNS3_MBX_UNMAP_RING_TO_VECTOR HNS3_MBX_GET_RING_VECTOR_MAP Fixes: 463e748964f5 ("net/hns3: support mailbox") Signed-off-by: Chengwen Feng Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_mbx.c | 14 +++++++++++--- drivers/net/hns3/hns3_mbx.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index c1647af4bf..7087b91c4d 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -150,6 +150,8 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode, { struct hns3_mbx_vf_to_pf_cmd *req; struct hns3_cmd_desc desc; + bool is_ring_vector_msg; + int offset; int ret; req = (struct hns3_mbx_vf_to_pf_cmd *)desc.data; @@ -164,9 +166,15 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode, hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false); req->msg[0] = code; - req->msg[1] = subcode; - if (msg_data) - memcpy(&req->msg[HNS3_CMD_CODE_OFFSET], msg_data, msg_len); + is_ring_vector_msg = (code == HNS3_MBX_MAP_RING_TO_VECTOR) || + (code == HNS3_MBX_UNMAP_RING_TO_VECTOR) || + (code == HNS3_MBX_GET_RING_VECTOR_MAP); + if (!is_ring_vector_msg) + req->msg[1] = subcode; + if (msg_data) { + offset = is_ring_vector_msg ? 1 : HNS3_CMD_CODE_OFFSET; + memcpy(&req->msg[offset], msg_data, msg_len); + } /* synchronous send */ if (need_resp) { diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h index 01eddb845d..45101c0b12 100644 --- a/drivers/net/hns3/hns3_mbx.h +++ b/drivers/net/hns3/hns3_mbx.h @@ -41,6 +41,7 @@ enum HNS3_MBX_OPCODE { HNS3_MBX_GET_QID_IN_PF, /* (VF -> PF) get queue id in pf */ HNS3_MBX_HANDLE_VF_TBL = 38, /* (VF -> PF) store/clear hw cfg tbl */ + HNS3_MBX_GET_RING_VECTOR_MAP, /* (VF -> PF) get ring-to-vector map */ }; /* below are per-VF mac-vlan subcodes */ -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:41.754724064 +0000 +++ 0080-net-hns3-fix-ring-vector-related-mailbox-command-for.patch 2020-02-11 11:17:38.516003516 +0000 @@ -1,8 +1,10 @@ -From c05e0c5b74277e6e72a3b4ad8ae62bce0f03ce80 Mon Sep 17 00:00:00 2001 +From 6195f043bc8023fb64769f499750f7056fa0a558 Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Thu, 9 Jan 2020 11:15:56 +0800 Subject: [PATCH] net/hns3: fix ring vector related mailbox command format +[ upstream commit c05e0c5b74277e6e72a3b4ad8ae62bce0f03ce80 ] + The format of the ring vector related mailbox commands between driver and firmware is different from those of other mailbox commands in hns3 network engine. @@ -14,7 +16,6 @@ HNS3_MBX_GET_RING_VECTOR_MAP Fixes: 463e748964f5 ("net/hns3: support mailbox") -Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Wei Hu (Xavier) @@ -24,7 +25,7 @@ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c -index 26807bc4b0..0d03f50644 100644 +index c1647af4bf..7087b91c4d 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -150,6 +150,8 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode, @@ -56,7 +57,7 @@ /* synchronous send */ if (need_resp) { diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h -index 3722c87604..b01eaacc3c 100644 +index 01eddb845d..45101c0b12 100644 --- a/drivers/net/hns3/hns3_mbx.h +++ b/drivers/net/hns3/hns3_mbx.h @@ -41,6 +41,7 @@ enum HNS3_MBX_OPCODE { @@ -64,9 +65,9 @@ HNS3_MBX_HANDLE_VF_TBL = 38, /* (VF -> PF) store/clear hw cfg tbl */ + HNS3_MBX_GET_RING_VECTOR_MAP, /* (VF -> PF) get ring-to-vector map */ - HNS3_MBX_PUSH_LINK_STATUS = 201, /* (IMP -> PF) get port link status */ }; + /* below are per-VF mac-vlan subcodes */ -- 2.20.1