From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id DD7CDA0465 for ; Wed, 29 May 2019 12:36:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F36BD1B944; Wed, 29 May 2019 12:36:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id C72973576 for ; Wed, 29 May 2019 12:36:49 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4TAUW6R012661; Wed, 29 May 2019 03:36:48 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=cYri+yPKLf1+2KDMaQKTF8yVOU5dVoBKf7LOl8wyCyk=; b=Lv7XC5IfIRJeAJmss+x4leniOFADCBS7GdB2qQuyJTbJFidhBRKOoqZbnYMnVpRkWMoR 9id9S5eTMQEqJKi0ygCS+F44WaLz+c4xBURsbfEwzya8eHbIwMItLR1zMK+xBmIgPND2 7pZTSPqjloSSIp4xQKeHpHAcheFl0srt9GkpQMAItRNZnMAzk4yJVJSGG7ZMuHGZoOmG mh5AwkQ4jP0akDAcwTGsdv31y/vsHHE7rHw0gL/JTHEUT+LRVbxmQcIpQUFfkb6n5v+4 noQamzJGGlV1BnTQ0E8cIf+JCkpJnq0s+LFxFjlbDOLx8ArYFWj3f1ScBfcbWVOM+T4x Jg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2sskp892q9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 29 May 2019 03:36:48 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 29 May 2019 03:36:47 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 29 May 2019 03:36:47 -0700 Received: from hyd1189.marvell.com (unknown [10.29.41.191]) by maili.marvell.com (Postfix) with ESMTP id AF1623F703F; Wed, 29 May 2019 03:36:44 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Pablo de Lara CC: Lukasz Bartosik , Jerin Jacob , Narayana Prasad , , Anoob Joseph Date: Wed, 29 May 2019 16:06:23 +0530 Message-ID: <1559126183-29543-1-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-29_06:, , signatures=0 Subject: [dpdk-dev] [PATCH] crypto/octeontx: sync mbox changes done in kernel drv X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Lukasz Bartosik Synchronize mbox with latest changes in kernel driver Change-Id: I2123bf5a0784eab2604cc2c82eead0af16e745ff Signed-off-by: Lukasz Bartosik Signed-off-by: Anoob Joseph --- drivers/crypto/octeontx/otx_cryptodev_mbox.c | 3 +++ drivers/crypto/octeontx/otx_cryptodev_mbox.h | 12 +++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/octeontx/otx_cryptodev_mbox.c b/drivers/crypto/octeontx/otx_cryptodev_mbox.c index a8e51a8..daba776 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_mbox.c +++ b/drivers/crypto/octeontx/otx_cryptodev_mbox.c @@ -24,6 +24,9 @@ otx_cpt_handle_mbox_intr(struct cpt_vf *cptvf) CPT_LOG_DP_DEBUG("%s: Mailbox msg 0x%lx from PF", cptvf->dev_name, (unsigned int long)mbx.msg); switch (mbx.msg) { + case OTX_CPT_MSG_VF_UP: + cptvf->pf_acked = true; + break; case OTX_CPT_MSG_READY: { otx_cpt_chipid_vfid_t cid; diff --git a/drivers/crypto/octeontx/otx_cryptodev_mbox.h b/drivers/crypto/octeontx/otx_cryptodev_mbox.h index b05d1c5..2d2e0e6 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_mbox.h +++ b/drivers/crypto/octeontx/otx_cryptodev_mbox.h @@ -15,11 +15,6 @@ #define OTX_CPT_MBOX_MSG_TIMEOUT 2000 /* In Milli Seconds */ -#define OTX_CPT_MBOX_MSG_TYPE_REQ 0 -#define OTX_CPT_MBOX_MSG_TYPE_ACK 1 -#define OTX_CPT_MBOX_MSG_TYPE_NACK 2 -#define OTX_CPT_MBOX_MSG_TYPE_NOP 3 - /* CPT mailbox structure */ struct cpt_mbox { /** Message type MBOX[0] */ @@ -28,7 +23,8 @@ struct cpt_mbox { uint64_t data; }; -typedef enum { +/* PF-VF message opcodes */ +enum otx_cpt_mbox_opcode { OTX_CPT_MSG_VF_UP = 1, OTX_CPT_MSG_VF_DOWN, OTX_CPT_MSG_READY, @@ -36,7 +32,9 @@ typedef enum { OTX_CPT_MSG_QBIND_GRP, OTX_CPT_MSG_VQ_PRIORITY, OTX_CPT_MSG_PF_TYPE, -} otx_cpt_mbox_opcode_t; + OTX_CPT_MBOX_MSG_TYPE_ACK, + OTX_CPT_MBOX_MSG_TYPE_NACK +}; typedef union { uint64_t u64; -- 2.7.4