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 7339CA04AF; Mon, 4 May 2020 14:41:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C94991C208; Mon, 4 May 2020 14:41:15 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 18EC51C1AE for ; Mon, 4 May 2020 14:41:13 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 044CeG39000620 for ; Mon, 4 May 2020 05:41:13 -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-type; s=pfpt0818; bh=QqSAq06VOh1fKfmfY012ytQ4adsl+aosJN+iv6JwZhU=; b=Tf3l3uVbeFVWWiclsnvFSWQqIRxUuK9apPj9WtYw7GRbbdrltddH7aQ99f2BSFVyRyKw w1xzSdDPiss5Vjx7cv3q/RO2CjlBT0bdfV3hcDk/2+8FT2j7PDpT92XoIPy5CH2ichI/ YRfIEpDwoW6bbGnNOMlOAZStbdPNSdKtFvRUaDV09nUqtqWnObKhj6dS1RmqqaTfhoGm ft//xPOCfSAERuV97vMEteaK1notNS9EkrN/lEoTyenN6ORMKbw6mu/ZvFcOShQBGyXu 2C6O1lkvJuIuZsO3nuXqntEw9QE5/r6edlVDb+tqFQ3YM2Wry6Mh8nJzE4uldufbAruu Mw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 30s67q6qsv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 04 May 2020 05:41:13 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 4 May 2020 05:41:11 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 4 May 2020 05:41:10 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 4 May 2020 05:41:10 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 9C8653F7041; Mon, 4 May 2020 05:41:09 -0700 (PDT) From: Ankur Dwivedi To: CC: , Ankur Dwivedi Date: Mon, 4 May 2020 18:10:47 +0530 Message-ID: <1588596047-14965-1-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-04_07:2020-05-04, 2020-05-04 signatures=0 Subject: [dpdk-dev] [PATCH] app/test: handle -ENOTSUP from session init 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" The session init routine rte_cryptodev_sym_session_init(), could return -ENOTSUP when the requested algo combination is not supported by the PMD. This should be treated as unsupported features. For other return values like -EINVAL or -ENOMEM the test can be treated as failure. Signed-off-by: Ankur Dwivedi --- app/test/test_cryptodev_blockcipher.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c index 473dad9..5717194 100644 --- a/app/test/test_cryptodev_blockcipher.c +++ b/app/test/test_cryptodev_blockcipher.c @@ -427,9 +427,11 @@ nb_iterates == 0) { sess = rte_cryptodev_sym_session_create(sess_mpool); - rte_cryptodev_sym_session_init(dev_id, sess, init_xform, - sess_priv_mpool); - if (!sess) { + status = rte_cryptodev_sym_session_init(dev_id, sess, + init_xform, sess_priv_mpool); + if (status == -ENOTSUP) + goto error_exit; + if (!sess || status < 0) { snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "line %u " "FAILED: %s", __LINE__, "Session creation failed"); -- 1.9.3