From patchwork Sat Apr 24 10:36:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 426812 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2062180jao; Sat, 24 Apr 2021 03:38:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSyUJR1dmE8WZkOyqHi1zJqsFGjqz62PRkTk/jHTlam99S59CQVctr6F2uSwG6MW+dRkzB X-Received: by 2002:a7b:c219:: with SMTP id x25mr10085558wmi.73.1619260715013; Sat, 24 Apr 2021 03:38:35 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id 1si10285218wrf.389.2021.04.24.03.38.34; Sat, 24 Apr 2021 03:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=e0RDhuJU; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1B1E41110; Sat, 24 Apr 2021 12:38:31 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00080.outbound.protection.outlook.com [40.107.0.80]) by mails.dpdk.org (Postfix) with ESMTP id EDA83410FC for ; Sat, 24 Apr 2021 12:38:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hZsqSdzC/HvlgYt+cSsXOXtYWK2MUYRxdl5HX6+BCCM/K7RtlzhMuWyScAF5qXWgHVGHe+ZufRZhpG/3aY+G+pkpWs5c5ChhZzqcrQh9QcVY/T/8su3imlNL6khlUt+eFSe9VWcLxF5Em1lt8iRn2g/dqVu3cWdLSR8n3li4JH4r7L8wjthBWmkVbg3O2abtMOT8t6k6K5zGAXyF1EcVYC+P77aMvpgISEskDzuNbeW3yZxcMTtCcb4DKbqujY4uf/yyEAoJezALN5eOMAK0eptNiJC9wv2PHf/2AsMvGsHuJGvMLsD77fy7W3CHxwqs3dCpiBTix+oYsQHdtPAWpA== 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-SenderADCheck; bh=iMDLT+c+iGsxua4W6Vd2B+fDLnnsEAvRKEFGRAmVx88=; b=l7Cvkm8HRSEFQnXAS93X76SVD6Ui3oefroLaREewsm29mkgAqTNbjS8ov2PE0zw5Mp8ajagWcm73rLAOTEm+2bEQ+aWqzgCke+NyXFA7M30tf9HGSJMz2T47XFyKtBu6tXKEMjjbZ9yEcCKMTjScNPQuMEp+p5CGuMXezOpro3vJvtmgzFrzUyOvQSK2glBSkgdefDSbC+vrrKY8YNHqisrykV4UVnGNPQPMYpoLVg9Lhc6JgdPpE76gfaUhGABbTZji8ZR6nYL5L/Iz1dI2yQqGx7sfxtiCZYGNoCPRbDDa0ejhPoa+zVJz5p3E4olsbVb1P/cglhP2JGJrNTt06w== 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=iMDLT+c+iGsxua4W6Vd2B+fDLnnsEAvRKEFGRAmVx88=; b=e0RDhuJUc9uhYXp26fE6rPiNXkvZLA+DHFzD1ixC7GxuaiJ2XkXynztBWELdiYyFOQzCKhQTQlO6/AiebrzwAeGJ9E7+B2oQCr+Zr0+tCdwlGkv5q8j+9MoyR1x5t8MMjLq2syOiofRo/XJzPImvFVvZRyB7AnkBhp2/5SYRxj4= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM5PR0401MB2564.eurprd04.prod.outlook.com (2603:10a6:203:38::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.19; Sat, 24 Apr 2021 10:38:28 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.023; Sat, 24 Apr 2021 10:38:28 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com, nicolas.chautru@intel.com Cc: david.marchand@redhat.com, Hemant Agrawal Date: Sat, 24 Apr 2021 16:06:53 +0530 Message-Id: <20210424103700.8098-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210424103700.8098-1-hemant.agrawal@nxp.com> References: <20210413051715.26430-2-hemant.agrawal@nxp.com> <20210424103700.8098-1-hemant.agrawal@nxp.com> X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sat, 24 Apr 2021 10:38:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4e264edc-d69e-4ff7-2be2-08d9070d18f7 X-MS-TrafficTypeDiagnostic: AM5PR0401MB2564: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qVCiRCdcdx1O6m0W7GV9+kMD5b0geRjaVic61EzWq4vtxbWffOwSkusGq7TeoanIQjCaKXalRJLSCPCghAk3IK2ufJvdZK6dv/VM8kJVHT180qHTsV37jS048FvRgLFF951uiKpZivQDeOA5+AswyBGYTcwKTbFAM6One47LUWiWDKc917Q87i5wjZdxjB5y+iT0e6Y71amqvZMvSqWaTKDLKd/82YfHc+Y8urILf2uLSxJcxbN2b9Sn4pcz7faFuQkCrvExRvkD0qvrwRlAKhF9mAtKUa9mcFPbF4YEdrB6A14rok+2HZxac+M8mnPZLabTxfHEyE+3EN0PmmSmXGEzf9SHcWYltj3uf00m7L4FjJ2oE/NxaInVjo0szH+CbjNnxmkQN9/xSMaCLjjnoBQG0xYZTPe55Oj1wPD+XCKbR70xUYrTRtJS6Oq1EOm2/OPK7gRCJ2NpiTbg+cvt+IRTCva2+J7k3i6Zav1jpu09Pko/E42CxXKlJz06I70AWpzdWEb7jo58sFoMjY2AN2axOfxCH29prqrZ5GFDM5ADYO2XZjITpRjErn4Kd49Qd78+2roJ1PS1pM4/MskJSMZ47ejie3PB590zWNis8O2gYRSt6nUo/iHzR1UCZzicoFViS878i3CNDraMPeNO8vxbeoVDEv5HorgnXZgLmkM= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(39860400002)(396003)(366004)(6506007)(5660300002)(38100700002)(1076003)(52116002)(44832011)(316002)(38350700002)(4326008)(478600001)(83380400001)(2616005)(956004)(6486002)(6512007)(8936002)(36756003)(86362001)(66946007)(2906002)(26005)(66556008)(66476007)(186003)(8676002)(16526019)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: czUjT1VaTu4o+nVx5NhjDSLF1vz0nWYmqC/McwTjH4sn/7tFxZdr0N1lf5E2rU0xwi8W4csizv6UBK8LNnQt72J69Igs/ojOyFNdxrgi9N11sesIpayQnPVhbNLf0x3NgyjYO80p8De7lr6fF1cZc/hqcJiACP+9abreo/2p6h7z8r9KA7d/RxiBd8RLpEe3MJwLVLFQUDldsdE3C9nn+1cAEv+5UJW2IMLmA9y8qmsD/3hxvyyiz+t3S7uOQNIfXfR2Ctce0K35U9Bki96ODn6tTCtb5FJ4nkXVATqJkLnkwfJFy0evG2t8ueIZ/h2KTvN17J/gpe9ubrJKqWrYA1JSEsrZ3IhIfKPLiAYuVHZTmUcwLyBkLVXH9KGx2nt9MK0cePBTzCAiExSnS5d+ZjxJjQuxrM7DtijcnUoyp2o+VgOesPqmpdSPFEEN3la6exMtq57CNykgvlg6EMaH12sG2w/AyOfI6orODfzB7db6RDg33//c9MpbuW2ssSa5CxeBOkjdw31zE15UqheXlLQ/HZP0NilaIWq5Oe+0OhlbzzrfZSCErpEIC45bHc2A2DmAN/b5Ubs91qGrn7xCz3C+anRJ9B/SwfkYfjAItDoZJP0KU4S/6HX0x/bJSoAKHaBjTdmeUK8l+HxliSiENW6xQEiSbITbu6OmZtT7t8KdR2k/gJMJBKtgQZrcw3P7bEV1OMYve/SbvbLsmGO7rY7oDhL0fX0n7DR8p69bJ0HUGTJbGQ5dOc0OLyCiQhYUf+S17sBVlaRVco1NDKSw4UuJxqqlKkBrKx+b/D3B7V9cr5TUj7Px8lLOOvY0NsE7qWsmCpc0gOh2VY33f8G+zVZ5hZM6Zbxt70rn9eLnga/CrG1xmMbrU00TfZK0bzH21T2vZq2m8HCmQw3TbMfU148zWAxGk3jwrSqjMl4SeO+lANw5Gv00dDgHTrJPATCIp9zZwE1TN+s0ZX6A0L8Ee6X1DXl4WU8fH+UNL3FBnNIB7/IuaPqyprwhbFwTpfqkV25jrzewM9knEojdDWorXM0ym4FwRP7pNomse3ucqfuf+ekNN/CmKfYZQiMbjnkdbZ1lqFl5DrXnWHPxPzylX6zlkUeeVVBtQ+i8lu4pdf7WT7L7AWLCfI5WY86oBkC8Cp+VF+BTr5bDZ9gShxDYqOWRDjN/RqKEl/eKqIa+cEYWqpEYHi1XtIC/Wi36pBfw3jAzQGfI3sRdwIcSZWzRd02/PlS+KbcpRJWgPjlfeZC/sv8pRDsD9+fVucKPAmwuVtv1WAJbU7KvoXnqbTsjS9ewrbocht/rfs/ocm2CHrV2zUNoWEQSmm35wkqEMgmH X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e264edc-d69e-4ff7-2be2-08d9070d18f7 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2021 10:38:28.7335 (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: HypFq0Pnrw+2q2h+DOAL7EecwF4RBWF9lQiLyvemyP7PRPp5uSZmO8ta4X89WwH0CpY43kyX2zAQ0Xv4Op3hZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0401MB2564 Subject: [dpdk-dev] [PATCH v4 1/8] bbdev: add network order data capability X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This patch intoduces a new capability of the bbdev device to process the LDPC data in network byte order. Signed-off-by: Hemant Agrawal --- doc/guides/bbdevs/features/default.ini | 1 + doc/guides/prog_guide/bbdev.rst | 6 ++++++ lib/bbdev/rte_bbdev_op.h | 8 ++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) -- 2.17.1 Signed-off-by: Hemant Agrawal diff --git a/doc/guides/bbdevs/features/default.ini b/doc/guides/bbdevs/features/default.ini index 5fe267a625..e5da644099 100644 --- a/doc/guides/bbdevs/features/default.ini +++ b/doc/guides/bbdevs/features/default.ini @@ -14,3 +14,4 @@ LLR/HARQ Compression = External DDR Access = HW Accelerated = BBDEV API = +Network Order Data = diff --git a/doc/guides/prog_guide/bbdev.rst b/doc/guides/prog_guide/bbdev.rst index 6b2bd54e1a..89a86d10fb 100644 --- a/doc/guides/prog_guide/bbdev.rst +++ b/doc/guides/prog_guide/bbdev.rst @@ -747,6 +747,9 @@ given below. |RTE_BBDEV_LDPC_ENC_CONCATENATION | | Set if a device supports concatenation of non byte aligned output | +--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_ENC_NETWORK_ORDER | +| Set if a device supports network order data processing | ++--------------------------------------------------------------------+ The structure passed for each LDPC encode operation is given below, with the operation flags forming a bitmask in the ``op_flags`` field. @@ -942,6 +945,9 @@ given below. |RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_LOOPBACK | | Set if a device supports loopback access to HARQ internal memory | +--------------------------------------------------------------------+ +|RTE_BBDEV_LDPC_DEC_NETWORK_ORDER | +| Set if a device supports network order data processing | ++--------------------------------------------------------------------+ The structure passed for each LDPC decode operation is given below, with the operation flags forming a bitmask in the ``op_flags`` field. diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h index f946842727..8fab617768 100644 --- a/lib/bbdev/rte_bbdev_op.h +++ b/lib/bbdev/rte_bbdev_op.h @@ -186,7 +186,9 @@ enum rte_bbdev_op_ldpcdec_flag_bitmasks { * for HARQ memory. If not set, it is assumed the filler bits are not * in HARQ memory and handled directly by the LDPC decoder. */ - RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_FILLERS = (1ULL << 18) + RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_FILLERS = (1ULL << 18), + /** Set if a device supports network order data processing */ + RTE_BBDEV_LDPC_DEC_NETWORK_ORDER = (1ULL << 19) }; /** Flags for LDPC encoder operation and capability structure */ @@ -206,7 +208,9 @@ enum rte_bbdev_op_ldpcenc_flag_bitmasks { /** Set if a device supports scatter-gather functionality. */ RTE_BBDEV_LDPC_ENC_SCATTER_GATHER = (1ULL << 6), /** Set if a device supports concatenation of non byte aligned output */ - RTE_BBDEV_LDPC_ENC_CONCATENATION = (1ULL << 7) + RTE_BBDEV_LDPC_ENC_CONCATENATION = (1ULL << 7), + /** Set if a device supports network order data processing */ + RTE_BBDEV_LDPC_ENC_NETWORK_ORDER = (1ULL << 8) }; /** Flags for the Code Block/Transport block mode */ From patchwork Sat Apr 24 10:36:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 426813 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2062234jao; Sat, 24 Apr 2021 03:38:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEZ3JAyK5e81w2dC8P8BLIph2rFrpi0EnTWzRwpvJtoqlkB5cRZIHz5zPAjTbpZNDs1pwQ X-Received: by 2002:a05:6000:1785:: with SMTP id e5mr10281681wrg.143.1619260722285; Sat, 24 Apr 2021 03:38:42 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id w11si9632841wmc.34.2021.04.24.03.38.42; Sat, 24 Apr 2021 03:38:42 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=J7Nq9u+a; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1587941119; Sat, 24 Apr 2021 12:38:36 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150079.outbound.protection.outlook.com [40.107.15.79]) by mails.dpdk.org (Postfix) with ESMTP id 989C841118 for ; Sat, 24 Apr 2021 12:38:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VJOttwsdt/ZVsLpCG6aYdFaFMMWDQDdSeBSAcSPmicGyrNLtMDJU+Q06xhDVP29xOE5/KJ0/sIk+SyfmS+jC8eiFjPGNCUqSlKZTfPeHR9aJWrSuzVH0leV057iMrJ+hq6m5aDmhw3yQBtnA3lb31htkb6Tc2vhayPBPAKBNDAtQPwbuJZd+BI0MOZg2UDskfPQe+GiaHNRpI3N9j/mfVn3iwxhA5JAQty5eKSOjIbLwTLVIpV0u4FOo6c4DLYBX6bGbEwR6Ehc4xk9iv9DC1Grrb+koiuu58cVlw8aYlB04RT8vErigqWA4XqhK/TAQ9sRDcZ3fCEHjuzxrbp6qBA== 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-SenderADCheck; bh=dfei0Hai+zj/RlnPcgcnDxiMOlC79FIOJpE1bEGEncM=; b=PRtYbMwQEuEavsw8q0q3KMSLTNH/YWjV6hXkBZZjhhp2mMZbThRUF69dIsT83CVi54DEjAU06E5pIQSg22arSKCTWkzaThpa00ziSVp1ouSmJNdv5OCovBLdcieoahgMlA8egi2eFwakQH6qQkp1PefLr801A9SiTNOeee9uYSKzCyrAwh8DtU8RffZprZRi6EPWzU9ud8Ah/wOiMnELjeiv/vLJTDT7q4R2v2rqpLRJCmwhpOe8KVzKMLCXfCyN1a1SRJFq8Jp5HYSpAISOm6Rr9l1CkYSMl6pfcIpLkywq7CY/qoTFI0Nfskp1uf7zQkWPimnSYLhsJpQdC4xo/w== 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=dfei0Hai+zj/RlnPcgcnDxiMOlC79FIOJpE1bEGEncM=; b=J7Nq9u+a2pveI/G+llouP/xhqjxPJ5Kus4BFYxVgjif3wsYk2XMSqTQUJWIV/QVzoVqk4Sq/fokq79I6veVcJakvW8+D+jaIAuYrgraPAhDRlb3MRibrm/vYLyXbsuk5NxKSVQXCe0Hi/IAK7vQTh2ShcJ/thNtetSaDGO70YEA= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM6PR0402MB3895.eurprd04.prod.outlook.com (2603:10a6:209:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Sat, 24 Apr 2021 10:38:31 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.023; Sat, 24 Apr 2021 10:38:31 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com, nicolas.chautru@intel.com Cc: david.marchand@redhat.com, Hemant Agrawal , Nipun Gupta Date: Sat, 24 Apr 2021 16:06:54 +0530 Message-Id: <20210424103700.8098-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210424103700.8098-1-hemant.agrawal@nxp.com> References: <20210413051715.26430-2-hemant.agrawal@nxp.com> <20210424103700.8098-1-hemant.agrawal@nxp.com> X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sat, 24 Apr 2021 10:38:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1a98805e-b3ad-4003-4131-08d9070d1ad5 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3895: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Oc8OerHXSWWYF9AhzEbHqPIAApOZaycTQRpsoyd8Ja9D3Aixdsqp8K2R4gdlyKKHxDbhZKH12BqcpjKqBkfDgi3sw0YfoTnVWltznyo1Lx1r/SApZSPd2FEeBusEP9Fceo2vu4RcmNfvcJjosN47FyqBbR3HEL5TeXJ9CcNwhU13Fn8t8WFZRvGQASM4l/RyrrxirV2+UJQ/tFLln7j/7J8QpK86URKl5qHrBPnrTtnsNQSkU1O4i08eNYL0w3mhOjsjUXy0p0mqmltXqeFRjQmOkuxdcPXcoMLqygU5GN0bMXz8x8vQvyd962RJefriBQf+N7lrBQQyTdlO8lQlwp0CrI07W2HfMIlH4nK4KqIfgkb/SIkWHPQKHMT7KNpvEU1LDdkCLstaGwDkTxT6DPx0gBH51ZybHc4DtQxSXD5BrVNXB2dQ3TYLMYdstONtEljRMe5iBvRJA7j7sXZpxcVAdkvcAJsbwCqYPTwAjQirv8OQ8+WbljAUEmVerWgVbwqla04J5L8e5vT7GYfFp+wJQOvmzwWpr9ZW13BVfoicV5EpCwHbafIzv4rzhOaSdMyw9eIOpD7fmCRlsx7Bp59ponkL7yrtXRU02Kg3tqrfmEqfY9JdafeteDSDGIOtnBM74OAc1LU171Fgm3DjeFRqNb8P9un9W9rgHj3Tdb0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(8936002)(5660300002)(316002)(1076003)(54906003)(8676002)(6512007)(86362001)(478600001)(38100700002)(2906002)(956004)(2616005)(38350700002)(36756003)(6666004)(186003)(83380400001)(26005)(4326008)(16526019)(6506007)(52116002)(6486002)(44832011)(66476007)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 81grALZfOxyFrWYA8Z0edMlMuQsiqgnXxs+/n4kbjRVAipBFhTYBJARMcmpDgjdbg6hRwnQCAtJolXFcgOxDoldDvQWuuw8FtLvld14SrSjRaijTpcxZgMVnOMcSqiojZ2UiQSbkVf0BJ8ajICQivyB2bn7TLFBuyY/YNcU5fFGdJPbtEUeCvX5Z5xPZQA8HZkCKtitQQ4Fj4h/64DjXgLmo8taPX/7KnQPD+D6FaYP54cJRCF0YQzpP4Dew9RzuLAEh2LNWbJBH28YUct7TJInTUkUc9gSAzHlshECoIG0SUhRqrgUXpMC6tXdY/BeJ493eDC2tK/qUzFbmP+pV6b8p6+4PZs6rrRdWufd+N/G2iMQvW3RSMbwdXmHPa3bUQZnaNq6RVnM9mBrEt391XWrV7Fnh0vakS0hcyPNIEPkKibrAlQm3Lh/emzgwmMj2XYPpsKuYGP5O+Zq7Xmz7beOO6S2u+qC+ZvsRohK13dHX6I3lwKnpqGTHpC58+NrCi3qckM1k2DaHn4J386yYQsfpkQY7s9P+TueptbpITniwPGBezazDOIFnNtQa9IlLzyc6srGSbCQoJDIEAAfnbAs7DOZhcbJLU6D5hZXVSX593cJd03Srv8X4XDa2FGoc7YGRKQSSAma24FAnv90eo+YV9PhbVjuIAcc+uXkvm6CfDVSQQVBZGL6PbtuRKMfzDrtG4mtbkILe4BxljlfrplL1+3juTUTSabENBD1v3ow4yIYYK40jVR61VY3s/wbkzyywkAyapUJ9r7kd5SluSq0OhadFyiw0Z5TEqJO5MFC1TsRWKuQ5Yj+Y+c3Q5A9k14XRWeOlJ1KzQtnvmDHZX8fLzL6t6DJHKar53EOYnFklI+lSJpMvhnL2sgxUwuYSqG5qaaD3REM/ZxAZgPG6yyd6IdsBOe1bGAotqtt8QtuQzEsX70IrKNqVpmWNcppPAiq9LIIE5Vry2JHCWffQK/v6i8bwXOgjmrPw7MHBMvEwHBIqXjv30YOfiURJ6rhdc69bV+6p1nB59ug8NttEQ4GUw/oAuF3GZ6xqpS4S87E63Hmo58bgAohN9NIm7P1+h+YZ5PH/ALEfGJlcasnFiDoK/yel+u2mD3VegD/CoF6FvUKSMiqd8WF5nljuu/pmX7zbNThF4+vSlxR6n2E06PEvYes1/lR5e0aTVpDuXiiZJAlTJDqHaXrzNESxjN7mG6yPsO144OCHO+Qf6BChoaTjk/t47NdbEFJ94JVeHcoa2HviOQ2/1jOogXtZOJAukaTme5q/+igcUfC32jnsYMMvft2fGbMZ6+Q1Xgeh2S/UiJ+Dq0XAOcW7orFcDKM7 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a98805e-b3ad-4003-4131-08d9070d1ad5 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2021 10:38:31.8087 (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: mP1iLW+lTyXLuxqf4Nx+mVddVadl4dixMPFvo+/9jjlhbugnejgCnyr2sob7LK0tPujejHhLrZ+cJxwKhWZguA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3895 Subject: [dpdk-dev] [PATCH v4 2/8] baseband: introduce NXP LA12xx driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This patch introduce the baseband device drivers for NXP's LA1200 series software defined baseband modem. Signed-off-by: Nipun Gupta Signed-off-by: Hemant Agrawal --- drivers/baseband/la12xx/bbdev_la12xx.c | 109 ++++++++++++++++++ .../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 26 +++++ drivers/baseband/la12xx/meson.build | 6 + drivers/baseband/la12xx/version.map | 3 + drivers/baseband/meson.build | 1 + 5 files changed, 145 insertions(+) create mode 100644 drivers/baseband/la12xx/bbdev_la12xx.c create mode 100644 drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h create mode 100644 drivers/baseband/la12xx/meson.build create mode 100644 drivers/baseband/la12xx/version.map -- 2.17.1 diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c new file mode 100644 index 0000000000..7050b17728 --- /dev/null +++ b/drivers/baseband/la12xx/bbdev_la12xx.c @@ -0,0 +1,109 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2020-2021 NXP + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#define DRIVER_NAME baseband_la12xx + +RTE_LOG_REGISTER(bbdev_la12xx_logtype, pmd.bb.la12xx, NOTICE); + +/* private data structure */ +struct bbdev_la12xx_private { + unsigned int max_nb_queues; /**< Max number of queues */ +}; +/* Create device */ +static int +la12xx_bbdev_create(struct rte_vdev_device *vdev) +{ + struct rte_bbdev *bbdev; + const char *name = rte_vdev_device_name(vdev); + + PMD_INIT_FUNC_TRACE(); + + bbdev = rte_bbdev_allocate(name); + if (bbdev == NULL) + return -ENODEV; + + bbdev->data->dev_private = rte_zmalloc(name, + sizeof(struct bbdev_la12xx_private), + RTE_CACHE_LINE_SIZE); + if (bbdev->data->dev_private == NULL) { + rte_bbdev_release(bbdev); + return -ENOMEM; + } + + bbdev->dev_ops = NULL; + bbdev->device = &vdev->device; + bbdev->data->socket_id = 0; + bbdev->intr_handle = NULL; + + /* register rx/tx burst functions for data path */ + bbdev->dequeue_enc_ops = NULL; + bbdev->dequeue_dec_ops = NULL; + bbdev->enqueue_enc_ops = NULL; + bbdev->enqueue_dec_ops = NULL; + + return 0; +} + +/* Initialise device */ +static int +la12xx_bbdev_probe(struct rte_vdev_device *vdev) +{ + const char *name; + + PMD_INIT_FUNC_TRACE(); + + if (vdev == NULL) + return -EINVAL; + + name = rte_vdev_device_name(vdev); + if (name == NULL) + return -EINVAL; + + return la12xx_bbdev_create(vdev); +} + +/* Uninitialise device */ +static int +la12xx_bbdev_remove(struct rte_vdev_device *vdev) +{ + struct rte_bbdev *bbdev; + const char *name; + + PMD_INIT_FUNC_TRACE(); + + if (vdev == NULL) + return -EINVAL; + + name = rte_vdev_device_name(vdev); + if (name == NULL) + return -EINVAL; + + bbdev = rte_bbdev_get_named_dev(name); + if (bbdev == NULL) + return -EINVAL; + + rte_free(bbdev->data->dev_private); + + return rte_bbdev_release(bbdev); +} + +static struct rte_vdev_driver bbdev_la12xx_pmd_drv = { + .probe = la12xx_bbdev_probe, + .remove = la12xx_bbdev_remove +}; + +RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv); diff --git a/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h b/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h new file mode 100644 index 0000000000..9dfa1cc458 --- /dev/null +++ b/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2020 NXP + */ + +#ifndef _BBDEV_LA12XX_PMD_LOGS_H_ +#define _BBDEV_LA12XX_PMD_LOGS_H_ + +#define rte_bbdev_log(level, fmt, ...) \ + rte_log(RTE_LOG_ ## level, bbdev_la12xx_logtype, fmt "\n", \ + ##__VA_ARGS__) + +#ifdef RTE_LIBRTE_BBDEV_DEBUG +#define rte_bbdev_log_debug(fmt, ...) \ + rte_bbdev_log(DEBUG, "la12xx_pmd: " fmt, \ + ##__VA_ARGS__) +#else +#define rte_bbdev_log_debug(fmt, ...) +#endif + +#define PMD_INIT_FUNC_TRACE() rte_bbdev_log_debug(">>") + +/* DP Logs, toggled out at compile time if level lower than current level */ +#define rte_bbdev_dp_log(level, fmt, args...) \ + RTE_LOG_DP(level, PMD, fmt, ## args) + +#endif /* _BBDEV_LA12XX_PMD_LOGS_H_ */ diff --git a/drivers/baseband/la12xx/meson.build b/drivers/baseband/la12xx/meson.build new file mode 100644 index 0000000000..7a017dcffa --- /dev/null +++ b/drivers/baseband/la12xx/meson.build @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2020-2021 NXP + +deps += ['bbdev', 'bus_vdev', 'ring'] + +sources = files('bbdev_la12xx.c') diff --git a/drivers/baseband/la12xx/version.map b/drivers/baseband/la12xx/version.map new file mode 100644 index 0000000000..4a76d1d52d --- /dev/null +++ b/drivers/baseband/la12xx/version.map @@ -0,0 +1,3 @@ +DPDK_21 { + local: *; +}; diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build index c98ebd9024..fbc9c7e9ab 100644 --- a/drivers/baseband/meson.build +++ b/drivers/baseband/meson.build @@ -11,4 +11,5 @@ drivers = [ 'fpga_lte_fec', 'null', 'turbo_sw', + 'la12xx', ] From patchwork Sat Apr 24 10:36:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 426814 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2062309jao; Sat, 24 Apr 2021 03:38:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/enW7QM6ODiSFjG0ci85oREmR+G9V79Hm/pmMGXGwjR22El5hgV6itI4/kh/rtMyEFwJl X-Received: by 2002:a05:6000:118c:: with SMTP id g12mr10250537wrx.241.1619260729984; Sat, 24 Apr 2021 03:38:49 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id i10si9495878wry.161.2021.04.24.03.38.49; Sat, 24 Apr 2021 03:38:49 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=szgtEVjO; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9275410FC; Sat, 24 Apr 2021 12:38:40 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150058.outbound.protection.outlook.com [40.107.15.58]) by mails.dpdk.org (Postfix) with ESMTP id B8EBB4111C for ; Sat, 24 Apr 2021 12:38:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cBqOM/OQAYJmVOwA+TZkNOF5KyDib+SIlRKdfqs+4Z3ztdtmuPhEpNV+tv+8lcJD8BZPHbj32mGIdgAqTWKlqjAy/3mka6HqUAY2imfPpiOvclmNIrrlquwRFN9r1iLZYRe8A+++wH/PqQhlq7jXXYXd/1qUCWnWz/sXS82bJKALkgXZfMGbQTtvhxoqulADD/7eA/jWTZBIvcjoodq6JeGjC9ewJqqEnyKPqNC7hm75jjoN+WudjlCsv85cKS63b41Pea/1DB0fQt/wYgq4NfnkeFB/2xwpzeS53sw5WdHKn3+uG0qCMEK8t8XECfJCtIc6nBG1yf/4ZuP8KvH2ww== 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-SenderADCheck; bh=vQ3CJw47U2MeVNjyk0zhM/h0j5Bcapxe3iBgYzRgzIs=; b=Vkd0xuUyST1rHSGc8NwZsfzN+YzR5UKMLspvZm+aupTh1Rj+AHnn3fgODfnBoHejuDOl2e6b+Nrhn9Fqsbdv5q6yw8t+deGprwoe1ISPA9P0OAT39rdnQGrYv1dVDL45f/TmXAWgsZ3reFqcDido0c0fugLiC1Ze83nYy0gpXF6LvSJtBedDgy3xJW+uGcrITGVu6DC8znGi8Lsvt1kgkkR074DZ9f2A2hUhMOJVFPRoN1efacVRgFNwCJzo/CoqCpggeFqgER840ZRqsMVb1bqPjHmLdxUu6X+IdbzDg7lbJtP1lxTZg4qFeP4tbxkugaLlNZi5cY8nH1MAbziK+Q== 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=vQ3CJw47U2MeVNjyk0zhM/h0j5Bcapxe3iBgYzRgzIs=; b=szgtEVjO27jgHz6ouhiFFVcgFFfBlCH8qVxbiX0cPz6XVM99OnhnpAGB2QcMMpOcEJX0iZRcW2/6C0OG7DfdU0C8w8Zh2Bbql4AcpY/s7pgRO74GnF9UCd4eZZO3dZUVO9f3MfieWNQNUlf10HjE5zgdNeIoRa8tPUGQsMoymXM= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM6PR0402MB3895.eurprd04.prod.outlook.com (2603:10a6:209:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Sat, 24 Apr 2021 10:38:35 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.023; Sat, 24 Apr 2021 10:38:35 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com, nicolas.chautru@intel.com Cc: david.marchand@redhat.com, Hemant Agrawal , Nipun Gupta Date: Sat, 24 Apr 2021 16:06:55 +0530 Message-Id: <20210424103700.8098-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210424103700.8098-1-hemant.agrawal@nxp.com> References: <20210413051715.26430-2-hemant.agrawal@nxp.com> <20210424103700.8098-1-hemant.agrawal@nxp.com> X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sat, 24 Apr 2021 10:38:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 08ee7cb7-6651-4391-2aed-08d9070d1cb5 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3895: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9H8azO3Sok0YzBAbOR1A2vKbFyk5xAJ4ForOGOzoZZ6THUjxmgf8/pCPqMcTi2M/6tsKkI8igCfXgUkfKqSRF5xA6fvOvWYGUYBCvXzdOQ2J7v4J3SPr/vZuzSQEe3DBaSjDqb1ZhFtkkXuKe4P5rJQJZ/L58u0t9VfNWMT23EgdKtVIe0VZxjCiRBjZDvGY5joUNSg1+tDBgvCfqvBDN9lPyGMM8yR3SoeXPByjr/H39uUifSATG6v5tbdqpU1aogosRb6/qZA0+3Z0HodjItFyMTsiEhNuVgyMWEDbHDaj6SvjKVO6mIZiwNtXqv/RcF8HrBiys76yyrih30buUNAHt0aZtKukwWcUSYte8hjDxCoD2Q05tk2/fvwqMKulA7I9ziCdWiF1yhHWzKHLn0Th5cAzeKklxdtdBu5zpJStYrR8TqnWBMZQIFHhOUR+HeEURPSS9CRKFStM+5NFOT5BGK09HvnYpIOW3deKBWxmyzcRdwVPIW2OLd3Wc2xJSvJ0mKVNzXdAM96uUL1mO842r6b3+bUcXVN+akLDYwT0zihijtHXYb7UqmSLDJ61EOOiWB25NS13cVhBA3GmaD9MB8NeB9lxUXSh5rr/wDnB66OJA+YO2JhhMICmQom5KnjPj4DimX+6AlH921PETXWLPi2+dww+iP8VmkzZLgk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(8936002)(5660300002)(316002)(1076003)(54906003)(8676002)(6512007)(86362001)(478600001)(38100700002)(2906002)(956004)(2616005)(38350700002)(36756003)(6666004)(186003)(83380400001)(26005)(4326008)(16526019)(6506007)(52116002)(6486002)(44832011)(66476007)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 26VwVQALY48sF4KF39RiP6tsDQi9P+EnGeflnR+kvEsuhamkcsTAoPnYhKgtay6moHMbxQeafo3/oQQ3YyOvTAr9CXnBbOOZCWEhr+JJp/fdvXZU2JyttUtnLO9A1O9IXUG5l+ETSfD4QrG6UsNBsy4a0x8mQ6uI0RUfnsNEBS59l1gJCISsAf2f/wcFyycJW0gDW5v853bENSQvgjVb3fk/zC0sagbDuAVxpJ8lVPs5/aYZIGP67xq9Fyx0Uj8ajjYKSEt4DO/f3uTFi/gC5hS12P+7iGIZ2X0tWGWdlZD1pXb2qUBJYtxdO+KYjcyVw3o+oXqlERHh0KCtb/DRZh9hjil2K6TIdV7diA14HHXzcIN9UqlqqFZl8wXn8Oza5cL+fcpCm7ESaeiw2K2mT1UeheWuW/yRfbfeeDTnBtI28xkTiUhR4Y+SS9ng/NudWDGIjvQIybSMKRyCYaFFt6B6T8+W2RsElFqDjf9kwBmfYtj2d/jgMEGGHNsC5Z/q09117pv/AazWJPcL+geZvL26NaY9CJe+9kkglJ1m67TMZ1jRDJMzHON3PYD8GQDi9M6yVNt2V20uM74B3I1h2AsU90XnrFBr0224fDIGAq/T7XPbvQMSmLDP1BhWPqFO4T12aOlDK0WJOu1MCWe6VCj8GOSkiJfMMgiSyFcmU/WWc/e9kHKeTn/iQxu25ZXGmWxS3qHRoP/hjDzTRHbpQuU9jFkftKn2SBGWPNn6bIGg64JORPZPM0KLYtry9ICbvyzZx1PdifSKcGdpaZOmHgQDawhVUksRdUk0GNTvtvYbuhz5scb9R3v+8xPTqb7TAR2qAS/bzTZrcWPZXIpuO8IAT8ktJ8woTixnd+fEY28NvZ2wfoBPfyAcSMIdUO7M29a3RCWvv4u6pKj9I6ZAVxKBOZxmdKULFdJ7+h+E5glWmKkcDEfXK7hVgpF7ER39Vckwt0hge/SKjnHYPCQA7hvrXWyW/3kIBcpvPM36bIhTpxXGMDN2SPTuR1SNHKSMwF5zdtoohXy4IP36HH2Qd1gXijQkT8zlwgovaMn/9kAlgkzVygvVz1IOzwD5jbJM78xI9u47IdI8fpmMmRZliTST8SSUB+X++34wuk+uc8bVuUeBxJ8uP32CfoceeFVWuPX3l2dDrxLLOYFulz6B4x2zg5P7OBTnl3QUBDq/rWrt/X6jD5MS7eia91KPA5XSCVgMAcqhkyfmvDQeXM6GO9cqE4XYg0na8sd+QkGam9FQLSbZRyoHk7nJYviKSjycUjQR624SabKfpE+TcYhvSQaO8Z+be2wDHwSZaVK8O8L9lDPqNTrkr7+3pwnOoxXi X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08ee7cb7-6651-4391-2aed-08d9070d1cb5 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2021 10:38:34.9308 (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: 1a/GAd3+JJpIBZqDsIrW2S50h5AW6hF5mllzeIyW0vTHp6WcKeoRio7UQ2ah9/KVNX7TEUT9W8OwL1H5qe6cbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3895 Subject: [dpdk-dev] [PATCH v4 3/8] baseband/la12xx: add devargs for max queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This patch adds dev args to take max queues as input Signed-off-by: Nipun Gupta Signed-off-by: Hemant Agrawal --- drivers/baseband/la12xx/bbdev_la12xx.c | 72 +++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c index 7050b17728..8886b35429 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx.c +++ b/drivers/baseband/la12xx/bbdev_la12xx.c @@ -19,13 +19,72 @@ RTE_LOG_REGISTER(bbdev_la12xx_logtype, pmd.bb.la12xx, NOTICE); +/* Initialisation params structure that can be used by LA12xx BBDEV driver */ +struct bbdev_la12xx_params { + uint8_t queues_num; /*< LA12xx BBDEV queues number */ +}; + +#define LA12XX_MAX_NB_QUEUES_ARG "max_nb_queues" + +static const char * const bbdev_la12xx_valid_params[] = { + LA12XX_MAX_NB_QUEUES_ARG, +}; + /* private data structure */ struct bbdev_la12xx_private { unsigned int max_nb_queues; /**< Max number of queues */ }; +static inline int +parse_u16_arg(const char *key, const char *value, void *extra_args) +{ + uint16_t *u16 = extra_args; + + unsigned int long result; + if ((value == NULL) || (extra_args == NULL)) + return -EINVAL; + errno = 0; + result = strtoul(value, NULL, 0); + if ((result >= (1 << 16)) || (errno != 0)) { + rte_bbdev_log(ERR, "Invalid value %lu for %s", result, key); + return -ERANGE; + } + *u16 = (uint16_t)result; + return 0; +} + +/* Parse parameters used to create device */ +static int +parse_bbdev_la12xx_params(struct bbdev_la12xx_params *params, + const char *input_args) +{ + struct rte_kvargs *kvlist = NULL; + int ret = 0; + + if (params == NULL) + return -EINVAL; + if (input_args) { + kvlist = rte_kvargs_parse(input_args, + bbdev_la12xx_valid_params); + if (kvlist == NULL) + return -EFAULT; + + ret = rte_kvargs_process(kvlist, bbdev_la12xx_valid_params[0], + &parse_u16_arg, ¶ms->queues_num); + if (ret < 0) + goto exit; + + } + +exit: + if (kvlist) + rte_kvargs_free(kvlist); + return ret; +} + /* Create device */ static int -la12xx_bbdev_create(struct rte_vdev_device *vdev) +la12xx_bbdev_create(struct rte_vdev_device *vdev, + struct bbdev_la12xx_params *init_params __rte_unused) { struct rte_bbdev *bbdev; const char *name = rte_vdev_device_name(vdev); @@ -62,7 +121,11 @@ la12xx_bbdev_create(struct rte_vdev_device *vdev) static int la12xx_bbdev_probe(struct rte_vdev_device *vdev) { + struct bbdev_la12xx_params init_params = { + 8 + }; const char *name; + const char *input_args; PMD_INIT_FUNC_TRACE(); @@ -73,7 +136,10 @@ la12xx_bbdev_probe(struct rte_vdev_device *vdev) if (name == NULL) return -EINVAL; - return la12xx_bbdev_create(vdev); + input_args = rte_vdev_device_args(vdev); + parse_bbdev_la12xx_params(&init_params, input_args); + + return la12xx_bbdev_create(vdev, &init_params); } /* Uninitialise device */ @@ -107,3 +173,5 @@ static struct rte_vdev_driver bbdev_la12xx_pmd_drv = { }; RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv); +RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME, + LA12XX_MAX_NB_QUEUES_ARG"="); From patchwork Sat Apr 24 10:36:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 426815 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2062364jao; Sat, 24 Apr 2021 03:38:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9ItcAdr+4SRNx181UU+SlOk6FN6FIEz9jy0QweoLHkFeLSn8RlVn1b2DCnVUn+tT/lLuc X-Received: by 2002:a7b:c444:: with SMTP id l4mr8923959wmi.36.1619260735961; Sat, 24 Apr 2021 03:38:55 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id a184si9335022wmc.77.2021.04.24.03.38.55; Sat, 24 Apr 2021 03:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=a0cch5d3; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00FB841127; Sat, 24 Apr 2021 12:38:42 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150051.outbound.protection.outlook.com [40.107.15.51]) by mails.dpdk.org (Postfix) with ESMTP id 020A2410D7 for ; Sat, 24 Apr 2021 12:38:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hhOhOE4KriNAgK8wwLnnvKe9cggfdJ4r4a4ic1hYU3Q2cM9VilU0q3tUcYAJ2/48Pcmw5JDEoA12Ht8TMPP4HeEtTU3O/AGF0Jux9GAfndRuBTj+5t/IAw10xaq56usimgUuBO7oS/X/wol+XJlxDchWV3mDHams6yXqb4WPqQSHf327MZhjTRisDm2Co2niP14FEN1HoD2EBrqiYRUjoXxJeRTNuGceZhJFUo3ZGpgvvliTquMcdmOWBJq9p3sCX5IqrQTecHPLa9cMFDduHwMPxh/gFGDYjEKq2uPr+fSxSOxzEjpkLhPbAFpNfgwpuoabYXeW7R/0IS6En0seOA== 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-SenderADCheck; bh=u0ayBmITf0khCC/YcHn4dDMF/WHCaFJYLMyP8O4Dndo=; b=SErB++kAbCNJhyXCHca/Dm71yyWJtwX2LQZPxZbJxEUehhHAdyJfzktJP58g3PJyZPAQ/hUFJqkxkCFSk/AYOgZ1f7BXqUPgDQgyGfgpgNuD4c1HVJQLOQyphJpLUyyjEWWBlpPZYGJaeHfEeg/A4k7G67SGpfuedK5viZpqZlC1KatLh5H5xZRSlkHf3149q/ePlcACLHISlGPSwVBZvvkB8khI2jgRWyH1lHq484IErw2zYIk8nH6vvHjjpN2Y1b9udlPOTu9THKw4++IqFMd5Qpb5oDwSNpbZbBIpk2VhWFidOYrSoaQjn3FIF5uE9eYNxCqOhpntCxeWp042Xw== 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=u0ayBmITf0khCC/YcHn4dDMF/WHCaFJYLMyP8O4Dndo=; b=a0cch5d3GHMom6e5c/T9t7ZyCYRqreXARmgwivvmUxeBtuwP3EQVvPNghYY4Mm1nYWPJKsl/ybupJcmr6zEvXUyu77/LX+NaWxVkN6iOSjN0tRL25E6rgwmslua49412EecgF75FAMx/HH196EtYTIdpNqF5nYw2RtSbPFZxQgA= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM6PR0402MB3895.eurprd04.prod.outlook.com (2603:10a6:209:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Sat, 24 Apr 2021 10:38:37 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.023; Sat, 24 Apr 2021 10:38:37 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com, nicolas.chautru@intel.com Cc: david.marchand@redhat.com, Hemant Agrawal Date: Sat, 24 Apr 2021 16:06:56 +0530 Message-Id: <20210424103700.8098-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210424103700.8098-1-hemant.agrawal@nxp.com> References: <20210413051715.26430-2-hemant.agrawal@nxp.com> <20210424103700.8098-1-hemant.agrawal@nxp.com> X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sat, 24 Apr 2021 10:38:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ba455b5c-c012-4bb3-92ee-08d9070d1e54 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3895: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7222gVA7zCzzm+Uk/KD7kHfAeZ47GfqJS5z646qjMEs3F2JkLwLxYZKgINfT23aZkT63gBOkM8jV0bOdByd0+DCsWxiU4k/wlqyu4GsT881WyI5muvb3cW6JzE08o3N+fMzVy5cBco7tOLgNurHVg6DYcTJNpgTsvm4lPYKG2OuiVNe2w215+xTiFxhl+XmYtQ/Qmwo4CMIqvXIJKOE1MIKGAeXwTrg4nn6l28dCTlFTq/iHfgMX6MO1Oq3xIXA4mu88tFSMeevlC14AO0MQ2lra+dr/BuP+/S3d9VlBpzRHM6CtGrjEFvCBX63ADA38WWTlMb6uzV5y0wVLceeABu2j4hd1+PoN9HqwelBBahXN0gd0YdRAMGH1Arl4LTuk19qpUzTKqlpwob0OKEAzsQPU+Qw+vdq0YCSyinPQ8NAJOikWEXWgLaA1o9c1Xe2s18LKnlbOVKOgkiCc/GE+3jBpfw+IRA1jgYdXIMU+LteELxowMfm6CuJrLJzRcJwF9nhfcnNkSiPDiLGZ8fdg28GKhH9VayUNMj2cMofEHWvxW0Uhjmj5nwWqMZ/Xoj/bFXvhGgHqYU6m1I1zxD228FhYpJzbjMLzE5O+Skf34Oz2t1mUntKSQmUVFU5E0EIeXBOZBZpwul5f4l8MCnLjQdIsJM8d/KsNWr0Jy854p20= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(8936002)(5660300002)(316002)(1076003)(8676002)(6512007)(86362001)(478600001)(38100700002)(2906002)(956004)(2616005)(38350700002)(36756003)(6666004)(186003)(83380400001)(26005)(4326008)(16526019)(6506007)(52116002)(6486002)(44832011)(66476007)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: +PUlyDAaZx1Q38vbZeAKKf09ONGN7Y2nzxY+hq7wS278hM3TEhXtfvJqs2nWfQ2416eulYiW9YTuGnUDdo5+x9BHMABjcRyWpGnV7lPIvYutr5hzL0enEE5dtpVeSx4MQkFakGKUT+CUGe1Ag+77PSUF6ivCsE/Vvh4i7GUqosTVTCq+rO6D4D8h8arXsRbF+OWWbVKu74PKMJMYSnwVKGyZVds5SpZXWGi2cNdGLyAJlQBZkGlWWxHL+xB6OpQb4WUF63rUL54BXcczwoJZKsXIiqWVTS7xBtkxDVNdQvMhrQ+rUlZI10fGrBi3kz3EkZXSnS94AXMhPvbWNAiDrkrVuHqfs8OewBLApdFKlbaiIxUHbvb8NX0E/l5eNGEOiF95fJulQQG1BrRllwBJxB92JO3XDbPhKl2DoOmJXblk/S7E2TNdo+OK2RpH1PUIF9j34hB46yzIp3Iyl57mtPpNtv59bi6gi5ana8qTatRImrx0qn3iL+fFU+1SIOrpQ0L84QbMpGRsDKZXoSBbCTD2BtrLAMRoljgNQ1WgnGpOY+LjU4EI57IUpdQq8AZi7kKg3XFhUT+7krxN5b/pQKm19JWQ/a7cjSS+nKvYn5LS0WfSC5Q7BmAGF6CFTWXrxlxnjI5kv9ddp9Yxli4E3FryzZOlgOfWYLbD4xyei16ooTI8GS6GwWv2j9w42PcdxdHbEHtThWLFFiirotvqJKgOS8B4EuADED/x+TNVBVO+KlozMPUg9uZEvXEOKaq3lxik9rSxQllHCfY0u6B2Bfj8B+f0li7gUy23Y++5s7BC4oSSDvv0zILJ4VsMcmPz3gKY58svs8oEaP7pDYA9PFdl1N1Yp1bJg5gZwuG98aOeGDH2UWsTaNGxIGzNV2S+ZQNtYZO9gM7nbuL7lPZDPi6zCuyUyv/tVtXOlTIS/8EmeODW7Qmh/Rsuuekj+QnvmpLPbxFA3GnS/Xe0K3Xe8mAOgFU09DvKcf/9d10gKvMwJY4X+GGINDASEoMwdhPwyG6HkINEn3UyFxjjQEIQjd/bWJIZ6rh+SdZx3saaVx+C0MJqJ1zYViMnO8r15k4ScKIl28TXJq02T34e3wcrqPUqIKOAxOsJ7qGpIkhS3JWDFLcX+8EuB3G8Io2b5DLn+TBKrhhYOlw9mhQdAwgx79MM1Mag3SK1BZr2rYXbUeKHBeJM9dc6VzpBGL6l4L136Q+Aa5qUbZjlJD+y/cGjWgV0/2e6OJxQb0qiFhAdb9Fhn/wd6yDJ7vASypSi9lc8j6GzT1tr+L5xyomrUtX+pqQkvhRZL9SwljRePd9wlqRc6ISAc65ach6iNt4veAKG X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba455b5c-c012-4bb3-92ee-08d9070d1e54 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2021 10:38:37.6802 (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: UDrjhnNPyD8S13zD37rAAxF3eFuxXg72076kkDR7OMP0nj+VfW4KHZ0snoYhv04BzLh3rI/lXyVMD+hanwI70g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3895 Subject: [dpdk-dev] [PATCH v4 4/8] baseband/la12xx: add support for multiple modems X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This patch add support for multiple modems by assigning a modem id as dev args in vdev creation. Signed-off-by: Hemant Agrawal --- drivers/baseband/la12xx/bbdev_la12xx.c | 64 +++++++++++++++++++--- drivers/baseband/la12xx/bbdev_la12xx.h | 56 +++++++++++++++++++ drivers/baseband/la12xx/bbdev_la12xx_ipc.h | 20 +++++++ 3 files changed, 133 insertions(+), 7 deletions(-) create mode 100644 drivers/baseband/la12xx/bbdev_la12xx.h create mode 100644 drivers/baseband/la12xx/bbdev_la12xx_ipc.h -- 2.17.1 diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c index 8886b35429..f26f3f2a08 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx.c +++ b/drivers/baseband/la12xx/bbdev_la12xx.c @@ -14,6 +14,8 @@ #include #include +#include +#include #define DRIVER_NAME baseband_la12xx @@ -22,18 +24,18 @@ RTE_LOG_REGISTER(bbdev_la12xx_logtype, pmd.bb.la12xx, NOTICE); /* Initialisation params structure that can be used by LA12xx BBDEV driver */ struct bbdev_la12xx_params { uint8_t queues_num; /*< LA12xx BBDEV queues number */ + int8_t modem_id; /*< LA12xx modem instance id */ }; #define LA12XX_MAX_NB_QUEUES_ARG "max_nb_queues" +#define LA12XX_VDEV_MODEM_ID_ARG "modem" +#define LA12XX_MAX_MODEM 4 static const char * const bbdev_la12xx_valid_params[] = { LA12XX_MAX_NB_QUEUES_ARG, + LA12XX_VDEV_MODEM_ID_ARG, }; -/* private data structure */ -struct bbdev_la12xx_private { - unsigned int max_nb_queues; /**< Max number of queues */ -}; static inline int parse_u16_arg(const char *key, const char *value, void *extra_args) { @@ -52,6 +54,28 @@ parse_u16_arg(const char *key, const char *value, void *extra_args) return 0; } +/* Parse integer from integer argument */ +static int +parse_integer_arg(const char *key __rte_unused, + const char *value, void *extra_args) +{ + int i; + char *end; + + errno = 0; + + i = strtol(value, &end, 10); + if (*end != 0 || errno != 0 || i < 0 || i > LA12XX_MAX_MODEM) { + rte_bbdev_log(ERR, "Supported Port IDS are 0 to %d", + LA12XX_MAX_MODEM - 1); + return -EINVAL; + } + + *((uint32_t *)extra_args) = i; + + return 0; +} + /* Parse parameters used to create device */ static int parse_bbdev_la12xx_params(struct bbdev_la12xx_params *params, @@ -73,6 +97,16 @@ parse_bbdev_la12xx_params(struct bbdev_la12xx_params *params, if (ret < 0) goto exit; + ret = rte_kvargs_process(kvlist, + bbdev_la12xx_valid_params[1], + &parse_integer_arg, + ¶ms->modem_id); + + if (params->modem_id >= LA12XX_MAX_MODEM) { + rte_bbdev_log(ERR, "Invalid modem id, must be < %u", + LA12XX_MAX_MODEM); + goto exit; + } } exit: @@ -84,10 +118,11 @@ parse_bbdev_la12xx_params(struct bbdev_la12xx_params *params, /* Create device */ static int la12xx_bbdev_create(struct rte_vdev_device *vdev, - struct bbdev_la12xx_params *init_params __rte_unused) + struct bbdev_la12xx_params *init_params) { struct rte_bbdev *bbdev; const char *name = rte_vdev_device_name(vdev); + struct bbdev_la12xx_private *priv; PMD_INIT_FUNC_TRACE(); @@ -103,6 +138,20 @@ la12xx_bbdev_create(struct rte_vdev_device *vdev, return -ENOMEM; } + priv = bbdev->data->dev_private; + priv->modem_id = init_params->modem_id; + /* if modem id is not configured */ + if (priv->modem_id == -1) + priv->modem_id = bbdev->data->dev_id; + + /* Reset Global variables */ + priv->num_ldpc_enc_queues = 0; + priv->num_ldpc_dec_queues = 0; + priv->num_valid_queues = 0; + priv->max_nb_queues = init_params->queues_num; + + rte_bbdev_log(INFO, "Setting Up %s: DevId=%d, ModemId=%d", + name, bbdev->data->dev_id, priv->modem_id); bbdev->dev_ops = NULL; bbdev->device = &vdev->device; bbdev->data->socket_id = 0; @@ -122,7 +171,7 @@ static int la12xx_bbdev_probe(struct rte_vdev_device *vdev) { struct bbdev_la12xx_params init_params = { - 8 + 8, -1, }; const char *name; const char *input_args; @@ -174,4 +223,5 @@ static struct rte_vdev_driver bbdev_la12xx_pmd_drv = { RTE_PMD_REGISTER_VDEV(DRIVER_NAME, bbdev_la12xx_pmd_drv); RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME, - LA12XX_MAX_NB_QUEUES_ARG"="); + LA12XX_MAX_NB_QUEUES_ARG"=" + LA12XX_VDEV_MODEM_ID_ARG "= "); diff --git a/drivers/baseband/la12xx/bbdev_la12xx.h b/drivers/baseband/la12xx/bbdev_la12xx.h new file mode 100644 index 0000000000..5228502331 --- /dev/null +++ b/drivers/baseband/la12xx/bbdev_la12xx.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2020-2021 NXP + */ + +#ifndef __BBDEV_LA12XX_H__ +#define __BBDEV_LA12XX_H__ + +#define BBDEV_IPC_ENC_OP_TYPE 1 +#define BBDEV_IPC_DEC_OP_TYPE 2 + +#define MAX_LDPC_ENC_FECA_QUEUES 4 +#define MAX_LDPC_DEC_FECA_QUEUES 4 + +#define MAX_CHANNEL_DEPTH 16 +/* private data structure */ +struct bbdev_la12xx_private { + void *ipc_priv; + uint8_t num_valid_queues; + uint8_t max_nb_queues; + uint8_t num_ldpc_enc_queues; + uint8_t num_ldpc_dec_queues; + int8_t modem_id; + struct bbdev_la12xx_q_priv *queues_priv[32]; +}; + +struct hugepage_info { + void *vaddr; + phys_addr_t paddr; + size_t len; +}; + +struct bbdev_la12xx_q_priv { + struct bbdev_la12xx_private *bbdev_priv; + uint32_t q_id; /**< Channel ID */ + uint32_t feca_blk_id; /** FECA block ID for processing */ + uint32_t feca_blk_id_be32; /**< FECA Block ID for this queue */ + uint8_t en_napi; /* 0: napi disabled, 1: napi enabled */ + uint16_t queue_size; /**< Queue depth */ + int32_t eventfd; /**< Event FD value */ + enum rte_bbdev_op_type op_type; /**< Operation type */ + uint32_t la12xx_core_id; + /* LA12xx core ID on which this will be scheduled */ + struct rte_mempool *mp; /**< Pool from where buffers would be cut */ + void *bbdev_op[MAX_CHANNEL_DEPTH]; + /**< Stores bbdev op for each index */ + void *msg_ch_vaddr[MAX_CHANNEL_DEPTH]; + /**< Stores msg channel addr for modem->host */ + uint32_t host_pi; /**< Producer_Index for HOST->MODEM */ + uint32_t host_ci; /**< Consumer Index for MODEM->HOST */ + host_ipc_params_t *host_params; /**< Host parameters */ +}; + +#define lower_32_bits(x) ((uint32_t)((uint64_t)x)) +#define upper_32_bits(x) ((uint32_t)(((uint64_t)(x) >> 16) >> 16)) + +#endif diff --git a/drivers/baseband/la12xx/bbdev_la12xx_ipc.h b/drivers/baseband/la12xx/bbdev_la12xx_ipc.h new file mode 100644 index 0000000000..9aa5562981 --- /dev/null +++ b/drivers/baseband/la12xx/bbdev_la12xx_ipc.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2020-2021 NXP + */ +#ifndef __BBDEV_LA12XX_IPC_H__ +#define __BBDEV_LA12XX_IPC_H__ + +/** No. of max channel per instance */ +#define IPC_MAX_DEPTH (16) + +/* This shared memory would be on the host side which have copy of some + * of the parameters which are also part of Shared BD ring. Read access + * of these parameters from the host side would not be over PCI. + */ +typedef struct host_ipc_params { + volatile uint32_t pi; + volatile uint32_t ci; + volatile uint32_t modem_ptr[IPC_MAX_DEPTH]; +} __rte_packed host_ipc_params_t; + +#endif From patchwork Sat Apr 24 10:36:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 426816 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2062416jao; Sat, 24 Apr 2021 03:39:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzGWnHYyYemFhHnmZOQUvvPF6wnhBMXE8YLkSVnXdkcRdhzXq/qOUjDFuW10zmFM4Ky+MK X-Received: by 2002:adf:e491:: with SMTP id i17mr10067617wrm.314.1619260742640; Sat, 24 Apr 2021 03:39:02 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id k206si12451375wmf.3.2021.04.24.03.39.02; Sat, 24 Apr 2021 03:39:02 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=GmY0pGFP; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4ADB1410FA; Sat, 24 Apr 2021 12:38:47 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150059.outbound.protection.outlook.com [40.107.15.59]) by mails.dpdk.org (Postfix) with ESMTP id AA4834112B for ; Sat, 24 Apr 2021 12:38:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BbYH6IBo9AcLGXUikmY8aHVmZxaTT0JmHnLmgm3Q9lPm+OCuw+v/0DsQARp41hX35msIXHyNhaz4wr3KvFJA0zA4jgQ6oXEmqDmSLI+wKQYmDk8zo4u59RO63yUTVQfk4D5tWyx3NiYuZ7AgulV+LkOSTBxHJUSxL1SZQTBYV/xo+LYR/Btg8ostkHVWBNGU/Au7TYVfLPBB8qwkjPkHJsvY3c9/0O1zaQNZV0lKMTdq1tmQiYIv/C3YlPYGwQfdLsHX5140DTEl9iRhyA1ZEtKVIvvcR+wR2Uys+djyi83JfZj+lTsoHGBy/aou1RdXwyuBJuXwQE6FynB6CA25bw== 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-SenderADCheck; bh=PYHv2u0wks0nKT/q5BHY0VPqwQrM2J3oEF+48bbsfoA=; b=PTnIBCb2MbGjF9hgKcAnJjDMT40+Iuox/9WvPvH8rjqrnQhOS27AGMfdmaVQVzOWTQdfV6eZjdUugoy9mnAcQZtusk7DQK7aU5it/bpjrJaKjmIgdQPCYSxq9C9pEGaMo8g0EgBcrZ9gIuyewWOKcxGmGa48b/iq2sSMZcsEb2WhmrcZ3hwxVn+9J/cm1piXLujHXsMBVI1o7q8FUB9QJK9si9sFMXS5GbkpyNwQhvP1eMmaIlgn0y4hQgFTHc/Ch753ZWJZI4UvWFMSl/U58Sd0kbEzEPOAoirR2TISvC6ANR08tl4Zdf6el6YxOX2/6HP6GhyRVhbUQqZQFSnAww== 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=PYHv2u0wks0nKT/q5BHY0VPqwQrM2J3oEF+48bbsfoA=; b=GmY0pGFPulfwIlyxbamIO6C/NWbpzOEbIsNSjD9rhX3dm7miVMpPuL+xDkYV7tcASgJw5canaeyeoFks5hU4RWaImgY2LzLMPViSEZ+b26+YfEOGBxE0mrYg+IAjmYy9Yl0ir7OM7tk8fVG1hNoKNTuk25OY3TZgr615LeBfxjQ= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM6PR0402MB3895.eurprd04.prod.outlook.com (2603:10a6:209:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Sat, 24 Apr 2021 10:38:41 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.023; Sat, 24 Apr 2021 10:38:41 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com, nicolas.chautru@intel.com Cc: david.marchand@redhat.com, Hemant Agrawal , Nipun Gupta Date: Sat, 24 Apr 2021 16:06:57 +0530 Message-Id: <20210424103700.8098-6-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210424103700.8098-1-hemant.agrawal@nxp.com> References: <20210413051715.26430-2-hemant.agrawal@nxp.com> <20210424103700.8098-1-hemant.agrawal@nxp.com> X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sat, 24 Apr 2021 10:38:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f0f2cc2-2e8d-434d-6c1a-08d9070d202a X-MS-TrafficTypeDiagnostic: AM6PR0402MB3895: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:431; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ESdlpQQmoDtD7j6YUCbsr13vTBMzv1QqyIrQ4GYA/jGcpR6PKpvWx/f9UVQxX/QORHPWJX4XtPZqD1zwNPq1Ri/RmvoQDVwNuL1f5RvOlcBnhvb2hcx5RtGR2blMzrTBlcrGJT2y6z/0J6BNszOL7c5+Cmlqyb0PcUG2CTwJth5oG7VZbPxlDaOXqHgT4eX4BEb1+doftA1dOCcLowgqfPFxVtAgp2hZIkw5sd1HU9U0W2a8UbxpUavTrkD9LVWCs2m2g27iBFO0L9ibTin2NY5PW5oqw29fXDEXxk8vd5GaK/TrXFf1Sxz1vbiUo890ahWJm9UjF7YE4Yt2F91lJOFakLluFs5UfVcvy8sCmyx8CpSslRdWFJOrBFi2unMmKv4lOu1jYukSmJn/HfkA6zSpd9kbUoh0k7Mr1W/i5xlJpIZGi63gkd4GWgX4+GE5rTDQ6/pW5v+6U9UzECzcHKj5mc0JtuEpwTWIr2t/An2DYofeYQ15A+cT3iOqFP3q+PcxI6USRJRAj/UDMrHFeP+W3E+lzMa1hlQ/lDzWeph4yGruk9Ifsy2sKzGJiCdsHbRCJ+7cBsyAUcXDRS/OhSAec4QdVY7PP9EGg9AY68cMQ3ssHS3A2a0eB7Y76e2KJfZUNgcK1bPO8y+oRL1xGFY4KxlnmwS+NmygmJoMvdTWG4iH5O/pvyv8NmCXtSo2vrZxCGqUrKXD0ju4YL6H8sqQTsl1Tw3nRs7YrEGvcszruWFpHqZMx/eAwVNtuT0s X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(8936002)(5660300002)(316002)(1076003)(54906003)(8676002)(6512007)(86362001)(478600001)(30864003)(38100700002)(2906002)(956004)(2616005)(38350700002)(36756003)(6666004)(186003)(83380400001)(26005)(4326008)(16526019)(6506007)(52116002)(6486002)(44832011)(66476007)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: +CKIt0fkWpoB8fH625ekGDa2XxtBnzPtwh0qeX+m/45u/KiQhey5ml8Q+C0iDE6K+XsftuoiZvq4rBFTc+7nREXnbWNLlmTvTVI7KN1zPX88clrAhZuu9TLYN5fkNnehzDDRQO2gT4c8NCAJylTqrMZWVkEO6jkTI9lQwYnv4mNwJVi+HhEQ+MhdS8CCoHpYZDxePJM0q3Jbmi3iXnERO0EJoQzyISUOzH+szrhTSEcKahd8l2qmcLzSynE1+4BR2kE4hICtmVj8TQirGUQEmxpOCOzhVRhSdkNooeM6h1nV+lDJ+sizUsnm7r60FNmWN+PV54wXBFJa/6SGwBjYlO4Vq7jnMe7IUG4GV2p/BkhgEAJxwb0na1uoCxDukIpCj4DaUkTL9XftXuRsEpFTb7Tzuc1wj2AEwFaGgP6FzIA6u/426q1uGZze/nE//DYFhHNUPr40nuix1t4M4bMJ2BSCLAJSg4aqMMZ2003wj/NhtLzJrl26DyuTREGpUo7k/HeVepqQegeqm9qH2g8+96r5LCU0gUMMna8wD46eYaVMaVGtn21eiNkKfkYRstjdR/3Fm42IFH3c30Riqay3/ndx4a544X8Agh3y5Vlx4ldVn+394iDkrAfu2OIXiCcgGI5mTDRgyP84XdDXJlpCloGepSXq/hzRgg1uikWRZeGX3/UCpKKkoA/ysWEinuGSNsetlOW71xMc1ARO49/7pPp7D0LxG0k/bMr7RovcxnABxLpyYpoWG4l2xw2e8qcaBXDfFVlEuQnNHspMu6O+pOsHrIlKexmhJ7AB/RPZK6/OYetlk3FLNaucuIAilUCn/8rW+F1hyhNpwGqk/oClPAlXgQPNbYfiQNjBqLFencG4BOQxy7CMi+LaZ2y3yXyc3UbGaQLawBB5vrcYd28b5/YBcV+QSiG+wweSbpcybGmRfsYKYJvOIXh6UD3+uAafjpPfz1r6yd2ds31t1B5WeTLSRJCTTGgHo4XPRKJFFxOcx3YfPjfmtkD8UXmyN7pb5jdhMD0eG60jhLEod6sA277TXU7i8kTdIM74ERiOie0ASl/3vIi6TqJ9cGILvCRnNMnqCUqbLWl3ohREL0RDgBVTZzxYOY+EqhEGqV1MGAWYFQRMJQR1xsmwR9gMDO/ekClhfgnc/MSSy279WnFkJwRgRT4IGczbfaK9lFILf43opnwkdyrWZ5hXi69E3mpPwkS4GXOjRZtIpnK2WY4GIyi+N7eovsTQay1dtYWUl4yxmca2bPKOwfTOVT6DR6BMDHJG53TRB8Dqz6AVaM+JAosCluYw2ngND9Kh2Vs72hPPHg0kvVFDrwxwAnqk/uh4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f0f2cc2-2e8d-434d-6c1a-08d9070d202a X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2021 10:38:40.8504 (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: SrAU4bTu6wLQi9lyg9Ka3SVjDyEj8xk+HpTlAIBr3ExYwZvefnGYgGtwpX0Jgqq4014md61AXhIR2epwbuGkog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3895 Subject: [dpdk-dev] [PATCH v4 5/8] baseband/la12xx: add queue and modem config support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This patch add support for connecting with modem and creating the ipc channel as queues with modem for the exchange of data. Signed-off-by: Nipun Gupta Signed-off-by: Hemant Agrawal --- doc/guides/bbdevs/index.rst | 1 + doc/guides/bbdevs/la12xx.rst | 81 +++ doc/guides/rel_notes/release_21_05.rst | 5 + drivers/baseband/la12xx/bbdev_la12xx.c | 552 ++++++++++++++++++++- drivers/baseband/la12xx/bbdev_la12xx.h | 11 +- drivers/baseband/la12xx/bbdev_la12xx_ipc.h | 189 ++++++- 6 files changed, 829 insertions(+), 10 deletions(-) create mode 100644 doc/guides/bbdevs/la12xx.rst -- 2.17.1 diff --git a/doc/guides/bbdevs/index.rst b/doc/guides/bbdevs/index.rst index 4445cbd1b0..cedd706fa6 100644 --- a/doc/guides/bbdevs/index.rst +++ b/doc/guides/bbdevs/index.rst @@ -14,3 +14,4 @@ Baseband Device Drivers fpga_lte_fec fpga_5gnr_fec acc100 + la12xx diff --git a/doc/guides/bbdevs/la12xx.rst b/doc/guides/bbdevs/la12xx.rst new file mode 100644 index 0000000000..3c9ac5c047 --- /dev/null +++ b/doc/guides/bbdevs/la12xx.rst @@ -0,0 +1,81 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright 2021 NXP + +NXP LA12xx Poll Mode Driver +======================================= + +The BBDEV LA12xx poll mode driver (PMD) supports an implementation for +offloading High Phy processing functions like LDPC Encode / Decode 5GNR wireless +acceleration function, using PCI based LA12xx Software defined radio. + +More information can be found at `NXP Official Website +`_. + +Features +-------- + +LA12xx PMD supports the following features: + +- Maximum of 8 UL queues +- Maximum of 8 DL queues +- PCIe Gen-3 x8 Interface +- MSI-X + +Installation +------------ + +Section 3 of the DPDK manual provides instructions on installing and compiling DPDK. + +DPDK requires hugepages to be configured as detailed in section 2 of the DPDK manual. + +Initialization +-------------- + +The device can be listed on the host console with: + + +Use the following lspci command to get the multiple LA12xx processor ids. The +device ID of the LA12xx baseband processor is "1c30". + +.. code-block:: console + + sudo lspci -nn + +... +0001:01:00.0 Power PC [0b20]: Freescale Semiconductor Inc Device [1957:1c30] ( +rev 10) +... +0002:01:00.0 Power PC [0b20]: Freescale Semiconductor Inc Device [1957:1c30] ( +rev 10) + + +Prerequisites +------------- + +Currently supported by DPDK: + +- NXP LA1224 BSP **1.0+**. +- NXP LA1224 PCIe Modem card connected to ARM host. + +- Follow the DPDK :ref:`Getting Started Guide for Linux ` to setup the basic DPDK environment. + +* Use dev arg option ``modem=0`` to identify the modem instance for a given + device. This is required only if more than 1 modem cards are attached to host. + this is optional and the default value is 0. + e.g. ``--vdev=baseband_la12xx,modem=0`` + +* Use dev arg option ``max_nb_queues=x`` to specify the maximum number of queues + to be used for communication with offload device i.e. modem. default is 16. + e.g. ``--vdev=baseband_la12xx,max_nb_queues=4`` + +Enabling logs +------------- + +For enabling logs, use the following EAL parameter: + +.. code-block:: console + + ./your_bbdev_application --log-level=la12xx: + +Using ``bb.la12xx`` as log matching criteria, all Baseband PMD logs can be +enabled which are lower than logging ``level``. diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst index b3224dc332..4e0b62debb 100644 --- a/doc/guides/rel_notes/release_21_05.rst +++ b/doc/guides/rel_notes/release_21_05.rst @@ -236,6 +236,11 @@ New Features the hash function used in NICs to spread the traffic among the queues. It can be used to get predictable mapping of the flows. +* **Added NXP LA12xx baseband PMD.** + + * Added a new baseband PMD driver for NXP LA12xx Software defined radio. + * See the :doc:`../bbdevs/la12xx` for more details. + * **Updated testpmd.** * Added a command line option to configure forced speed for Ethernet port. diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c index f26f3f2a08..1fdeca279e 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx.c +++ b/drivers/baseband/la12xx/bbdev_la12xx.c @@ -3,6 +3,11 @@ */ #include +#include +#include +#include +#include +#include #include #include @@ -31,11 +36,549 @@ struct bbdev_la12xx_params { #define LA12XX_VDEV_MODEM_ID_ARG "modem" #define LA12XX_MAX_MODEM 4 +#define LA12XX_MAX_CORES 4 +#define LA12XX_LDPC_ENC_CORE 0 +#define LA12XX_LDPC_DEC_CORE 1 + +#define LA12XX_MAX_LDPC_ENC_QUEUES 4 +#define LA12XX_MAX_LDPC_DEC_QUEUES 4 + static const char * const bbdev_la12xx_valid_params[] = { LA12XX_MAX_NB_QUEUES_ARG, LA12XX_VDEV_MODEM_ID_ARG, }; +static const struct rte_bbdev_op_cap bbdev_capabilities[] = { + { + .type = RTE_BBDEV_OP_LDPC_ENC, + .cap.ldpc_enc = { + .capability_flags = + RTE_BBDEV_LDPC_CRC_24A_ATTACH | + RTE_BBDEV_LDPC_CRC_24B_ATTACH, + .num_buffers_src = + RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, + .num_buffers_dst = + RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, + } + }, + { + .type = RTE_BBDEV_OP_LDPC_DEC, + .cap.ldpc_dec = { + .capability_flags = + RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | + RTE_BBDEV_LDPC_LLR_COMPRESSION | + RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | + RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP, + .num_buffers_src = + RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, + .num_buffers_hard_out = + RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, + } + }, + RTE_BBDEV_END_OF_CAPABILITIES_LIST() +}; + +static struct rte_bbdev_queue_conf default_queue_conf = { + .queue_size = MAX_CHANNEL_DEPTH, +}; + +/* Get device info */ +static void +la12xx_info_get(struct rte_bbdev *dev __rte_unused, + struct rte_bbdev_driver_info *dev_info) +{ + PMD_INIT_FUNC_TRACE(); + + dev_info->driver_name = RTE_STR(DRIVER_NAME); + dev_info->max_num_queues = LA12XX_MAX_QUEUES; + dev_info->queue_size_lim = MAX_CHANNEL_DEPTH; + dev_info->hardware_accelerated = true; + dev_info->max_dl_queue_priority = 0; + dev_info->max_ul_queue_priority = 0; + dev_info->default_queue_conf = default_queue_conf; + dev_info->capabilities = bbdev_capabilities; + dev_info->cpu_flag_reqs = NULL; + dev_info->min_alignment = 64; + + rte_bbdev_log_debug("got device info from %u", dev->data->dev_id); +} + +/* Release queue */ +static int +la12xx_queue_release(struct rte_bbdev *dev, uint16_t q_id) +{ + RTE_SET_USED(dev); + RTE_SET_USED(q_id); + + PMD_INIT_FUNC_TRACE(); + + /* TODO: Implement */ + + return 0; +} + +#define HUGEPG_OFFSET(A) \ + ((uint64_t) ((unsigned long) (A) \ + - ((uint64_t)ipc_priv->hugepg_start.host_vaddr))) + +static int ipc_queue_configure(uint32_t channel_id, + ipc_t instance, struct bbdev_la12xx_q_priv *q_priv) +{ + ipc_userspace_t *ipc_priv = (ipc_userspace_t *)instance; + ipc_instance_t *ipc_instance = ipc_priv->instance; + ipc_ch_t *ch; + void *vaddr; + uint32_t i = 0; + uint32_t msg_size = sizeof(struct bbdev_ipc_enqueue_op); + + PMD_INIT_FUNC_TRACE(); + + rte_bbdev_log_debug("%x %p", ipc_instance->initialized, + ipc_priv->instance); + ch = &(ipc_instance->ch_list[channel_id]); + + rte_bbdev_log_debug("channel: %u, depth: %u, msg size: %u", + channel_id, q_priv->queue_size, msg_size); + + /* Start init of channel */ + ch->md.ring_size = rte_cpu_to_be_32(q_priv->queue_size); + ch->md.pi = 0; + ch->md.ci = 0; + ch->md.msg_size = msg_size; + for (i = 0; i < q_priv->queue_size; i++) { + vaddr = rte_malloc(NULL, msg_size, RTE_CACHE_LINE_SIZE); + if (!vaddr) + return IPC_HOST_BUF_ALLOC_FAIL; + /* Only offset now */ + ch->bd_h[i].modem_ptr = + rte_cpu_to_be_32(HUGEPG_OFFSET(vaddr)); + ch->bd_h[i].host_virt_l = lower_32_bits(vaddr); + ch->bd_h[i].host_virt_h = upper_32_bits(vaddr); + q_priv->msg_ch_vaddr[i] = vaddr; + /* Not sure use of this len may be for CRC*/ + ch->bd_h[i].len = 0; + } + ch->host_ipc_params = + rte_cpu_to_be_32(HUGEPG_OFFSET(q_priv->host_params)); + + rte_bbdev_log_debug("Channel configured"); + return IPC_SUCCESS; +} + +static int +la12xx_e200_queue_setup(struct rte_bbdev *dev, + struct bbdev_la12xx_q_priv *q_priv) +{ + struct bbdev_la12xx_private *priv = dev->data->dev_private; + ipc_userspace_t *ipc_priv = priv->ipc_priv; + struct gul_hif *mhif; + ipc_metadata_t *ipc_md; + ipc_ch_t *ch; + int instance_id = 0, i; + int ret; + + PMD_INIT_FUNC_TRACE(); + + switch (q_priv->op_type) { + case RTE_BBDEV_OP_LDPC_ENC: + q_priv->la12xx_core_id = LA12XX_LDPC_ENC_CORE; + break; + case RTE_BBDEV_OP_LDPC_DEC: + q_priv->la12xx_core_id = LA12XX_LDPC_DEC_CORE; + break; + default: + rte_bbdev_log(ERR, "Unsupported op type\n"); + return -1; + } + + mhif = (struct gul_hif *)ipc_priv->mhif_start.host_vaddr; + /* offset is from start of PEB */ + ipc_md = (ipc_metadata_t *)((uint64_t)ipc_priv->peb_start.host_vaddr + + mhif->ipc_regs.ipc_mdata_offset); + ch = &ipc_md->instance_list[instance_id].ch_list[q_priv->q_id]; + + if (q_priv->q_id < priv->num_valid_queues) { + ipc_br_md_t *md = &(ch->md); + + q_priv->feca_blk_id = rte_cpu_to_be_32(ch->feca_blk_id); + q_priv->feca_blk_id_be32 = ch->feca_blk_id; + q_priv->host_pi = rte_be_to_cpu_32(md->pi); + q_priv->host_ci = rte_be_to_cpu_32(md->ci); + q_priv->host_params = (host_ipc_params_t *) + (rte_be_to_cpu_32(ch->host_ipc_params) + + ((uint64_t)ipc_priv->hugepg_start.host_vaddr)); + + for (i = 0; i < q_priv->queue_size; i++) { + uint32_t h, l; + + h = ch->bd_h[i].host_virt_h; + l = ch->bd_h[i].host_virt_l; + q_priv->msg_ch_vaddr[i] = (void *)join_32_bits(h, l); + } + + rte_bbdev_log(WARNING, + "Queue [%d] already configured, not configuring again", + q_priv->q_id); + return 0; + } + + rte_bbdev_log_debug("setting up queue %d", q_priv->q_id); + + /* Call ipc_configure_channel */ + ret = ipc_queue_configure(q_priv->q_id, ipc_priv, q_priv); + if (ret) { + rte_bbdev_log(ERR, "Unable to setup queue (%d) (err=%d)", + q_priv->q_id, ret); + return ret; + } + + /* Set queue properties for LA12xx device */ + switch (q_priv->op_type) { + case RTE_BBDEV_OP_LDPC_ENC: + if (priv->num_ldpc_enc_queues >= LA12XX_MAX_LDPC_ENC_QUEUES) { + rte_bbdev_log(ERR, + "num_ldpc_enc_queues reached max value"); + return -1; + } + ch->la12xx_core_id = + rte_cpu_to_be_32(LA12XX_LDPC_ENC_CORE); + ch->feca_blk_id = rte_cpu_to_be_32(priv->num_ldpc_enc_queues++); + break; + case RTE_BBDEV_OP_LDPC_DEC: + if (priv->num_ldpc_dec_queues >= LA12XX_MAX_LDPC_DEC_QUEUES) { + rte_bbdev_log(ERR, + "num_ldpc_dec_queues reached max value"); + return -1; + } + ch->la12xx_core_id = + rte_cpu_to_be_32(LA12XX_LDPC_DEC_CORE); + ch->feca_blk_id = rte_cpu_to_be_32(priv->num_ldpc_dec_queues++); + break; + default: + rte_bbdev_log(ERR, "Not supported op type\n"); + return -1; + } + ch->op_type = rte_cpu_to_be_32(q_priv->op_type); + ch->depth = rte_cpu_to_be_32(q_priv->queue_size); + + /* Store queue config here */ + q_priv->feca_blk_id = rte_cpu_to_be_32(ch->feca_blk_id); + q_priv->feca_blk_id_be32 = ch->feca_blk_id; + + return 0; +} + +/* Setup a queue */ +static int +la12xx_queue_setup(struct rte_bbdev *dev, uint16_t q_id, + const struct rte_bbdev_queue_conf *queue_conf) +{ + struct bbdev_la12xx_private *priv = dev->data->dev_private; + struct rte_bbdev_queue_data *q_data; + struct bbdev_la12xx_q_priv *q_priv; + int ret; + + PMD_INIT_FUNC_TRACE(); + + /* Move to setup_queues callback */ + q_data = &dev->data->queues[q_id]; + q_data->queue_private = rte_zmalloc(NULL, + sizeof(struct bbdev_la12xx_q_priv), 0); + if (!q_data->queue_private) { + rte_bbdev_log(ERR, "Memory allocation failed for qpriv"); + return -ENOMEM; + } + q_priv = q_data->queue_private; + q_priv->q_id = q_id; + q_priv->bbdev_priv = dev->data->dev_private; + q_priv->queue_size = queue_conf->queue_size; + q_priv->op_type = queue_conf->op_type; + + ret = la12xx_e200_queue_setup(dev, q_priv); + if (ret) { + rte_bbdev_log(ERR, "e200_queue_setup failed for qid: %d", + q_id); + return ret; + } + + /* Store queue config here */ + priv->num_valid_queues++; + + return 0; +} + +static int +la12xx_start(struct rte_bbdev *dev) +{ + struct bbdev_la12xx_private *priv = dev->data->dev_private; + ipc_userspace_t *ipc_priv = priv->ipc_priv; + int ready = 0; + struct gul_hif *hif_start; + + PMD_INIT_FUNC_TRACE(); + + hif_start = (struct gul_hif *)ipc_priv->mhif_start.host_vaddr; + + /* Set Host Read bit */ + SET_HIF_HOST_RDY(hif_start, HIF_HOST_READY_IPC_APP); + + /* Now wait for modem ready bit */ + while (!ready) + ready = CHK_HIF_MOD_RDY(hif_start, HIF_MOD_READY_IPC_APP); + + return 0; +} + +static const struct rte_bbdev_ops pmd_ops = { + .info_get = la12xx_info_get, + .queue_setup = la12xx_queue_setup, + .queue_release = la12xx_queue_release, + .start = la12xx_start +}; +static struct hugepage_info * +get_hugepage_info(void) +{ + struct hugepage_info *hp_info; + struct rte_memseg *mseg; + + PMD_INIT_FUNC_TRACE(); + + /* TODO - find a better way */ + hp_info = rte_malloc(NULL, sizeof(struct hugepage_info), 0); + if (!hp_info) { + rte_bbdev_log(ERR, "Unable to allocate on local heap"); + return NULL; + } + + mseg = rte_mem_virt2memseg(hp_info, NULL); + hp_info->vaddr = mseg->addr; + hp_info->paddr = rte_mem_virt2phy(mseg->addr); + hp_info->len = mseg->len; + + return hp_info; +} + +static int open_ipc_dev(int modem_id) +{ + char dev_initials[16], dev_path[PATH_MAX]; + struct dirent *entry; + int dev_ipc = 0; + DIR *dir; + + dir = opendir("/dev/"); + if (!dir) { + rte_bbdev_log(ERR, "Unable to open /dev/"); + return -1; + } + + sprintf(dev_initials, "gulipcgul%d", modem_id); + + while ((entry = readdir(dir)) != NULL) { + if (!strncmp(dev_initials, entry->d_name, + sizeof(dev_initials) - 1)) + break; + } + + if (!entry) { + rte_bbdev_log(ERR, "Error: No gulipcgul%d device", modem_id); + return -1; + } + + sprintf(dev_path, "/dev/%s", entry->d_name); + dev_ipc = open(dev_path, O_RDWR); + if (dev_ipc < 0) { + rte_bbdev_log(ERR, "Error: Cannot open %s", dev_path); + return -errno; + } + + return dev_ipc; +} + +static int +setup_la12xx_dev(struct rte_bbdev *dev) +{ + struct bbdev_la12xx_private *priv = dev->data->dev_private; + ipc_userspace_t *ipc_priv = priv->ipc_priv; + struct hugepage_info *hp = NULL; + ipc_channel_us_t *ipc_priv_ch = NULL; + int dev_ipc = 0, dev_mem = 0, i; + ipc_metadata_t *ipc_md; + struct gul_hif *mhif; + uint32_t phy_align = 0; + int ret; + + PMD_INIT_FUNC_TRACE(); + + if (!ipc_priv) { + /* TODO - get a better way */ + /* Get the hugepage info against it */ + hp = get_hugepage_info(); + if (!hp) { + rte_bbdev_log(ERR, "Unable to get hugepage info"); + ret = -ENOMEM; + goto err; + } + + rte_bbdev_log_debug("%lx %p %lx", + hp->paddr, hp->vaddr, hp->len); + + ipc_priv = rte_zmalloc(0, sizeof(ipc_userspace_t), 0); + if (ipc_priv == NULL) { + rte_bbdev_log(ERR, + "Unable to allocate memory for ipc priv"); + ret = -ENOMEM; + goto err; + } + + for (i = 0; i < IPC_MAX_CHANNEL_COUNT; i++) { + ipc_priv_ch = rte_zmalloc(0, + sizeof(ipc_channel_us_t), 0); + if (ipc_priv_ch == NULL) { + rte_bbdev_log(ERR, + "Unable to allocate memory for channels"); + ret = -ENOMEM; + } + ipc_priv->channels[i] = ipc_priv_ch; + } + + dev_mem = open("/dev/mem", O_RDWR); + if (dev_mem < 0) { + rte_bbdev_log(ERR, "Error: Cannot open /dev/mem"); + ret = -errno; + goto err; + } + + ipc_priv->instance_id = 0; + ipc_priv->dev_mem = dev_mem; + + rte_bbdev_log_debug("hugepg input %lx %p %lx", + hp->paddr, hp->vaddr, hp->len); + + ipc_priv->sys_map.hugepg_start.host_phys = hp->paddr; + ipc_priv->sys_map.hugepg_start.size = hp->len; + + ipc_priv->hugepg_start.host_phys = hp->paddr; + ipc_priv->hugepg_start.host_vaddr = hp->vaddr; + ipc_priv->hugepg_start.size = hp->len; + + rte_free(hp); + } + + dev_ipc = open_ipc_dev(priv->modem_id); + if (dev_ipc < 0) { + rte_bbdev_log(ERR, "Error: open_ipc_dev failed"); + goto err; + } + ipc_priv->dev_ipc = dev_ipc; + + ret = ioctl(ipc_priv->dev_ipc, IOCTL_GUL_IPC_GET_SYS_MAP, + &ipc_priv->sys_map); + if (ret) { + rte_bbdev_log(ERR, + "IOCTL_GUL_IPC_GET_SYS_MAP ioctl failed"); + goto err; + } + + phy_align = (ipc_priv->sys_map.mhif_start.host_phys % 0x1000); + ipc_priv->mhif_start.host_vaddr = + mmap(0, ipc_priv->sys_map.mhif_start.size + phy_align, + (PROT_READ | PROT_WRITE), MAP_SHARED, ipc_priv->dev_mem, + (ipc_priv->sys_map.mhif_start.host_phys - phy_align)); + if (ipc_priv->mhif_start.host_vaddr == MAP_FAILED) { + rte_bbdev_log(ERR, "MAP failed:"); + ret = -errno; + goto err; + } + + ipc_priv->mhif_start.host_vaddr = (void *) ((uint64_t) + (ipc_priv->mhif_start.host_vaddr) + phy_align); + + phy_align = (ipc_priv->sys_map.peb_start.host_phys % 0x1000); + ipc_priv->peb_start.host_vaddr = + mmap(0, ipc_priv->sys_map.peb_start.size + phy_align, + (PROT_READ | PROT_WRITE), MAP_SHARED, ipc_priv->dev_mem, + (ipc_priv->sys_map.peb_start.host_phys - phy_align)); + if (ipc_priv->peb_start.host_vaddr == MAP_FAILED) { + rte_bbdev_log(ERR, "MAP failed:"); + ret = -errno; + goto err; + } + + ipc_priv->peb_start.host_vaddr = (void *)((uint64_t) + (ipc_priv->peb_start.host_vaddr) + phy_align); + + phy_align = (ipc_priv->sys_map.modem_ccsrbar.host_phys % 0x1000); + ipc_priv->modem_ccsrbar.host_vaddr = + mmap(0, ipc_priv->sys_map.modem_ccsrbar.size + phy_align, + (PROT_READ | PROT_WRITE), MAP_SHARED, ipc_priv->dev_mem, + (ipc_priv->sys_map.modem_ccsrbar.host_phys - phy_align)); + if (ipc_priv->modem_ccsrbar.host_vaddr == MAP_FAILED) { + rte_bbdev_log(ERR, "MAP failed:"); + ret = -errno; + goto err; + } + + ipc_priv->modem_ccsrbar.host_vaddr = (void *)((uint64_t) + (ipc_priv->modem_ccsrbar.host_vaddr) + phy_align); + + ipc_priv->hugepg_start.modem_phys = + ipc_priv->sys_map.hugepg_start.modem_phys; + + ipc_priv->mhif_start.host_phys = + ipc_priv->sys_map.mhif_start.host_phys; + ipc_priv->mhif_start.size = ipc_priv->sys_map.mhif_start.size; + ipc_priv->peb_start.host_phys = ipc_priv->sys_map.peb_start.host_phys; + ipc_priv->peb_start.size = ipc_priv->sys_map.peb_start.size; + + rte_bbdev_log(INFO, "peb %lx %p %x", + ipc_priv->peb_start.host_phys, + ipc_priv->peb_start.host_vaddr, + ipc_priv->peb_start.size); + rte_bbdev_log(INFO, "hugepg %lx %p %x", + ipc_priv->hugepg_start.host_phys, + ipc_priv->hugepg_start.host_vaddr, + ipc_priv->hugepg_start.size); + rte_bbdev_log(INFO, "mhif %lx %p %x", + ipc_priv->mhif_start.host_phys, + ipc_priv->mhif_start.host_vaddr, + ipc_priv->mhif_start.size); + mhif = (struct gul_hif *)ipc_priv->mhif_start.host_vaddr; + + /* offset is from start of PEB */ + ipc_md = (ipc_metadata_t *)((uint64_t)ipc_priv->peb_start.host_vaddr + + mhif->ipc_regs.ipc_mdata_offset); + + if (sizeof(ipc_metadata_t) != mhif->ipc_regs.ipc_mdata_size) { + rte_bbdev_log(ERR, + "ipc_metadata_t =%lx, mhif->ipc_regs.ipc_mdata_size=%x", + sizeof(ipc_metadata_t), mhif->ipc_regs.ipc_mdata_size); + rte_bbdev_log(ERR, "--> mhif->ipc_regs.ipc_mdata_offset= %x", + mhif->ipc_regs.ipc_mdata_offset); + rte_bbdev_log(ERR, "gul_hif size=%lx", sizeof(struct gul_hif)); + return IPC_MD_SZ_MISS_MATCH; + } + + ipc_priv->instance = (ipc_instance_t *) + (&ipc_md->instance_list[ipc_priv->instance_id]); + + rte_bbdev_log_debug("finish host init"); + + priv->ipc_priv = ipc_priv; + + return 0; + +err: + rte_free(hp); + rte_free(ipc_priv); + rte_free(ipc_priv_ch); + if (dev_mem) + close(dev_mem); + if (dev_ipc) + close(dev_ipc); + + return ret; +} + static inline int parse_u16_arg(const char *key, const char *value, void *extra_args) { @@ -123,6 +666,7 @@ la12xx_bbdev_create(struct rte_vdev_device *vdev, struct rte_bbdev *bbdev; const char *name = rte_vdev_device_name(vdev); struct bbdev_la12xx_private *priv; + int ret; PMD_INIT_FUNC_TRACE(); @@ -152,7 +696,13 @@ la12xx_bbdev_create(struct rte_vdev_device *vdev, rte_bbdev_log(INFO, "Setting Up %s: DevId=%d, ModemId=%d", name, bbdev->data->dev_id, priv->modem_id); - bbdev->dev_ops = NULL; + ret = setup_la12xx_dev(bbdev); + if (ret) { + rte_bbdev_log(ERR, "IPC Setup failed for %s", name); + rte_free(bbdev->data->dev_private); + return ret; + } + bbdev->dev_ops = &pmd_ops; bbdev->device = &vdev->device; bbdev->data->socket_id = 0; bbdev->intr_handle = NULL; diff --git a/drivers/baseband/la12xx/bbdev_la12xx.h b/drivers/baseband/la12xx/bbdev_la12xx.h index 5228502331..49c37fe2fe 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx.h +++ b/drivers/baseband/la12xx/bbdev_la12xx.h @@ -5,16 +5,10 @@ #ifndef __BBDEV_LA12XX_H__ #define __BBDEV_LA12XX_H__ -#define BBDEV_IPC_ENC_OP_TYPE 1 -#define BBDEV_IPC_DEC_OP_TYPE 2 - -#define MAX_LDPC_ENC_FECA_QUEUES 4 -#define MAX_LDPC_DEC_FECA_QUEUES 4 - #define MAX_CHANNEL_DEPTH 16 /* private data structure */ struct bbdev_la12xx_private { - void *ipc_priv; + ipc_userspace_t *ipc_priv; uint8_t num_valid_queues; uint8_t max_nb_queues; uint8_t num_ldpc_enc_queues; @@ -52,5 +46,6 @@ struct bbdev_la12xx_q_priv { #define lower_32_bits(x) ((uint32_t)((uint64_t)x)) #define upper_32_bits(x) ((uint32_t)(((uint64_t)(x) >> 16) >> 16)) - +#define join_32_bits(upper, lower) \ + ((size_t)(((uint64_t)(upper) << 32) | (uint32_t)(lower))) #endif diff --git a/drivers/baseband/la12xx/bbdev_la12xx_ipc.h b/drivers/baseband/la12xx/bbdev_la12xx_ipc.h index 9aa5562981..5f613fb087 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx_ipc.h +++ b/drivers/baseband/la12xx/bbdev_la12xx_ipc.h @@ -4,9 +4,182 @@ #ifndef __BBDEV_LA12XX_IPC_H__ #define __BBDEV_LA12XX_IPC_H__ +#define LA12XX_MAX_QUEUES 20 +#define HOST_RX_QUEUEID_OFFSET LA12XX_MAX_QUEUES + +/** No. of max channel per instance */ +#define IPC_MAX_CHANNEL_COUNT (64) + /** No. of max channel per instance */ #define IPC_MAX_DEPTH (16) +/** No. of max IPC instance per modem */ +#define IPC_MAX_INSTANCE_COUNT (1) + +/** Error codes */ +#define IPC_SUCCESS (0) /** IPC operation success */ +#define IPC_INPUT_INVALID (-1) /** Invalid input to API */ +#define IPC_CH_INVALID (-2) /** Channel no is invalid */ +#define IPC_INSTANCE_INVALID (-3) /** Instance no is invalid */ +#define IPC_MEM_INVALID (-4) /** Insufficient memory */ +#define IPC_CH_FULL (-5) /** Channel is full */ +#define IPC_CH_EMPTY (-6) /** Channel is empty */ +#define IPC_BL_EMPTY (-7) /** Free buffer list is empty */ +#define IPC_BL_FULL (-8) /** Free buffer list is full */ +#define IPC_HOST_BUF_ALLOC_FAIL (-9) /** DPDK malloc fail */ +#define IPC_MD_SZ_MISS_MATCH (-10) /** META DATA size in mhif miss matched*/ +#define IPC_MALLOC_FAIL (-11) /** system malloc fail */ +#define IPC_IOCTL_FAIL (-12) /** IOCTL call failed */ +#define IPC_MMAP_FAIL (-14) /** MMAP fail */ +#define IPC_OPEN_FAIL (-15) /** OPEN fail */ +#define IPC_EVENTFD_FAIL (-16) /** eventfd initialization failed */ +#define IPC_NOT_IMPLEMENTED (-17) /** IPC feature is not implemented yet*/ + +#define SET_HIF_HOST_RDY(hif, RDY_MASK) (hif->host_ready |= RDY_MASK) +#define CHK_HIF_MOD_RDY(hif, RDY_MASK) (hif->mod_ready & RDY_MASK) + +/* Host Ready bits */ +#define HIF_HOST_READY_HOST_REGIONS (1 << 0) +#define HIF_HOST_READY_IPC_LIB (1 << 12) +#define HIF_HOST_READY_IPC_APP (1 << 13) +#define HIF_HOST_READY_FECA (1 << 14) + +/* Modem Ready bits */ +#define HIF_MOD_READY_IPC_LIB (1 << 5) +#define HIF_MOD_READY_IPC_APP (1 << 6) +#define HIF_MOD_READY_FECA (1 << 7) + +typedef void *ipc_t; + +struct ipc_msg { + int chid; + void *addr; + uint32_t len; + uint8_t flags; +}; + +typedef struct { + uint64_t host_phys; + uint32_t modem_phys; + void *host_vaddr; + uint32_t size; +} mem_range_t; + +#define GUL_IPC_MAGIC 'R' + +#define IOCTL_GUL_IPC_GET_SYS_MAP _IOW(GUL_IPC_MAGIC, 1, struct ipc_msg *) +#define IOCTL_GUL_IPC_CHANNEL_REGISTER _IOWR(GUL_IPC_MAGIC, 4, struct ipc_msg *) +#define IOCTL_GUL_IPC_CHANNEL_DEREGISTER \ + _IOWR(GUL_IPC_MAGIC, 5, struct ipc_msg *) +#define IOCTL_GUL_IPC_CHANNEL_RAISE_INTERRUPT _IOW(GUL_IPC_MAGIC, 6, int *) + +/** buffer ring common metadata */ +typedef struct ipc_bd_ring_md { + volatile uint32_t pi; /**< Producer index and flag (MSB) + * which flip for each Ring wrapping + */ + volatile uint32_t ci; /**< Consumer index and flag (MSB) + * which flip for each Ring wrapping + */ + uint32_t ring_size; /**< depth (Used to roll-over pi/ci) */ + uint32_t msg_size; /**< Size of the each buffer */ +} __rte_packed ipc_br_md_t; + +/** IPC buffer descriptor */ +typedef struct ipc_buffer_desc { + union { + uint64_t host_virt; /**< msg's host virtual address */ + struct { + uint32_t host_virt_l; + uint32_t host_virt_h; + }; + }; + uint32_t modem_ptr; /**< msg's modem physical address */ + uint32_t len; /**< msg len */ +} __rte_packed ipc_bd_t; + +typedef struct ipc_channel { + uint32_t ch_id; /**< Channel id */ + ipc_br_md_t md; /**< Metadata for BD ring */ + ipc_bd_t bd_h[IPC_MAX_DEPTH]; /**< Buffer Descriptor on Host */ + ipc_bd_t bd_m[IPC_MAX_DEPTH]; /**< Buffer Descriptor on Modem */ + uint32_t op_type; /**< Type of the BBDEV operation + * supported on this channel + */ + uint32_t depth; /**< Channel depth */ + uint32_t feca_blk_id; /**< FECA Transport Block ID for processing */ + uint32_t la12xx_core_id;/**< LA12xx core ID on which this will be + * scheduled + */ + uint32_t feca_input_circ_size; /**< FECA transport block input + * circular buffer size + */ + uint32_t host_ipc_params; /**< Address for host IPC parameters */ +} __rte_packed ipc_ch_t; + +typedef struct ipc_instance { + uint32_t instance_id; /**< instance id, use to init this + * instance by ipc_init API + */ + uint32_t initialized; /**< Set in ipc_init */ + ipc_ch_t ch_list[IPC_MAX_CHANNEL_COUNT]; + /**< Channel descriptors in this instance */ +} __rte_packed ipc_instance_t; + +typedef struct ipc_metadata { + uint32_t ipc_host_signature; /**< IPC host signature, Set by host/L2 */ + uint32_t ipc_geul_signature; /**< IPC geul signature, Set by modem */ + ipc_instance_t instance_list[IPC_MAX_INSTANCE_COUNT]; +} __rte_packed ipc_metadata_t; + +typedef struct ipc_channel_us_priv { + int32_t eventfd; + uint32_t channel_id; + /* In flight packets status for buffer list. */ + uint8_t bufs_inflight[IPC_MAX_DEPTH]; +} ipc_channel_us_t; + +typedef struct { + uint64_t host_phys; + uint32_t modem_phys; + uint32_t size; +} mem_strt_addr_t; + +typedef struct { + mem_strt_addr_t modem_ccsrbar; + mem_strt_addr_t peb_start; /* PEB meta data */ + mem_strt_addr_t mhif_start; /* MHIF meta daat */ + mem_strt_addr_t hugepg_start; /* Modem to access hugepage */ +} sys_map_t; + +typedef struct ipc_priv_t { + int instance_id; + int dev_ipc; + int dev_mem; + sys_map_t sys_map; + mem_range_t modem_ccsrbar; + mem_range_t peb_start; + mem_range_t mhif_start; + mem_range_t hugepg_start; + ipc_channel_us_t *channels[IPC_MAX_CHANNEL_COUNT]; + ipc_instance_t *instance; + ipc_instance_t *instance_bk; +} ipc_userspace_t; + +/** Structure specifying enqueue operation (enqueue at LA1224) */ +struct bbdev_ipc_enqueue_op { + /** Status of operation that was performed */ + int32_t status; + /** CRC Status of SD operation that was performed */ + int32_t crc_stat_addr; + /** HARQ Output buffer memory length for Shared Decode. + * Filled by LA12xx. + */ + uint32_t out_len; + /** Reserved (for 8 byte alignment) */ + uint32_t rsvd; +}; + /* This shared memory would be on the host side which have copy of some * of the parameters which are also part of Shared BD ring. Read access * of these parameters from the host side would not be over PCI. @@ -14,7 +187,21 @@ typedef struct host_ipc_params { volatile uint32_t pi; volatile uint32_t ci; - volatile uint32_t modem_ptr[IPC_MAX_DEPTH]; + volatile uint32_t bd_m_modem_ptr[IPC_MAX_DEPTH]; } __rte_packed host_ipc_params_t; +struct hif_ipc_regs { + uint32_t ipc_mdata_offset; + uint32_t ipc_mdata_size; +} __rte_packed; + +struct gul_hif { + uint32_t ver; + uint32_t hif_ver; + uint32_t status; + volatile uint32_t host_ready; + volatile uint32_t mod_ready; + struct hif_ipc_regs ipc_regs; +} __rte_packed; + #endif From patchwork Sat Apr 24 10:36:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 426817 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2062464jao; Sat, 24 Apr 2021 03:39:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNNA8QDta2m2AdTwBi/Nu2UPRLqICJBIdFJIK9SbBx/0C7TAs8/0WP5LLkoN4R3VDM/YlS X-Received: by 2002:a7b:c097:: with SMTP id r23mr8605414wmh.40.1619260749282; Sat, 24 Apr 2021 03:39:09 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id q18si9307997wre.309.2021.04.24.03.39.09; Sat, 24 Apr 2021 03:39:09 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=je6KwFMd; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 772B04112E; Sat, 24 Apr 2021 12:38:48 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150078.outbound.protection.outlook.com [40.107.15.78]) by mails.dpdk.org (Postfix) with ESMTP id 1203A41118 for ; Sat, 24 Apr 2021 12:38:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DVJCK/jxgBbVzAXyhTmpRIzPpz9N/PKMdsOrgn1dsG78hLfphFODD0xVdhfDLNSTrBHvqd/aOaHCJ4cxTo9XLxo006vaaUPsVQVGP85oXgqaoVY3Z6xJztl2/ibgJilHAXUYC2fAluP46jBEc6zaKNgCHO1/YMKOplUTwPljVKhlBml6L89is8RQIr8Ds1PCwwdDjrqsaCfJjP+wnyJC+2Vw2dZsHe1/LyLV3eQx0cXeSyUCL3ECz5vWIuJYbpepss6M+jsA/kEhYte2i78CtwQLR1m+BHJMR9vW5IOpbbzdC5QK+w9Zi4y5QNAVq2BdQ1vHDt7KXZDWp9HM6w1XSQ== 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-SenderADCheck; bh=fRd5w7qDs1EfApAXXC77gwBpmmaEm59hx6zaZBpW0Dw=; b=ktox89OTvtmCpbt/4uIYM9kV6zPINzDii8CPiT2kkGUjqlD/Lh7wueU14iUEN8vBJAm9jFW34WpDw7Eh4y1ShA7hEVfss5u6yTOnJ01wd2fDZieozdql/SzMe8C7YFNB/hIAtTGTCnLUdn9jibui4QszgnbwNS/sxiA9FV5o2WwvD16Taska2f4IidRHJciGUGzzglKOqcXp7uBLXE4E1PHV6cnvp5gkpf7mcGMDPRpBSifmSv6nYVoXvjHRQLPWZYo3xwbDn3ZIyCLwIM7JDuW8w5eiYQJi4yxpLhedn1imogCUfQVBOCuGv7XyC3eRiMsVij9bNOMt0TTn9/VArQ== 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=fRd5w7qDs1EfApAXXC77gwBpmmaEm59hx6zaZBpW0Dw=; b=je6KwFMdnF0U3x8hQFqi9dOx1Z3GIIQZr0JmOlT7ctMG/7YcZKuC2L/jE54PzvdSlVlLzCrB37XprSQMJvY0nSE8BwJ6WcUFdbV6DgQ4poCMwoxfEDqCJjgyeH5k25w+0Gp56wvdIoJn1TOd8agYW7A/2zHcdyvfRG9zxBMvPyI= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM6PR0402MB3895.eurprd04.prod.outlook.com (2603:10a6:209:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Sat, 24 Apr 2021 10:38:44 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.023; Sat, 24 Apr 2021 10:38:44 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com, nicolas.chautru@intel.com Cc: david.marchand@redhat.com, Hemant Agrawal , Nipun Gupta Date: Sat, 24 Apr 2021 16:06:58 +0530 Message-Id: <20210424103700.8098-7-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210424103700.8098-1-hemant.agrawal@nxp.com> References: <20210413051715.26430-2-hemant.agrawal@nxp.com> <20210424103700.8098-1-hemant.agrawal@nxp.com> X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sat, 24 Apr 2021 10:38:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 63110e5b-0abf-4b34-6bab-08d9070d2209 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3895: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1060; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mt7Gjay80YpiLMPuHCMRaTIwcq+w22Jo07wsziDSb0M4jukjMHXVtmn6DYsPyGXDThpinD/4moBNln8ToF7xwJnJKASqW8lajUF4Cmyhwz5O3UqGM1JYsuNlPPq9rFs7uLxCrq++bNhyLOQTELsIgzZkAmTEba9ttyJ8t9FsmIuxBJ4kTuxQcXQXB62ZIh55ul/4Kcp1Rr2x+hwB3cZuNyRePEB0ozS1ZXefYch+m0Dmp0RSS9bTgRY3UsGWB0eA0eKpuoEUwGx+WrYnmBFlRjgg4RKyAXKRLWKprP8XgiwOvEA8IK3q42wlawDJsN5OBRXITf1rRBr9jHR4ry9/B3aOCesy+OqZHfu2f/e3wx8qT51hBmAHZQK9j6CrsCC4pGg3Xx4K2d7esMIctP74srzwUUSbm420K/JfwBtl1IJkwsOcSYPsm9EMU9zKiNdKK5QcogngXqsvkK7DaZ7/GULAXg556oFP5D0bpgLa6Egd8XjFc/ZA1piAS1fl6+hKS3234ylveRW36j0wHRWJAZcF+YTXtBsZEQLrs5MZ1xthwQBfutWwPPiAfQBS/n5MPkTj+vv7BT9BgW3qoXc+LJhLDt1BkBQmqqI1vWlmxIMMLbTjhuLB5aCWgYTiiGSXAhiOE2PO3ZgpBDASwexnIU4mVdOz1RGqNIK/KmWe5ZQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(8936002)(5660300002)(316002)(1076003)(54906003)(8676002)(6512007)(86362001)(478600001)(30864003)(38100700002)(2906002)(956004)(2616005)(38350700002)(36756003)(6666004)(186003)(83380400001)(26005)(4326008)(16526019)(6506007)(52116002)(6486002)(44832011)(66476007)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: R2yUhxHcUOkUn2Kf8yySk+zstGudU9eJoEUfjMWj4nSzvY8KfMs/vTDyk6ZQyp0T/fntXXDoDqB1CyakhrbVjQm5s+C+UcH4iJoUaCYXoeGkh61rh3Z/ipdZpfrs0VUD7UYda+kEbzmgR0Bf1MIcCRNzZ7wrFwtw0LypOejyips5fhe3LmQN8YSm8SaBLbcNOF5Lchy2UdyXX37OfJ2iKPrOITwGI4JA6A1VbscPOTCAXDRouDzyXi1OvCuwbu9Yg6lORCNsJOovl9gNcuheI4GXf0W+JMNP7X5etHC4Wr8aqTIaS0jBFvqdkvRnq0XkSAi9Qdog3N30ZZMDkNakOLhNire8uQkR14jZOZPzqJW3hSJBgEMRWIsPPJkAlCGnMZR/FsVHjFzOP2AeADkQ19yfDwGXVj/zLGrsWRsXJq1/w35Vz20X/5tNf0CP5nqv6S4JzoziyS3vhbgfJutCKjoxKPmyP3NYD3RBpwvfcyH8hPo4llRJ0pfKxu8mKm5HBLzuveY3qSr3hd9ksmY0o5QDJZa9G7m3EcrbUj3kJXCSd9qdkf1Uvbt8w4MiuClQfrI1LqdNC+G6LcOjtuR6627GdEk3xDknFfW5S2SI9JJPcpRh1wagqG9yqxLnBnVxWLAhGIGpngp34luBJ3l/CAQw2QXK8TI3G456g31T9hGAgEZEpEUACHUPk6DMgTgL5Xs+UVz3UcZmBFjOi7gFQtEaWPiZr+Wb0fhC0gq6tWDfJgPcRZhoojYbrIlh2qiwemLy3V/k+32rPFUgZEjTSvfzfsa5V0XTpEjqr1nX4RlPpUCZUquLsomK4N5hsJDGmuOIH/EMUOOMoBrFfK5gbwr35BKD/N/Ihg4VpjIQ9yQ6gHvWPbZDLGmR0KupESoQRyvqLYQxfP+xIdag+OkQzpsqvQLZaid0+JWPJR1U9f87qiTQbVASqhNzgvkEFyD7oCsFyOBQMpjX+OrgBui+c+2scfbBkTSxFTTlxtQpZY91cPszJJwXKFUmxg8UV6eyofiG5f4lUD2ONDUhFptnG2gJKEXCtP0lLI0l8pQz3YAus1ODPQPhyCIcp7vkCwm64eb4pMPI9BnX7KFV0zd017ePjhigXMBSH4g5iY7z4x7s7vgeh96R8hjJADfCIHs7nEZWQSQ4X+MyR0HHujONLvGbCnibKy5s4EDXg1JunlmCb6r5EBs+bBR2nehmKUx+fzFowSVkoRrHdyKXym5dkR1dcsXzbWiYx9uRtdxmZdCjAmNSuq9Y3iIS4IA1wMkU7x0i4+0ZsiHT1tOgGzLpB59U1muqD5mPW54qOiLvrB/+dbduzbpdM6pOtXWIbHej X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63110e5b-0abf-4b34-6bab-08d9070d2209 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2021 10:38:43.9786 (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: tYxXyXURu5jMRX3tZD1KjHxoxkY3sszLXlM+YFfkBgSWtf2GGXemd28Lr57U1zj1MJhnYeEOIWBNDOoSeV17XA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3895 Subject: [dpdk-dev] [PATCH v4 6/8] baseband/la12xx: add enqueue and dequeue support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Add support for enqueue and dequeue the LDPC enc/dec from the modem device. Signed-off-by: Nipun Gupta Signed-off-by: Hemant Agrawal --- doc/guides/bbdevs/features/la12xx.ini | 14 + doc/guides/bbdevs/la12xx.rst | 46 +++ drivers/baseband/la12xx/bbdev_la12xx.c | 334 ++++++++++++++++++++- drivers/baseband/la12xx/bbdev_la12xx_ipc.h | 37 +++ 4 files changed, 425 insertions(+), 6 deletions(-) create mode 100644 doc/guides/bbdevs/features/la12xx.ini -- 2.17.1 diff --git a/doc/guides/bbdevs/features/la12xx.ini b/doc/guides/bbdevs/features/la12xx.ini new file mode 100644 index 0000000000..d184914b10 --- /dev/null +++ b/doc/guides/bbdevs/features/la12xx.ini @@ -0,0 +1,14 @@ +; +; Supported features of the 'la12xx' bbdev driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Turbo Decoder (4G) = N +Turbo Encoder (4G) = N +LDPC Decoder (5G) = Y +LDPC Encoder (5G) = Y +LLR/HARQ Compression = N +HW Accelerated = Y +BBDEV API = Y +Network Order Data = Y \ No newline at end of file diff --git a/doc/guides/bbdevs/la12xx.rst b/doc/guides/bbdevs/la12xx.rst index 3c9ac5c047..c39be0e51f 100644 --- a/doc/guides/bbdevs/la12xx.rst +++ b/doc/guides/bbdevs/la12xx.rst @@ -16,6 +16,8 @@ Features LA12xx PMD supports the following features: +- LDPC Encode in the DL +- LDPC Decode in the UL - Maximum of 8 UL queues - Maximum of 8 DL queues - PCIe Gen-3 x8 Interface @@ -79,3 +81,47 @@ For enabling logs, use the following EAL parameter: Using ``bb.la12xx`` as log matching criteria, all Baseband PMD logs can be enabled which are lower than logging ``level``. + +Test Application +---------------- + +BBDEV provides a test application, ``test-bbdev.py`` and range of test data for testing +the functionality of LA12xx for FEC encode and decode, depending on the device +capabilities. The test application is located under app->test-bbdev folder and has the +following options: + +.. code-block:: console + + "-p", "--testapp-path": specifies path to the bbdev test app. + "-e", "--eal-params" : EAL arguments which are passed to the test app. + "-t", "--timeout" : Timeout in seconds (default=300). + "-c", "--test-cases" : Defines test cases to run. Run all if not specified. + "-v", "--test-vector" : Test vector path (default=dpdk_path+/app/test-bbdev/test_vectors/bbdev_null.data). + "-n", "--num-ops" : Number of operations to process on device (default=32). + "-b", "--burst-size" : Operations enqueue/dequeue burst size (default=32). + "-s", "--snr" : SNR in dB used when generating LLRs for bler tests. + "-s", "--iter_max" : Number of iterations for LDPC decoder. + "-l", "--num-lcores" : Number of lcores to run (default=16). + "-i", "--init-device" : Initialise PF device with default values. + + +To execute the test application tool using simple decode or encode data, +type one of the following: + +.. code-block:: console + + ./test-bbdev.py -e="--vdev=baseband_la12xx,socket_id=0,max_nb_queues=8" -c validation -n 64 -b 1 -v ./ldpc_dec_default.data + ./test-bbdev.py -e="--vdev=baseband_la12xx,socket_id=0,max_nb_queues=8" -c validation -n 64 -b 1 -v ./ldpc_enc_default.data + +The test application ``test-bbdev.py``, supports the ability to configure the PF device with +a default set of values, if the "-i" or "- -init-device" option is included. The default values +are defined in test_bbdev_perf.c. + + +Test Vectors +~~~~~~~~~~~~ + +In addition to the simple LDPC decoder and LDPC encoder tests, bbdev also provides +a range of additional tests under the test_vectors folder, which may be useful. The results +of these tests will depend on the LA12xx FEC capabilities which may cause some +testcases to be skipped, but no failure should be reported. diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c index 1fdeca279e..50e3284622 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx.c +++ b/drivers/baseband/la12xx/bbdev_la12xx.c @@ -54,7 +54,8 @@ static const struct rte_bbdev_op_cap bbdev_capabilities[] = { .cap.ldpc_enc = { .capability_flags = RTE_BBDEV_LDPC_CRC_24A_ATTACH | - RTE_BBDEV_LDPC_CRC_24B_ATTACH, + RTE_BBDEV_LDPC_CRC_24B_ATTACH | + RTE_BBDEV_LDPC_ENC_NETWORK_ORDER, .num_buffers_src = RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, .num_buffers_dst = @@ -68,7 +69,8 @@ static const struct rte_bbdev_op_cap bbdev_capabilities[] = { RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | RTE_BBDEV_LDPC_LLR_COMPRESSION | RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | - RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP, + RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | + RTE_BBDEV_LDPC_DEC_NETWORK_ORDER, .num_buffers_src = RTE_BBDEV_LDPC_MAX_CODE_BLOCKS, .num_buffers_hard_out = @@ -121,6 +123,10 @@ la12xx_queue_release(struct rte_bbdev *dev, uint16_t q_id) ((uint64_t) ((unsigned long) (A) \ - ((uint64_t)ipc_priv->hugepg_start.host_vaddr))) +#define MODEM_P2V(A) \ + ((uint64_t) ((unsigned long) (A) \ + + (unsigned long)(ipc_priv->peb_start.host_vaddr))) + static int ipc_queue_configure(uint32_t channel_id, ipc_t instance, struct bbdev_la12xx_q_priv *q_priv) { @@ -335,6 +341,318 @@ static const struct rte_bbdev_ops pmd_ops = { .queue_release = la12xx_queue_release, .start = la12xx_start }; + +static inline int +is_bd_ring_full(uint32_t ci, uint32_t ci_flag, + uint32_t pi, uint32_t pi_flag) +{ + if (pi == ci) { + if (pi_flag != ci_flag) + return 1; /* Ring is Full */ + } + return 0; +} + +static inline int +prepare_ldpc_enc_op(struct rte_bbdev_enc_op *bbdev_enc_op, + struct bbdev_la12xx_q_priv *q_priv __rte_unused, + struct rte_bbdev_op_data *in_op_data __rte_unused, + struct rte_bbdev_op_data *out_op_data) +{ + struct rte_bbdev_op_ldpc_enc *ldpc_enc = &bbdev_enc_op->ldpc_enc; + uint32_t total_out_bits; + + total_out_bits = (ldpc_enc->tb_params.cab * + ldpc_enc->tb_params.ea) + (ldpc_enc->tb_params.c - + ldpc_enc->tb_params.cab) * ldpc_enc->tb_params.eb; + + ldpc_enc->output.length = (total_out_bits + 7)/8; + + rte_pktmbuf_append(out_op_data->data, ldpc_enc->output.length); + + return 0; +} + +static inline int +prepare_ldpc_dec_op(struct rte_bbdev_dec_op *bbdev_dec_op, + struct bbdev_ipc_dequeue_op *bbdev_ipc_op, + struct bbdev_la12xx_q_priv *q_priv __rte_unused, + struct rte_bbdev_op_data *out_op_data __rte_unused) +{ + struct rte_bbdev_op_ldpc_dec *ldpc_dec = &bbdev_dec_op->ldpc_dec; + uint32_t total_out_bits; + uint32_t num_code_blocks = 0; + uint16_t sys_cols; + + sys_cols = (ldpc_dec->basegraph == 1) ? 22 : 10; + if (ldpc_dec->tb_params.c == 1) { + total_out_bits = ((sys_cols * ldpc_dec->z_c) - + ldpc_dec->n_filler); + /* 5G-NR protocol uses 16 bit CRC when output packet + * size <= 3824 (bits). Otherwise 24 bit CRC is used. + * Adjust the output bits accordingly + */ + if (total_out_bits - 16 <= 3824) + total_out_bits -= 16; + else + total_out_bits -= 24; + ldpc_dec->hard_output.length = (total_out_bits / 8); + } else { + total_out_bits = (((sys_cols * ldpc_dec->z_c) - + ldpc_dec->n_filler - 24) * + ldpc_dec->tb_params.c); + ldpc_dec->hard_output.length = (total_out_bits / 8) - 3; + } + + num_code_blocks = ldpc_dec->tb_params.c; + + bbdev_ipc_op->num_code_blocks = rte_cpu_to_be_32(num_code_blocks); + + return 0; +} + +static int +enqueue_single_op(struct bbdev_la12xx_q_priv *q_priv, void *bbdev_op) +{ + struct bbdev_la12xx_private *priv = q_priv->bbdev_priv; + ipc_userspace_t *ipc_priv = priv->ipc_priv; + ipc_instance_t *ipc_instance = ipc_priv->instance; + struct bbdev_ipc_dequeue_op *bbdev_ipc_op; + struct rte_bbdev_op_ldpc_enc *ldpc_enc; + struct rte_bbdev_op_ldpc_dec *ldpc_dec; + uint32_t q_id = q_priv->q_id; + uint32_t ci, ci_flag, pi, pi_flag; + ipc_ch_t *ch = &(ipc_instance->ch_list[q_id]); + ipc_br_md_t *md = &(ch->md); + size_t virt; + char *huge_start_addr = + (char *)q_priv->bbdev_priv->ipc_priv->hugepg_start.host_vaddr; + struct rte_bbdev_op_data *in_op_data, *out_op_data; + char *data_ptr; + uint32_t l1_pcie_addr; + int ret; + + ci = IPC_GET_CI_INDEX(q_priv->host_ci); + ci_flag = IPC_GET_CI_FLAG(q_priv->host_ci); + + pi = IPC_GET_PI_INDEX(q_priv->host_pi); + pi_flag = IPC_GET_PI_FLAG(q_priv->host_pi); + + rte_bbdev_dp_log(DEBUG, "before bd_ring_full: pi: %u, ci: %u," + "pi_flag: %u, ci_flag: %u, ring size: %u", + pi, ci, pi_flag, ci_flag, q_priv->queue_size); + + if (is_bd_ring_full(ci, ci_flag, pi, pi_flag)) { + rte_bbdev_dp_log(DEBUG, "bd ring full for queue id: %d", q_id); + return IPC_CH_FULL; + } + + virt = MODEM_P2V(q_priv->host_params->bd_m_modem_ptr[pi]); + bbdev_ipc_op = (struct bbdev_ipc_dequeue_op *)virt; + q_priv->bbdev_op[pi] = bbdev_op; + + switch (q_priv->op_type) { + case RTE_BBDEV_OP_LDPC_ENC: + ldpc_enc = &(((struct rte_bbdev_enc_op *)bbdev_op)->ldpc_enc); + in_op_data = &ldpc_enc->input; + out_op_data = &ldpc_enc->output; + + ret = prepare_ldpc_enc_op(bbdev_op, q_priv, + in_op_data, out_op_data); + if (ret) { + rte_bbdev_log(ERR, "process_ldpc_enc_op fail, ret: %d", + ret); + return ret; + } + break; + + case RTE_BBDEV_OP_LDPC_DEC: + ldpc_dec = &(((struct rte_bbdev_dec_op *)bbdev_op)->ldpc_dec); + in_op_data = &ldpc_dec->input; + + out_op_data = &ldpc_dec->hard_output; + + ret = prepare_ldpc_dec_op(bbdev_op, bbdev_ipc_op, + q_priv, out_op_data); + if (ret) { + rte_bbdev_log(ERR, "process_ldpc_dec_op fail, ret: %d", + ret); + return ret; + } + break; + + default: + rte_bbdev_log(ERR, "unsupported bbdev_ipc op type"); + return -1; + } + + if (in_op_data->data) { + data_ptr = rte_pktmbuf_mtod(in_op_data->data, char *); + l1_pcie_addr = (uint32_t)GUL_USER_HUGE_PAGE_ADDR + + data_ptr - huge_start_addr; + bbdev_ipc_op->in_addr = l1_pcie_addr; + bbdev_ipc_op->in_len = in_op_data->length; + } + + if (out_op_data->data) { + data_ptr = rte_pktmbuf_mtod(out_op_data->data, char *); + l1_pcie_addr = (uint32_t)GUL_USER_HUGE_PAGE_ADDR + + data_ptr - huge_start_addr; + bbdev_ipc_op->out_addr = rte_cpu_to_be_32(l1_pcie_addr); + bbdev_ipc_op->out_len = rte_cpu_to_be_32(out_op_data->length); + } + + /* Move Producer Index forward */ + pi++; + /* Flip the PI flag, if wrapping */ + if (unlikely(q_priv->queue_size == pi)) { + pi = 0; + pi_flag = pi_flag ? 0 : 1; + } + + if (pi_flag) + IPC_SET_PI_FLAG(pi); + else + IPC_RESET_PI_FLAG(pi); + q_priv->host_pi = pi; + + /* Wait for Data Copy & pi_flag update to complete before updating pi */ + rte_mb(); + /* now update pi */ + md->pi = rte_cpu_to_be_32(pi); + + rte_bbdev_dp_log(DEBUG, "enter: pi: %u, ci: %u," + "pi_flag: %u, ci_flag: %u, ring size: %u", + pi, ci, pi_flag, ci_flag, q_priv->queue_size); + + return 0; +} + +/* Enqueue decode burst */ +static uint16_t +enqueue_dec_ops(struct rte_bbdev_queue_data *q_data, + struct rte_bbdev_dec_op **ops, uint16_t nb_ops) +{ + struct bbdev_la12xx_q_priv *q_priv = q_data->queue_private; + int nb_enqueued, ret; + + for (nb_enqueued = 0; nb_enqueued < nb_ops; nb_enqueued++) { + ret = enqueue_single_op(q_priv, ops[nb_enqueued]); + if (ret) + break; + } + + q_data->queue_stats.enqueue_err_count += nb_ops - nb_enqueued; + q_data->queue_stats.enqueued_count += nb_enqueued; + + return nb_enqueued; +} + +/* Enqueue encode burst */ +static uint16_t +enqueue_enc_ops(struct rte_bbdev_queue_data *q_data, + struct rte_bbdev_enc_op **ops, uint16_t nb_ops) +{ + struct bbdev_la12xx_q_priv *q_priv = q_data->queue_private; + int nb_enqueued, ret; + + for (nb_enqueued = 0; nb_enqueued < nb_ops; nb_enqueued++) { + ret = enqueue_single_op(q_priv, ops[nb_enqueued]); + if (ret) + break; + } + + q_data->queue_stats.enqueue_err_count += nb_ops - nb_enqueued; + q_data->queue_stats.enqueued_count += nb_enqueued; + + return nb_enqueued; +} + +/* Dequeue encode burst */ +static void * +dequeue_single_op(struct bbdev_la12xx_q_priv *q_priv, void *dst) +{ + void *op; + uint32_t ci, ci_flag; + uint32_t temp_ci; + + temp_ci = q_priv->host_params->ci; + if (temp_ci == q_priv->host_ci) + return NULL; + + ci = IPC_GET_CI_INDEX(q_priv->host_ci); + ci_flag = IPC_GET_CI_FLAG(q_priv->host_ci); + + rte_bbdev_dp_log(DEBUG, + "ci: %u, ci_flag: %u, ring size: %u", + ci, ci_flag, q_priv->queue_size); + + op = q_priv->bbdev_op[ci]; + + rte_memcpy(dst, q_priv->msg_ch_vaddr[ci], + sizeof(struct bbdev_ipc_enqueue_op)); + + /* Move Consumer Index forward */ + ci++; + /* Flip the CI flag, if wrapping */ + if (q_priv->queue_size == ci) { + ci = 0; + ci_flag = ci_flag ? 0 : 1; + } + if (ci_flag) + IPC_SET_CI_FLAG(ci); + else + IPC_RESET_CI_FLAG(ci); + + q_priv->host_ci = ci; + + rte_bbdev_dp_log(DEBUG, + "exit: ci: %u, ci_flag: %u, ring size: %u", + ci, ci_flag, q_priv->queue_size); + + return op; +} + +/* Dequeue decode burst */ +static uint16_t +dequeue_dec_ops(struct rte_bbdev_queue_data *q_data, + struct rte_bbdev_dec_op **ops, uint16_t nb_ops) +{ + struct bbdev_la12xx_q_priv *q_priv = q_data->queue_private; + struct bbdev_ipc_enqueue_op bbdev_ipc_op; + int nb_dequeued; + + for (nb_dequeued = 0; nb_dequeued < nb_ops; nb_dequeued++) { + ops[nb_dequeued] = dequeue_single_op(q_priv, &bbdev_ipc_op); + if (!ops[nb_dequeued]) + break; + ops[nb_dequeued]->status = bbdev_ipc_op.status; + } + q_data->queue_stats.dequeued_count += nb_dequeued; + + return nb_dequeued; +} + +/* Dequeue encode burst */ +static uint16_t +dequeue_enc_ops(struct rte_bbdev_queue_data *q_data, + struct rte_bbdev_enc_op **ops, uint16_t nb_ops) +{ + struct bbdev_la12xx_q_priv *q_priv = q_data->queue_private; + struct bbdev_ipc_enqueue_op bbdev_ipc_op; + int nb_enqueued; + + for (nb_enqueued = 0; nb_enqueued < nb_ops; nb_enqueued++) { + ops[nb_enqueued] = dequeue_single_op(q_priv, &bbdev_ipc_op); + if (!ops[nb_enqueued]) + break; + ops[nb_enqueued]->status = bbdev_ipc_op.status; + } + q_data->queue_stats.enqueued_count += nb_enqueued; + + return nb_enqueued; +} + static struct hugepage_info * get_hugepage_info(void) { @@ -708,10 +1026,14 @@ la12xx_bbdev_create(struct rte_vdev_device *vdev, bbdev->intr_handle = NULL; /* register rx/tx burst functions for data path */ - bbdev->dequeue_enc_ops = NULL; - bbdev->dequeue_dec_ops = NULL; - bbdev->enqueue_enc_ops = NULL; - bbdev->enqueue_dec_ops = NULL; + bbdev->dequeue_enc_ops = dequeue_enc_ops; + bbdev->dequeue_dec_ops = dequeue_dec_ops; + bbdev->enqueue_enc_ops = enqueue_enc_ops; + bbdev->enqueue_dec_ops = enqueue_dec_ops; + bbdev->dequeue_ldpc_enc_ops = dequeue_enc_ops; + bbdev->dequeue_ldpc_dec_ops = dequeue_dec_ops; + bbdev->enqueue_ldpc_enc_ops = enqueue_enc_ops; + bbdev->enqueue_ldpc_dec_ops = enqueue_dec_ops; return 0; } diff --git a/drivers/baseband/la12xx/bbdev_la12xx_ipc.h b/drivers/baseband/la12xx/bbdev_la12xx_ipc.h index 5f613fb087..b6a7f677d0 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx_ipc.h +++ b/drivers/baseband/la12xx/bbdev_la12xx_ipc.h @@ -73,6 +73,25 @@ typedef struct { _IOWR(GUL_IPC_MAGIC, 5, struct ipc_msg *) #define IOCTL_GUL_IPC_CHANNEL_RAISE_INTERRUPT _IOW(GUL_IPC_MAGIC, 6, int *) +#define GUL_USER_HUGE_PAGE_OFFSET (0) +#define GUL_PCI1_ADDR_BASE (0x00000000ULL) + +#define GUL_USER_HUGE_PAGE_ADDR (GUL_PCI1_ADDR_BASE + GUL_USER_HUGE_PAGE_OFFSET) + +/* IPC PI/CI index & flag manipulation helpers */ +#define IPC_PI_CI_FLAG_MASK 0x80000000 /* (1<<31) */ +#define IPC_PI_CI_INDEX_MASK 0x7FFFFFFF /* ~(1<<31) */ + +#define IPC_SET_PI_FLAG(x) (x |= IPC_PI_CI_FLAG_MASK) +#define IPC_RESET_PI_FLAG(x) (x &= IPC_PI_CI_INDEX_MASK) +#define IPC_GET_PI_FLAG(x) (x >> 31) +#define IPC_GET_PI_INDEX(x) (x & IPC_PI_CI_INDEX_MASK) + +#define IPC_SET_CI_FLAG(x) (x |= IPC_PI_CI_FLAG_MASK) +#define IPC_RESET_CI_FLAG(x) (x &= IPC_PI_CI_INDEX_MASK) +#define IPC_GET_CI_FLAG(x) (x >> 31) +#define IPC_GET_CI_INDEX(x) (x & IPC_PI_CI_INDEX_MASK) + /** buffer ring common metadata */ typedef struct ipc_bd_ring_md { volatile uint32_t pi; /**< Producer index and flag (MSB) @@ -180,6 +199,24 @@ struct bbdev_ipc_enqueue_op { uint32_t rsvd; }; +/** Structure specifying dequeue operation (dequeue at LA1224) */ +struct bbdev_ipc_dequeue_op { + /** Input buffer memory address */ + uint32_t in_addr; + /** Input buffer memory length */ + uint32_t in_len; + /** Output buffer memory address */ + uint32_t out_addr; + /** Output buffer memory length */ + uint32_t out_len; + /* Number of code blocks. Only set when HARQ is used */ + uint32_t num_code_blocks; + /** Dequeue Operation flags */ + uint32_t op_flags; + /** Shared metadata between L1 and L2 */ + uint32_t shared_metadata; +}; + /* This shared memory would be on the host side which have copy of some * of the parameters which are also part of Shared BD ring. Read access * of these parameters from the host side would not be over PCI. From patchwork Sat Apr 24 10:36:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 426818 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2062541jao; Sat, 24 Apr 2021 03:39:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8MLWPHedYJUbtZH3KKu1kNL7Xu3Sfu+u7zbUB5S81dW/+VN49XTrEh+fPKeymj/GCK0Jr X-Received: by 2002:a05:600c:4f56:: with SMTP id m22mr8434382wmq.19.1619260757571; Sat, 24 Apr 2021 03:39:17 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id d14si9613805wrz.132.2021.04.24.03.39.17; Sat, 24 Apr 2021 03:39:17 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=htDVlLVd; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19A6F41136; Sat, 24 Apr 2021 12:38:54 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20045.outbound.protection.outlook.com [40.107.2.45]) by mails.dpdk.org (Postfix) with ESMTP id AEA4641124 for ; Sat, 24 Apr 2021 12:38:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cWjEW58cPB8pCGlO5msIHVsk+GcvkVPbM5UY7zQLf2VhR95/rG2LGWDZmrkZ2auWdAQjt2qbmCTgDzPaz49Bxl+33mo17FUVIgpOTLmIdxBX23JjdUDtRIhXE5uwW7X5gMYBRGOOH8Iw+S/PvTT72J4Flkc2Ox5/VWyLWlLCtIbfVrR/v0TtW9rlZycxDSpXFUqMS5lWEdk0RGhLFF9AaIF0duJamPsNpkRYAaRCuluFrtGax52RX67JG38+3UbolpxenNw+OeN1oZBp1IKhU8pe4bOgPVIm2Wv1gglUAoOkP4dqIozEHe0X6qISoE5Si1ARgaErCSh9CEaa/QSrGg== 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-SenderADCheck; bh=VMJN7I6vdeVKU7SZrMOnw8xImJq+cXrr81ORl96T78o=; b=lv77x8Rmg+KCFzx4tglmVFnMXIRSWnRL215yq5iEJv1K8py1LpakP3rGzF3AcUwsnxPqG3HQjXSzcunPqtBS7vnc4VyC9O/BxHGTCpF2Mz3YoeaGlAfeCKFzCF8JxBsIBHSpZr9jZRztyIiCDaGYlkes//sump11MOq5btDh9LVlzJ8uKdWCh+l38GzNPg3W1mvZJbrnEDMJvY8U7FieQiivRB0H2D2Y74XEZ2HVJN8BvYMnxZ8FNCfqQtg4ewugaaLNsaehB0e4kxnXDAAVu9uYxOyU3TFYWKdKsGGJje2WHhjGh4vkQQ4EV02BYA79IR+aRgmLIeG1asKjgGEVIw== 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=VMJN7I6vdeVKU7SZrMOnw8xImJq+cXrr81ORl96T78o=; b=htDVlLVdvA2XSFw1jRCVZBnXBkMhbavOf9Y2JwN6xSUXyEYktwkos7c+RFjD7iWkS/NRykD5igpolq8XcNDA8SxaSDqC7uAexZ7rdmPpyW4MUoYmLruC8/X2XTgMMvooIuk7hSYfx4yRBzOa6uw6HWxAqhUOhSRNryVdLnkPoKE= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM6PR0402MB3895.eurprd04.prod.outlook.com (2603:10a6:209:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Sat, 24 Apr 2021 10:38:47 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.023; Sat, 24 Apr 2021 10:38:46 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com, nicolas.chautru@intel.com Cc: david.marchand@redhat.com, Hemant Agrawal Date: Sat, 24 Apr 2021 16:06:59 +0530 Message-Id: <20210424103700.8098-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210424103700.8098-1-hemant.agrawal@nxp.com> References: <20210413051715.26430-2-hemant.agrawal@nxp.com> <20210424103700.8098-1-hemant.agrawal@nxp.com> X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sat, 24 Apr 2021 10:38:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d123f7bf-0b14-4ed9-844e-08d9070d23ba X-MS-TrafficTypeDiagnostic: AM6PR0402MB3895: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1201; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SCzXZqc+AHhvCrf898NPeMaCA1FNfaNE5cmyyCgquJVbmm7182s6sRia/AjsMq+Dk/UA6g+aF3X/4/hKCkOm2aJopcPCALhj7Ymt5xQkK3sknuK5aeaxoTbPHnfCW2QY5N+RjA5ExT9SQXSYZVOSmm1DHpWraRosYjcOGWBYS/v+ZiMHyJ2p8oxqFE9aW5DgHSKxRghfZ75LMu0dL8RSxzNXwOSS8jyrn3f08dhzMhvvQM61EDXaDs7Xeshcn+7La8hyyI7SHhmr9M041B5R5bPz58pmyEJ86iBmSwaZA1C44FyOkub8utP/N0rM00nq8Yqcghl0qNsUla8RyLNgr+Wen1lHg0VQ7eJYarc57SaQmJDkr+VhmbUlPVd7/GCV3q2lC+Am4bMLmDND31lZf2Q8ENcBocn4anwKMGimCrfFpRjgLXwXAa+q3ZyXQUMWKj6MVLlQCupoMSYnu1sKHzxL4Wswvdu3T+Y/VJg2YSaYgDY3hv+DEcNTUCy0c6hx8koE+JL7NGTKRBs0F5H2yHXUUETwCZE3Je19RcCB8UxObu2oiAj2VKHPOhd91i3oOSD+gzGn2LKwwzI7hkvm/iYsnlG82OwJSaHmr/xYay1Uq3pLIHaoozi8AmJyoWGjpRrQOTHfl8sjACibQ8XD7nmI1xZCfUnG4W9YQ4u/2Ko= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(8936002)(5660300002)(316002)(1076003)(8676002)(6512007)(86362001)(478600001)(4744005)(38100700002)(2906002)(956004)(2616005)(38350700002)(36756003)(6666004)(186003)(26005)(4326008)(16526019)(6506007)(52116002)(6486002)(44832011)(66476007)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: C9SNAfd10vOBc/VhzLRazTHUkjcuTFvokOzASzr1BMUs2oxXtGqwB4aSzu4UuvjbCBnH5rp8I56Dejsb53T/dKTxYGknsYsNrrEEyvMrmQ5oLY5CwHzrsQ5GEgwv1+4YXeAy8Ly47uCFmzKgUJCJ8VkMI8gH4B7+QfzXPwRNbwH4ts2MmreW86NW8Y+F4MZqZgspjXjv1G+ThK6cts9Ml38BzJrnNHuuMa/cdvfYIHDuYWc3iPdc8FMiPEQwNugOvifoOCnIP80KEj610ZbEC6g1z1tL8zEEW8pwoCb54uABCk1rG1VvVzdm9UlfSk0TFoOevW0ofDPr+kCbsatONcpOzK6PdrMZwFrGMekJHAsJ7TK9pC5Qvr7J+owmKv/59oykXvS2xgZ58AhQEiB6PI9inQO3IkfPjf/N6XKkZt80VUwlXxgwwR8gowbj71DQdB7lgPQJ8UZ2oMhTIwInOzmwDWTM3XuzsVTRiIFmeJxp3Dg8pE0NhFxoaToPJr+qpUSWOClyW4mk9UkygmZFCAZqVc5DWfoutgJd5EqLWZHyLtPoM6XsBQZBxg/90GdAm9Ewi4zf3uytpvrZ+Rd2JxMdNBPaGZL9nXCu58+XEn5ccJqNxpj8AHC6ygm8O2ivf6fRpNmNcY05U/erbIp3TGvpIZEe64qqEB/mzKPr5edn15k/5rWHbR+YhbfPkegOLhbwOi1EBqnvQiwex0N2JEh5/RBwqaJ29xD0ZTZs5dPSmwtkxbaUz9KaMAwJLI0oRma6Rkm7M3UNeTC3y/7qnFEUSU1SYGMnUxWcOIa5EC3KLzki5gi8SXR1gCqsghM9CSheojChO2iBxQ0RRPUzG5xNMFj6MymujJAi/CN5NxOtvbw8kj0scP/WBB/I+2dk9dU2To3WbBdOdhFpOIqUbc119mtPUKJVOOfFhHQr3lhFhrguKwwnNvXm+Mi7d9TSCSukebde4UxQimQH4PCRVUHPnu8o0zjW+UGlbuUg+uAI75Nyw4dEmQ/k86wleBTS45QoMnVrYsI4G/U73Xt4uBg4l/EMaCqRn7F3PyuL0BliJZH4Iml7CR5bHWnZ6rtFf66mT+2j4p/yMBQ+5V9jM1aR4q+uDeTaCZRwWb235S6PlvwvZkxRJaeg+tpqQn2atcwBAwcrrLvUfX+qe61SnAhM8IkzV/fLz06diOlZ8zVITv3VdghaCrQ7NOyzYyPNAf5WEfshmCtevUqAXf0WfMPeL75NW+fEKZZeTd2o6mmQMiekT6EXYUC2OBqMNq00rewwFrUjh1KJhS0Vy6WMMYjOVygYr4Qamn5+LnFr6bTqHEXcazpo0/yg4QP2JwMA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d123f7bf-0b14-4ed9-844e-08d9070d23ba X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2021 10:38:46.8459 (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: tb6+OVuzQ6SSiTKeXN5v1Bq74RD+nVSHme2Z0od4GP+gcrGwS9WuJiZHE9I+b+28IWajJ4dL1NKc8htxUqP+dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3895 Subject: [dpdk-dev] [PATCH v4 7/8] app/bbdev: enable la12xx for bbdev X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" this patch adds la12xx driver in test bbdev Signed-off-by: Hemant Agrawal --- app/test-bbdev/meson.build | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build index 57335641f0..75fd87ae2d 100644 --- a/app/test-bbdev/meson.build +++ b/app/test-bbdev/meson.build @@ -17,3 +17,6 @@ endif if dpdk_conf.has('RTE_BASEBAND_ACC100') deps += ['baseband_acc100'] endif +if dpdk_conf.has('RTE_LIBRTE_PMD_BBDEV_LA12XX') + deps += ['baseband_la12xx'] +endif From patchwork Sat Apr 24 10:37:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 426819 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2062583jao; Sat, 24 Apr 2021 03:39:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjbVOCoCmeIdImmEB0nVV0iT6R/24sMo7hmH9kYijtc9E24ZRe51axG+CKrKvnLhr7XtJa X-Received: by 2002:a05:600c:3581:: with SMTP id p1mr9908542wmq.35.1619260763483; Sat, 24 Apr 2021 03:39:23 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id q26si9530608wmc.95.2021.04.24.03.39.23; Sat, 24 Apr 2021 03:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b="dRBjaI/+"; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6963E4112D; Sat, 24 Apr 2021 12:38:55 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150057.outbound.protection.outlook.com [40.107.15.57]) by mails.dpdk.org (Postfix) with ESMTP id 8A9D241133 for ; Sat, 24 Apr 2021 12:38:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mOmQYtgXX6SfjNCa/ec3qori2MPDo06x9VVyGsZRnQb9r0d9YUp+idYjuDHJwpxaEl0A/7LCr89GM5qMvoIjKDFe2tJHKBG4hgZLoawmAHckR2eKduPF9cdplRI0A7Yw9M8S4eMOdqHjiry0N5C1bqzH/pkK9XC5WxIeyoXKjlpEfXqHz+HkNyJSoFxKhDwiBsT+traCx3GwMPj19FhY7qanR1fV41BfdvfXrv6IbXa+P2QbdHPaUhkEyxOMQdqzk+5nz9HzW7N2oYGlXj5sCndGUSveGa5NGZNPwwLxgVI1TWVijxtqyTExJcn8EdhF5kp6pQMwRvArRlW1LVnCWw== 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-SenderADCheck; bh=mjusiaTFV+1CUsJtmFsFT1/3T12wAxEeiwzkVFqJi7g=; b=ag9r/vCzXzjyXxhbZ+3MueAivO5iCjesPNjhMlE63wNbvhhr5gcY4tGjkwoXrQh+PjZW7+3r18315/m+t537VfLsPCEmmHT+7INb3Qp/aSZWuH6DzbKpnO7eitHL8KVJVtezV0apUi8FEQgOZi41xOfXXsm+Y7NJMWija832Z18rXpw25fEArMLgqnXcw0SNneFB9aw8urWCye0ZpjeKLlkszpsCzpDTynOfMz+oZYKFjrchx4kRM8MAd3b97DXr0ZMQJBEw5C3Mjwca6F23wSCNxM28mAFtF6Qyf4MF+Tl9Ai7/EKv/X2fT1ErHGUdctfHrabikRq6/UHbZLfhNPA== 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=mjusiaTFV+1CUsJtmFsFT1/3T12wAxEeiwzkVFqJi7g=; b=dRBjaI/+GxtZeTA6UFTd6+AC6Ik0lDjACrepU0Vf0FzE2+kTswV5hWkdcuC0HBLTUI4JogFhd7B+Nw4uiMVCQ5qxQSLXcHAhiGNHesrRzHz3JydFK6u6jCK2kwFrsWA5FXM/TtXHmKyguZOxiG9wPS8o1CJy55nqvXHUYyg5hO8= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) by AM6PR0402MB3895.eurprd04.prod.outlook.com (2603:10a6:209:1a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Sat, 24 Apr 2021 10:38:49 +0000 Received: from AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55]) by AM6PR04MB4456.eurprd04.prod.outlook.com ([fe80::ad9e:a38e:e84e:bf55%6]) with mapi id 15.20.4065.023; Sat, 24 Apr 2021 10:38:49 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com, nicolas.chautru@intel.com Cc: david.marchand@redhat.com, Nipun Gupta Date: Sat, 24 Apr 2021 16:07:00 +0530 Message-Id: <20210424103700.8098-9-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210424103700.8098-1-hemant.agrawal@nxp.com> References: <20210413051715.26430-2-hemant.agrawal@nxp.com> <20210424103700.8098-1-hemant.agrawal@nxp.com> X-Originating-IP: [92.120.0.67] X-ClientProxiedBy: HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) To AM6PR04MB4456.eurprd04.prod.outlook.com (2603:10a6:20b:22::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by HK2PR04CA0088.apcprd04.prod.outlook.com (2603:1096:202:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sat, 24 Apr 2021 10:38:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bd540180-a765-47a4-5f74-08d9070d2575 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3895: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:765; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I+W/l35M1ZdkIBKNm2TIbzQ2HJ3jLNDnBbnYVOHX+OEkBtCsm13pgQmZiJLTIbWhb/39dqzcx+jVbyWrEZ2IYawfBrZGTDjqPyU/KGEeDb5sHB5o0Bi3w3yPcWQxlujz/23TnYUBJO/LBGn/efTPoVUJHAgU3IU5vc9+T2XHTUiQQUmSb7aEt9MTDmB3mL9s25jLVTH09yAy+mbq0aEt7DRBuwePHdPv+KBf75iQeAzadlQnCNDQs/CRCN1ZOLO5k3+oZV4dfPcyXeyQZQ7r90gKkLulqg1GLifxfzIJAjf/8GzimT+ChfbknJ7ZpFCCy6QscA/IyEmWzOmrqLFogXy6hb6UCnEDxfq+K4CHCBWfvfzZ71QijR/Si1+qXL/g5tFv2gFwGOhgvhwOJ7UwsL9mcTAyU2KuAVcaIzUH5g8gALfu2kiFoszCn0y37OaiKENhJ3/ZXWi5jdkQp/o1I2tBguEBMsH1ehABoraIAd3OPyp5+xvUlCVgqIhcs/p2a+ChXivEH+gEZjP45yIW0R0prdwgh1Bq49bhzY/OS7yHXYuH2lWVFDpL1XT77vg6dHCcHbYhfkdJUC3BO+m5N5PlGH17LrCtKiozzMAi+/KSVxSXYni/lTF+wq2nAGq+xXqmhqMy6EeNIzw+vSIryg+WkcQzF/GwxXhMtJQA4Jc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4456.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(8936002)(5660300002)(316002)(1076003)(8676002)(6512007)(86362001)(478600001)(38100700002)(2906002)(956004)(2616005)(38350700002)(36756003)(6666004)(186003)(83380400001)(26005)(4326008)(16526019)(6506007)(52116002)(6486002)(44832011)(66476007)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Q7QQVl5nTgxsKrOwD3vcViJfgAdE8G1hNGYtaUBLBukSYCuD441SNEamZGczQG9SYErAZopFO/AWDUYTs7SlbtXdrYQNQBO/QnCEA+IHNlj19tcm5u0nKeYRofGScdRsL9MPUMk5dkxJoSGWzeRFwFiD49WcyDnhiKKUNjCQ4BQcbL/OKzJGXdrVergTMqQiRAA57SQICuDiVddmppawuYaOOqETJ3XtITYb0jp8biviS4hntSVrdcUrsaNA08hL6/0ELEAXm7MPTG3cjp/DLauart9S1CZ9TVoq5r9CqLztCSHCZIxTfkKq85yDqOwaKAjUFDhYgysLrCOfURxc02/8GAqzhqxxrIcHalrlaV6zTHxo7q+HocEo3QbnTzPvzSbL0vAA58OsNNa2Cs37HRDUv8eVAMC6Gt9IkxanqyOHabd30kRsMdctZNVP3pq8nbjhPsxfp1k/05Cle0OUBjwVfx1j4BOdaMK1F0EO0gho3oHko1BPkTBZWoeF1Mj9yeD67OGUSRCJHPKY2l/D5rSFKAXRq53/uC8rElM9yWV7njQWQY6b6ZCEFX4CcZ6WteLY+cy84/Hnc45mwzOQzr4bHnZoOb2gpTgN6MbFwIC2uYsC1VuMV87xlRs0bEbZS/pvIIHA9J2QjJU6XPW1bSeG2cdzsEK2HhgtsfnMvpZi5d0LNu3CmxqO2WYuSgn8QRhri4JI5Rz+NEaQ/4bY7hL5pBEKwshqEUVdEmKxFiPZX7Sbgd8PNYFd0ix+/iteV+EpffO0ghcXo3tdY/YmWH7/ZkelS87fT/OyBJgu86kjhfDBQfWoBCXecGxzufCQO+7rOlgUlYSbXbNLwMtkhmuhgKrc+K4ieV4eZV9t7NKOW/qRQgdC+9cFSyauFktEvF7w7OJFISCfYG0Surdh+zLsmNwoWYkx8In6lO1KtBFbO/pxz/vRMPqxz9Fnjm518fHvjRx1OiXyW0q35zhbn6pHkU76LF95pMx8tNEReckifhrdr/94EnbwzHmesiB97ck6c3th7yIwUhs6rQ1TsIqgTa8SLKnm2nWdZnqkiVk4TFd+tTfb74aXLybpxXBHZA+Z6xfrNAzZAUq7pIgrIvE/B3cUBFSBA4oYZz8naoRAVA20VZ4MUe62uqJ/PjYull11OeruYciPEFLHdZ0Bdy79uP9O5zm2kY+U+VTl8nSBv55967QOk3ecLgavQRR3Vl8qWAMesBGTFs4k+VE0laufLXpbo4GpGnE4A9xpHEvq0SpIVPqu0iB2kjlFcPIEO/J6Q4tgyqLbxONTqKl0iVyIK81Anj8z2Ow+8Y2DEAHc6hDQA9KDqXVHUCnl1shB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd540180-a765-47a4-5f74-08d9070d2575 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4456.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2021 10:38:49.6252 (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: us6jHGq+K8e8KFBq6gXTzdE0aP/pFkGjMAqxl58hWN8xmiDX+59q4ABzi17OjhznTtAhDa7bopswhn5oLGtwyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3895 Subject: [dpdk-dev] [PATCH v4 8/8] app/bbdev: add test vectors for transport blocks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: Nipun Gupta This patch adds two test vectors for transport block in network byte order: - LDPC encode for Transport Block - LDPC decode for Transport block Signed-off-by: Nipun Gupta --- app/test-bbdev/test_vectors/ldpc_dec_tb.data | 122 +++++++++++++++++++ app/test-bbdev/test_vectors/ldpc_enc_tb.data | 60 +++++++++ 2 files changed, 182 insertions(+) create mode 100644 app/test-bbdev/test_vectors/ldpc_dec_tb.data create mode 100644 app/test-bbdev/test_vectors/ldpc_enc_tb.data -- 2.17.1 diff --git a/app/test-bbdev/test_vectors/ldpc_dec_tb.data b/app/test-bbdev/test_vectors/ldpc_dec_tb.data new file mode 100644 index 0000000000..4ec5020d04 --- /dev/null +++ b/app/test-bbdev/test_vectors/ldpc_dec_tb.data @@ -0,0 +1,122 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2020 NXP + +op_type = +RTE_BBDEV_OP_LDPC_DEC + +input0 = +0x817f8181, 0x7f7f8181, 0x817f7f81, 0x81817f81, 0x81817f81, 0x817f7f81, 0x7f7f7f7f, 0x7f7f7f81, +0x817f7f81, 0x817f7f81, 0x7f7f817f, 0x7f7f7f81, 0x81817f7f, 0x81818181, 0x817f8181, 0x7f817f81, +0x81817f7f, 0x7f7f817f, 0x81817f81, 0x817f8181, 0x7f7f7f81, 0x817f817f, 0x7f817f7f, 0x7f817f7f, +0x7f817f7f, 0x81817f7f, 0x7f818181, 0x817f7f7f, 0x8181817f, 0x81817f7f, 0x7f817f81, 0x7f7f7f7f, +0x7f817f7f, 0x81817f7f, 0x81818181, 0x817f817f, 0x81817f7f, 0x7f81817f, 0x7f7f7f7f, 0x7f7f7f7f, +0x7f818181, 0x7f7f7f81, 0x81817f81, 0x7f817f7f, 0x7f7f7f7f, 0x817f817f, 0x817f817f, 0x7f7f817f, +0x81817f81, 0x7f7f7f7f, 0x7f81817f, 0x817f817f, 0x7f7f8181, 0x7f7f7f7f, 0x817f7f7f, 0x81818181, +0x817f8181, 0x7f7f817f, 0x7f7f8181, 0x7f7f7f7f, 0x7f818181, 0x817f8181, 0x817f7f81, 0x817f8181, +0x817f7f81, 0x81817f7f, 0x7f7f8181, 0x81818181, 0x817f817f, 0x817f7f7f, 0x81818181, 0x7f817f81, +0x7f7f7f81, 0x81817f81, 0x7f817f7f, 0x7f818181, 0x7f7f7f81, 0x817f817f, 0x81818181, 0x81818181, +0x81817f81, 0x81817f81, 0x7f7f8181, 0x817f7f7f, 0x7f81817f, 0x817f817f, 0x81817f7f, 0x817f7f81, +0x81817f7f, 0x7f7f7f81, 0x7f817f81, 0x7f817f81, 0x817f7f7f, 0x7f818181, 0x81818181, 0x7f7f7f7f, +0x7f7f7f7f, 0x8181817f, 0x7f7f7f81, 0x7f817f81, 0x81817f81, 0x7f7f817f, 0x7f81817f, 0x817f8181, +0x7f81817f, 0x7f81817f, 0x817f7f7f, 0x7f81817f, 0x817f7f81, 0x817f7f81, 0x7f817f7f, 0x8181817f, +0x7f81817f, 0x7f7f8181, 0x817f8181, 0x817f7f7f, 0x817f7f81, 0x7f81817f, 0x7f7f817f, 0x7f817f7f, +0x7f7f8181, 0x81818181, 0x7f818181, 0x7f7f817f, 0x7f818181, 0x81818181, 0x7f817f7f, 0x817f817f, +0x817f817f, 0x817f7f7f, 0x81817f81, 0x81817f7f, 0x81817f81, 0x7f817f81, 0x7f817f7f, 0x7f817f7f, +0x817f7f7f, 0x817f7f7f, 0x7f7f7f7f, 0x7f7f7f81, 0x7f7f8181, 0x7f817f81, 0x7f817f7f, 0x817f7f7f, +0x7f7f8181, 0x8181817f, 0x7f7f8181, 0x7f7f7f81, 0x817f7f7f, 0x7f7f7f81, 0x817f8181, 0x7f7f817f, +0x7f81817f, 0x817f817f, 0x7f817f81, 0x7f7f8181, 0x7f818181, 0x7f817f81, 0x81818181, 0x81817f7f, +0x7f81817f, 0x7f81817f, 0x7f7f8181, 0x81818181, 0x817f8181, 0x7f7f817f, 0x7f817f7f, 0x7f7f8181, +0x7f81817f, 0x7f7f817f, 0x7f7f7f7f, 0x7f818181, 0x81817f7f, 0x8181817f, 0x7f81817f, 0x8181817f, +0x81817f81, 0x7f7f7f7f, 0x81818181, 0x7f7f817f, 0x7f81817f, 0x7f7f7f7f, 0x81817f81, 0x817f7f81, +0x817f7f81, 0x817f7f81, 0x81818181, 0x7f7f7f7f, 0x81817f81, 0x817f7f7f, 0x8181817f, 0x7f7f7f81, +0x81817f81, 0x817f7f81, 0x81818181, 0x7f7f7f7f, 0x81817f7f, 0x81817f81, 0x7f7f7f81, 0x7f7f7f7f, +0x817f817f, 0x7f818181, 0x8181817f, 0x81817f81, 0x7f7f7f81, 0x7f817f7f, 0x7f7f7f7f, 0x7f817f81, +0x8181817f, 0x7f7f7f7f, 0x81817f7f, 0x7f7f7f81, 0x7f81817f, 0x7f7f7f7f, 0x7f7f7f81, 0x817f8181, +0x7f7f8181, 0x7f7f7f81, 0x7f7f8181, 0x7f817f7f, 0x81818181, 0x7f81817f, 0x7f818181, 0x7f818181, +0x7f818181, 0x817f7f81, 0x7f7f8181, 0x81818181, 0x7f7f7f7f, 0x7f7f7f7f, 0x817f8181, 0x81818181, +0x7f7f817f, 0x817f8181, 0x81817f7f, 0x817f817f, 0x7f7f817f, 0x7f7f7f7f, 0x817f8181, 0x817f8181, +0x817f8181, 0x81818181, 0x7f7f817f, 0x7f817f81, 0x817f7f81, 0x7f7f7f81, 0x81817f81, 0x7f818181, +0x81817f7f, 0x7f818181, 0x81818181, 0x817f817f, 0x7f817f7f, 0x81818181, 0x817f8181, 0x7f7f7f7f, +0x7f817f81, 0x817f7f7f, 0x7f818181, 0x8181817f, 0x817f817f, 0x7f817f7f, 0x817f7f81, 0x7f818181, +0x817f7f7f, 0x817f7f81, 0x7f7f7f81, 0x81817f81, 0x7f81817f, 0x7f818181, 0x81817f7f, 0x817f7f81, +0x81817f81, 0x7f7f8181, 0x7f7f8181, 0x7f817f81, 0x7f7f817f, 0x817f7f7f, 0x7f7f7f7f, 0x817f7f7f, +0x7f7f8181, 0x817f8181, 0x817f8181, 0x7f817f81, 0x817f8181, 0x8181817f, 0x81817f7f, 0x7f817f7f, +0x7f817f7f, 0x7f817f81, 0x817f817f, 0x817f7f7f, 0x8181817f, 0x817f817f, 0x817f7f81, 0x81817f7f, +0x7f817f7f, 0x7f7f7f7f, 0x7f817f7f, 0x7f7f817f, 0x7f818181, 0x8181817f, 0x817f7f7f, 0x7f817f81, +0x7f7f8181, 0x81817f7f, 0x7f7f817f, 0x7f7f817f, 0x7f817f7f, 0x7f7f817f, 0x7f818181, 0x7f817f7f, +0x817f7f7f, 0x7f817f81, 0x81818181, 0x7f818181, 0x817f8181, 0x8181817f, 0x8181817f, 0x817f7f7f, +0x81817f81, 0x817f7f7f, 0x7f81817f, 0x817f8181, 0x7f818181, 0x7f817f7f, 0x81817f7f, 0x7f81817f, +0x81817f81, 0x7f7f7f81, 0x7f7f7f7f, 0x81818181, 0x817f7f7f, 0x81817f81, 0x817f7f81, 0x81817f7f, +0x81818181, 0x7f7f7f7f, 0x817f817f, 0x7f817f81, 0x817f7f7f, 0x7f817f81, 0x817f8181, 0x7f81817f, +0x7f818181, 0x7f7f8181, 0x817f817f, 0x7f7f7f7f, 0x81818181, 0x7f817f81, 0x81817f81, 0x7f81817f, +0x81818181, 0x7f7f817f, 0x81818181, 0x7f7f7f81, 0x817f7f81, 0x8181817f, 0x7f818181, 0x7f7f7f7f, +0x7f7f7f7f, 0x8181817f, 0x81817f81, 0x81818181, 0x7f7f817f, 0x81817f7f, 0x7f817f81, 0x817f8181, +0x81817f7f, 0x7f817f7f, 0x817f7f7f, 0x7f81817f, 0x817f7f7f, 0x7f7f7f7f, 0x7f7f8181, 0x7f7f8181, +0x7f81817f, 0x7f7f8181, 0x7f7f8181, 0x817f7f81, 0x8181817f, 0x81817f7f, 0x817f8181, 0x817f817f, +0x8181817f, 0x7f7f8181, 0x7f81817f, 0x817f817f, 0x7f817f81, 0x7f817f7f, 0x7f7f8181, 0x81818181, +0x7f817f81, 0x7f7f8181, 0x81817f7f, 0x7f7f7f81, 0x7f7f7f81, 0x7f7f7f7f, 0x7f81817f, 0x7f7f8181, +0x7f7f817f, 0x817f817f, 0x7f7f7f7f, 0x817f8181, 0x7f818181, 0x7f7f817f, 0x8181817f, 0x8181817f, +0x817f7f81, 0x8181817f, 0x817f8181, 0x7f817f7f, 0x81817f7f, 0x81818181, 0x7f7f8181, 0x7f817f81, +0x817f8181, 0x7f817f7f, 0x81818181, 0x81817f81, 0x7f817f81, 0x81817f7f, 0x7f818181, 0x8181817f, +0x7f7f7f81, 0x7f81817f, 0x7f7f8181, 0x81818181, 0x81817f7f, 0x817f8181, 0x81817f7f, 0x7f7f817f, +0x81818181, 0x7f7f8181, 0x7f7f817f, 0x817f817f, 0x7f817f81, 0x7f7f7f7f, 0x7f817f81, 0x7f817f7f, +0x7f81817f, 0x7f7f8181, 0x7f7f817f, 0x81818181, 0x7f7f8181, 0x817f7f81, 0x81817f81, 0x81817f7f, +0x81817f81, 0x81818181, 0x7f817f81, 0x7f7f7f7f, 0x81817f7f, 0x7f817f7f, 0x7f7f817f, 0x81817f7f, +0x81817f7f, 0x7f7f7f7f, 0x817f7f7f, 0x7f817f81, 0x81818181, 0x81817f7f, 0x7f817f7f, 0x8181817f, +0x7f81817f, 0x817f7f81, 0x7f817f7f, 0x7f7f7f7f, 0x817f7f81, 0x7f817f81, 0x81818181, 0x81817f81, +0x7f817f81, 0x81818181, 0x81818181, 0x8181817f, 0x7f7f817f, 0x817f7f7f, 0x817f7f7f, 0x7f7f7f7f, +0x81818181, 0x7f817f7f, 0x817f7f81, 0x7f7f8181, 0x817f8181, 0x81817f7f, 0x81817f7f, 0x817f7f7f, +0x817f817f, 0x7f818181, 0x7f817f7f, 0x817f8181, 0x7f817f7f, 0x817f8181, 0x7f7f817f, 0x81817f7f, +0x8181817f, 0x7f817f81, 0x7f7f7f81, 0x81818181, 0x7f7f7f81, 0x81818181, 0x7f7f817f, 0x817f7f7f, +0x817f817f, 0x7f7f8181, 0x7f7f7f81, 0x7f817f7f, 0x817f8181, 0x817f817f, 0x81818181, 0x81817f7f, + +output0 = +0xea7bdad9, 0xabd8311a, 0x4e7ba2e2, 0x5c5c5c85, 0xc400ed50, 0x9bea8883, 0xb7f0 + +basegraph= +2 + +z_c= +28 + +n_cb= +1400 + +q_m= +2 + +n_filler= +56 + +ea = +2048 + +eb = +2048 + +iter_max= +8 + +expected_iter_count= +2 + +c = +1 + +r = +0 + +cab = +0 + +rv_index = +0 + +code_block_mode = +0 + +op_flags = +RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP, RTE_BBDEV_LDPC_LLR_COMPRESSION, RTE_BBDEV_LDPC_DEC_NETWORK_ORDER + +expected_status = +OK diff --git a/app/test-bbdev/test_vectors/ldpc_enc_tb.data b/app/test-bbdev/test_vectors/ldpc_enc_tb.data new file mode 100644 index 0000000000..f3e883584a --- /dev/null +++ b/app/test-bbdev/test_vectors/ldpc_enc_tb.data @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2020 NXP + +op_type = +RTE_BBDEV_OP_LDPC_ENC + +input0 = +0xea7bdad9, 0xabd8311a, 0x4e7ba2e2, 0x5c5c5c85, 0xc400ed50, 0x9bea8883, 0xb7f0 + +output0 = +0x109dd93b, 0x5bfc1299, 0x44a1bd2c, 0x05ce87c4, 0x006cafc4, 0x2aa04d17, 0xf803a60d, 0xb9b7032b, +0x5f8af3c9, 0xffa174d1, 0x9ca683dd, 0x0f78551c, 0xb62d51e0, 0xe4996866, 0x42698b36, 0xa4f727f3, +0x445dcd8a, 0x84531088, 0x2b1813e3, 0xcf5735a6, 0x342bf366, 0xe6ec7026, 0x9d062f0d, 0x1e8d0f99, +0x01dc0f9d, 0x5041de7a, 0xb1061c0e, 0x776f4313, 0xfb00f397, 0xbb02acb2, 0x7d1952fb, 0x0bf4af7c, +0x794ae785, 0x9c76d198, 0x8082533d, 0x4ceb5bb3, 0xc9ae8a54, 0x58e72404, 0x472422c3, 0x8eeb7f58, +0x6c47b68d, 0xc9d8f01d, 0x6b585a0f, 0x6d5f0a37, 0x07e91f2f, 0xb5c2fde0, 0x3308684c, 0xabce9336, +0xf345a63e, 0x36011c35, 0xee27b0a2, 0x53fc4be9, 0xe7c5df4b, 0x2cbcf361, 0x4505a23f, 0xcd93f236, +0xc24c05fd, 0xe4cf580c, 0xdf590496, 0x0882eff5, 0x8ccb394f, 0xc2b4b47a, 0x82f1f15e, 0xcfab413a + +basegraph= +2 + +z_c= +28 + +n_cb= +1400 + +q_m= +2 + +n_filler= +56 + +ea = +2048 + +eb = +2048 + +c = +1 + +r = +0 + +cab = +0 + +rv_index = +0 + +code_block_mode = +0 + +op_flags = +RTE_BBDEV_LDPC_CRC_24B_ATTACH, RTE_BBDEV_LDPC_ENC_NETWORK_ORDER + +expected_status = +OK