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 0E08EA00BE for ; Fri, 22 Apr 2022 05:51:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF375427EF; Fri, 22 Apr 2022 05:51:39 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20041.outbound.protection.outlook.com [40.107.2.41]) by mails.dpdk.org (Postfix) with ESMTP id 970FF40040; Fri, 22 Apr 2022 05:51:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nwEWxW/BJl7aOSoJjvs9ZRxoLUst0G7InlgQCfvnW6c37QoKWiglArhcShZuMgdI2IU4ak71F1RYV82NgbheN75Py8cxo6+7Te05x8D6Ot0mDqAKXk42ygvDX0K3vBDQcqsyy1mgB6YPoMiKhXRzZwgEkKoG07iTVTqiyorjJc95uOXSJTIzONWdlxYgtFWsCnK+8QovMyAPc3dUK2b1zed2A85FKIC3pdAv8Q9RiLhJP+iNrJhNVRMhJvsufCO99llB9NQFisxsPfxaol+P5iaRkNzzoRPPdb3QqEJHguL4cCnRnm9ieHLvwOyNW8NIzD3JuHU3uVdanSth5IB+3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1k6bDCo9CEpwvd2/JKdAaSDgNoQyelM5RBPZaRN/iO8=; b=KFV6rcBzTLr93VATyGIeX3/qSp8Pomr/l1fG6g4vdSOnPxwFV7rodEwn/8zKBKzUX+2HvA3RGWUkqyWWjs15sqIoHA2JBo2w7dbUkPBn2VolMAVIDzz1YxHMeSPOhRfUeRmgZoTaad5RUfmrU61tsU1nzknRdsDr1tWzZ3PyPYGSqIM2cyp7kQGptN/aELIfHugOl4yjqjmmcskna0C+Eaud8hANkn/Z4xqQ1JQj2BxO82zWUU95do4Lxz8sCP6clBLgPr+odLPR3dupFO+HuHq9v1rMD8v0a9l/yZjRQXfNjx5c1oa/Xz5XsoVQMd9G8Wl10uQiHMuIMzsEpArZJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1k6bDCo9CEpwvd2/JKdAaSDgNoQyelM5RBPZaRN/iO8=; b=sC5/W48zO7j09c3mX3msLWnSOtbb3Xj7SvPFAVHJnCN7lTW5eqMkJdgUFTxF3yUYbZxYHyTUMA08eh2gYlxnl/CZnsY9FxDXaaGsXIi8E4tRsB+9RdW3o4LFJlXaKM00G31aeAB4VIM53kmTtQqK1eev1ap5M6mLI2E1bK0hA8I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by DB7PR04MB4393.eurprd04.prod.outlook.com (2603:10a6:5:32::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Fri, 22 Apr 2022 03:51:36 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%7]) with mapi id 15.20.5186.015; Fri, 22 Apr 2022 03:51:36 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh , stable@dpdk.org Subject: [PATCH 02/14] crypto/dpaa2_sec: fix buffer pool ID check Date: Fri, 22 Apr 2022 09:20:48 +0530 Message-Id: <20220422035100.3180870-2-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220422035100.3180870-1-g.singh@nxp.com> References: <20220422035100.3180870-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR03CA0127.apcprd03.prod.outlook.com (2603:1096:4:91::31) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ae209d5d-e185-4bfc-1ee9-08da24136623 X-MS-TrafficTypeDiagnostic: DB7PR04MB4393:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HkbA1JMRxg1fOk6LanpXuVDSzE3AYqiwEXPvtVU75E4dZaWSUkgY9inj/bbyvD72u7S5ChayRngjtToIcXyGxLf/D1/Go+pmpWACQaLCHQL+/GxfjVX7S5A+WF7kGUAN0byC7rhbdVcJAKRWY5GPlO9DlYB3n+5Gzyhg/Inm5qshJjjZNzzuTGXlhOQWtnvd8rxvJbSr2pbCxE+zSdhsyd0lYeYeCOiuPK29D+MSlti9r5q5wOq7aTiaiWIeXmIuXQ+x9FfPRENA15tk1oxR7C+R2LLWfM2W96U3fwq6ILq8MkHzBeKo1cJkNV6eaHKyd5v8tJShVyz56tAlZRyrrjBxBjelmlsBZbZ7rLV4kLuGvc0M8Mw6YJbgbz08eSPoudy265gmGtAsjqLim9fwr8k9osg5SSYZC9vfkThexp1gY6wghromyorM51aZHhrmNQFVppqz/Y9QCk4Im+dqrk2Na0+jWjtoyE0q/7Py25wy/rXngrJGjRbPIYQCN6nYbwzVqIWKKuIrkXkjh+bEEnyfq5VmDW0z9jp0UickoaprPDRup8TfIySqYSxHT1jKNzAPqhDwloVeJC612a/hnXzaE9M1ZAsk8a3zf+oKda6sF5x04iU+u4oOqr+GlsK672NJT8jzSA7irwGLrrHkz2QokhvgUvkyBytmi8KIymSR3NAkhEn+Wn4940pFWRi5OSmoKRSy+aTT6e86hK4cPA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(5660300002)(36756003)(2616005)(6486002)(1076003)(8936002)(86362001)(316002)(52116002)(66946007)(26005)(6506007)(6512007)(186003)(66556008)(6666004)(66476007)(83380400001)(38350700002)(38100700002)(508600001)(4326008)(55236004)(2906002)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?KDYFhAvGJQkkAyQ3tXPT1xlwuY9/XAvXyR2nepPFbg1rwQ0sfdL8fxVS8jxv?= =?us-ascii?Q?sRt441XM7+BoI8VSIpiaiCG/paQR7RpMUAsFUot/VVgA9clrKK3a5hnCR3EM?= =?us-ascii?Q?DKuq0DNUykKmxc6xzcBvjh1ySqBmmzsZheJeZ61nbc/zb94yN3ob1Nbxqp9H?= =?us-ascii?Q?MTAVl4Xxost+3AOMqtHCgJZkeMFqoo/LxknbHNkdRaSdO3EWFqjqeqtmXVfQ?= =?us-ascii?Q?D1FV+UzowNdmgDKGxm/Hqhx6lvrQXzDJ0nArc0DVwedWQIsDWTpWdyKXio/+?= =?us-ascii?Q?armqTvtTD6+UzN6/26odKSjL1YHEsuGG/JDUssrmLC+CPMG6Uzo7jkeNmMnq?= =?us-ascii?Q?Y62AjrSLGDYwBZL/ghTF9zupZ99+Ju2i5iiH7sgjkrkElJdkFNGnCeew+kiU?= =?us-ascii?Q?si55qHYzo2BdMT/bD0R2KssImpk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=?us-ascii?Q?rdnZNa2F9qGV5dloXUlbe0vh7EYxUJvrngcXPDmHVRTdaDmnGXrqM5YkgEc2?= =?us-ascii?Q?ihdY5ofa/zRXP+KZLVBpOH4IBlKS+UMXkPNWYxMbAkoOy+nMDr1fQmgXtDjV?= =?us-ascii?Q?bX9PJINYTPWQS8lmV/nPIVKBPDEnzkmKrVZRG5RcmQ8MUuBoFWFMmtTHggWT?= =?us-ascii?Q?m4t+1f7z1I6rLGRFBsLx/5APTNZJ137rgYHdZ1YoJnVV17KYUNuHSgq/pAHa?= =?us-ascii?Q?GbWoXzLwjvkvqMlC6R/HaySo8mCuJPK+BLi7UKDwWMgDnCpUmxjB/agrG7XS?= =?us-ascii?Q?Xdl2sqEvFSW2MEQVt0Kbuc/ZYuFebJoF6aijYJXhrwZc+LXDWEmXtl2Bs6Fa?= =?us-ascii?Q?nvH4m+1UwE9GTSXxIRbRCuF9vsFZx2RZ+yn9Oohbbvpu4m7JinZqkvJXR6N3?= =?us-ascii?Q?pj3GIdISYA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae209d5d-e185-4bfc-1ee9-08da24136623 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 03:51:36.5558 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4bzZX8SagTg+hPe1dWrJEqNM8ZDyCi1nFcAuJZf0rr7NtHdtRxcH98tv1CvO/gQ9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4393 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 Simple fd rely on bpid of the buffers whereas other FD types can support buffers without bpid of pool. So moving the bpid check to simple fd to mbuf conversion function. Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation") Cc: stable@dpdk.org Signed-off-by: Gagandeep Singh --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 03fef5e500..2374d67978 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1566,6 +1566,10 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd) int16_t diff = 0; dpaa2_sec_session *sess_priv __rte_unused; + if (unlikely(DPAA2_GET_FD_IVP(fd))) { + DPAA2_SEC_ERR("error: non inline buffer"); + return NULL; + } struct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF( DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)), rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size); @@ -1612,11 +1616,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd) * We can have a better approach to use the inline Mbuf */ - if (unlikely(DPAA2_GET_FD_IVP(fd))) { - /* TODO complete it. */ - DPAA2_SEC_ERR("error: non inline buffer"); - return NULL; - } op = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1)); /* Prefeth op */ -- 2.25.1