DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v10 00/16] bbdev ACC200 PMD
@ 2022-10-11 21:15 Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 01/16] baseband/acc100: remove unused registers Nicolas Chautru
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nicolas Chautru

v10: Update of patch 13 to expose a single configuration API for the ACC devices.
     New commit 15 to refactor PMD code using helper functions for the descriptor
     index management and improve readability.
     New commit 16 to extend bbdev-test capability to support new
     operations and capabilities in the new PMD.
     Formatting fixes. Note that the checkpatch warning are False-Alarms.
     Thanks
v9: I had missed a compilation error in debug mode. 
v8: Rebased to latest and fixed related compilation error. Added acc200.ini and updated rel_notes.
    Formatting improvement in comments, docs and commit message.
v7: Additional update in commits 9,10,11 based on review from Maxime.
v5/v6:Updates based on Maxime reviews of v4/v5. Thanks.
v4: Rebase suggested by Maxime to split first commit and update the order within the series. No functional change. 
v3: Putting together ACC100 and ACC200 PMDs in common acc directory based on previous discussion on v2. 
v2: Includes now code refactory to have common structures and code reused with the parallel ACC1XX serie PMD which can be shared moving forward.
v1: This is targeting 22.11 and includes the PMD for the new serie integrated accelerator on Intel Xeon SPR-EEC.


Nic Chautru (16):
  baseband/acc100: remove unused registers
  baseband/acc100: refactor to segregate common code
  baseband/acc: rename directory from acc100 to acc
  baseband/acc: introduce PMD for ACC200
  baseband/acc: add HW register definitions for ACC200
  baseband/acc: add info get function for ACC200
  baseband/acc: add queue configuration for ACC200
  baseband/acc: add LDPC processing functions
  baseband/acc: add LTE processing functions
  baseband/acc: add support for FFT operations
  baseband/acc: support interrupt
  baseband/acc: add device status and vf2pf comms
  baseband/acc: add PF configure companion function
  baseband/acc: simplify meson dependency
  baseband/acc: add helper function for descriptor index
  test-bbdev: unit test capability extension

 MAINTAINERS                                   |    5 +-
 app/test-bbdev/meson.build                    |    4 +-
 app/test-bbdev/test_bbdev_perf.c              |  626 ++-
 app/test-bbdev/test_bbdev_vector.c            |  182 +
 app/test-bbdev/test_bbdev_vector.h            |    1 +
 app/test-bbdev/test_vectors/fft_150.data      |  475 ++
 app/test-bbdev/test_vectors/fft_byp_28.data   |  103 +
 doc/guides/bbdevs/acc200.rst                  |  257 ++
 doc/guides/bbdevs/features/acc200.ini         |   14 +
 doc/guides/bbdevs/features/default.ini        |    1 +
 doc/guides/bbdevs/index.rst                   |    1 +
 doc/guides/rel_notes/release_22_11.rst        |    6 +
 drivers/baseband/acc/acc100_pf_enum.h         |  147 +
 drivers/baseband/acc/acc100_pmd.h             |  177 +
 .../baseband/{acc100 => acc}/acc100_vf_enum.h |    0
 drivers/baseband/{acc100 => acc}/acc101_pmd.h |   10 -
 drivers/baseband/acc/acc200_cfg.h             |   32 +
 drivers/baseband/acc/acc200_pf_enum.h         |  108 +
 drivers/baseband/acc/acc200_pmd.h             |  196 +
 drivers/baseband/acc/acc200_vf_enum.h         |   83 +
 drivers/baseband/acc/acc_common.h             | 1422 ++++++
 drivers/baseband/acc/meson.build              |    8 +
 .../baseband/{acc100 => acc}/rte_acc100_pmd.c | 1894 +++-----
 drivers/baseband/acc/rte_acc200_pmd.c         | 3821 +++++++++++++++++
 drivers/baseband/acc/rte_acc_cfg.h            |   49 +
 .../rte_acc_common_cfg.h}                     |   66 +-
 drivers/baseband/{acc100 => acc}/version.map  |    2 +-
 drivers/baseband/acc100/acc100_pf_enum.h      | 1086 -----
 drivers/baseband/acc100/acc100_pmd.h          |  624 ---
 drivers/baseband/acc100/meson.build           |    8 -
 drivers/baseband/meson.build                  |    2 +-
 31 files changed, 8335 insertions(+), 3075 deletions(-)
 create mode 100644 app/test-bbdev/test_vectors/fft_150.data
 create mode 100644 app/test-bbdev/test_vectors/fft_byp_28.data
 create mode 100644 doc/guides/bbdevs/acc200.rst
 create mode 100644 doc/guides/bbdevs/features/acc200.ini
 create mode 100644 drivers/baseband/acc/acc100_pf_enum.h
 create mode 100644 drivers/baseband/acc/acc100_pmd.h
 rename drivers/baseband/{acc100 => acc}/acc100_vf_enum.h (100%)
 rename drivers/baseband/{acc100 => acc}/acc101_pmd.h (76%)
 create mode 100644 drivers/baseband/acc/acc200_cfg.h
 create mode 100644 drivers/baseband/acc/acc200_pf_enum.h
 create mode 100644 drivers/baseband/acc/acc200_pmd.h
 create mode 100644 drivers/baseband/acc/acc200_vf_enum.h
 create mode 100644 drivers/baseband/acc/acc_common.h
 create mode 100644 drivers/baseband/acc/meson.build
 rename drivers/baseband/{acc100 => acc}/rte_acc100_pmd.c (69%)
 create mode 100644 drivers/baseband/acc/rte_acc200_pmd.c
 create mode 100644 drivers/baseband/acc/rte_acc_cfg.h
 rename drivers/baseband/{acc100/rte_acc100_cfg.h => acc/rte_acc_common_cfg.h} (55%)
 rename drivers/baseband/{acc100 => acc}/version.map (69%)
 delete mode 100644 drivers/baseband/acc100/acc100_pf_enum.h
 delete mode 100644 drivers/baseband/acc100/acc100_pmd.h
 delete mode 100644 drivers/baseband/acc100/meson.build

-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 01/16] baseband/acc100: remove unused registers
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 02/16] baseband/acc100: refactor to segregate common code Nicolas Chautru
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Cleanep up the enum files to remove un-used registers definitions.
No functionality change.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc100/acc100_pf_enum.h | 939 -----------------------
 1 file changed, 939 deletions(-)

diff --git a/drivers/baseband/acc100/acc100_pf_enum.h b/drivers/baseband/acc100/acc100_pf_enum.h
index 2fba667627..f4e5002762 100644
--- a/drivers/baseband/acc100/acc100_pf_enum.h
+++ b/drivers/baseband/acc100/acc100_pf_enum.h
@@ -14,32 +14,6 @@
 enum {
 	HWPfQmgrEgressQueuesTemplate          =  0x0007FE00,
 	HWPfQmgrIngressAq                     =  0x00080000,
-	HWPfQmgrArbQAvail                     =  0x00A00010,
-	HWPfQmgrArbQBlock                     =  0x00A00014,
-	HWPfQmgrAqueueDropNotifEn             =  0x00A00024,
-	HWPfQmgrAqueueDisableNotifEn          =  0x00A00028,
-	HWPfQmgrSoftReset                     =  0x00A00038,
-	HWPfQmgrInitStatus                    =  0x00A0003C,
-	HWPfQmgrAramWatchdogCount             =  0x00A00040,
-	HWPfQmgrAramWatchdogCounterEn         =  0x00A00044,
-	HWPfQmgrAxiWatchdogCount              =  0x00A00048,
-	HWPfQmgrAxiWatchdogCounterEn          =  0x00A0004C,
-	HWPfQmgrProcessWatchdogCount          =  0x00A00050,
-	HWPfQmgrProcessWatchdogCounterEn      =  0x00A00054,
-	HWPfQmgrProcessUl4GWatchdogCounter    =  0x00A00058,
-	HWPfQmgrProcessDl4GWatchdogCounter    =  0x00A0005C,
-	HWPfQmgrProcessUl5GWatchdogCounter    =  0x00A00060,
-	HWPfQmgrProcessDl5GWatchdogCounter    =  0x00A00064,
-	HWPfQmgrProcessMldWatchdogCounter     =  0x00A00068,
-	HWPfQmgrMsiOverflowUpperVf            =  0x00A00070,
-	HWPfQmgrMsiOverflowLowerVf            =  0x00A00074,
-	HWPfQmgrMsiWatchdogOverflow           =  0x00A00078,
-	HWPfQmgrMsiOverflowEnable             =  0x00A0007C,
-	HWPfQmgrDebugAqPointerMemGrp          =  0x00A00100,
-	HWPfQmgrDebugOutputArbQFifoGrp        =  0x00A00140,
-	HWPfQmgrDebugMsiFifoGrp               =  0x00A00180,
-	HWPfQmgrDebugAxiWdTimeoutMsiFifo      =  0x00A001C0,
-	HWPfQmgrDebugProcessWdTimeoutMsiFifo  =  0x00A001C4,
 	HWPfQmgrDepthLog2Grp                  =  0x00A00200,
 	HWPfQmgrTholdGrp                      =  0x00A00300,
 	HWPfQmgrGrpTmplateReg0Indx            =  0x00A00600,
@@ -48,85 +22,23 @@ enum {
 	HWPfQmgrGrpTmplateReg3Indx            =  0x00A00780,
 	HWPfQmgrGrpTmplateReg4Indx            =  0x00A00800,
 	HWPfQmgrVfBaseAddr                    =  0x00A01000,
-	HWPfQmgrUl4GWeightRrVf                =  0x00A02000,
-	HWPfQmgrDl4GWeightRrVf                =  0x00A02100,
-	HWPfQmgrUl5GWeightRrVf                =  0x00A02200,
-	HWPfQmgrDl5GWeightRrVf                =  0x00A02300,
-	HWPfQmgrMldWeightRrVf                 =  0x00A02400,
 	HWPfQmgrArbQDepthGrp                  =  0x00A02F00,
 	HWPfQmgrGrpFunction0                  =  0x00A02F40,
-	HWPfQmgrGrpFunction1                  =  0x00A02F44,
 	HWPfQmgrGrpPriority                   =  0x00A02F48,
-	HWPfQmgrWeightSync                    =  0x00A03000,
 	HWPfQmgrAqEnableVf                    =  0x00A10000,
-	HWPfQmgrAqResetVf                     =  0x00A20000,
 	HWPfQmgrRingSizeVf                    =  0x00A20004,
 	HWPfQmgrGrpDepthLog20Vf               =  0x00A20008,
 	HWPfQmgrGrpDepthLog21Vf               =  0x00A2000C,
-	HWPfQmgrGrpFunction0Vf                =  0x00A20010,
-	HWPfQmgrGrpFunction1Vf                =  0x00A20014,
 	HWPfDmaConfig0Reg                     =  0x00B80000,
 	HWPfDmaConfig1Reg                     =  0x00B80004,
 	HWPfDmaQmgrAddrReg                    =  0x00B80008,
-	HWPfDmaSoftResetReg                   =  0x00B8000C,
 	HWPfDmaAxcacheReg                     =  0x00B80010,
-	HWPfDmaVersionReg                     =  0x00B80014,
-	HWPfDmaFrameThreshold                 =  0x00B80018,
-	HWPfDmaTimestampLo                    =  0x00B8001C,
-	HWPfDmaTimestampHi                    =  0x00B80020,
-	HWPfDmaAxiStatus                      =  0x00B80028,
 	HWPfDmaAxiControl                     =  0x00B8002C,
-	HWPfDmaNoQmgr                         =  0x00B80030,
-	HWPfDmaQosScale                       =  0x00B80034,
 	HWPfDmaQmanen                         =  0x00B80040,
-	HWPfDmaQmgrQosBase                    =  0x00B80060,
-	HWPfDmaFecClkGatingEnable             =  0x00B80080,
-	HWPfDmaPmEnable                       =  0x00B80084,
-	HWPfDmaQosEnable                      =  0x00B80088,
-	HWPfDmaHarqWeightedRrFrameThreshold   =  0x00B800B0,
-	HWPfDmaDataSmallWeightedRrFrameThresh  = 0x00B800B4,
-	HWPfDmaDataLargeWeightedRrFrameThresh  = 0x00B800B8,
-	HWPfDmaInboundCbMaxSize               =  0x00B800BC,
 	HWPfDmaInboundDrainDataSize           =  0x00B800C0,
 	HWPfDmaVfDdrBaseRw                    =  0x00B80400,
-	HWPfDmaCmplTmOutCnt                   =  0x00B80800,
-	HWPfDmaProcTmOutCnt                   =  0x00B80804,
-	HWPfDmaStatusRrespBresp               =  0x00B80810,
-	HWPfDmaCfgRrespBresp                  =  0x00B80814,
-	HWPfDmaStatusMemParErr                =  0x00B80818,
-	HWPfDmaCfgMemParErrEn                 =  0x00B8081C,
-	HWPfDmaStatusDmaHwErr                 =  0x00B80820,
-	HWPfDmaCfgDmaHwErrEn                  =  0x00B80824,
-	HWPfDmaStatusFecCoreErr               =  0x00B80828,
-	HWPfDmaCfgFecCoreErrEn                =  0x00B8082C,
-	HWPfDmaStatusFcwDescrErr              =  0x00B80830,
-	HWPfDmaCfgFcwDescrErrEn               =  0x00B80834,
-	HWPfDmaStatusBlockTransmit            =  0x00B80838,
-	HWPfDmaBlockOnErrEn                   =  0x00B8083C,
-	HWPfDmaStatusFlushDma                 =  0x00B80840,
-	HWPfDmaFlushDmaOnErrEn                =  0x00B80844,
-	HWPfDmaStatusSdoneFifoFull            =  0x00B80848,
-	HWPfDmaStatusDescriptorErrLoVf        =  0x00B8084C,
-	HWPfDmaStatusDescriptorErrHiVf        =  0x00B80850,
-	HWPfDmaStatusFcwErrLoVf               =  0x00B80854,
-	HWPfDmaStatusFcwErrHiVf               =  0x00B80858,
-	HWPfDmaStatusDataErrLoVf              =  0x00B8085C,
-	HWPfDmaStatusDataErrHiVf              =  0x00B80860,
-	HWPfDmaCfgMsiEnSoftwareErr            =  0x00B80864,
 	HWPfDmaDescriptorSignatuture          =  0x00B80868,
-	HWPfDmaFcwSignature                   =  0x00B8086C,
 	HWPfDmaErrorDetectionEn               =  0x00B80870,
-	HWPfDmaErrCntrlFifoDebug              =  0x00B8087C,
-	HWPfDmaStatusToutData                 =  0x00B80880,
-	HWPfDmaStatusToutDesc                 =  0x00B80884,
-	HWPfDmaStatusToutUnexpData            =  0x00B80888,
-	HWPfDmaStatusToutUnexpDesc            =  0x00B8088C,
-	HWPfDmaStatusToutProcess              =  0x00B80890,
-	HWPfDmaConfigCtoutOutDataEn           =  0x00B808A0,
-	HWPfDmaConfigCtoutOutDescrEn          =  0x00B808A4,
-	HWPfDmaConfigUnexpComplDataEn         =  0x00B808A8,
-	HWPfDmaConfigUnexpComplDescrEn        =  0x00B808AC,
-	HWPfDmaConfigPtoutOutEn               =  0x00B808B0,
 	HWPfDmaFec5GulDescBaseLoRegVf         =  0x00B88020,
 	HWPfDmaFec5GulDescBaseHiRegVf         =  0x00B88024,
 	HWPfDmaFec5GulRespPtrLoRegVf          =  0x00B88028,
@@ -143,414 +55,34 @@ enum {
 	HWPfDmaFec4GdlDescBaseHiRegVf         =  0x00B88084,
 	HWPfDmaFec4GdlRespPtrLoRegVf          =  0x00B88088,
 	HWPfDmaFec4GdlRespPtrHiRegVf          =  0x00B8808C,
-	HWPfDmaVfDdrBaseRangeRo               =  0x00B880A0,
-	HWPfQosmonACntrlReg                   =  0x00B90000,
 	HWPfQosmonAEvalOverflow0              =  0x00B90008,
-	HWPfQosmonAEvalOverflow1              =  0x00B9000C,
-	HWPfQosmonADivTerm                    =  0x00B90010,
-	HWPfQosmonATickTerm                   =  0x00B90014,
-	HWPfQosmonAEvalTerm                   =  0x00B90018,
-	HWPfQosmonAAveTerm                    =  0x00B9001C,
-	HWPfQosmonAForceEccErr                =  0x00B90020,
-	HWPfQosmonAEccErrDetect               =  0x00B90024,
-	HWPfQosmonAIterationConfig0Low        =  0x00B90060,
-	HWPfQosmonAIterationConfig0High       =  0x00B90064,
-	HWPfQosmonAIterationConfig1Low        =  0x00B90068,
-	HWPfQosmonAIterationConfig1High       =  0x00B9006C,
-	HWPfQosmonAIterationConfig2Low        =  0x00B90070,
-	HWPfQosmonAIterationConfig2High       =  0x00B90074,
-	HWPfQosmonAIterationConfig3Low        =  0x00B90078,
-	HWPfQosmonAIterationConfig3High       =  0x00B9007C,
-	HWPfQosmonAEvalMemAddr                =  0x00B90080,
-	HWPfQosmonAEvalMemData                =  0x00B90084,
-	HWPfQosmonAXaction                    =  0x00B900C0,
-	HWPfQosmonARemThres1Vf                =  0x00B90400,
-	HWPfQosmonAThres2Vf                   =  0x00B90404,
-	HWPfQosmonAWeiFracVf                  =  0x00B90408,
-	HWPfQosmonARrWeiVf                    =  0x00B9040C,
 	HWPfPermonACntrlRegVf                 =  0x00B98000,
-	HWPfPermonACountVf                    =  0x00B98008,
-	HWPfPermonAKCntLoVf                   =  0x00B98010,
-	HWPfPermonAKCntHiVf                   =  0x00B98014,
-	HWPfPermonADeltaCntLoVf               =  0x00B98020,
-	HWPfPermonADeltaCntHiVf               =  0x00B98024,
-	HWPfPermonAVersionReg                 =  0x00B9C000,
-	HWPfPermonACbControlFec               =  0x00B9C0F0,
-	HWPfPermonADltTimerLoFec              =  0x00B9C0F4,
-	HWPfPermonADltTimerHiFec              =  0x00B9C0F8,
-	HWPfPermonACbCountFec                 =  0x00B9C100,
-	HWPfPermonAAccExecTimerLoFec          =  0x00B9C104,
-	HWPfPermonAAccExecTimerHiFec          =  0x00B9C108,
-	HWPfPermonAExecTimerMinFec            =  0x00B9C200,
-	HWPfPermonAExecTimerMaxFec            =  0x00B9C204,
-	HWPfPermonAControlBusMon              =  0x00B9C400,
-	HWPfPermonAConfigBusMon               =  0x00B9C404,
-	HWPfPermonASkipCountBusMon            =  0x00B9C408,
-	HWPfPermonAMinLatBusMon               =  0x00B9C40C,
-	HWPfPermonAMaxLatBusMon               =  0x00B9C500,
-	HWPfPermonATotalLatLowBusMon          =  0x00B9C504,
-	HWPfPermonATotalLatUpperBusMon        =  0x00B9C508,
-	HWPfPermonATotalReqCntBusMon          =  0x00B9C50C,
-	HWPfQosmonBCntrlReg                   =  0x00BA0000,
 	HWPfQosmonBEvalOverflow0              =  0x00BA0008,
-	HWPfQosmonBEvalOverflow1              =  0x00BA000C,
-	HWPfQosmonBDivTerm                    =  0x00BA0010,
-	HWPfQosmonBTickTerm                   =  0x00BA0014,
-	HWPfQosmonBEvalTerm                   =  0x00BA0018,
-	HWPfQosmonBAveTerm                    =  0x00BA001C,
-	HWPfQosmonBForceEccErr                =  0x00BA0020,
-	HWPfQosmonBEccErrDetect               =  0x00BA0024,
-	HWPfQosmonBIterationConfig0Low        =  0x00BA0060,
-	HWPfQosmonBIterationConfig0High       =  0x00BA0064,
-	HWPfQosmonBIterationConfig1Low        =  0x00BA0068,
-	HWPfQosmonBIterationConfig1High       =  0x00BA006C,
-	HWPfQosmonBIterationConfig2Low        =  0x00BA0070,
-	HWPfQosmonBIterationConfig2High       =  0x00BA0074,
-	HWPfQosmonBIterationConfig3Low        =  0x00BA0078,
-	HWPfQosmonBIterationConfig3High       =  0x00BA007C,
-	HWPfQosmonBEvalMemAddr                =  0x00BA0080,
-	HWPfQosmonBEvalMemData                =  0x00BA0084,
-	HWPfQosmonBXaction                    =  0x00BA00C0,
-	HWPfQosmonBRemThres1Vf                =  0x00BA0400,
-	HWPfQosmonBThres2Vf                   =  0x00BA0404,
-	HWPfQosmonBWeiFracVf                  =  0x00BA0408,
-	HWPfQosmonBRrWeiVf                    =  0x00BA040C,
 	HWPfPermonBCntrlRegVf                 =  0x00BA8000,
-	HWPfPermonBCountVf                    =  0x00BA8008,
-	HWPfPermonBKCntLoVf                   =  0x00BA8010,
-	HWPfPermonBKCntHiVf                   =  0x00BA8014,
-	HWPfPermonBDeltaCntLoVf               =  0x00BA8020,
-	HWPfPermonBDeltaCntHiVf               =  0x00BA8024,
-	HWPfPermonBVersionReg                 =  0x00BAC000,
-	HWPfPermonBCbControlFec               =  0x00BAC0F0,
-	HWPfPermonBDltTimerLoFec              =  0x00BAC0F4,
-	HWPfPermonBDltTimerHiFec              =  0x00BAC0F8,
-	HWPfPermonBCbCountFec                 =  0x00BAC100,
-	HWPfPermonBAccExecTimerLoFec          =  0x00BAC104,
-	HWPfPermonBAccExecTimerHiFec          =  0x00BAC108,
-	HWPfPermonBExecTimerMinFec            =  0x00BAC200,
-	HWPfPermonBExecTimerMaxFec            =  0x00BAC204,
-	HWPfPermonBControlBusMon              =  0x00BAC400,
-	HWPfPermonBConfigBusMon               =  0x00BAC404,
-	HWPfPermonBSkipCountBusMon            =  0x00BAC408,
-	HWPfPermonBMinLatBusMon               =  0x00BAC40C,
-	HWPfPermonBMaxLatBusMon               =  0x00BAC500,
-	HWPfPermonBTotalLatLowBusMon          =  0x00BAC504,
-	HWPfPermonBTotalLatUpperBusMon        =  0x00BAC508,
-	HWPfPermonBTotalReqCntBusMon          =  0x00BAC50C,
-	HwPfFabI2MArbCntrlReg                 =  0x00BB0000,
 	HWPfFabricMode                        =  0x00BB1000,
-	HwPfFabI2MGrp0DebugReg                =  0x00BBF000,
-	HwPfFabI2MGrp1DebugReg                =  0x00BBF004,
-	HwPfFabI2MGrp2DebugReg                =  0x00BBF008,
-	HwPfFabI2MGrp3DebugReg                =  0x00BBF00C,
-	HwPfFabI2MBuf0DebugReg                =  0x00BBF010,
-	HwPfFabI2MBuf1DebugReg                =  0x00BBF014,
-	HwPfFabI2MBuf2DebugReg                =  0x00BBF018,
-	HwPfFabI2MBuf3DebugReg                =  0x00BBF01C,
-	HwPfFabM2IBuf0Grp0DebugReg            =  0x00BBF020,
-	HwPfFabM2IBuf1Grp0DebugReg            =  0x00BBF024,
-	HwPfFabM2IBuf0Grp1DebugReg            =  0x00BBF028,
-	HwPfFabM2IBuf1Grp1DebugReg            =  0x00BBF02C,
-	HwPfFabM2IBuf0Grp2DebugReg            =  0x00BBF030,
-	HwPfFabM2IBuf1Grp2DebugReg            =  0x00BBF034,
-	HwPfFabM2IBuf0Grp3DebugReg            =  0x00BBF038,
-	HwPfFabM2IBuf1Grp3DebugReg            =  0x00BBF03C,
 	HWPfFecUl5gCntrlReg                   =  0x00BC0000,
-	HWPfFecUl5gI2MThreshReg               =  0x00BC0004,
-	HWPfFecUl5gVersionReg                 =  0x00BC0100,
-	HWPfFecUl5gFcwStatusReg               =  0x00BC0104,
-	HWPfFecUl5gWarnReg                    =  0x00BC0108,
 	HwPfFecUl5gIbDebugReg                 =  0x00BC0200,
-	HwPfFecUl5gObLlrDebugReg              =  0x00BC0204,
-	HwPfFecUl5gObHarqDebugReg             =  0x00BC0208,
-	HwPfFecUl5g1CntrlReg                  =  0x00BC1000,
-	HwPfFecUl5g1I2MThreshReg              =  0x00BC1004,
-	HwPfFecUl5g1VersionReg                =  0x00BC1100,
-	HwPfFecUl5g1FcwStatusReg              =  0x00BC1104,
-	HwPfFecUl5g1WarnReg                   =  0x00BC1108,
-	HwPfFecUl5g1IbDebugReg                =  0x00BC1200,
-	HwPfFecUl5g1ObLlrDebugReg             =  0x00BC1204,
-	HwPfFecUl5g1ObHarqDebugReg            =  0x00BC1208,
-	HwPfFecUl5g2CntrlReg                  =  0x00BC2000,
-	HwPfFecUl5g2I2MThreshReg              =  0x00BC2004,
-	HwPfFecUl5g2VersionReg                =  0x00BC2100,
-	HwPfFecUl5g2FcwStatusReg              =  0x00BC2104,
-	HwPfFecUl5g2WarnReg                   =  0x00BC2108,
-	HwPfFecUl5g2IbDebugReg                =  0x00BC2200,
-	HwPfFecUl5g2ObLlrDebugReg             =  0x00BC2204,
-	HwPfFecUl5g2ObHarqDebugReg            =  0x00BC2208,
-	HwPfFecUl5g3CntrlReg                  =  0x00BC3000,
-	HwPfFecUl5g3I2MThreshReg              =  0x00BC3004,
-	HwPfFecUl5g3VersionReg                =  0x00BC3100,
-	HwPfFecUl5g3FcwStatusReg              =  0x00BC3104,
-	HwPfFecUl5g3WarnReg                   =  0x00BC3108,
-	HwPfFecUl5g3IbDebugReg                =  0x00BC3200,
-	HwPfFecUl5g3ObLlrDebugReg             =  0x00BC3204,
-	HwPfFecUl5g3ObHarqDebugReg            =  0x00BC3208,
-	HwPfFecUl5g4CntrlReg                  =  0x00BC4000,
-	HwPfFecUl5g4I2MThreshReg              =  0x00BC4004,
-	HwPfFecUl5g4VersionReg                =  0x00BC4100,
-	HwPfFecUl5g4FcwStatusReg              =  0x00BC4104,
-	HwPfFecUl5g4WarnReg                   =  0x00BC4108,
-	HwPfFecUl5g4IbDebugReg                =  0x00BC4200,
-	HwPfFecUl5g4ObLlrDebugReg             =  0x00BC4204,
-	HwPfFecUl5g4ObHarqDebugReg            =  0x00BC4208,
-	HwPfFecUl5g5CntrlReg                  =  0x00BC5000,
-	HwPfFecUl5g5I2MThreshReg              =  0x00BC5004,
-	HwPfFecUl5g5VersionReg                =  0x00BC5100,
-	HwPfFecUl5g5FcwStatusReg              =  0x00BC5104,
-	HwPfFecUl5g5WarnReg                   =  0x00BC5108,
-	HwPfFecUl5g5IbDebugReg                =  0x00BC5200,
-	HwPfFecUl5g5ObLlrDebugReg             =  0x00BC5204,
-	HwPfFecUl5g5ObHarqDebugReg            =  0x00BC5208,
-	HwPfFecUl5g6CntrlReg                  =  0x00BC6000,
-	HwPfFecUl5g6I2MThreshReg              =  0x00BC6004,
-	HwPfFecUl5g6VersionReg                =  0x00BC6100,
-	HwPfFecUl5g6FcwStatusReg              =  0x00BC6104,
-	HwPfFecUl5g6WarnReg                   =  0x00BC6108,
-	HwPfFecUl5g6IbDebugReg                =  0x00BC6200,
-	HwPfFecUl5g6ObLlrDebugReg             =  0x00BC6204,
-	HwPfFecUl5g6ObHarqDebugReg            =  0x00BC6208,
-	HwPfFecUl5g7CntrlReg                  =  0x00BC7000,
-	HwPfFecUl5g7I2MThreshReg              =  0x00BC7004,
-	HwPfFecUl5g7VersionReg                =  0x00BC7100,
-	HwPfFecUl5g7FcwStatusReg              =  0x00BC7104,
-	HwPfFecUl5g7WarnReg                   =  0x00BC7108,
-	HwPfFecUl5g7IbDebugReg                =  0x00BC7200,
-	HwPfFecUl5g7ObLlrDebugReg             =  0x00BC7204,
-	HwPfFecUl5g7ObHarqDebugReg            =  0x00BC7208,
-	HwPfFecUl5g8CntrlReg                  =  0x00BC8000,
-	HwPfFecUl5g8I2MThreshReg              =  0x00BC8004,
-	HwPfFecUl5g8VersionReg                =  0x00BC8100,
-	HwPfFecUl5g8FcwStatusReg              =  0x00BC8104,
-	HwPfFecUl5g8WarnReg                   =  0x00BC8108,
-	HwPfFecUl5g8IbDebugReg                =  0x00BC8200,
-	HwPfFecUl5g8ObLlrDebugReg             =  0x00BC8204,
-	HwPfFecUl5g8ObHarqDebugReg            =  0x00BC8208,
-	HWPfFecDl5gCntrlReg                   =  0x00BCF000,
-	HWPfFecDl5gI2MThreshReg               =  0x00BCF004,
-	HWPfFecDl5gVersionReg                 =  0x00BCF100,
-	HWPfFecDl5gFcwStatusReg               =  0x00BCF104,
-	HWPfFecDl5gWarnReg                    =  0x00BCF108,
-	HWPfFecUlVersionReg                   =  0x00BD0000,
-	HWPfFecUlControlReg                   =  0x00BD0004,
-	HWPfFecUlStatusReg                    =  0x00BD0008,
-	HWPfFecDlVersionReg                   =  0x00BDF000,
-	HWPfFecDlClusterConfigReg             =  0x00BDF004,
-	HWPfFecDlBurstThres                   =  0x00BDF00C,
-	HWPfFecDlClusterStatusReg0            =  0x00BDF040,
-	HWPfFecDlClusterStatusReg1            =  0x00BDF044,
-	HWPfFecDlClusterStatusReg2            =  0x00BDF048,
-	HWPfFecDlClusterStatusReg3            =  0x00BDF04C,
-	HWPfFecDlClusterStatusReg4            =  0x00BDF050,
-	HWPfFecDlClusterStatusReg5            =  0x00BDF054,
-	HWPfChaFabPllPllrst                   =  0x00C40000,
-	HWPfChaFabPllClk0                     =  0x00C40004,
-	HWPfChaFabPllClk1                     =  0x00C40008,
-	HWPfChaFabPllBwadj                    =  0x00C4000C,
-	HWPfChaFabPllLbw                      =  0x00C40010,
-	HWPfChaFabPllResetq                   =  0x00C40014,
-	HWPfChaFabPllPhshft0                  =  0x00C40018,
-	HWPfChaFabPllPhshft1                  =  0x00C4001C,
-	HWPfChaFabPllDivq0                    =  0x00C40020,
-	HWPfChaFabPllDivq1                    =  0x00C40024,
-	HWPfChaFabPllDivq2                    =  0x00C40028,
-	HWPfChaFabPllDivq3                    =  0x00C4002C,
-	HWPfChaFabPllDivq4                    =  0x00C40030,
-	HWPfChaFabPllDivq5                    =  0x00C40034,
-	HWPfChaFabPllDivq6                    =  0x00C40038,
-	HWPfChaFabPllDivq7                    =  0x00C4003C,
-	HWPfChaDl5gPllPllrst                  =  0x00C40080,
-	HWPfChaDl5gPllClk0                    =  0x00C40084,
-	HWPfChaDl5gPllClk1                    =  0x00C40088,
-	HWPfChaDl5gPllBwadj                   =  0x00C4008C,
-	HWPfChaDl5gPllLbw                     =  0x00C40090,
-	HWPfChaDl5gPllResetq                  =  0x00C40094,
 	HWPfChaDl5gPllPhshft0                 =  0x00C40098,
-	HWPfChaDl5gPllPhshft1                 =  0x00C4009C,
-	HWPfChaDl5gPllDivq0                   =  0x00C400A0,
-	HWPfChaDl5gPllDivq1                   =  0x00C400A4,
-	HWPfChaDl5gPllDivq2                   =  0x00C400A8,
-	HWPfChaDl5gPllDivq3                   =  0x00C400AC,
-	HWPfChaDl5gPllDivq4                   =  0x00C400B0,
-	HWPfChaDl5gPllDivq5                   =  0x00C400B4,
-	HWPfChaDl5gPllDivq6                   =  0x00C400B8,
-	HWPfChaDl5gPllDivq7                   =  0x00C400BC,
-	HWPfChaDl4gPllPllrst                  =  0x00C40100,
-	HWPfChaDl4gPllClk0                    =  0x00C40104,
-	HWPfChaDl4gPllClk1                    =  0x00C40108,
-	HWPfChaDl4gPllBwadj                   =  0x00C4010C,
-	HWPfChaDl4gPllLbw                     =  0x00C40110,
-	HWPfChaDl4gPllResetq                  =  0x00C40114,
-	HWPfChaDl4gPllPhshft0                 =  0x00C40118,
-	HWPfChaDl4gPllPhshft1                 =  0x00C4011C,
-	HWPfChaDl4gPllDivq0                   =  0x00C40120,
-	HWPfChaDl4gPllDivq1                   =  0x00C40124,
-	HWPfChaDl4gPllDivq2                   =  0x00C40128,
-	HWPfChaDl4gPllDivq3                   =  0x00C4012C,
-	HWPfChaDl4gPllDivq4                   =  0x00C40130,
-	HWPfChaDl4gPllDivq5                   =  0x00C40134,
-	HWPfChaDl4gPllDivq6                   =  0x00C40138,
-	HWPfChaDl4gPllDivq7                   =  0x00C4013C,
-	HWPfChaUl5gPllPllrst                  =  0x00C40180,
-	HWPfChaUl5gPllClk0                    =  0x00C40184,
-	HWPfChaUl5gPllClk1                    =  0x00C40188,
-	HWPfChaUl5gPllBwadj                   =  0x00C4018C,
-	HWPfChaUl5gPllLbw                     =  0x00C40190,
-	HWPfChaUl5gPllResetq                  =  0x00C40194,
-	HWPfChaUl5gPllPhshft0                 =  0x00C40198,
-	HWPfChaUl5gPllPhshft1                 =  0x00C4019C,
-	HWPfChaUl5gPllDivq0                   =  0x00C401A0,
-	HWPfChaUl5gPllDivq1                   =  0x00C401A4,
-	HWPfChaUl5gPllDivq2                   =  0x00C401A8,
-	HWPfChaUl5gPllDivq3                   =  0x00C401AC,
-	HWPfChaUl5gPllDivq4                   =  0x00C401B0,
-	HWPfChaUl5gPllDivq5                   =  0x00C401B4,
-	HWPfChaUl5gPllDivq6                   =  0x00C401B8,
-	HWPfChaUl5gPllDivq7                   =  0x00C401BC,
-	HWPfChaUl4gPllPllrst                  =  0x00C40200,
-	HWPfChaUl4gPllClk0                    =  0x00C40204,
-	HWPfChaUl4gPllClk1                    =  0x00C40208,
-	HWPfChaUl4gPllBwadj                   =  0x00C4020C,
-	HWPfChaUl4gPllLbw                     =  0x00C40210,
-	HWPfChaUl4gPllResetq                  =  0x00C40214,
-	HWPfChaUl4gPllPhshft0                 =  0x00C40218,
-	HWPfChaUl4gPllPhshft1                 =  0x00C4021C,
-	HWPfChaUl4gPllDivq0                   =  0x00C40220,
-	HWPfChaUl4gPllDivq1                   =  0x00C40224,
-	HWPfChaUl4gPllDivq2                   =  0x00C40228,
-	HWPfChaUl4gPllDivq3                   =  0x00C4022C,
-	HWPfChaUl4gPllDivq4                   =  0x00C40230,
-	HWPfChaUl4gPllDivq5                   =  0x00C40234,
-	HWPfChaUl4gPllDivq6                   =  0x00C40238,
-	HWPfChaUl4gPllDivq7                   =  0x00C4023C,
-	HWPfChaDdrPllPllrst                   =  0x00C40280,
-	HWPfChaDdrPllClk0                     =  0x00C40284,
-	HWPfChaDdrPllClk1                     =  0x00C40288,
-	HWPfChaDdrPllBwadj                    =  0x00C4028C,
-	HWPfChaDdrPllLbw                      =  0x00C40290,
-	HWPfChaDdrPllResetq                   =  0x00C40294,
-	HWPfChaDdrPllPhshft0                  =  0x00C40298,
-	HWPfChaDdrPllPhshft1                  =  0x00C4029C,
-	HWPfChaDdrPllDivq0                    =  0x00C402A0,
-	HWPfChaDdrPllDivq1                    =  0x00C402A4,
-	HWPfChaDdrPllDivq2                    =  0x00C402A8,
-	HWPfChaDdrPllDivq3                    =  0x00C402AC,
-	HWPfChaDdrPllDivq4                    =  0x00C402B0,
-	HWPfChaDdrPllDivq5                    =  0x00C402B4,
-	HWPfChaDdrPllDivq6                    =  0x00C402B8,
-	HWPfChaDdrPllDivq7                    =  0x00C402BC,
-	HWPfChaErrStatus                      =  0x00C40400,
-	HWPfChaErrMask                        =  0x00C40404,
-	HWPfChaDebugPcieMsiFifo               =  0x00C40410,
-	HWPfChaDebugDdrMsiFifo                =  0x00C40414,
-	HWPfChaDebugMiscMsiFifo               =  0x00C40418,
-	HWPfChaPwmSet                         =  0x00C40420,
-	HWPfChaDdrRstStatus                   =  0x00C40430,
 	HWPfChaDdrStDoneStatus                =  0x00C40434,
 	HWPfChaDdrWbRstCfg                    =  0x00C40438,
 	HWPfChaDdrApbRstCfg                   =  0x00C4043C,
 	HWPfChaDdrPhyRstCfg                   =  0x00C40440,
 	HWPfChaDdrCpuRstCfg                   =  0x00C40444,
 	HWPfChaDdrSifRstCfg                   =  0x00C40448,
-	HWPfChaPadcfgPcomp0                   =  0x00C41000,
-	HWPfChaPadcfgNcomp0                   =  0x00C41004,
-	HWPfChaPadcfgOdt0                     =  0x00C41008,
-	HWPfChaPadcfgProtect0                 =  0x00C4100C,
-	HWPfChaPreemphasisProtect0            =  0x00C41010,
-	HWPfChaPreemphasisCompen0             =  0x00C41040,
-	HWPfChaPreemphasisOdten0              =  0x00C41044,
-	HWPfChaPadcfgPcomp1                   =  0x00C41100,
-	HWPfChaPadcfgNcomp1                   =  0x00C41104,
-	HWPfChaPadcfgOdt1                     =  0x00C41108,
-	HWPfChaPadcfgProtect1                 =  0x00C4110C,
-	HWPfChaPreemphasisProtect1            =  0x00C41110,
-	HWPfChaPreemphasisCompen1             =  0x00C41140,
-	HWPfChaPreemphasisOdten1              =  0x00C41144,
-	HWPfChaPadcfgPcomp2                   =  0x00C41200,
-	HWPfChaPadcfgNcomp2                   =  0x00C41204,
-	HWPfChaPadcfgOdt2                     =  0x00C41208,
-	HWPfChaPadcfgProtect2                 =  0x00C4120C,
-	HWPfChaPreemphasisProtect2            =  0x00C41210,
-	HWPfChaPreemphasisCompen2             =  0x00C41240,
-	HWPfChaPreemphasisOdten4              =  0x00C41444,
-	HWPfChaPreemphasisOdten2              =  0x00C41244,
-	HWPfChaPadcfgPcomp3                   =  0x00C41300,
-	HWPfChaPadcfgNcomp3                   =  0x00C41304,
-	HWPfChaPadcfgOdt3                     =  0x00C41308,
-	HWPfChaPadcfgProtect3                 =  0x00C4130C,
-	HWPfChaPreemphasisProtect3            =  0x00C41310,
-	HWPfChaPreemphasisCompen3             =  0x00C41340,
-	HWPfChaPreemphasisOdten3              =  0x00C41344,
-	HWPfChaPadcfgPcomp4                   =  0x00C41400,
-	HWPfChaPadcfgNcomp4                   =  0x00C41404,
-	HWPfChaPadcfgOdt4                     =  0x00C41408,
-	HWPfChaPadcfgProtect4                 =  0x00C4140C,
-	HWPfChaPreemphasisProtect4            =  0x00C41410,
-	HWPfChaPreemphasisCompen4             =  0x00C41440,
-	HWPfHiVfToPfDbellVf                   =  0x00C80000,
-	HWPfHiPfToVfDbellVf                   =  0x00C80008,
-	HWPfHiInfoRingBaseLoVf                =  0x00C80010,
-	HWPfHiInfoRingBaseHiVf                =  0x00C80014,
-	HWPfHiInfoRingPointerVf               =  0x00C80018,
-	HWPfHiInfoRingIntWrEnVf               =  0x00C80020,
-	HWPfHiInfoRingPf2VfWrEnVf             =  0x00C80024,
-	HWPfHiMsixVectorMapperVf              =  0x00C80060,
-	HWPfHiModuleVersionReg                =  0x00C84000,
-	HWPfHiIosf2axiErrLogReg               =  0x00C84004,
-	HWPfHiHardResetReg                    =  0x00C84008,
 	HWPfHi5GHardResetReg                  =  0x00C8400C,
 	HWPfHiInfoRingBaseLoRegPf             =  0x00C84010,
 	HWPfHiInfoRingBaseHiRegPf             =  0x00C84014,
 	HWPfHiInfoRingPointerRegPf            =  0x00C84018,
 	HWPfHiInfoRingIntWrEnRegPf            =  0x00C84020,
 	HWPfHiInfoRingVf2pfLoWrEnReg          =  0x00C84024,
-	HWPfHiInfoRingVf2pfHiWrEnReg          =  0x00C84028,
-	HWPfHiLogParityErrStatusReg           =  0x00C8402C,
-	HWPfHiLogDataParityErrorVfStatusLo    =  0x00C84030,
-	HWPfHiLogDataParityErrorVfStatusHi    =  0x00C84034,
 	HWPfHiBlockTransmitOnErrorEn          =  0x00C84038,
 	HWPfHiCfgMsiIntWrEnRegPf              =  0x00C84040,
 	HWPfHiCfgMsiVf2pfLoWrEnReg            =  0x00C84044,
-	HWPfHiCfgMsiVf2pfHighWrEnReg          =  0x00C84048,
-	HWPfHiMsixVectorMapperPf              =  0x00C84060,
-	HWPfHiApbWrWaitTime                   =  0x00C84100,
-	HWPfHiXCounterMaxValue                =  0x00C84104,
 	HWPfHiPfMode                          =  0x00C84108,
 	HWPfHiClkGateHystReg                  =  0x00C8410C,
-	HWPfHiSnoopBitsReg                    =  0x00C84110,
 	HWPfHiMsiDropEnableReg                =  0x00C84114,
-	HWPfHiMsiStatReg                      =  0x00C84120,
-	HWPfHiFifoOflStatReg                  =  0x00C84124,
-	HWPfHiHiDebugReg                      =  0x00C841F4,
-	HWPfHiDebugMemSnoopMsiFifo            =  0x00C841F8,
-	HWPfHiDebugMemSnoopInputFifo          =  0x00C841FC,
-	HWPfHiMsixMappingConfig               =  0x00C84200,
-	HWPfHiJunkReg                         =  0x00C8FF00,
-	HWPfDdrUmmcVer                        =  0x00D00000,
-	HWPfDdrUmmcCap                        =  0x00D00010,
 	HWPfDdrUmmcCtrl                       =  0x00D00020,
-	HWPfDdrMpcPe                          =  0x00D00080,
-	HWPfDdrMpcPpri3                       =  0x00D00090,
-	HWPfDdrMpcPpri2                       =  0x00D000A0,
-	HWPfDdrMpcPpri1                       =  0x00D000B0,
-	HWPfDdrMpcPpri0                       =  0x00D000C0,
-	HWPfDdrMpcPrwgrpCtrl                  =  0x00D000D0,
-	HWPfDdrMpcPbw7                        =  0x00D000E0,
-	HWPfDdrMpcPbw6                        =  0x00D000F0,
-	HWPfDdrMpcPbw5                        =  0x00D00100,
-	HWPfDdrMpcPbw4                        =  0x00D00110,
-	HWPfDdrMpcPbw3                        =  0x00D00120,
-	HWPfDdrMpcPbw2                        =  0x00D00130,
-	HWPfDdrMpcPbw1                        =  0x00D00140,
-	HWPfDdrMpcPbw0                        =  0x00D00150,
-	HWPfDdrMemoryInit                     =  0x00D00200,
-	HWPfDdrMemoryInitDone                 =  0x00D00210,
 	HWPfDdrMemInitPhyTrng0                =  0x00D00240,
-	HWPfDdrMemInitPhyTrng1                =  0x00D00250,
-	HWPfDdrMemInitPhyTrng2                =  0x00D00260,
-	HWPfDdrMemInitPhyTrng3                =  0x00D00270,
 	HWPfDdrBcDram                         =  0x00D003C0,
 	HWPfDdrBcAddrMap                      =  0x00D003D0,
 	HWPfDdrBcRef                          =  0x00D003E0,
@@ -565,502 +97,31 @@ enum {
 	HWPfDdrBcTim8                         =  0x00D00480,
 	HWPfDdrBcTim9                         =  0x00D00490,
 	HWPfDdrBcTim10                        =  0x00D004A0,
-	HWPfDdrBcTim12                        =  0x00D004C0,
 	HWPfDdrDfiInit                        =  0x00D004D0,
-	HWPfDdrDfiInitComplete                =  0x00D004E0,
 	HWPfDdrDfiTim0                        =  0x00D004F0,
 	HWPfDdrDfiTim1                        =  0x00D00500,
 	HWPfDdrDfiPhyUpdEn                    =  0x00D00530,
-	HWPfDdrMemStatus                      =  0x00D00540,
-	HWPfDdrUmmcErrStatus                  =  0x00D00550,
-	HWPfDdrUmmcIntStatus                  =  0x00D00560,
 	HWPfDdrUmmcIntEn                      =  0x00D00570,
 	HWPfDdrPhyRdLatency                   =  0x00D48400,
 	HWPfDdrPhyRdLatencyDbi                =  0x00D48410,
 	HWPfDdrPhyWrLatency                   =  0x00D48420,
 	HWPfDdrPhyTrngType                    =  0x00D48430,
-	HWPfDdrPhyMrsTiming2                  =  0x00D48440,
-	HWPfDdrPhyMrsTiming0                  =  0x00D48450,
-	HWPfDdrPhyMrsTiming1                  =  0x00D48460,
-	HWPfDdrPhyDramTmrd                    =  0x00D48470,
-	HWPfDdrPhyDramTmod                    =  0x00D48480,
-	HWPfDdrPhyDramTwpre                   =  0x00D48490,
-	HWPfDdrPhyDramTrfc                    =  0x00D484A0,
-	HWPfDdrPhyDramTrwtp                   =  0x00D484B0,
 	HWPfDdrPhyMr01Dimm                    =  0x00D484C0,
 	HWPfDdrPhyMr01DimmDbi                 =  0x00D484D0,
 	HWPfDdrPhyMr23Dimm                    =  0x00D484E0,
 	HWPfDdrPhyMr45Dimm                    =  0x00D484F0,
 	HWPfDdrPhyMr67Dimm                    =  0x00D48500,
 	HWPfDdrPhyWrlvlWwRdlvlRr              =  0x00D48510,
-	HWPfDdrPhyOdtEn                       =  0x00D48520,
-	HWPfDdrPhyFastTrng                    =  0x00D48530,
-	HWPfDdrPhyDynTrngGap                  =  0x00D48540,
-	HWPfDdrPhyDynRcalGap                  =  0x00D48550,
 	HWPfDdrPhyIdletimeout                 =  0x00D48560,
-	HWPfDdrPhyRstCkeGap                   =  0x00D48570,
-	HWPfDdrPhyCkeMrsGap                   =  0x00D48580,
-	HWPfDdrPhyMemVrefMidVal               =  0x00D48590,
-	HWPfDdrPhyVrefStep                    =  0x00D485A0,
-	HWPfDdrPhyVrefThreshold               =  0x00D485B0,
-	HWPfDdrPhyPhyVrefMidVal               =  0x00D485C0,
 	HWPfDdrPhyDqsCountMax                 =  0x00D485D0,
 	HWPfDdrPhyDqsCountNum                 =  0x00D485E0,
-	HWPfDdrPhyDramRow                     =  0x00D485F0,
-	HWPfDdrPhyDramCol                     =  0x00D48600,
-	HWPfDdrPhyDramBgBa                    =  0x00D48610,
-	HWPfDdrPhyDynamicUpdreqrel            =  0x00D48620,
-	HWPfDdrPhyVrefLimits                  =  0x00D48630,
-	HWPfDdrPhyIdtmTcStatus                =  0x00D6C020,
 	HWPfDdrPhyIdtmFwVersion               =  0x00D6C410,
-	HWPfDdrPhyRdlvlGateInitDelay          =  0x00D70000,
-	HWPfDdrPhyRdenSmplabc                 =  0x00D70008,
-	HWPfDdrPhyVrefNibble0                 =  0x00D7000C,
-	HWPfDdrPhyVrefNibble1                 =  0x00D70010,
-	HWPfDdrPhyRdlvlGateDqsSmpl0           =  0x00D70014,
-	HWPfDdrPhyRdlvlGateDqsSmpl1           =  0x00D70018,
-	HWPfDdrPhyRdlvlGateDqsSmpl2           =  0x00D7001C,
 	HWPfDdrPhyDqsCount                    =  0x00D70020,
-	HWPfDdrPhyWrlvlRdlvlGateStatus        =  0x00D70024,
-	HWPfDdrPhyErrorFlags                  =  0x00D70028,
-	HWPfDdrPhyPowerDown                   =  0x00D70030,
-	HWPfDdrPhyPrbsSeedByte0               =  0x00D70034,
-	HWPfDdrPhyPrbsSeedByte1               =  0x00D70038,
-	HWPfDdrPhyPcompDq                     =  0x00D70040,
-	HWPfDdrPhyNcompDq                     =  0x00D70044,
-	HWPfDdrPhyPcompDqs                    =  0x00D70048,
-	HWPfDdrPhyNcompDqs                    =  0x00D7004C,
-	HWPfDdrPhyPcompCmd                    =  0x00D70050,
-	HWPfDdrPhyNcompCmd                    =  0x00D70054,
-	HWPfDdrPhyPcompCk                     =  0x00D70058,
-	HWPfDdrPhyNcompCk                     =  0x00D7005C,
-	HWPfDdrPhyRcalOdtDq                   =  0x00D70060,
-	HWPfDdrPhyRcalOdtDqs                  =  0x00D70064,
-	HWPfDdrPhyRcalMask1                   =  0x00D70068,
-	HWPfDdrPhyRcalMask2                   =  0x00D7006C,
-	HWPfDdrPhyRcalCtrl                    =  0x00D70070,
-	HWPfDdrPhyRcalCnt                     =  0x00D70074,
-	HWPfDdrPhyRcalOverride                =  0x00D70078,
-	HWPfDdrPhyRcalGateen                  =  0x00D7007C,
-	HWPfDdrPhyCtrl                        =  0x00D70080,
-	HWPfDdrPhyWrlvlAlg                    =  0x00D70084,
-	HWPfDdrPhyRcalVreftTxcmdOdt           =  0x00D70088,
-	HWPfDdrPhyRdlvlGateParam              =  0x00D7008C,
-	HWPfDdrPhyRdlvlGateParam2             =  0x00D70090,
-	HWPfDdrPhyRcalVreftTxdata             =  0x00D70094,
-	HWPfDdrPhyCmdIntDelay                 =  0x00D700A4,
-	HWPfDdrPhyAlertN                      =  0x00D700A8,
-	HWPfDdrPhyTrngReqWpre2tck             =  0x00D700AC,
-	HWPfDdrPhyCmdPhaseSel                 =  0x00D700B4,
-	HWPfDdrPhyCmdDcdl                     =  0x00D700B8,
-	HWPfDdrPhyCkDcdl                      =  0x00D700BC,
-	HWPfDdrPhySwTrngCtrl1                 =  0x00D700C0,
-	HWPfDdrPhySwTrngCtrl2                 =  0x00D700C4,
-	HWPfDdrPhyRcalPcompRden               =  0x00D700C8,
-	HWPfDdrPhyRcalNcompRden               =  0x00D700CC,
-	HWPfDdrPhyRcalCompen                  =  0x00D700D0,
-	HWPfDdrPhySwTrngRdqs                  =  0x00D700D4,
-	HWPfDdrPhySwTrngWdqs                  =  0x00D700D8,
-	HWPfDdrPhySwTrngRdena                 =  0x00D700DC,
-	HWPfDdrPhySwTrngRdenb                 =  0x00D700E0,
-	HWPfDdrPhySwTrngRdenc                 =  0x00D700E4,
-	HWPfDdrPhySwTrngWdq                   =  0x00D700E8,
-	HWPfDdrPhySwTrngRdq                   =  0x00D700EC,
-	HWPfDdrPhyPcfgHmValue                 =  0x00D700F0,
-	HWPfDdrPhyPcfgTimerValue              =  0x00D700F4,
-	HWPfDdrPhyPcfgSoftwareTraining        =  0x00D700F8,
-	HWPfDdrPhyPcfgMcStatus                =  0x00D700FC,
-	HWPfDdrPhyWrlvlPhRank0                =  0x00D70100,
-	HWPfDdrPhyRdenPhRank0                 =  0x00D70104,
-	HWPfDdrPhyRdenIntRank0                =  0x00D70108,
-	HWPfDdrPhyRdqsDcdlRank0               =  0x00D7010C,
-	HWPfDdrPhyRdqsShadowDcdlRank0         =  0x00D70110,
-	HWPfDdrPhyWdqsDcdlRank0               =  0x00D70114,
-	HWPfDdrPhyWdmDcdlShadowRank0          =  0x00D70118,
-	HWPfDdrPhyWdmDcdlRank0                =  0x00D7011C,
-	HWPfDdrPhyDbiDcdlRank0                =  0x00D70120,
-	HWPfDdrPhyRdenDcdlaRank0              =  0x00D70124,
-	HWPfDdrPhyDbiDcdlShadowRank0          =  0x00D70128,
-	HWPfDdrPhyRdenDcdlbRank0              =  0x00D7012C,
-	HWPfDdrPhyWdqsShadowDcdlRank0         =  0x00D70130,
-	HWPfDdrPhyRdenDcdlcRank0              =  0x00D70134,
-	HWPfDdrPhyRdenShadowDcdlaRank0        =  0x00D70138,
-	HWPfDdrPhyWrlvlIntRank0               =  0x00D7013C,
-	HWPfDdrPhyRdqDcdlBit0Rank0            =  0x00D70200,
-	HWPfDdrPhyRdqDcdlShadowBit0Rank0      =  0x00D70204,
-	HWPfDdrPhyWdqDcdlBit0Rank0            =  0x00D70208,
-	HWPfDdrPhyWdqDcdlShadowBit0Rank0      =  0x00D7020C,
-	HWPfDdrPhyRdqDcdlBit1Rank0            =  0x00D70240,
-	HWPfDdrPhyRdqDcdlShadowBit1Rank0      =  0x00D70244,
-	HWPfDdrPhyWdqDcdlBit1Rank0            =  0x00D70248,
-	HWPfDdrPhyWdqDcdlShadowBit1Rank0      =  0x00D7024C,
-	HWPfDdrPhyRdqDcdlBit2Rank0            =  0x00D70280,
-	HWPfDdrPhyRdqDcdlShadowBit2Rank0      =  0x00D70284,
-	HWPfDdrPhyWdqDcdlBit2Rank0            =  0x00D70288,
-	HWPfDdrPhyWdqDcdlShadowBit2Rank0      =  0x00D7028C,
-	HWPfDdrPhyRdqDcdlBit3Rank0            =  0x00D702C0,
-	HWPfDdrPhyRdqDcdlShadowBit3Rank0      =  0x00D702C4,
-	HWPfDdrPhyWdqDcdlBit3Rank0            =  0x00D702C8,
-	HWPfDdrPhyWdqDcdlShadowBit3Rank0      =  0x00D702CC,
-	HWPfDdrPhyRdqDcdlBit4Rank0            =  0x00D70300,
-	HWPfDdrPhyRdqDcdlShadowBit4Rank0      =  0x00D70304,
-	HWPfDdrPhyWdqDcdlBit4Rank0            =  0x00D70308,
-	HWPfDdrPhyWdqDcdlShadowBit4Rank0      =  0x00D7030C,
-	HWPfDdrPhyRdqDcdlBit5Rank0            =  0x00D70340,
-	HWPfDdrPhyRdqDcdlShadowBit5Rank0      =  0x00D70344,
-	HWPfDdrPhyWdqDcdlBit5Rank0            =  0x00D70348,
-	HWPfDdrPhyWdqDcdlShadowBit5Rank0      =  0x00D7034C,
-	HWPfDdrPhyRdqDcdlBit6Rank0            =  0x00D70380,
-	HWPfDdrPhyRdqDcdlShadowBit6Rank0      =  0x00D70384,
-	HWPfDdrPhyWdqDcdlBit6Rank0            =  0x00D70388,
-	HWPfDdrPhyWdqDcdlShadowBit6Rank0      =  0x00D7038C,
-	HWPfDdrPhyRdqDcdlBit7Rank0            =  0x00D703C0,
-	HWPfDdrPhyRdqDcdlShadowBit7Rank0      =  0x00D703C4,
-	HWPfDdrPhyWdqDcdlBit7Rank0            =  0x00D703C8,
-	HWPfDdrPhyWdqDcdlShadowBit7Rank0      =  0x00D703CC,
-	HWPfDdrPhyIdtmStatus                  =  0x00D740D0,
-	HWPfDdrPhyIdtmError                   =  0x00D74110,
-	HWPfDdrPhyIdtmDebug                   =  0x00D74120,
-	HWPfDdrPhyIdtmDebugInt                =  0x00D74130,
-	HwPfPcieLnAsicCfgovr                  =  0x00D80000,
-	HwPfPcieLnAclkmixer                   =  0x00D80004,
-	HwPfPcieLnTxrampfreq                  =  0x00D80008,
-	HwPfPcieLnLanetest                    =  0x00D8000C,
-	HwPfPcieLnDcctrl                      =  0x00D80010,
-	HwPfPcieLnDccmeas                     =  0x00D80014,
-	HwPfPcieLnDccovrAclk                  =  0x00D80018,
-	HwPfPcieLnDccovrTxa                   =  0x00D8001C,
-	HwPfPcieLnDccovrTxk                   =  0x00D80020,
-	HwPfPcieLnDccovrDclk                  =  0x00D80024,
-	HwPfPcieLnDccovrEclk                  =  0x00D80028,
-	HwPfPcieLnDcctrimAclk                 =  0x00D8002C,
-	HwPfPcieLnDcctrimTx                   =  0x00D80030,
-	HwPfPcieLnDcctrimDclk                 =  0x00D80034,
-	HwPfPcieLnDcctrimEclk                 =  0x00D80038,
-	HwPfPcieLnQuadCtrl                    =  0x00D8003C,
-	HwPfPcieLnQuadCorrIndex               =  0x00D80040,
-	HwPfPcieLnQuadCorrStatus              =  0x00D80044,
-	HwPfPcieLnAsicRxovr1                  =  0x00D80048,
-	HwPfPcieLnAsicRxovr2                  =  0x00D8004C,
-	HwPfPcieLnAsicEqinfovr                =  0x00D80050,
-	HwPfPcieLnRxcsr                       =  0x00D80054,
-	HwPfPcieLnRxfectrl                    =  0x00D80058,
-	HwPfPcieLnRxtest                      =  0x00D8005C,
-	HwPfPcieLnEscount                     =  0x00D80060,
-	HwPfPcieLnCdrctrl                     =  0x00D80064,
-	HwPfPcieLnCdrctrl2                    =  0x00D80068,
-	HwPfPcieLnCdrcfg0Ctrl0                =  0x00D8006C,
-	HwPfPcieLnCdrcfg0Ctrl1                =  0x00D80070,
-	HwPfPcieLnCdrcfg0Ctrl2                =  0x00D80074,
-	HwPfPcieLnCdrcfg1Ctrl0                =  0x00D80078,
-	HwPfPcieLnCdrcfg1Ctrl1                =  0x00D8007C,
-	HwPfPcieLnCdrcfg1Ctrl2                =  0x00D80080,
-	HwPfPcieLnCdrcfg2Ctrl0                =  0x00D80084,
-	HwPfPcieLnCdrcfg2Ctrl1                =  0x00D80088,
-	HwPfPcieLnCdrcfg2Ctrl2                =  0x00D8008C,
-	HwPfPcieLnCdrcfg3Ctrl0                =  0x00D80090,
-	HwPfPcieLnCdrcfg3Ctrl1                =  0x00D80094,
-	HwPfPcieLnCdrcfg3Ctrl2                =  0x00D80098,
-	HwPfPcieLnCdrphase                    =  0x00D8009C,
-	HwPfPcieLnCdrfreq                     =  0x00D800A0,
-	HwPfPcieLnCdrstatusPhase              =  0x00D800A4,
-	HwPfPcieLnCdrstatusFreq               =  0x00D800A8,
-	HwPfPcieLnCdroffset                   =  0x00D800AC,
-	HwPfPcieLnRxvosctl                    =  0x00D800B0,
-	HwPfPcieLnRxvosctl2                   =  0x00D800B4,
-	HwPfPcieLnRxlosctl                    =  0x00D800B8,
-	HwPfPcieLnRxlos                       =  0x00D800BC,
-	HwPfPcieLnRxlosvval                   =  0x00D800C0,
-	HwPfPcieLnRxvosd0                     =  0x00D800C4,
-	HwPfPcieLnRxvosd1                     =  0x00D800C8,
-	HwPfPcieLnRxvosep0                    =  0x00D800CC,
-	HwPfPcieLnRxvosep1                    =  0x00D800D0,
-	HwPfPcieLnRxvosen0                    =  0x00D800D4,
-	HwPfPcieLnRxvosen1                    =  0x00D800D8,
-	HwPfPcieLnRxvosafe                    =  0x00D800DC,
-	HwPfPcieLnRxvosa0                     =  0x00D800E0,
-	HwPfPcieLnRxvosa0Out                  =  0x00D800E4,
-	HwPfPcieLnRxvosa1                     =  0x00D800E8,
-	HwPfPcieLnRxvosa1Out                  =  0x00D800EC,
-	HwPfPcieLnRxmisc                      =  0x00D800F0,
-	HwPfPcieLnRxbeacon                    =  0x00D800F4,
-	HwPfPcieLnRxdssout                    =  0x00D800F8,
-	HwPfPcieLnRxdssout2                   =  0x00D800FC,
-	HwPfPcieLnAlphapctrl                  =  0x00D80100,
-	HwPfPcieLnAlphanctrl                  =  0x00D80104,
 	HwPfPcieLnAdaptctrl                   =  0x00D80108,
-	HwPfPcieLnAdaptctrl1                  =  0x00D8010C,
-	HwPfPcieLnAdaptstatus                 =  0x00D80110,
-	HwPfPcieLnAdaptvga1                   =  0x00D80114,
-	HwPfPcieLnAdaptvga2                   =  0x00D80118,
-	HwPfPcieLnAdaptvga3                   =  0x00D8011C,
-	HwPfPcieLnAdaptvga4                   =  0x00D80120,
-	HwPfPcieLnAdaptboost1                 =  0x00D80124,
-	HwPfPcieLnAdaptboost2                 =  0x00D80128,
-	HwPfPcieLnAdaptboost3                 =  0x00D8012C,
-	HwPfPcieLnAdaptboost4                 =  0x00D80130,
-	HwPfPcieLnAdaptsslms1                 =  0x00D80134,
-	HwPfPcieLnAdaptsslms2                 =  0x00D80138,
-	HwPfPcieLnAdaptvgaStatus              =  0x00D8013C,
-	HwPfPcieLnAdaptboostStatus            =  0x00D80140,
-	HwPfPcieLnAdaptsslmsStatus1           =  0x00D80144,
-	HwPfPcieLnAdaptsslmsStatus2           =  0x00D80148,
-	HwPfPcieLnAfectrl1                    =  0x00D8014C,
-	HwPfPcieLnAfectrl2                    =  0x00D80150,
-	HwPfPcieLnAfectrl3                    =  0x00D80154,
-	HwPfPcieLnAfedefault1                 =  0x00D80158,
-	HwPfPcieLnAfedefault2                 =  0x00D8015C,
-	HwPfPcieLnDfectrl1                    =  0x00D80160,
-	HwPfPcieLnDfectrl2                    =  0x00D80164,
-	HwPfPcieLnDfectrl3                    =  0x00D80168,
-	HwPfPcieLnDfectrl4                    =  0x00D8016C,
-	HwPfPcieLnDfectrl5                    =  0x00D80170,
-	HwPfPcieLnDfectrl6                    =  0x00D80174,
-	HwPfPcieLnAfestatus1                  =  0x00D80178,
-	HwPfPcieLnAfestatus2                  =  0x00D8017C,
-	HwPfPcieLnDfestatus1                  =  0x00D80180,
-	HwPfPcieLnDfestatus2                  =  0x00D80184,
-	HwPfPcieLnDfestatus3                  =  0x00D80188,
-	HwPfPcieLnDfestatus4                  =  0x00D8018C,
-	HwPfPcieLnDfestatus5                  =  0x00D80190,
-	HwPfPcieLnAlphastatus                 =  0x00D80194,
-	HwPfPcieLnFomctrl1                    =  0x00D80198,
-	HwPfPcieLnFomctrl2                    =  0x00D8019C,
-	HwPfPcieLnFomctrl3                    =  0x00D801A0,
-	HwPfPcieLnAclkcalStatus               =  0x00D801A4,
-	HwPfPcieLnOffscorrStatus              =  0x00D801A8,
-	HwPfPcieLnEyewidthStatus              =  0x00D801AC,
-	HwPfPcieLnEyeheightStatus             =  0x00D801B0,
-	HwPfPcieLnAsicTxovr1                  =  0x00D801B4,
-	HwPfPcieLnAsicTxovr2                  =  0x00D801B8,
-	HwPfPcieLnAsicTxovr3                  =  0x00D801BC,
-	HwPfPcieLnTxbiasadjOvr                =  0x00D801C0,
-	HwPfPcieLnTxcsr                       =  0x00D801C4,
-	HwPfPcieLnTxtest                      =  0x00D801C8,
-	HwPfPcieLnTxtestword                  =  0x00D801CC,
-	HwPfPcieLnTxtestwordHigh              =  0x00D801D0,
-	HwPfPcieLnTxdrive                     =  0x00D801D4,
-	HwPfPcieLnMtcsLn                      =  0x00D801D8,
-	HwPfPcieLnStatsumLn                   =  0x00D801DC,
-	HwPfPcieLnRcbusScratch                =  0x00D801E0,
-	HwPfPcieLnRcbusMinorrev               =  0x00D801F0,
-	HwPfPcieLnRcbusMajorrev               =  0x00D801F4,
-	HwPfPcieLnRcbusBlocktype              =  0x00D801F8,
-	HwPfPcieSupPllcsr                     =  0x00D80800,
-	HwPfPcieSupPlldiv                     =  0x00D80804,
-	HwPfPcieSupPllcal                     =  0x00D80808,
-	HwPfPcieSupPllcalsts                  =  0x00D8080C,
-	HwPfPcieSupPllmeas                    =  0x00D80810,
-	HwPfPcieSupPlldactrim                 =  0x00D80814,
-	HwPfPcieSupPllbiastrim                =  0x00D80818,
-	HwPfPcieSupPllbwtrim                  =  0x00D8081C,
-	HwPfPcieSupPllcaldly                  =  0x00D80820,
-	HwPfPcieSupRefclkonpclkctrl           =  0x00D80824,
-	HwPfPcieSupPclkdelay                  =  0x00D80828,
-	HwPfPcieSupPhyconfig                  =  0x00D8082C,
-	HwPfPcieSupRcalIntf                   =  0x00D80830,
-	HwPfPcieSupAuxcsr                     =  0x00D80834,
-	HwPfPcieSupVref                       =  0x00D80838,
-	HwPfPcieSupLinkmode                   =  0x00D8083C,
-	HwPfPcieSupRrefcalctl                 =  0x00D80840,
-	HwPfPcieSupRrefcal                    =  0x00D80844,
-	HwPfPcieSupRrefcaldly                 =  0x00D80848,
-	HwPfPcieSupTximpcalctl                =  0x00D8084C,
-	HwPfPcieSupTximpcal                   =  0x00D80850,
-	HwPfPcieSupTximpoffset                =  0x00D80854,
-	HwPfPcieSupTximpcaldly                =  0x00D80858,
-	HwPfPcieSupRximpcalctl                =  0x00D8085C,
-	HwPfPcieSupRximpcal                   =  0x00D80860,
-	HwPfPcieSupRximpoffset                =  0x00D80864,
-	HwPfPcieSupRximpcaldly                =  0x00D80868,
-	HwPfPcieSupFence                      =  0x00D8086C,
-	HwPfPcieSupMtcs                       =  0x00D80870,
-	HwPfPcieSupStatsum                    =  0x00D809B8,
-	HwPfPciePcsDpStatus0                  =  0x00D81000,
-	HwPfPciePcsDpControl0                 =  0x00D81004,
-	HwPfPciePcsPmaStatusLane0             =  0x00D81008,
-	HwPfPciePcsPipeStatusLane0            =  0x00D8100C,
-	HwPfPciePcsTxdeemph0Lane0             =  0x00D81010,
-	HwPfPciePcsTxdeemph1Lane0             =  0x00D81014,
-	HwPfPciePcsInternalStatusLane0        =  0x00D81018,
-	HwPfPciePcsDpStatus1                  =  0x00D8101C,
-	HwPfPciePcsDpControl1                 =  0x00D81020,
-	HwPfPciePcsPmaStatusLane1             =  0x00D81024,
-	HwPfPciePcsPipeStatusLane1            =  0x00D81028,
-	HwPfPciePcsTxdeemph0Lane1             =  0x00D8102C,
-	HwPfPciePcsTxdeemph1Lane1             =  0x00D81030,
-	HwPfPciePcsInternalStatusLane1        =  0x00D81034,
-	HwPfPciePcsDpStatus2                  =  0x00D81038,
-	HwPfPciePcsDpControl2                 =  0x00D8103C,
-	HwPfPciePcsPmaStatusLane2             =  0x00D81040,
-	HwPfPciePcsPipeStatusLane2            =  0x00D81044,
-	HwPfPciePcsTxdeemph0Lane2             =  0x00D81048,
-	HwPfPciePcsTxdeemph1Lane2             =  0x00D8104C,
-	HwPfPciePcsInternalStatusLane2        =  0x00D81050,
-	HwPfPciePcsDpStatus3                  =  0x00D81054,
-	HwPfPciePcsDpControl3                 =  0x00D81058,
-	HwPfPciePcsPmaStatusLane3             =  0x00D8105C,
-	HwPfPciePcsPipeStatusLane3            =  0x00D81060,
-	HwPfPciePcsTxdeemph0Lane3             =  0x00D81064,
-	HwPfPciePcsTxdeemph1Lane3             =  0x00D81068,
-	HwPfPciePcsInternalStatusLane3        =  0x00D8106C,
-	HwPfPciePcsEbStatus0                  =  0x00D81070,
-	HwPfPciePcsEbStatus1                  =  0x00D81074,
-	HwPfPciePcsEbStatus2                  =  0x00D81078,
-	HwPfPciePcsEbStatus3                  =  0x00D8107C,
-	HwPfPciePcsPllSettingPcieG1           =  0x00D81088,
-	HwPfPciePcsPllSettingPcieG2           =  0x00D8108C,
-	HwPfPciePcsPllSettingPcieG3           =  0x00D81090,
-	HwPfPciePcsControl                    =  0x00D81094,
 	HwPfPciePcsEqControl                  =  0x00D81098,
-	HwPfPciePcsEqTimer                    =  0x00D8109C,
-	HwPfPciePcsEqErrStatus                =  0x00D810A0,
-	HwPfPciePcsEqErrCount                 =  0x00D810A4,
-	HwPfPciePcsStatus                     =  0x00D810A8,
-	HwPfPciePcsMiscRegister               =  0x00D810AC,
-	HwPfPciePcsObsControl                 =  0x00D810B0,
-	HwPfPciePcsPrbsCount0                 =  0x00D81200,
-	HwPfPciePcsBistControl0               =  0x00D81204,
-	HwPfPciePcsBistStaticWord00           =  0x00D81208,
-	HwPfPciePcsBistStaticWord10           =  0x00D8120C,
-	HwPfPciePcsBistStaticWord20           =  0x00D81210,
-	HwPfPciePcsBistStaticWord30           =  0x00D81214,
-	HwPfPciePcsPrbsCount1                 =  0x00D81220,
-	HwPfPciePcsBistControl1               =  0x00D81224,
-	HwPfPciePcsBistStaticWord01           =  0x00D81228,
-	HwPfPciePcsBistStaticWord11           =  0x00D8122C,
-	HwPfPciePcsBistStaticWord21           =  0x00D81230,
-	HwPfPciePcsBistStaticWord31           =  0x00D81234,
-	HwPfPciePcsPrbsCount2                 =  0x00D81240,
-	HwPfPciePcsBistControl2               =  0x00D81244,
-	HwPfPciePcsBistStaticWord02           =  0x00D81248,
-	HwPfPciePcsBistStaticWord12           =  0x00D8124C,
-	HwPfPciePcsBistStaticWord22           =  0x00D81250,
-	HwPfPciePcsBistStaticWord32           =  0x00D81254,
-	HwPfPciePcsPrbsCount3                 =  0x00D81260,
-	HwPfPciePcsBistControl3               =  0x00D81264,
-	HwPfPciePcsBistStaticWord03           =  0x00D81268,
-	HwPfPciePcsBistStaticWord13           =  0x00D8126C,
-	HwPfPciePcsBistStaticWord23           =  0x00D81270,
-	HwPfPciePcsBistStaticWord33           =  0x00D81274,
-	HwPfPcieGpexLtssmStateCntrl           =  0x00D90400,
-	HwPfPcieGpexLtssmStateStatus          =  0x00D90404,
-	HwPfPcieGpexSkipFreqTimer             =  0x00D90408,
-	HwPfPcieGpexLaneSelect                =  0x00D9040C,
-	HwPfPcieGpexLaneDeskew                =  0x00D90410,
-	HwPfPcieGpexRxErrorStatus             =  0x00D90414,
-	HwPfPcieGpexLaneNumControl            =  0x00D90418,
-	HwPfPcieGpexNFstControl               =  0x00D9041C,
-	HwPfPcieGpexLinkStatus                =  0x00D90420,
-	HwPfPcieGpexAckReplayTimeout          =  0x00D90438,
-	HwPfPcieGpexSeqNumberStatus           =  0x00D9043C,
-	HwPfPcieGpexCoreClkRatio              =  0x00D90440,
-	HwPfPcieGpexDllTholdControl           =  0x00D90448,
-	HwPfPcieGpexPmTimer                   =  0x00D90450,
-	HwPfPcieGpexPmeTimeout                =  0x00D90454,
-	HwPfPcieGpexAspmL1Timer               =  0x00D90458,
-	HwPfPcieGpexAspmReqTimer              =  0x00D9045C,
-	HwPfPcieGpexAspmL1Dis                 =  0x00D90460,
-	HwPfPcieGpexAdvisoryErrorControl      =  0x00D90468,
-	HwPfPcieGpexId                        =  0x00D90470,
-	HwPfPcieGpexClasscode                 =  0x00D90474,
-	HwPfPcieGpexSubsystemId               =  0x00D90478,
-	HwPfPcieGpexDeviceCapabilities        =  0x00D9047C,
-	HwPfPcieGpexLinkCapabilities          =  0x00D90480,
-	HwPfPcieGpexFunctionNumber            =  0x00D90484,
-	HwPfPcieGpexPmCapabilities            =  0x00D90488,
-	HwPfPcieGpexFunctionSelect            =  0x00D9048C,
-	HwPfPcieGpexErrorCounter              =  0x00D904AC,
-	HwPfPcieGpexConfigReady               =  0x00D904B0,
-	HwPfPcieGpexFcUpdateTimeout           =  0x00D904B8,
-	HwPfPcieGpexFcUpdateTimer             =  0x00D904BC,
-	HwPfPcieGpexVcBufferLoad              =  0x00D904C8,
-	HwPfPcieGpexVcBufferSizeThold         =  0x00D904CC,
-	HwPfPcieGpexVcBufferSelect            =  0x00D904D0,
-	HwPfPcieGpexBarEnable                 =  0x00D904D4,
-	HwPfPcieGpexBarDwordLower             =  0x00D904D8,
-	HwPfPcieGpexBarDwordUpper             =  0x00D904DC,
-	HwPfPcieGpexBarSelect                 =  0x00D904E0,
-	HwPfPcieGpexCreditCounterSelect       =  0x00D904E4,
-	HwPfPcieGpexCreditCounterStatus       =  0x00D904E8,
-	HwPfPcieGpexTlpHeaderSelect           =  0x00D904EC,
-	HwPfPcieGpexTlpHeaderDword0           =  0x00D904F0,
-	HwPfPcieGpexTlpHeaderDword1           =  0x00D904F4,
-	HwPfPcieGpexTlpHeaderDword2           =  0x00D904F8,
-	HwPfPcieGpexTlpHeaderDword3           =  0x00D904FC,
-	HwPfPcieGpexRelaxOrderControl         =  0x00D90500,
-	HwPfPcieGpexBarPrefetch               =  0x00D90504,
-	HwPfPcieGpexFcCheckControl            =  0x00D90508,
-	HwPfPcieGpexFcUpdateTimerTraffic      =  0x00D90518,
-	HwPfPcieGpexPhyControl0               =  0x00D9053C,
-	HwPfPcieGpexPhyControl1               =  0x00D90544,
-	HwPfPcieGpexPhyControl2               =  0x00D9054C,
-	HwPfPcieGpexUserControl0              =  0x00D9055C,
-	HwPfPcieGpexUncorrErrorStatus         =  0x00D905F0,
-	HwPfPcieGpexRxCplError                =  0x00D90620,
-	HwPfPcieGpexRxCplErrorDword0          =  0x00D90624,
-	HwPfPcieGpexRxCplErrorDword1          =  0x00D90628,
-	HwPfPcieGpexRxCplErrorDword2          =  0x00D9062C,
-	HwPfPcieGpexPabSwResetEn              =  0x00D90630,
-	HwPfPcieGpexGen3Control0              =  0x00D90634,
-	HwPfPcieGpexGen3Control1              =  0x00D90638,
-	HwPfPcieGpexGen3Control2              =  0x00D9063C,
-	HwPfPcieGpexGen2ControlCsr            =  0x00D90640,
-	HwPfPcieGpexTotalVfInitialVf0         =  0x00D90644,
-	HwPfPcieGpexTotalVfInitialVf1         =  0x00D90648,
-	HwPfPcieGpexSriovLinkDevId0           =  0x00D90684,
-	HwPfPcieGpexSriovLinkDevId1           =  0x00D90688,
-	HwPfPcieGpexSriovPageSize0            =  0x00D906C4,
-	HwPfPcieGpexSriovPageSize1            =  0x00D906C8,
-	HwPfPcieGpexIdVersion                 =  0x00D906FC,
-	HwPfPcieGpexSriovVfOffsetStride0      =  0x00D90704,
-	HwPfPcieGpexSriovVfOffsetStride1      =  0x00D90708,
-	HwPfPcieGpexGen3DeskewControl         =  0x00D907B4,
-	HwPfPcieGpexGen3EqControl             =  0x00D907B8,
-	HwPfPcieGpexBridgeVersion             =  0x00D90800,
-	HwPfPcieGpexBridgeCapability          =  0x00D90804,
 	HwPfPcieGpexBridgeControl             =  0x00D90808,
-	HwPfPcieGpexBridgeStatus              =  0x00D9080C,
-	HwPfPcieGpexEngineActivityStatus      =  0x00D9081C,
-	HwPfPcieGpexEngineResetControl        =  0x00D90820,
 	HwPfPcieGpexAxiPioControl             =  0x00D90840,
-	HwPfPcieGpexAxiPioStatus              =  0x00D90844,
-	HwPfPcieGpexAmbaSlaveCmdStatus        =  0x00D90848,
-	HwPfPcieGpexPexPioControl             =  0x00D908C0,
-	HwPfPcieGpexPexPioStatus              =  0x00D908C4,
-	HwPfPcieGpexAmbaMasterStatus          =  0x00D908C8,
-	HwPfPcieGpexCsrSlaveCmdStatus         =  0x00D90920,
-	HwPfPcieGpexMailboxAxiControl         =  0x00D90A50,
-	HwPfPcieGpexMailboxAxiData            =  0x00D90A54,
-	HwPfPcieGpexMailboxPexControl         =  0x00D90A90,
-	HwPfPcieGpexMailboxPexData            =  0x00D90A94,
-	HwPfPcieGpexPexInterruptEnable        =  0x00D90AD0,
-	HwPfPcieGpexPexInterruptStatus        =  0x00D90AD4,
-	HwPfPcieGpexPexInterruptAxiPioVector  =  0x00D90AD8,
-	HwPfPcieGpexPexInterruptPexPioVector  =  0x00D90AE0,
-	HwPfPcieGpexPexInterruptMiscVector    =  0x00D90AF8,
-	HwPfPcieGpexAmbaInterruptPioEnable    =  0x00D90B00,
-	HwPfPcieGpexAmbaInterruptMiscEnable   =  0x00D90B0C,
-	HwPfPcieGpexAmbaInterruptPioStatus    =  0x00D90B10,
-	HwPfPcieGpexAmbaInterruptMiscStatus   =  0x00D90B1C,
-	HwPfPcieGpexPexPmControl              =  0x00D90B80,
-	HwPfPcieGpexSlotMisc                  =  0x00D90B88,
-	HwPfPcieGpexAxiAddrMappingControl     =  0x00D90BA0,
-	HwPfPcieGpexAxiAddrMappingWindowAxiBase     =  0x00D90BA4,
-	HwPfPcieGpexAxiAddrMappingWindowPexBaseLow  =  0x00D90BA8,
 	HwPfPcieGpexAxiAddrMappingWindowPexBaseHigh =  0x00D90BAC,
-	HwPfPcieGpexPexBarAddrFunc0Bar0       =  0x00D91BA0,
-	HwPfPcieGpexPexBarAddrFunc0Bar1       =  0x00D91BA4,
-	HwPfPcieGpexAxiAddrMappingPcieHdrParam =  0x00D95BA0,
-	HwPfPcieGpexExtAxiAddrMappingAxiBase  =  0x00D980A0,
-	HwPfPcieGpexPexExtBarAddrFunc0Bar0    =  0x00D984A0,
-	HwPfPcieGpexPexExtBarAddrFunc0Bar1    =  0x00D984A4,
-	HwPfPcieGpexAmbaInterruptFlrEnable    =  0x00D9B960,
-	HwPfPcieGpexAmbaInterruptFlrStatus    =  0x00D9B9A0,
-	HwPfPcieGpexExtAxiAddrMappingSize     =  0x00D9BAF0,
-	HwPfPcieGpexPexPioAwcacheControl      =  0x00D9C300,
-	HwPfPcieGpexPexPioArcacheControl      =  0x00D9C304,
-	HwPfPcieGpexPabObSizeControlVc0       =  0x00D9C310
 };
 
 /* TIP PF Interrupt numbers */
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 02/16] baseband/acc100: refactor to segregate common code
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 01/16] baseband/acc100: remove unused registers Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 03/16] baseband/acc: rename directory from acc100 to acc Nicolas Chautru
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Refactored shareable common code to be used by future PMD
(including ACC200 in  this patchset) and
following PMDs in roadmap) by gathering such structures or inline methods.
No functionality change.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 app/test-bbdev/test_bbdev_perf.c             |    6 +-
 drivers/baseband/acc100/acc100_pmd.h         |  449 +----
 drivers/baseband/acc100/acc101_pmd.h         |   10 -
 drivers/baseband/acc100/acc_common.h         | 1304 +++++++++++++
 drivers/baseband/acc100/rte_acc100_cfg.h     |   70 +-
 drivers/baseband/acc100/rte_acc100_pmd.c     | 1773 ++++++------------
 drivers/baseband/acc100/rte_acc_common_cfg.h |  101 +
 7 files changed, 1982 insertions(+), 1731 deletions(-)
 create mode 100644 drivers/baseband/acc100/acc_common.h
 create mode 100644 drivers/baseband/acc100/rte_acc_common_cfg.h

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 75f1ca4f14..3bdd0571c3 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -709,18 +709,18 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
 #ifdef RTE_BASEBAND_ACC100
 	if ((get_init_device() == true) &&
 			(!strcmp(info->drv.driver_name, ACC100PF_DRIVER_NAME))) {
-		struct rte_acc100_conf conf;
+		struct rte_acc_conf conf;
 		unsigned int i;
 
 		printf("Configure ACC100/ACC101 FEC Driver %s with default values\n",
 				info->drv.driver_name);
 
 		/* clear default configuration before initialization */
-		memset(&conf, 0, sizeof(struct rte_acc100_conf));
+		memset(&conf, 0, sizeof(struct rte_acc_conf));
 
 		/* Always set in PF mode for built-in configuration */
 		conf.pf_mode_en = true;
-		for (i = 0; i < RTE_ACC100_NUM_VFS; ++i) {
+		for (i = 0; i < RTE_ACC_NUM_VFS; ++i) {
 			conf.arb_dl_4g[i].gbr_threshold1 = ACC100_QOS_GBR;
 			conf.arb_dl_4g[i].gbr_threshold1 = ACC100_QOS_GBR;
 			conf.arb_dl_4g[i].round_robin_weight = ACC100_QMGR_RR;
diff --git a/drivers/baseband/acc100/acc100_pmd.h b/drivers/baseband/acc100/acc100_pmd.h
index 0c9810ca56..b325948904 100644
--- a/drivers/baseband/acc100/acc100_pmd.h
+++ b/drivers/baseband/acc100/acc100_pmd.h
@@ -8,6 +8,7 @@
 #include "acc100_pf_enum.h"
 #include "acc100_vf_enum.h"
 #include "rte_acc100_cfg.h"
+#include "acc_common.h"
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
@@ -34,64 +35,18 @@
 #define ACC100_PF_DEVICE_ID        (0x0d5c)
 #define ACC100_VF_DEVICE_ID        (0x0d5d)
 
-/* Values used in filling in descriptors */
-#define ACC100_DMA_DESC_TYPE           2
-#define ACC100_DMA_CODE_BLK_MODE       0
-#define ACC100_DMA_BLKID_FCW           1
-#define ACC100_DMA_BLKID_IN            2
-#define ACC100_DMA_BLKID_OUT_ENC       1
-#define ACC100_DMA_BLKID_OUT_HARD      1
-#define ACC100_DMA_BLKID_OUT_SOFT      2
-#define ACC100_DMA_BLKID_OUT_HARQ      3
-#define ACC100_DMA_BLKID_IN_HARQ       3
-
-/* Values used in filling in decode FCWs */
-#define ACC100_FCW_TD_VER              1
-#define ACC100_FCW_TD_EXT_COLD_REG_EN  1
-#define ACC100_FCW_TD_AUTOMAP          0x0f
-#define ACC100_FCW_TD_RVIDX_0          2
-#define ACC100_FCW_TD_RVIDX_1          26
-#define ACC100_FCW_TD_RVIDX_2          50
-#define ACC100_FCW_TD_RVIDX_3          74
-
 /* Values used in writing to the registers */
 #define ACC100_REG_IRQ_EN_ALL          0x1FF83FF  /* Enable all interrupts */
 
-/* ACC100 Specific Dimensioning */
-#define ACC100_SIZE_64MBYTE            (64*1024*1024)
-/* Number of elements in an Info Ring */
-#define ACC100_INFO_RING_NUM_ENTRIES   1024
-/* Number of elements in HARQ layout memory */
-#define ACC100_HARQ_LAYOUT             (64*1024*1024)
-/* Assume offset for HARQ in memory */
-#define ACC100_HARQ_OFFSET             (32*1024)
-#define ACC100_HARQ_OFFSET_SHIFT       15
-#define ACC100_HARQ_OFFSET_MASK        0x7ffffff
-/* Mask used to calculate an index in an Info Ring array (not a byte offset) */
-#define ACC100_INFO_RING_MASK          (ACC100_INFO_RING_NUM_ENTRIES-1)
 /* Number of Virtual Functions ACC100 supports */
 #define ACC100_NUM_VFS                  16
 #define ACC100_NUM_QGRPS                8
-#define ACC100_NUM_QGRPS_PER_WORD       8
 #define ACC100_NUM_AQS                  16
-#define MAX_ENQ_BATCH_SIZE              255
-/* All ACC100 Registers alignment are 32bits = 4B */
-#define ACC100_BYTES_IN_WORD                 4
-#define ACC100_MAX_E_MBUF                64000
 
 #define ACC100_GRP_ID_SHIFT    10 /* Queue Index Hierarchy */
 #define ACC100_VF_ID_SHIFT     4  /* Queue Index Hierarchy */
-#define ACC100_VF_OFFSET_QOS   16 /* offset in Memory specific to QoS Mon */
-#define ACC100_TMPL_PRI_0      0x03020100
-#define ACC100_TMPL_PRI_1      0x07060504
-#define ACC100_TMPL_PRI_2      0x0b0a0908
-#define ACC100_TMPL_PRI_3      0x0f0e0d0c
-#define ACC100_QUEUE_ENABLE    0x80000000  /* Bit to mark Queue as Enabled */
 #define ACC100_WORDS_IN_ARAM_SIZE (128 * 1024 / 4)
-#define ACC100_FDONE    0x80000000
-#define ACC100_SDONE    0x40000000
 
-#define ACC100_NUM_TMPL       32
 /* Mapping of signals for the available engines */
 #define ACC100_SIG_UL_5G      0
 #define ACC100_SIG_UL_5G_LAST 7
@@ -102,50 +57,10 @@
 #define ACC100_SIG_DL_4G      27
 #define ACC100_SIG_DL_4G_LAST 31
 #define ACC100_NUM_ACCS       5
-#define ACC100_ACCMAP_0       0
-#define ACC100_ACCMAP_1       2
-#define ACC100_ACCMAP_2       1
-#define ACC100_ACCMAP_3       3
-#define ACC100_ACCMAP_4       4
-#define ACC100_PF_VAL         2
-
-/* max number of iterations to allocate memory block for all rings */
-#define ACC100_SW_RING_MEM_ALLOC_ATTEMPTS 5
-#define ACC100_MAX_QUEUE_DEPTH            1024
-#define ACC100_DMA_MAX_NUM_POINTERS       14
-#define ACC100_DMA_MAX_NUM_POINTERS_IN    7
-#define ACC100_DMA_DESC_PADDING           8
-#define ACC100_FCW_PADDING                12
-#define ACC100_DESC_FCW_OFFSET            192
-#define ACC100_DESC_SIZE                  256
-#define ACC100_DESC_OFFSET                (ACC100_DESC_SIZE / 64)
-#define ACC100_FCW_TE_BLEN                32
-#define ACC100_FCW_TD_BLEN                24
-#define ACC100_FCW_LE_BLEN                32
-#define ACC100_FCW_LD_BLEN                36
-#define ACC100_5GUL_SIZE_0                16
-#define ACC100_5GUL_SIZE_1                40
-#define ACC100_5GUL_OFFSET_0              36
 
-#define ACC100_FCW_VER         2
-#define ACC100_MUX_5GDL_DESC   6
-#define ACC100_CMP_ENC_SIZE    20
-#define ACC100_CMP_DEC_SIZE    24
-#define ACC100_ENC_OFFSET     (32)
-#define ACC100_DEC_OFFSET     (80)
 #define ACC100_EXT_MEM /* Default option with memory external to CPU */
 #define ACC100_HARQ_OFFSET_THRESHOLD 1024
 
-/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */
-#define ACC100_N_ZC_1 66 /* N = 66 Zc for BG 1 */
-#define ACC100_N_ZC_2 50 /* N = 50 Zc for BG 2 */
-#define ACC100_K0_1_1 17 /* K0 fraction numerator for rv 1 and BG 1 */
-#define ACC100_K0_1_2 13 /* K0 fraction numerator for rv 1 and BG 2 */
-#define ACC100_K0_2_1 33 /* K0 fraction numerator for rv 2 and BG 1 */
-#define ACC100_K0_2_2 25 /* K0 fraction numerator for rv 2 and BG 2 */
-#define ACC100_K0_3_1 56 /* K0 fraction numerator for rv 3 and BG 1 */
-#define ACC100_K0_3_2 43 /* K0 fraction numerator for rv 3 and BG 2 */
-
 /* ACC100 Configuration */
 #define ACC100_DDR_ECC_ENABLE
 #define ACC100_CFG_DMA_ERROR    0x3D7
@@ -159,12 +74,10 @@
 #define ACC100_PCIE_QUAD_OFFSET 0x2000
 #define ACC100_PCS_EQ           0x6007
 #define ACC100_ADAPT            0x8400
-#define ACC100_ENGINE_OFFSET    0x1000
 #define ACC100_RESET_HI         0x20100
 #define ACC100_RESET_LO         0x20000
 #define ACC100_RESET_HARD       0x1FF
 #define ACC100_ENGINES_MAX      9
-#define ACC100_LONG_WAIT        1000
 #define ACC100_GPEX_AXIMAP_NUM  17
 #define ACC100_CLOCK_GATING_EN  0x30000
 #define ACC100_FABRIC_MODE      0xB
@@ -173,292 +86,8 @@
  */
 #define ACC100_HARQ_DDR         (512 * 1)
 #define ACC100_PRQ_DDR_VER       0x10092020
-#define ACC100_MS_IN_US         (1000)
 #define ACC100_DDR_TRAINING_MAX (5000)
 
-/* ACC100 DMA Descriptor triplet */
-struct acc100_dma_triplet {
-	uint64_t address;
-	uint32_t blen:20,
-		res0:4,
-		last:1,
-		dma_ext:1,
-		res1:2,
-		blkid:4;
-} __rte_packed;
-
-/* ACC100 DMA Response Descriptor */
-union acc100_dma_rsp_desc {
-	uint32_t val;
-	struct {
-		uint32_t crc_status:1,
-			synd_ok:1,
-			dma_err:1,
-			neg_stop:1,
-			fcw_err:1,
-			output_err:1,
-			input_err:1,
-			timestampEn:1,
-			iterCountFrac:8,
-			iter_cnt:8,
-			rsrvd3:6,
-			sdone:1,
-			fdone:1;
-		uint32_t add_info_0;
-		uint32_t add_info_1;
-	};
-};
-
-
-/* ACC100 Queue Manager Enqueue PCI Register */
-union acc100_enqueue_reg_fmt {
-	uint32_t val;
-	struct {
-		uint32_t num_elem:8,
-			addr_offset:3,
-			rsrvd:1,
-			req_elem_addr:20;
-	};
-};
-
-/* FEC 4G Uplink Frame Control Word */
-struct __rte_packed acc100_fcw_td {
-	uint8_t fcw_ver:4,
-		num_maps:4; /* Unused */
-	uint8_t filler:6, /* Unused */
-		rsrvd0:1,
-		bypass_sb_deint:1;
-	uint16_t k_pos;
-	uint16_t k_neg; /* Unused */
-	uint8_t c_neg; /* Unused */
-	uint8_t c; /* Unused */
-	uint32_t ea; /* Unused */
-	uint32_t eb; /* Unused */
-	uint8_t cab; /* Unused */
-	uint8_t k0_start_col; /* Unused */
-	uint8_t rsrvd1;
-	uint8_t code_block_mode:1, /* Unused */
-		turbo_crc_type:1,
-		rsrvd2:3,
-		bypass_teq:1, /* Unused */
-		soft_output_en:1, /* Unused */
-		ext_td_cold_reg_en:1;
-	union { /* External Cold register */
-		uint32_t ext_td_cold_reg;
-		struct {
-			uint32_t min_iter:4, /* Unused */
-				max_iter:4,
-				ext_scale:5, /* Unused */
-				rsrvd3:3,
-				early_stop_en:1, /* Unused */
-				sw_soft_out_dis:1, /* Unused */
-				sw_et_cont:1, /* Unused */
-				sw_soft_out_saturation:1, /* Unused */
-				half_iter_on:1, /* Unused */
-				raw_decoder_input_on:1, /* Unused */
-				rsrvd4:10;
-		};
-	};
-};
-
-/* FEC 5GNR Uplink Frame Control Word */
-struct __rte_packed acc100_fcw_ld {
-	uint32_t FCWversion:4,
-		qm:4,
-		nfiller:11,
-		BG:1,
-		Zc:9,
-		res0:1,
-		synd_precoder:1,
-		synd_post:1;
-	uint32_t ncb:16,
-		k0:16;
-	uint32_t rm_e:24,
-		hcin_en:1,
-		hcout_en:1,
-		crc_select:1,
-		bypass_dec:1,
-		bypass_intlv:1,
-		so_en:1,
-		so_bypass_rm:1,
-		so_bypass_intlv:1;
-	uint32_t hcin_offset:16,
-		hcin_size0:16;
-	uint32_t hcin_size1:16,
-		hcin_decomp_mode:3,
-		llr_pack_mode:1,
-		hcout_comp_mode:3,
-		res2:1,
-		dec_convllr:4,
-		hcout_convllr:4;
-	uint32_t itmax:7,
-		itstop:1,
-		so_it:7,
-		res3:1,
-		hcout_offset:16;
-	uint32_t hcout_size0:16,
-		hcout_size1:16;
-	uint32_t gain_i:8,
-		gain_h:8,
-		negstop_th:16;
-	uint32_t negstop_it:7,
-		negstop_en:1,
-		res4:24;
-};
-
-/* FEC 4G Downlink Frame Control Word */
-struct __rte_packed acc100_fcw_te {
-	uint16_t k_neg;
-	uint16_t k_pos;
-	uint8_t c_neg;
-	uint8_t c;
-	uint8_t filler;
-	uint8_t cab;
-	uint32_t ea:17,
-		rsrvd0:15;
-	uint32_t eb:17,
-		rsrvd1:15;
-	uint16_t ncb_neg;
-	uint16_t ncb_pos;
-	uint8_t rv_idx0:2,
-		rsrvd2:2,
-		rv_idx1:2,
-		rsrvd3:2;
-	uint8_t bypass_rv_idx0:1,
-		bypass_rv_idx1:1,
-		bypass_rm:1,
-		rsrvd4:5;
-	uint8_t rsrvd5:1,
-		rsrvd6:3,
-		code_block_crc:1,
-		rsrvd7:3;
-	uint8_t code_block_mode:1,
-		rsrvd8:7;
-	uint64_t rsrvd9;
-};
-
-/* FEC 5GNR Downlink Frame Control Word */
-struct __rte_packed acc100_fcw_le {
-	uint32_t FCWversion:4,
-		qm:4,
-		nfiller:11,
-		BG:1,
-		Zc:9,
-		res0:3;
-	uint32_t ncb:16,
-		k0:16;
-	uint32_t rm_e:24,
-		res1:2,
-		crc_select:1,
-		res2:1,
-		bypass_intlv:1,
-		res3:3;
-	uint32_t res4_a:12,
-		mcb_count:3,
-		res4_b:17;
-	uint32_t res5;
-	uint32_t res6;
-	uint32_t res7;
-	uint32_t res8;
-};
-
-/* ACC100 DMA Request Descriptor */
-struct __rte_packed acc100_dma_req_desc {
-	union {
-		struct{
-			uint32_t type:4,
-				rsrvd0:26,
-				sdone:1,
-				fdone:1;
-			uint32_t rsrvd1;
-			uint32_t rsrvd2;
-			uint32_t pass_param:8,
-				sdone_enable:1,
-				irq_enable:1,
-				timeStampEn:1,
-				res0:5,
-				numCBs:4,
-				res1:4,
-				m2dlen:4,
-				d2mlen:4;
-		};
-		struct{
-			uint32_t word0;
-			uint32_t word1;
-			uint32_t word2;
-			uint32_t word3;
-		};
-	};
-	struct acc100_dma_triplet data_ptrs[ACC100_DMA_MAX_NUM_POINTERS];
-
-	/* Virtual addresses used to retrieve SW context info */
-	union {
-		void *op_addr;
-		uint64_t pad1;  /* pad to 64 bits */
-	};
-	/*
-	 * Stores additional information needed for driver processing:
-	 * - last_desc_in_batch - flag used to mark last descriptor (CB)
-	 *                        in batch
-	 * - cbs_in_tb - stores information about total number of Code Blocks
-	 *               in currently processed Transport Block
-	 */
-	union {
-		struct {
-			union {
-				struct acc100_fcw_ld fcw_ld;
-				struct acc100_fcw_td fcw_td;
-				struct acc100_fcw_le fcw_le;
-				struct acc100_fcw_te fcw_te;
-				uint32_t pad2[ACC100_FCW_PADDING];
-			};
-			uint32_t last_desc_in_batch :8,
-				cbs_in_tb:8,
-				pad4 : 16;
-		};
-		uint64_t pad3[ACC100_DMA_DESC_PADDING]; /* pad to 64 bits */
-	};
-};
-
-/* ACC100 DMA Descriptor */
-union acc100_dma_desc {
-	struct acc100_dma_req_desc req;
-	union acc100_dma_rsp_desc rsp;
-	uint64_t atom_hdr;
-};
-
-
-/* Union describing Info Ring entry */
-union acc100_harq_layout_data {
-	uint32_t val;
-	struct {
-		uint16_t offset;
-		uint16_t size0;
-	};
-} __rte_packed;
-
-
-/* Union describing Info Ring entry */
-union acc100_info_ring_data {
-	uint32_t val;
-	struct {
-		union {
-			uint16_t detailed_info;
-			struct {
-				uint16_t aq_id: 4;
-				uint16_t qg_id: 4;
-				uint16_t vf_id: 6;
-				uint16_t reserved: 2;
-			};
-		};
-		uint16_t int_nb: 7;
-		uint16_t msi_0: 1;
-		uint16_t vf2pf: 6;
-		uint16_t loop: 1;
-		uint16_t valid: 1;
-	};
-} __rte_packed;
-
 struct acc100_registry_addr {
 	unsigned int dma_ring_dl5g_hi;
 	unsigned int dma_ring_dl5g_lo;
@@ -545,80 +174,4 @@ static const struct acc100_registry_addr vf_reg_addr = {
 	.ddr_range = HWVfDmaDdrBaseRangeRoVf,
 };
 
-/* Structure associated with each queue. */
-struct __rte_cache_aligned acc100_queue {
-	union acc100_dma_desc *ring_addr;  /* Virtual address of sw ring */
-	rte_iova_t ring_addr_iova;  /* IOVA address of software ring */
-	uint32_t sw_ring_head;  /* software ring head */
-	uint32_t sw_ring_tail;  /* software ring tail */
-	/* software ring size (descriptors, not bytes) */
-	uint32_t sw_ring_depth;
-	/* mask used to wrap enqueued descriptors on the sw ring */
-	uint32_t sw_ring_wrap_mask;
-	/* MMIO register used to enqueue descriptors */
-	void *mmio_reg_enqueue;
-	uint8_t vf_id;  /* VF ID (max = 63) */
-	uint8_t qgrp_id;  /* Queue Group ID */
-	uint16_t aq_id;  /* Atomic Queue ID */
-	uint16_t aq_depth;  /* Depth of atomic queue */
-	uint32_t aq_enqueued;  /* Count how many "batches" have been enqueued */
-	uint32_t aq_dequeued;  /* Count how many "batches" have been dequeued */
-	uint32_t irq_enable;  /* Enable ops dequeue interrupts if set to 1 */
-	struct rte_mempool *fcw_mempool;  /* FCW mempool */
-	enum rte_bbdev_op_type op_type;  /* Type of this Queue: TE or TD */
-	/* Internal Buffers for loopback input */
-	uint8_t *lb_in;
-	uint8_t *lb_out;
-	rte_iova_t lb_in_addr_iova;
-	rte_iova_t lb_out_addr_iova;
-	struct acc100_device *d;
-};
-
-typedef void (*acc10x_fcw_ld_fill_fun_t)(struct rte_bbdev_dec_op *op,
-		struct acc100_fcw_ld *fcw,
-		union acc100_harq_layout_data *harq_layout);
-
-/* Private data structure for each ACC100 device */
-struct acc100_device {
-	void *mmio_base;  /**< Base address of MMIO registers (BAR0) */
-	void *sw_rings_base;  /* Base addr of un-aligned memory for sw rings */
-	void *sw_rings;  /* 64MBs of 64MB aligned memory for sw rings */
-	rte_iova_t sw_rings_iova;  /* IOVA address of sw_rings */
-	/* Virtual address of the info memory routed to the this function under
-	 * operation, whether it is PF or VF.
-	 * HW may DMA information data at this location asynchronously
-	 */
-	union acc100_info_ring_data *info_ring;
-
-	union acc100_harq_layout_data *harq_layout;
-	/* Virtual Info Ring head */
-	uint16_t info_ring_head;
-	/* Number of bytes available for each queue in device, depending on
-	 * how many queues are enabled with configure()
-	 */
-	uint32_t sw_ring_size;
-	uint32_t ddr_size; /* Size in kB */
-	uint32_t *tail_ptrs; /* Base address of response tail pointer buffer */
-	rte_iova_t tail_ptr_iova; /* IOVA address of tail pointers */
-	/* Max number of entries available for each queue in device, depending
-	 * on how many queues are enabled with configure()
-	 */
-	uint32_t sw_ring_max_depth;
-	struct rte_acc100_conf acc100_conf; /* ACC100 Initial configuration */
-	/* Bitmap capturing which Queues have already been assigned */
-	uint16_t q_assigned_bit_map[ACC100_NUM_QGRPS];
-	bool pf_device; /**< True if this is a PF ACC100 device */
-	bool configured; /**< True if this ACC100 device is configured */
-	uint16_t device_variant;  /**< Device variant */
-	acc10x_fcw_ld_fill_fun_t fcw_ld_fill;  /**< 5GUL FCW generation function */
-};
-
-/**
- * Structure with details about RTE_BBDEV_EVENT_DEQUEUE event. It's passed to
- * the callback function.
- */
-struct acc100_deq_intr_details {
-	uint16_t queue_id;
-};
-
 #endif /* _RTE_ACC100_PMD_H_ */
diff --git a/drivers/baseband/acc100/acc101_pmd.h b/drivers/baseband/acc100/acc101_pmd.h
index 9d8862ce36..37df008330 100644
--- a/drivers/baseband/acc100/acc101_pmd.h
+++ b/drivers/baseband/acc100/acc101_pmd.h
@@ -11,16 +11,9 @@
 #define ACC101_NUM_VFS                  16
 #define ACC101_NUM_QGRPS                8
 #define ACC101_NUM_AQS                  16
-/* All ACC101 Registers alignment are 32bits = 4B */
-#define ACC101_BYTES_IN_WORD                 4
 
-#define ACC101_TMPL_PRI_0      0x03020100
-#define ACC101_TMPL_PRI_1      0x07060504
-#define ACC101_TMPL_PRI_2      0x0b0a0908
-#define ACC101_TMPL_PRI_3      0x0f0e0d0c
 #define ACC101_WORDS_IN_ARAM_SIZE (128 * 1024 / 4)
 
-#define ACC101_NUM_TMPL       32
 /* Mapping of signals for the available engines */
 #define ACC101_SIG_UL_5G      0
 #define ACC101_SIG_UL_5G_LAST 8
@@ -31,7 +24,6 @@
 #define ACC101_SIG_DL_4G      27
 #define ACC101_SIG_DL_4G_LAST 31
 #define ACC101_NUM_ACCS       5
-#define ACC101_PF_VAL         2
 
 /* ACC101 Configuration */
 #define ACC101_CFG_DMA_ERROR    0x3D7
@@ -39,8 +31,6 @@
 #define ACC101_CFG_QMGR_HI_P    0x0F0F
 #define ACC101_CFG_PCI_AXI      0xC003
 #define ACC101_CFG_PCI_BRIDGE   0x40006033
-#define ACC101_ENGINE_OFFSET    0x1000
-#define ACC101_LONG_WAIT        1000
 #define ACC101_GPEX_AXIMAP_NUM  17
 #define ACC101_CLOCK_GATING_EN  0x30000
 #define ACC101_DMA_INBOUND      0x104
diff --git a/drivers/baseband/acc100/acc_common.h b/drivers/baseband/acc100/acc_common.h
new file mode 100644
index 0000000000..f7ef4f8fcb
--- /dev/null
+++ b/drivers/baseband/acc100/acc_common.h
@@ -0,0 +1,1304 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Intel Corporation
+ */
+
+#ifndef _ACC_COMMON_H_
+#define _ACC_COMMON_H_
+
+#include <bus_pci_driver.h>
+#include "rte_acc_common_cfg.h"
+
+/* Values used in filling in descriptors */
+#define ACC_DMA_DESC_TYPE           2
+#define ACC_DMA_BLKID_FCW           1
+#define ACC_DMA_BLKID_IN            2
+#define ACC_DMA_BLKID_OUT_ENC       1
+#define ACC_DMA_BLKID_OUT_HARD      1
+#define ACC_DMA_BLKID_OUT_SOFT      2
+#define ACC_DMA_BLKID_OUT_HARQ      3
+#define ACC_DMA_BLKID_IN_HARQ       3
+#define ACC_DMA_BLKID_IN_MLD_R      3
+
+/* Values used in filling in decode FCWs */
+#define ACC_FCW_TD_VER              1
+#define ACC_FCW_TD_EXT_COLD_REG_EN  1
+#define ACC_FCW_TD_AUTOMAP          0x0f
+#define ACC_FCW_TD_RVIDX_0          2
+#define ACC_FCW_TD_RVIDX_1          26
+#define ACC_FCW_TD_RVIDX_2          50
+#define ACC_FCW_TD_RVIDX_3          74
+
+#define ACC_SIZE_64MBYTE            (64*1024*1024)
+/* Number of elements in an Info Ring */
+#define ACC_INFO_RING_NUM_ENTRIES   1024
+/* Number of elements in HARQ layout memory
+ * 128M x 32kB = 4GB addressable memory
+ */
+#define ACC_HARQ_LAYOUT             (128 * 1024 * 1024)
+/* Assume offset for HARQ in memory */
+#define ACC_HARQ_OFFSET             (32 * 1024)
+#define ACC_HARQ_OFFSET_SHIFT       15
+#define ACC_HARQ_OFFSET_MASK        0x7ffffff
+#define ACC_HARQ_OFFSET_THRESHOLD   1024
+/* Mask used to calculate an index in an Info Ring array (not a byte offset) */
+#define ACC_INFO_RING_MASK          (ACC_INFO_RING_NUM_ENTRIES-1)
+
+#define MAX_ENQ_BATCH_SIZE              255
+
+/* All ACC100 Registers alignment are 32bits = 4B */
+#define ACC_BYTES_IN_WORD                 4
+#define ACC_MAX_E_MBUF                64000
+
+#define ACC_VF_OFFSET_QOS   16 /* offset in Memory specific to QoS Mon */
+#define ACC_TMPL_PRI_0      0x03020100
+#define ACC_TMPL_PRI_1      0x07060504
+#define ACC_TMPL_PRI_2      0x0b0a0908
+#define ACC_TMPL_PRI_3      0x0f0e0d0c
+#define ACC_TMPL_PRI_4      0x13121110
+#define ACC_TMPL_PRI_5      0x17161514
+#define ACC_TMPL_PRI_6      0x1b1a1918
+#define ACC_TMPL_PRI_7      0x1f1e1d1c
+#define ACC_QUEUE_ENABLE    0x80000000  /* Bit to mark Queue as Enabled */
+#define ACC_FDONE           0x80000000
+#define ACC_SDONE           0x40000000
+
+#define ACC_NUM_TMPL       32
+
+#define ACC_ACCMAP_0       0
+#define ACC_ACCMAP_1       2
+#define ACC_ACCMAP_2       1
+#define ACC_ACCMAP_3       3
+#define ACC_ACCMAP_4       4
+#define ACC_ACCMAP_5       5
+#define ACC_PF_VAL         2
+
+/* max number of iterations to allocate memory block for all rings */
+#define ACC_SW_RING_MEM_ALLOC_ATTEMPTS 5
+#define ACC_MAX_QUEUE_DEPTH            1024
+#define ACC_DMA_MAX_NUM_POINTERS       14
+#define ACC_DMA_MAX_NUM_POINTERS_IN    7
+#define ACC_DMA_DESC_PADDINGS          8
+#define ACC_FCW_PADDING                12
+#define ACC_DESC_FCW_OFFSET            192
+#define ACC_DESC_SIZE                  256
+#define ACC_DESC_OFFSET                (ACC_DESC_SIZE / 64)
+#define ACC_FCW_TE_BLEN                32
+#define ACC_FCW_TD_BLEN                24
+#define ACC_FCW_LE_BLEN                32
+#define ACC_FCW_LD_BLEN                36
+#define ACC_FCW_FFT_BLEN               28
+#define ACC_5GUL_SIZE_0                16
+#define ACC_5GUL_SIZE_1                40
+#define ACC_5GUL_OFFSET_0              36
+#define ACC_COMPANION_PTRS             8
+#define ACC_FCW_VER                    2
+#define ACC_MUX_5GDL_DESC              6
+#define ACC_CMP_ENC_SIZE               20
+#define ACC_CMP_DEC_SIZE               24
+#define ACC_ENC_OFFSET                (32)
+#define ACC_DEC_OFFSET                (80)
+#define ACC_LIMIT_DL_MUX_BITS          534
+#define ACC_NUM_QGRPS_PER_WORD         8
+#define ACC_MAX_NUM_QGRPS              32
+
+/* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */
+#define ACC_N_ZC_1 66 /* N = 66 Zc for BG 1 */
+#define ACC_N_ZC_2 50 /* N = 50 Zc for BG 2 */
+#define ACC_K_ZC_1 22 /* K = 22 Zc for BG 1 */
+#define ACC_K_ZC_2 10 /* K = 10 Zc for BG 2 */
+#define ACC_K0_1_1 17 /* K0 fraction numerator for rv 1 and BG 1 */
+#define ACC_K0_1_2 13 /* K0 fraction numerator for rv 1 and BG 2 */
+#define ACC_K0_2_1 33 /* K0 fraction numerator for rv 2 and BG 1 */
+#define ACC_K0_2_2 25 /* K0 fraction numerator for rv 2 and BG 2 */
+#define ACC_K0_3_1 56 /* K0 fraction numerator for rv 3 and BG 1 */
+#define ACC_K0_3_2 43 /* K0 fraction numerator for rv 3 and BG 2 */
+
+#define ACC_ENGINE_OFFSET    0x1000
+#define ACC_LONG_WAIT        1000
+#define ACC_MS_IN_US         (1000)
+
+#define ACC_ALGO_SPA                0
+#define ACC_ALGO_MSA                1
+
+/* Helper macro for logging */
+#define rte_acc_log(level, fmt, ...) \
+	rte_log(RTE_LOG_ ## level, RTE_LOG_NOTICE, fmt "\n", \
+		##__VA_ARGS__)
+
+/* ACC100 DMA Descriptor triplet */
+struct acc_dma_triplet {
+	uint64_t address;
+	uint32_t blen:20,
+		res0:4,
+		last:1,
+		dma_ext:1,
+		res1:2,
+		blkid:4;
+} __rte_packed;
+
+
+/* ACC100 Queue Manager Enqueue PCI Register */
+union acc_enqueue_reg_fmt {
+	uint32_t val;
+	struct {
+		uint32_t num_elem:8,
+			addr_offset:3,
+			rsrvd:1,
+			req_elem_addr:20;
+	};
+};
+
+/* FEC 4G Uplink Frame Control Word */
+struct __rte_packed acc_fcw_td {
+	uint8_t fcw_ver:4,
+		num_maps:4; /* Unused in ACC100 */
+	uint8_t filler:6, /* Unused in ACC100 */
+		rsrvd0:1,
+		bypass_sb_deint:1;
+	uint16_t k_pos;
+	uint16_t k_neg; /* Unused in ACC100 */
+	uint8_t c_neg; /* Unused in ACC100 */
+	uint8_t c; /* Unused in ACC100 */
+	uint32_t ea; /* Unused in ACC100 */
+	uint32_t eb; /* Unused in ACC100 */
+	uint8_t cab; /* Unused in ACC100 */
+	uint8_t k0_start_col; /* Unused in ACC100 */
+	uint8_t rsrvd1;
+	uint8_t code_block_mode:1, /* Unused in ACC100 */
+		turbo_crc_type:1,
+		rsrvd2:3,
+		bypass_teq:1, /* Unused in ACC100 */
+		soft_output_en:1, /* Unused in ACC100 */
+		ext_td_cold_reg_en:1;
+	union { /* External Cold register */
+		uint32_t ext_td_cold_reg;
+		struct {
+			uint32_t min_iter:4, /* Unused in ACC100 */
+				max_iter:4,
+				ext_scale:5, /* Unused in ACC100 */
+				rsrvd3:3,
+				early_stop_en:1, /* Unused in ACC100 */
+				sw_soft_out_dis:1, /* Unused in ACC100 */
+				sw_et_cont:1, /* Unused in ACC100 */
+				sw_soft_out_saturation:1, /* Unused in ACC100 */
+				half_iter_on:1, /* Unused in ACC100 */
+				raw_decoder_input_on:1, /* Unused in ACC100 */
+				rsrvd4:10;
+		};
+	};
+};
+
+/* FEC 4G Downlink Frame Control Word */
+struct __rte_packed acc_fcw_te {
+	uint16_t k_neg;
+	uint16_t k_pos;
+	uint8_t c_neg;
+	uint8_t c;
+	uint8_t filler;
+	uint8_t cab;
+	uint32_t ea:17,
+		rsrvd0:15;
+	uint32_t eb:17,
+		rsrvd1:15;
+	uint16_t ncb_neg;
+	uint16_t ncb_pos;
+	uint8_t rv_idx0:2,
+		rsrvd2:2,
+		rv_idx1:2,
+		rsrvd3:2;
+	uint8_t bypass_rv_idx0:1,
+		bypass_rv_idx1:1,
+		bypass_rm:1,
+		rsrvd4:5;
+	uint8_t rsrvd5:1,
+		rsrvd6:3,
+		code_block_crc:1,
+		rsrvd7:3;
+	uint8_t code_block_mode:1,
+		rsrvd8:7;
+	uint64_t rsrvd9;
+};
+
+/* FEC 5GNR Downlink Frame Control Word */
+struct __rte_packed acc_fcw_le {
+	uint32_t FCWversion:4,
+		qm:4,
+		nfiller:11,
+		BG:1,
+		Zc:9,
+		res0:3;
+	uint32_t ncb:16,
+		k0:16;
+	uint32_t rm_e:22,
+		res1:4,
+		crc_select:1,
+		res2:1,
+		bypass_intlv:1,
+		res3:3;
+	uint32_t res4_a:12,
+		mcb_count:3,
+		res4_b:1,
+		C:8,
+		Cab:8;
+	uint32_t rm_e_b:22,
+		res5:10;
+	uint32_t res6;
+	uint32_t res7;
+	uint32_t res8;
+};
+
+/* FEC 5GNR Uplink Frame Control Word */
+struct __rte_packed acc_fcw_ld {
+	uint32_t FCWversion:4,
+		qm:4,
+		nfiller:11,
+		BG:1,
+		Zc:9,
+		cnu_algo:1, /* Not supported in ACC100 */
+		synd_precoder:1,
+		synd_post:1;
+	uint32_t ncb:16,
+		k0:16;
+	uint32_t rm_e:24,
+		hcin_en:1,
+		hcout_en:1,
+		crc_select:1,
+		bypass_dec:1,
+		bypass_intlv:1,
+		so_en:1,
+		so_bypass_rm:1,
+		so_bypass_intlv:1;
+	uint32_t hcin_offset:16,
+		hcin_size0:16;
+	uint32_t hcin_size1:16,
+		hcin_decomp_mode:3,
+		llr_pack_mode:1,
+		hcout_comp_mode:3,
+		saturate_input:1, /* Not supported in ACC200 */
+		dec_convllr:4,
+		hcout_convllr:4;
+	uint32_t itmax:7,
+		itstop:1,
+		so_it:7,
+		minsum_offset:1,  /* Not supported in ACC200 */
+		hcout_offset:16;
+	uint32_t hcout_size0:16,
+		hcout_size1:16;
+	uint32_t gain_i:8,
+		gain_h:8,
+		negstop_th:16;
+	uint32_t negstop_it:7,
+		negstop_en:1,
+		tb_crc_select:2, /* Not supported in ACC100 */
+		dec_llrclip:2,  /* Not supported in ACC200 */
+		tb_trailer_size:20; /* Not supported in ACC100 */
+};
+
+/* FFT Frame Control Word */
+struct __rte_packed acc_fcw_fft {
+	uint32_t in_frame_size:16,
+		leading_pad_size:16;
+	uint32_t out_frame_size:16,
+		leading_depad_size:16;
+	uint32_t cs_window_sel;
+	uint32_t cs_window_sel2:16,
+		cs_enable_bmap:16;
+	uint32_t num_antennas:8,
+		idft_size:8,
+		dft_size:8,
+		cs_offset:8;
+	uint32_t idft_shift:8,
+		dft_shift:8,
+		cs_multiplier:16;
+	uint32_t bypass:2,
+		fp16_in:1, /* Not supported in ACC200 */
+		fp16_out:1,
+		exp_adj:4,
+		power_shift:4,
+		power_en:1,
+		res:19;
+};
+
+/* MLD-TS Frame Control Word */
+struct __rte_packed acc_fcw_mldts {
+	uint32_t fcw_version:4,
+		res0:12,
+		nrb:13, /* 1 to 1925 */
+		res1:3;
+	uint32_t NLayers:2, /* 1: 2L... 3: 4L */
+		res2:14,
+		Qmod0:2, /* 0: 2...3: 8 */
+		res3_0:2,
+		Qmod1:2,
+		res3_1:2,
+		Qmod2:2,
+		res3_2:2,
+		Qmod3:2,
+		res3_3:2;
+	uint32_t Rrep:3, /* 0 to 5 */
+		res4:1,
+		Crep:3, /* 0 to 6 */
+		res5:25;
+	uint32_t pad0;
+	uint32_t pad1;
+	uint32_t pad2;
+	uint32_t pad3;
+	uint32_t pad4;
+};
+
+/* DMA Response Descriptor */
+union acc_dma_rsp_desc {
+	uint32_t val;
+	struct {
+		uint32_t crc_status:1,
+			synd_ok:1,
+			dma_err:1,
+			neg_stop:1,
+			fcw_err:1,
+			output_truncate:1,
+			input_err:1,
+			tsen_pagefault:1,
+			iterCountFrac:8,
+			iter_cnt:8,
+			engine_hung:1,
+			core_reset:5,
+			sdone:1,
+			fdone:1;
+		uint32_t add_info_0;
+		uint32_t add_info_1;
+	};
+};
+
+/* DMA Request Descriptor */
+struct __rte_packed acc_dma_req_desc {
+	union {
+		struct{
+			uint32_t type:4,
+				rsrvd0:26,
+				sdone:1,
+				fdone:1;
+			uint32_t ib_ant_offset:16, /* Not supported in ACC100 */
+				res2:12,
+				num_ant:4;
+			uint32_t ob_ant_offset:16,
+				ob_cyc_offset:12,
+				num_cs:4;
+			uint32_t pass_param:8,
+				sdone_enable:1,
+				irq_enable:1,
+				timeStampEn:1,
+				dltb:1, /* Not supported in ACC200 */
+				res0:4,
+				numCBs:8,
+				m2dlen:4,
+				d2mlen:4;
+		};
+		struct{
+			uint32_t word0;
+			uint32_t word1;
+			uint32_t word2;
+			uint32_t word3;
+		};
+	};
+	struct acc_dma_triplet data_ptrs[ACC_DMA_MAX_NUM_POINTERS];
+
+	/* Virtual addresses used to retrieve SW context info */
+	union {
+		void *op_addr;
+		uint64_t pad1;  /* pad to 64 bits */
+	};
+	/*
+	 * Stores additional information needed for driver processing:
+	 * - last_desc_in_batch - flag used to mark last descriptor (CB)
+	 *                        in batch
+	 * - cbs_in_tb - stores information about total number of Code Blocks
+	 *               in currently processed Transport Block
+	 */
+	union {
+		struct {
+			union {
+				struct acc_fcw_ld fcw_ld;
+				struct acc_fcw_td fcw_td;
+				struct acc_fcw_le fcw_le;
+				struct acc_fcw_te fcw_te;
+				struct acc_fcw_fft fcw_fft;
+				struct acc_fcw_mldts fcw_mldts;
+				uint32_t pad2[ACC_FCW_PADDING];
+			};
+			uint32_t last_desc_in_batch :8,
+				cbs_in_tb:8,
+				pad4 : 16;
+		};
+		uint64_t pad3[ACC_DMA_DESC_PADDINGS]; /* pad to 64 bits */
+	};
+};
+
+/* ACC100 DMA Descriptor */
+union acc_dma_desc {
+	struct acc_dma_req_desc req;
+	union acc_dma_rsp_desc rsp;
+	uint64_t atom_hdr;
+};
+
+/* Union describing Info Ring entry */
+union acc_info_ring_data {
+	uint32_t val;
+	struct {
+		union {
+			uint16_t detailed_info;
+			struct {
+				uint16_t aq_id: 4;
+				uint16_t qg_id: 4;
+				uint16_t vf_id: 6;
+				uint16_t reserved: 2;
+			};
+		};
+		uint16_t int_nb: 7;
+		uint16_t msi_0: 1;
+		uint16_t vf2pf: 6;
+		uint16_t loop: 1;
+		uint16_t valid: 1;
+	};
+	struct {
+		uint32_t aq_id_3: 6;
+		uint32_t qg_id_3: 5;
+		uint32_t vf_id_3: 6;
+		uint32_t int_nb_3: 6;
+		uint32_t msi_0_3: 1;
+		uint32_t vf2pf_3: 6;
+		uint32_t loop_3: 1;
+		uint32_t valid_3: 1;
+	};
+} __rte_packed;
+
+struct __rte_packed acc_pad_ptr {
+	void *op_addr;
+	uint64_t pad1;  /* pad to 64 bits */
+};
+
+struct __rte_packed acc_ptrs {
+	struct acc_pad_ptr ptr[ACC_COMPANION_PTRS];
+};
+
+/* Union describing Info Ring entry */
+union acc_harq_layout_data {
+	uint32_t val;
+	struct {
+		uint16_t offset;
+		uint16_t size0;
+	};
+} __rte_packed;
+
+/**
+ * Structure with details about RTE_BBDEV_EVENT_DEQUEUE event. It's passed to
+ * the callback function.
+ */
+struct acc_deq_intr_details {
+	uint16_t queue_id;
+};
+
+/* TIP VF2PF Comms */
+enum {
+	ACC_VF2PF_STATUS_REQUEST = 1,
+	ACC_VF2PF_USING_VF = 2,
+};
+
+
+typedef void (*acc10x_fcw_ld_fill_fun_t)(struct rte_bbdev_dec_op *op,
+		struct acc_fcw_ld *fcw,
+		union acc_harq_layout_data *harq_layout);
+
+/* Private data structure for each ACC100 device */
+struct acc_device {
+	void *mmio_base;  /**< Base address of MMIO registers (BAR0) */
+	void *sw_rings_base;  /* Base addr of un-aligned memory for sw rings */
+	void *sw_rings;  /* 64MBs of 64MB aligned memory for sw rings */
+	rte_iova_t sw_rings_iova;  /* IOVA address of sw_rings */
+	/* Virtual address of the info memory routed to the this function under
+	 * operation, whether it is PF or VF.
+	 * HW may DMA information data at this location asynchronously
+	 */
+	union acc_info_ring_data *info_ring;
+
+	union acc_harq_layout_data *harq_layout;
+	/* Virtual Info Ring head */
+	uint16_t info_ring_head;
+	/* Number of bytes available for each queue in device, depending on
+	 * how many queues are enabled with configure()
+	 */
+	uint32_t sw_ring_size;
+	uint32_t ddr_size; /* Size in kB */
+	uint32_t *tail_ptrs; /* Base address of response tail pointer buffer */
+	rte_iova_t tail_ptr_iova; /* IOVA address of tail pointers */
+	/* Max number of entries available for each queue in device, depending
+	 * on how many queues are enabled with configure()
+	 */
+	uint32_t sw_ring_max_depth;
+	struct rte_acc_conf acc_conf; /* ACC100 Initial configuration */
+	/* Bitmap capturing which Queues have already been assigned */
+	uint64_t q_assigned_bit_map[ACC_MAX_NUM_QGRPS];
+	bool pf_device; /**< True if this is a PF ACC100 device */
+	bool configured; /**< True if this ACC100 device is configured */
+	uint16_t device_variant;  /**< Device variant */
+	acc10x_fcw_ld_fill_fun_t fcw_ld_fill;  /**< 5GUL FCW generation function */
+};
+
+/* Structure associated with each queue. */
+struct __rte_cache_aligned acc_queue {
+	union acc_dma_desc *ring_addr;  /* Virtual address of sw ring */
+	rte_iova_t ring_addr_iova;  /* IOVA address of software ring */
+	uint32_t sw_ring_head;  /* software ring head */
+	uint32_t sw_ring_tail;  /* software ring tail */
+	/* software ring size (descriptors, not bytes) */
+	uint32_t sw_ring_depth;
+	/* mask used to wrap enqueued descriptors on the sw ring */
+	uint32_t sw_ring_wrap_mask;
+	/* Virtual address of companion ring */
+	struct acc_ptrs *companion_ring_addr;
+	/* MMIO register used to enqueue descriptors */
+	void *mmio_reg_enqueue;
+	uint8_t vf_id;  /* VF ID (max = 63) */
+	uint8_t qgrp_id;  /* Queue Group ID */
+	uint16_t aq_id;  /* Atomic Queue ID */
+	uint16_t aq_depth;  /* Depth of atomic queue */
+	uint32_t aq_enqueued;  /* Count how many "batches" have been enqueued */
+	uint32_t aq_dequeued;  /* Count how many "batches" have been dequeued */
+	uint32_t irq_enable;  /* Enable ops dequeue interrupts if set to 1 */
+	struct rte_mempool *fcw_mempool;  /* FCW mempool */
+	enum rte_bbdev_op_type op_type;  /* Type of this Queue: TE or TD */
+	/* Internal Buffers for loopback input */
+	uint8_t *lb_in;
+	uint8_t *lb_out;
+	rte_iova_t lb_in_addr_iova;
+	rte_iova_t lb_out_addr_iova;
+	int8_t *derm_buffer; /* interim buffer for de-rm in SDK */
+	struct acc_device *d;
+};
+
+/* Write to MMIO register address */
+static inline void
+mmio_write(void *addr, uint32_t value)
+{
+	*((volatile uint32_t *)(addr)) = rte_cpu_to_le_32(value);
+}
+
+/* Write a register of a ACC100 device */
+static inline void
+acc_reg_write(struct acc_device *d, uint32_t offset, uint32_t value)
+{
+	void *reg_addr = RTE_PTR_ADD(d->mmio_base, offset);
+	mmio_write(reg_addr, value);
+	usleep(ACC_LONG_WAIT);
+}
+
+/* Read a register of a ACC100 device */
+static inline uint32_t
+acc_reg_read(struct acc_device *d, uint32_t offset)
+{
+
+	void *reg_addr = RTE_PTR_ADD(d->mmio_base, offset);
+	uint32_t ret = *((volatile uint32_t *)(reg_addr));
+	return rte_le_to_cpu_32(ret);
+}
+
+/* Basic Implementation of Log2 for exact 2^N */
+static inline uint32_t
+log2_basic(uint32_t value)
+{
+	return (value == 0) ? 0 : rte_bsf32(value);
+}
+
+/* Calculate memory alignment offset assuming alignment is 2^N */
+static inline uint32_t
+calc_mem_alignment_offset(void *unaligned_virt_mem, uint32_t alignment)
+{
+	rte_iova_t unaligned_phy_mem = rte_malloc_virt2iova(unaligned_virt_mem);
+	return (uint32_t)(alignment -
+			(unaligned_phy_mem & (alignment-1)));
+}
+
+static void
+free_base_addresses(void **base_addrs, int size)
+{
+	int i;
+	for (i = 0; i < size; i++)
+		rte_free(base_addrs[i]);
+}
+
+/* Read flag value 0/1 from bitmap */
+static inline bool
+check_bit(uint32_t bitmap, uint32_t bitmask)
+{
+	return bitmap & bitmask;
+}
+
+static inline char *
+mbuf_append(struct rte_mbuf *m_head, struct rte_mbuf *m, uint16_t len)
+{
+	if (unlikely(len > rte_pktmbuf_tailroom(m)))
+		return NULL;
+
+	char *tail = (char *)m->buf_addr + m->data_off + m->data_len;
+	m->data_len = (uint16_t)(m->data_len + len);
+	m_head->pkt_len  = (m_head->pkt_len + len);
+	return tail;
+}
+
+
+static inline uint32_t
+get_desc_len(void)
+{
+	return sizeof(union acc_dma_desc);
+}
+
+/* Allocate the 2 * 64MB block for the sw rings */
+static inline int
+alloc_2x64mb_sw_rings_mem(struct rte_bbdev *dev, struct acc_device *d,
+		int socket)
+{
+	uint32_t sw_ring_size = ACC_SIZE_64MBYTE;
+	d->sw_rings_base = rte_zmalloc_socket(dev->device->driver->name,
+			2 * sw_ring_size, RTE_CACHE_LINE_SIZE, socket);
+	if (d->sw_rings_base == NULL) {
+		rte_acc_log(ERR, "Failed to allocate memory for %s:%u",
+				dev->device->driver->name,
+				dev->data->dev_id);
+		return -ENOMEM;
+	}
+	uint32_t next_64mb_align_offset = calc_mem_alignment_offset(
+			d->sw_rings_base, ACC_SIZE_64MBYTE);
+	d->sw_rings = RTE_PTR_ADD(d->sw_rings_base, next_64mb_align_offset);
+	d->sw_rings_iova = rte_malloc_virt2iova(d->sw_rings_base) +
+			next_64mb_align_offset;
+	d->sw_ring_size = ACC_MAX_QUEUE_DEPTH * get_desc_len();
+	d->sw_ring_max_depth = ACC_MAX_QUEUE_DEPTH;
+
+	return 0;
+}
+
+/* Attempt to allocate minimised memory space for sw rings */
+static inline void
+alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc_device *d,
+		uint16_t num_queues, int socket)
+{
+	rte_iova_t sw_rings_base_iova, next_64mb_align_addr_iova;
+	uint32_t next_64mb_align_offset;
+	rte_iova_t sw_ring_iova_end_addr;
+	void *base_addrs[ACC_SW_RING_MEM_ALLOC_ATTEMPTS];
+	void *sw_rings_base;
+	int i = 0;
+	uint32_t q_sw_ring_size = ACC_MAX_QUEUE_DEPTH * get_desc_len();
+	uint32_t dev_sw_ring_size = q_sw_ring_size * num_queues;
+	/* Free first in case this is a reconfiguration */
+	rte_free(d->sw_rings_base);
+
+	/* Find an aligned block of memory to store sw rings */
+	while (i < ACC_SW_RING_MEM_ALLOC_ATTEMPTS) {
+		/*
+		 * sw_ring allocated memory is guaranteed to be aligned to
+		 * q_sw_ring_size at the condition that the requested size is
+		 * less than the page size
+		 */
+		sw_rings_base = rte_zmalloc_socket(
+				dev->device->driver->name,
+				dev_sw_ring_size, q_sw_ring_size, socket);
+
+		if (sw_rings_base == NULL) {
+			rte_acc_log(ERR,
+					"Failed to allocate memory for %s:%u",
+					dev->device->driver->name,
+					dev->data->dev_id);
+			break;
+		}
+
+		sw_rings_base_iova = rte_malloc_virt2iova(sw_rings_base);
+		next_64mb_align_offset = calc_mem_alignment_offset(
+				sw_rings_base, ACC_SIZE_64MBYTE);
+		next_64mb_align_addr_iova = sw_rings_base_iova +
+				next_64mb_align_offset;
+		sw_ring_iova_end_addr = sw_rings_base_iova + dev_sw_ring_size;
+
+		/* Check if the end of the sw ring memory block is before the
+		 * start of next 64MB aligned mem address
+		 */
+		if (sw_ring_iova_end_addr < next_64mb_align_addr_iova) {
+			d->sw_rings_iova = sw_rings_base_iova;
+			d->sw_rings = sw_rings_base;
+			d->sw_rings_base = sw_rings_base;
+			d->sw_ring_size = q_sw_ring_size;
+			d->sw_ring_max_depth = ACC_MAX_QUEUE_DEPTH;
+			break;
+		}
+		/* Store the address of the unaligned mem block */
+		base_addrs[i] = sw_rings_base;
+		i++;
+	}
+
+	/* Free all unaligned blocks of mem allocated in the loop */
+	free_base_addresses(base_addrs, i);
+}
+
+/*
+ * Find queue_id of a device queue based on details from the Info Ring.
+ * If a queue isn't found UINT16_MAX is returned.
+ */
+static inline uint16_t
+get_queue_id_from_ring_info(struct rte_bbdev_data *data,
+		const union acc_info_ring_data ring_data)
+{
+	uint16_t queue_id;
+
+	for (queue_id = 0; queue_id < data->num_queues; ++queue_id) {
+		struct acc_queue *acc_q =
+				data->queues[queue_id].queue_private;
+		if (acc_q != NULL && acc_q->aq_id == ring_data.aq_id &&
+				acc_q->qgrp_id == ring_data.qg_id &&
+				acc_q->vf_id == ring_data.vf_id)
+			return queue_id;
+	}
+
+	return UINT16_MAX;
+}
+
+/* Fill in a frame control word for turbo encoding. */
+static inline void
+acc_fcw_te_fill(const struct rte_bbdev_enc_op *op, struct acc_fcw_te *fcw)
+{
+	fcw->code_block_mode = op->turbo_enc.code_block_mode;
+	if (fcw->code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) {
+		fcw->k_neg = op->turbo_enc.tb_params.k_neg;
+		fcw->k_pos = op->turbo_enc.tb_params.k_pos;
+		fcw->c_neg = op->turbo_enc.tb_params.c_neg;
+		fcw->c = op->turbo_enc.tb_params.c;
+		fcw->ncb_neg = op->turbo_enc.tb_params.ncb_neg;
+		fcw->ncb_pos = op->turbo_enc.tb_params.ncb_pos;
+
+		if (check_bit(op->turbo_enc.op_flags,
+				RTE_BBDEV_TURBO_RATE_MATCH)) {
+			fcw->bypass_rm = 0;
+			fcw->cab = op->turbo_enc.tb_params.cab;
+			fcw->ea = op->turbo_enc.tb_params.ea;
+			fcw->eb = op->turbo_enc.tb_params.eb;
+		} else {
+			/* E is set to the encoding output size when RM is
+			 * bypassed.
+			 */
+			fcw->bypass_rm = 1;
+			fcw->cab = fcw->c_neg;
+			fcw->ea = 3 * fcw->k_neg + 12;
+			fcw->eb = 3 * fcw->k_pos + 12;
+		}
+	} else { /* For CB mode */
+		fcw->k_pos = op->turbo_enc.cb_params.k;
+		fcw->ncb_pos = op->turbo_enc.cb_params.ncb;
+
+		if (check_bit(op->turbo_enc.op_flags,
+				RTE_BBDEV_TURBO_RATE_MATCH)) {
+			fcw->bypass_rm = 0;
+			fcw->eb = op->turbo_enc.cb_params.e;
+		} else {
+			/* E is set to the encoding output size when RM is
+			 * bypassed.
+			 */
+			fcw->bypass_rm = 1;
+			fcw->eb = 3 * fcw->k_pos + 12;
+		}
+	}
+
+	fcw->bypass_rv_idx1 = check_bit(op->turbo_enc.op_flags,
+			RTE_BBDEV_TURBO_RV_INDEX_BYPASS);
+	fcw->code_block_crc = check_bit(op->turbo_enc.op_flags,
+			RTE_BBDEV_TURBO_CRC_24B_ATTACH);
+	fcw->rv_idx1 = op->turbo_enc.rv_index;
+}
+
+/* Compute value of k0.
+ * Based on 3GPP 38.212 Table 5.4.2.1-2
+ * Starting position of different redundancy versions, k0
+ */
+static inline uint16_t
+get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
+{
+	if (rv_index == 0)
+		return 0;
+	uint16_t n = (bg == 1 ? ACC_N_ZC_1 : ACC_N_ZC_2) * z_c;
+	if (n_cb == n) {
+		if (rv_index == 1)
+			return (bg == 1 ? ACC_K0_1_1 : ACC_K0_1_2) * z_c;
+		else if (rv_index == 2)
+			return (bg == 1 ? ACC_K0_2_1 : ACC_K0_2_2) * z_c;
+		else
+			return (bg == 1 ? ACC_K0_3_1 : ACC_K0_3_2) * z_c;
+	}
+	/* LBRM case - includes a division by N */
+	if (unlikely(z_c == 0))
+		return 0;
+	if (rv_index == 1)
+		return (((bg == 1 ? ACC_K0_1_1 : ACC_K0_1_2) * n_cb)
+				/ n) * z_c;
+	else if (rv_index == 2)
+		return (((bg == 1 ? ACC_K0_2_1 : ACC_K0_2_2) * n_cb)
+				/ n) * z_c;
+	else
+		return (((bg == 1 ? ACC_K0_3_1 : ACC_K0_3_2) * n_cb)
+				/ n) * z_c;
+}
+
+/* Fill in a frame control word for LDPC encoding. */
+static inline void
+acc_fcw_le_fill(const struct rte_bbdev_enc_op *op,
+		struct acc_fcw_le *fcw, int num_cb, uint32_t default_e)
+{
+	fcw->qm = op->ldpc_enc.q_m;
+	fcw->nfiller = op->ldpc_enc.n_filler;
+	fcw->BG = (op->ldpc_enc.basegraph - 1);
+	fcw->Zc = op->ldpc_enc.z_c;
+	fcw->ncb = op->ldpc_enc.n_cb;
+	fcw->k0 = get_k0(fcw->ncb, fcw->Zc, op->ldpc_enc.basegraph,
+			op->ldpc_enc.rv_index);
+	fcw->rm_e = (default_e == 0) ? op->ldpc_enc.cb_params.e : default_e;
+	fcw->crc_select = check_bit(op->ldpc_enc.op_flags,
+			RTE_BBDEV_LDPC_CRC_24B_ATTACH);
+	fcw->bypass_intlv = check_bit(op->ldpc_enc.op_flags,
+			RTE_BBDEV_LDPC_INTERLEAVER_BYPASS);
+	fcw->mcb_count = num_cb;
+}
+
+/* Enqueue a number of operations to HW and update software rings */
+static inline void
+acc_dma_enqueue(struct acc_queue *q, uint16_t n,
+		struct rte_bbdev_stats *queue_stats)
+{
+	union acc_enqueue_reg_fmt enq_req;
+#ifdef RTE_BBDEV_OFFLOAD_COST
+	uint64_t start_time = 0;
+	queue_stats->acc_offload_cycles = 0;
+#else
+	RTE_SET_USED(queue_stats);
+#endif
+
+	enq_req.val = 0;
+	/* Setting offset, 100b for 256 DMA Desc */
+	enq_req.addr_offset = ACC_DESC_OFFSET;
+
+	/* Split ops into batches */
+	do {
+		union acc_dma_desc *desc;
+		uint16_t enq_batch_size;
+		uint64_t offset;
+		rte_iova_t req_elem_addr;
+
+		enq_batch_size = RTE_MIN(n, MAX_ENQ_BATCH_SIZE);
+
+		/* Set flag on last descriptor in a batch */
+		desc = q->ring_addr + ((q->sw_ring_head + enq_batch_size - 1) &
+				q->sw_ring_wrap_mask);
+		desc->req.last_desc_in_batch = 1;
+
+		/* Calculate the 1st descriptor's address */
+		offset = ((q->sw_ring_head & q->sw_ring_wrap_mask) *
+				sizeof(union acc_dma_desc));
+		req_elem_addr = q->ring_addr_iova + offset;
+
+		/* Fill enqueue struct */
+		enq_req.num_elem = enq_batch_size;
+		/* low 6 bits are not needed */
+		enq_req.req_elem_addr = (uint32_t)(req_elem_addr >> 6);
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+		rte_memdump(stderr, "Req sdone", desc, sizeof(*desc));
+#endif
+		rte_acc_log(DEBUG, "Enqueue %u reqs (phys %#"PRIx64") to reg %p",
+				enq_batch_size,
+				req_elem_addr,
+				(void *)q->mmio_reg_enqueue);
+
+		rte_wmb();
+
+#ifdef RTE_BBDEV_OFFLOAD_COST
+		/* Start time measurement for enqueue function offload. */
+		start_time = rte_rdtsc_precise();
+#endif
+		rte_acc_log(DEBUG, "Debug : MMIO Enqueue");
+		mmio_write(q->mmio_reg_enqueue, enq_req.val);
+
+#ifdef RTE_BBDEV_OFFLOAD_COST
+		queue_stats->acc_offload_cycles +=
+				rte_rdtsc_precise() - start_time;
+#endif
+
+		q->aq_enqueued++;
+		q->sw_ring_head += enq_batch_size;
+		n -= enq_batch_size;
+
+	} while (n);
+
+
+}
+
+/* Convert offset to harq index for harq_layout structure */
+static inline uint32_t hq_index(uint32_t offset)
+{
+	return (offset >> ACC_HARQ_OFFSET_SHIFT) & ACC_HARQ_OFFSET_MASK;
+}
+
+/* Calculates number of CBs in processed encoder TB based on 'r' and input
+ * length.
+ */
+static inline uint8_t
+get_num_cbs_in_tb_enc(struct rte_bbdev_op_turbo_enc *turbo_enc)
+{
+	uint8_t c, c_neg, r, crc24_bits = 0;
+	uint16_t k, k_neg, k_pos;
+	uint8_t cbs_in_tb = 0;
+	int32_t length;
+
+	length = turbo_enc->input.length;
+	r = turbo_enc->tb_params.r;
+	c = turbo_enc->tb_params.c;
+	c_neg = turbo_enc->tb_params.c_neg;
+	k_neg = turbo_enc->tb_params.k_neg;
+	k_pos = turbo_enc->tb_params.k_pos;
+	crc24_bits = 0;
+	if (check_bit(turbo_enc->op_flags, RTE_BBDEV_TURBO_CRC_24B_ATTACH))
+		crc24_bits = 24;
+	while (length > 0 && r < c) {
+		k = (r < c_neg) ? k_neg : k_pos;
+		length -= (k - crc24_bits) >> 3;
+		r++;
+		cbs_in_tb++;
+	}
+
+	return cbs_in_tb;
+}
+
+/* Calculates number of CBs in processed decoder TB based on 'r' and input
+ * length.
+ */
+static inline uint16_t
+get_num_cbs_in_tb_dec(struct rte_bbdev_op_turbo_dec *turbo_dec)
+{
+	uint8_t c, c_neg, r = 0;
+	uint16_t kw, k, k_neg, k_pos, cbs_in_tb = 0;
+	int32_t length;
+
+	length = turbo_dec->input.length;
+	r = turbo_dec->tb_params.r;
+	c = turbo_dec->tb_params.c;
+	c_neg = turbo_dec->tb_params.c_neg;
+	k_neg = turbo_dec->tb_params.k_neg;
+	k_pos = turbo_dec->tb_params.k_pos;
+	while (length > 0 && r < c) {
+		k = (r < c_neg) ? k_neg : k_pos;
+		kw = RTE_ALIGN_CEIL(k + 4, 32) * 3;
+		length -= kw;
+		r++;
+		cbs_in_tb++;
+	}
+
+	return cbs_in_tb;
+}
+
+/* Calculates number of CBs in processed decoder TB based on 'r' and input
+ * length.
+ */
+static inline uint16_t
+get_num_cbs_in_tb_ldpc_dec(struct rte_bbdev_op_ldpc_dec *ldpc_dec)
+{
+	uint16_t r, cbs_in_tb = 0;
+	int32_t length = ldpc_dec->input.length;
+	r = ldpc_dec->tb_params.r;
+	while (length > 0 && r < ldpc_dec->tb_params.c) {
+		length -=  (r < ldpc_dec->tb_params.cab) ?
+				ldpc_dec->tb_params.ea :
+				ldpc_dec->tb_params.eb;
+		r++;
+		cbs_in_tb++;
+	}
+	return cbs_in_tb;
+}
+
+/* Check we can mux encode operations with common FCW */
+static inline int16_t
+check_mux(struct rte_bbdev_enc_op **ops, uint16_t num) {
+	uint16_t i;
+	if (num <= 1)
+		return 1;
+	for (i = 1; i < num; ++i) {
+		/* Only mux compatible code blocks */
+		if (memcmp((uint8_t *)(&ops[i]->ldpc_enc) + ACC_ENC_OFFSET,
+				(uint8_t *)(&ops[0]->ldpc_enc) +
+				ACC_ENC_OFFSET,
+				ACC_CMP_ENC_SIZE) != 0)
+			return i;
+	}
+	/* Avoid multiplexing small inbound size frames */
+	int Kp = (ops[0]->ldpc_enc.basegraph == 1 ? 22 : 10) *
+			ops[0]->ldpc_enc.z_c - ops[0]->ldpc_enc.n_filler;
+	if (Kp  <= ACC_LIMIT_DL_MUX_BITS)
+		return 1;
+	return num;
+}
+
+/* Check we can mux encode operations with common FCW */
+static inline bool
+cmp_ldpc_dec_op(struct rte_bbdev_dec_op **ops) {
+	/* Only mux compatible code blocks */
+	if (memcmp((uint8_t *)(&ops[0]->ldpc_dec) + ACC_DEC_OFFSET,
+			(uint8_t *)(&ops[1]->ldpc_dec) +
+			ACC_DEC_OFFSET, ACC_CMP_DEC_SIZE) != 0) {
+		return false;
+	} else
+		return true;
+}
+
+/**
+ * Fills descriptor with data pointers of one block type.
+ *
+ * @param desc
+ *   Pointer to DMA descriptor.
+ * @param input
+ *   Pointer to pointer to input data which will be encoded. It can be changed
+ *   and points to next segment in scatter-gather case.
+ * @param offset
+ *   Input offset in rte_mbuf structure. It is used for calculating the point
+ *   where data is starting.
+ * @param cb_len
+ *   Length of currently processed Code Block
+ * @param seg_total_left
+ *   It indicates how many bytes still left in segment (mbuf) for further
+ *   processing.
+ * @param op_flags
+ *   Store information about device capabilities
+ * @param next_triplet
+ *   Index for ACC200 DMA Descriptor triplet
+ * @param scattergather
+ *   Flag to support scatter-gather for the mbuf
+ *
+ * @return
+ *   Returns index of next triplet on success, other value if lengths of
+ *   pkt and processed cb do not match.
+ *
+ */
+static inline int
+acc_dma_fill_blk_type_in(struct acc_dma_req_desc *desc,
+		struct rte_mbuf **input, uint32_t *offset, uint32_t cb_len,
+		uint32_t *seg_total_left, int next_triplet,
+		bool scattergather)
+{
+	uint32_t part_len;
+	struct rte_mbuf *m = *input;
+	if (scattergather)
+		part_len = (*seg_total_left < cb_len) ?
+				*seg_total_left : cb_len;
+	else
+		part_len = cb_len;
+	cb_len -= part_len;
+	*seg_total_left -= part_len;
+
+	desc->data_ptrs[next_triplet].address =
+			rte_pktmbuf_iova_offset(m, *offset);
+	desc->data_ptrs[next_triplet].blen = part_len;
+	desc->data_ptrs[next_triplet].blkid = ACC_DMA_BLKID_IN;
+	desc->data_ptrs[next_triplet].last = 0;
+	desc->data_ptrs[next_triplet].dma_ext = 0;
+	*offset += part_len;
+	next_triplet++;
+
+	while (cb_len > 0) {
+		if (next_triplet < ACC_DMA_MAX_NUM_POINTERS_IN && m->next != NULL) {
+
+			m = m->next;
+			*seg_total_left = rte_pktmbuf_data_len(m);
+			part_len = (*seg_total_left < cb_len) ?
+					*seg_total_left :
+					cb_len;
+			desc->data_ptrs[next_triplet].address =
+					rte_pktmbuf_iova_offset(m, 0);
+			desc->data_ptrs[next_triplet].blen = part_len;
+			desc->data_ptrs[next_triplet].blkid =
+					ACC_DMA_BLKID_IN;
+			desc->data_ptrs[next_triplet].last = 0;
+			desc->data_ptrs[next_triplet].dma_ext = 0;
+			cb_len -= part_len;
+			*seg_total_left -= part_len;
+			/* Initializing offset for next segment (mbuf) */
+			*offset = part_len;
+			next_triplet++;
+		} else {
+			rte_acc_log(ERR,
+				"Some data still left for processing: "
+				"data_left: %u, next_triplet: %u, next_mbuf: %p",
+				cb_len, next_triplet, m->next);
+			return -EINVAL;
+		}
+	}
+	/* Storing new mbuf as it could be changed in scatter-gather case*/
+	*input = m;
+
+	return next_triplet;
+}
+
+/* Fills descriptor with data pointers of one block type.
+ * Returns index of next triplet
+ */
+static inline int
+acc_dma_fill_blk_type(struct acc_dma_req_desc *desc,
+		struct rte_mbuf *mbuf, uint32_t offset,
+		uint32_t len, int next_triplet, int blk_id)
+{
+	desc->data_ptrs[next_triplet].address =
+			rte_pktmbuf_iova_offset(mbuf, offset);
+	desc->data_ptrs[next_triplet].blen = len;
+	desc->data_ptrs[next_triplet].blkid = blk_id;
+	desc->data_ptrs[next_triplet].last = 0;
+	desc->data_ptrs[next_triplet].dma_ext = 0;
+	next_triplet++;
+
+	return next_triplet;
+}
+
+static inline void
+acc_header_init(struct acc_dma_req_desc *desc)
+{
+	desc->word0 = ACC_DMA_DESC_TYPE;
+	desc->word1 = 0; /**< Timestamp could be disabled */
+	desc->word2 = 0;
+	desc->word3 = 0;
+	desc->numCBs = 1;
+}
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+/* Check if any input data is unexpectedly left for processing */
+static inline int
+check_mbuf_total_left(uint32_t mbuf_total_left)
+{
+	if (mbuf_total_left == 0)
+		return 0;
+	rte_acc_log(ERR,
+		"Some date still left for processing: mbuf_total_left = %u",
+		mbuf_total_left);
+	return -EINVAL;
+}
+#endif
+
+static inline int
+acc_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
+		struct acc_dma_req_desc *desc, struct rte_mbuf **input,
+		struct rte_mbuf *output, uint32_t *in_offset,
+		uint32_t *out_offset, uint32_t *out_length,
+		uint32_t *mbuf_total_left, uint32_t *seg_total_left, uint8_t r)
+{
+	int next_triplet = 1; /* FCW already done */
+	uint32_t e, ea, eb, length;
+	uint16_t k, k_neg, k_pos;
+	uint8_t cab, c_neg;
+
+	desc->word0 = ACC_DMA_DESC_TYPE;
+	desc->word1 = 0; /**< Timestamp could be disabled */
+	desc->word2 = 0;
+	desc->word3 = 0;
+	desc->numCBs = 1;
+
+	if (op->turbo_enc.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) {
+		ea = op->turbo_enc.tb_params.ea;
+		eb = op->turbo_enc.tb_params.eb;
+		cab = op->turbo_enc.tb_params.cab;
+		k_neg = op->turbo_enc.tb_params.k_neg;
+		k_pos = op->turbo_enc.tb_params.k_pos;
+		c_neg = op->turbo_enc.tb_params.c_neg;
+		e = (r < cab) ? ea : eb;
+		k = (r < c_neg) ? k_neg : k_pos;
+	} else {
+		e = op->turbo_enc.cb_params.e;
+		k = op->turbo_enc.cb_params.k;
+	}
+
+	if (check_bit(op->turbo_enc.op_flags, RTE_BBDEV_TURBO_CRC_24B_ATTACH))
+		length = (k - 24) >> 3;
+	else
+		length = k >> 3;
+
+	if (unlikely((*mbuf_total_left == 0) || (*mbuf_total_left < length))) {
+		rte_acc_log(ERR,
+				"Mismatch between mbuf length and included CB sizes: mbuf len %u, cb len %u",
+				*mbuf_total_left, length);
+		return -1;
+	}
+
+	next_triplet = acc_dma_fill_blk_type_in(desc, input, in_offset,
+			length, seg_total_left, next_triplet,
+			check_bit(op->turbo_enc.op_flags,
+			RTE_BBDEV_TURBO_ENC_SCATTER_GATHER));
+	if (unlikely(next_triplet < 0)) {
+		rte_acc_log(ERR,
+				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
+				op);
+		return -1;
+	}
+	desc->data_ptrs[next_triplet - 1].last = 1;
+	desc->m2dlen = next_triplet;
+	*mbuf_total_left -= length;
+
+	/* Set output length */
+	if (check_bit(op->turbo_enc.op_flags, RTE_BBDEV_TURBO_RATE_MATCH))
+		/* Integer round up division by 8 */
+		*out_length = (e + 7) >> 3;
+	else
+		*out_length = (k >> 3) * 3 + 2;
+
+	next_triplet = acc_dma_fill_blk_type(desc, output, *out_offset,
+			*out_length, next_triplet, ACC_DMA_BLKID_OUT_ENC);
+	if (unlikely(next_triplet < 0)) {
+		rte_acc_log(ERR,
+				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
+				op);
+		return -1;
+	}
+	op->turbo_enc.output.length += *out_length;
+	*out_offset += *out_length;
+	desc->data_ptrs[next_triplet - 1].last = 1;
+	desc->d2mlen = next_triplet - desc->m2dlen;
+
+	desc->op_addr = op;
+
+	return 0;
+}
+
+static inline int
+acc_pci_remove(struct rte_pci_device *pci_dev)
+{
+	struct rte_bbdev *bbdev;
+	int ret;
+	uint8_t dev_id;
+
+	if (pci_dev == NULL)
+		return -EINVAL;
+
+	/* Find device */
+	bbdev = rte_bbdev_get_named_dev(pci_dev->device.name);
+	if (bbdev == NULL) {
+		rte_acc_log(CRIT,
+				"Couldn't find HW dev \"%s\" to uninitialise it",
+				pci_dev->device.name);
+		return -ENODEV;
+	}
+	dev_id = bbdev->data->dev_id;
+
+	/* free device private memory before close */
+	rte_free(bbdev->data->dev_private);
+
+	/* Close device */
+	ret = rte_bbdev_close(dev_id);
+	if (ret < 0)
+		rte_acc_log(ERR,
+				"Device %i failed to close during uninit: %i",
+				dev_id, ret);
+
+	/* release bbdev from library */
+	rte_bbdev_release(bbdev);
+
+	return 0;
+}
+
+#endif /* _ACC_COMMON_H_ */
diff --git a/drivers/baseband/acc100/rte_acc100_cfg.h b/drivers/baseband/acc100/rte_acc100_cfg.h
index b70803d96d..732c03be24 100644
--- a/drivers/baseband/acc100/rte_acc100_cfg.h
+++ b/drivers/baseband/acc100/rte_acc100_cfg.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 Intel Corporation
+ * Copyright(c) 2022 Intel Corporation
  */
 
 #ifndef _RTE_ACC100_CFG_H_
@@ -18,76 +18,12 @@
 
 #include <stdint.h>
 #include <stdbool.h>
+#include "rte_acc_common_cfg.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
-/**< Number of Virtual Functions ACC100 supports */
-#define RTE_ACC100_NUM_VFS 16
 
-/**
- * Definition of Queue Topology for ACC100 Configuration
- * Some level of details is abstracted out to expose a clean interface
- * given that comprehensive flexibility is not required
- */
-struct rte_acc100_queue_topology {
-	/** Number of QGroups in incremental order of priority */
-	uint16_t num_qgroups;
-	/**
-	 * All QGroups have the same number of AQs here.
-	 * Note : Could be made a 16-array if more flexibility is really
-	 * required
-	 */
-	uint16_t num_aqs_per_groups;
-	/**
-	 * Depth of the AQs is the same of all QGroups here. Log2 Enum : 2^N
-	 * Note : Could be made a 16-array if more flexibility is really
-	 * required
-	 */
-	uint16_t aq_depth_log2;
-	/**
-	 * Index of the first Queue Group Index - assuming contiguity
-	 * Initialized as -1
-	 */
-	int8_t first_qgroup_index;
-};
-
-/**
- * Definition of Arbitration related parameters for ACC100 Configuration
- */
-struct rte_acc100_arbitration {
-	/** Default Weight for VF Fairness Arbitration */
-	uint16_t round_robin_weight;
-	uint32_t gbr_threshold1; /**< Guaranteed Bitrate Threshold 1 */
-	uint32_t gbr_threshold2; /**< Guaranteed Bitrate Threshold 2 */
-};
-
-/**
- * Structure to pass ACC100 configuration.
- * Note: all VF Bundles will have the same configuration.
- */
-struct rte_acc100_conf {
-	bool pf_mode_en; /**< 1 if PF is used for dataplane, 0 for VFs */
-	/** 1 if input '1' bit is represented by a positive LLR value, 0 if '1'
-	 * bit is represented by a negative value.
-	 */
-	bool input_pos_llr_1_bit;
-	/** 1 if output '1' bit is represented by a positive value, 0 if '1'
-	 * bit is represented by a negative value.
-	 */
-	bool output_pos_llr_1_bit;
-	uint16_t num_vf_bundles; /**< Number of VF bundles to setup */
-	/** Queue topology for each operation type */
-	struct rte_acc100_queue_topology q_ul_4g;
-	struct rte_acc100_queue_topology q_dl_4g;
-	struct rte_acc100_queue_topology q_ul_5g;
-	struct rte_acc100_queue_topology q_dl_5g;
-	/** Arbitration configuration for each operation type */
-	struct rte_acc100_arbitration arb_ul_4g[RTE_ACC100_NUM_VFS];
-	struct rte_acc100_arbitration arb_dl_4g[RTE_ACC100_NUM_VFS];
-	struct rte_acc100_arbitration arb_ul_5g[RTE_ACC100_NUM_VFS];
-	struct rte_acc100_arbitration arb_dl_5g[RTE_ACC100_NUM_VFS];
-};
 
 /**
  * Configure a ACC100/ACC101 device in PF mode notably for bbdev-test
@@ -104,7 +40,7 @@ struct rte_acc100_conf {
  */
 __rte_experimental
 int
-rte_acc10x_configure(const char *dev_name, struct rte_acc100_conf *conf);
+rte_acc10x_configure(const char *dev_name, struct rte_acc_conf *conf);
 
 #ifdef __cplusplus
 }
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 10272fd149..9cb7b74c64 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -30,48 +30,6 @@ RTE_LOG_REGISTER_DEFAULT(acc100_logtype, DEBUG);
 RTE_LOG_REGISTER_DEFAULT(acc100_logtype, NOTICE);
 #endif
 
-/* Write to MMIO register address */
-static inline void
-mmio_write(void *addr, uint32_t value)
-{
-	*((volatile uint32_t *)(addr)) = rte_cpu_to_le_32(value);
-}
-
-/* Write a register of a ACC100 device */
-static inline void
-acc100_reg_write(struct acc100_device *d, uint32_t offset, uint32_t value)
-{
-	void *reg_addr = RTE_PTR_ADD(d->mmio_base, offset);
-	mmio_write(reg_addr, value);
-	usleep(ACC100_LONG_WAIT);
-}
-
-/* Read a register of a ACC100 device */
-static inline uint32_t
-acc100_reg_read(struct acc100_device *d, uint32_t offset)
-{
-
-	void *reg_addr = RTE_PTR_ADD(d->mmio_base, offset);
-	uint32_t ret = *((volatile uint32_t *)(reg_addr));
-	return rte_le_to_cpu_32(ret);
-}
-
-/* Basic Implementation of Log2 for exact 2^N */
-static inline uint32_t
-log2_basic(uint32_t value)
-{
-	return (value == 0) ? 0 : rte_bsf32(value);
-}
-
-/* Calculate memory alignment offset assuming alignment is 2^N */
-static inline uint32_t
-calc_mem_alignment_offset(void *unaligned_virt_mem, uint32_t alignment)
-{
-	rte_iova_t unaligned_phy_mem = rte_malloc_virt2iova(unaligned_virt_mem);
-	return (uint32_t)(alignment -
-			(unaligned_phy_mem & (alignment-1)));
-}
-
 /* Calculate the offset of the enqueue register */
 static inline uint32_t
 queue_offset(bool pf_device, uint8_t vf_id, uint8_t qgrp_id, uint16_t aq_id)
@@ -88,17 +46,17 @@ enum {UL_4G = 0, UL_5G, DL_4G, DL_5G, NUM_ACC};
 
 /* Return the accelerator enum for a Queue Group Index */
 static inline int
-accFromQgid(int qg_idx, const struct rte_acc100_conf *acc100_conf)
+accFromQgid(int qg_idx, const struct rte_acc_conf *acc_conf)
 {
 	int accQg[ACC100_NUM_QGRPS];
 	int NumQGroupsPerFn[NUM_ACC];
 	int acc, qgIdx, qgIndex = 0;
 	for (qgIdx = 0; qgIdx < ACC100_NUM_QGRPS; qgIdx++)
 		accQg[qgIdx] = 0;
-	NumQGroupsPerFn[UL_4G] = acc100_conf->q_ul_4g.num_qgroups;
-	NumQGroupsPerFn[UL_5G] = acc100_conf->q_ul_5g.num_qgroups;
-	NumQGroupsPerFn[DL_4G] = acc100_conf->q_dl_4g.num_qgroups;
-	NumQGroupsPerFn[DL_5G] = acc100_conf->q_dl_5g.num_qgroups;
+	NumQGroupsPerFn[UL_4G] = acc_conf->q_ul_4g.num_qgroups;
+	NumQGroupsPerFn[UL_5G] = acc_conf->q_ul_5g.num_qgroups;
+	NumQGroupsPerFn[DL_4G] = acc_conf->q_dl_4g.num_qgroups;
+	NumQGroupsPerFn[DL_5G] = acc_conf->q_dl_5g.num_qgroups;
 	for (acc = UL_4G;  acc < NUM_ACC; acc++)
 		for (qgIdx = 0; qgIdx < NumQGroupsPerFn[acc]; qgIdx++)
 			accQg[qgIndex++] = acc;
@@ -108,23 +66,23 @@ accFromQgid(int qg_idx, const struct rte_acc100_conf *acc100_conf)
 
 /* Return the queue topology for a Queue Group Index */
 static inline void
-qtopFromAcc(struct rte_acc100_queue_topology **qtop, int acc_enum,
-		struct rte_acc100_conf *acc100_conf)
+qtopFromAcc(struct rte_acc_queue_topology **qtop, int acc_enum,
+		struct rte_acc_conf *acc_conf)
 {
-	struct rte_acc100_queue_topology *p_qtop;
+	struct rte_acc_queue_topology *p_qtop;
 	p_qtop = NULL;
 	switch (acc_enum) {
 	case UL_4G:
-		p_qtop = &(acc100_conf->q_ul_4g);
+		p_qtop = &(acc_conf->q_ul_4g);
 		break;
 	case UL_5G:
-		p_qtop = &(acc100_conf->q_ul_5g);
+		p_qtop = &(acc_conf->q_ul_5g);
 		break;
 	case DL_4G:
-		p_qtop = &(acc100_conf->q_dl_4g);
+		p_qtop = &(acc_conf->q_dl_4g);
 		break;
 	case DL_5G:
-		p_qtop = &(acc100_conf->q_dl_5g);
+		p_qtop = &(acc_conf->q_dl_5g);
 		break;
 	default:
 		/* NOTREACHED */
@@ -136,11 +94,11 @@ qtopFromAcc(struct rte_acc100_queue_topology **qtop, int acc_enum,
 
 /* Return the AQ depth for a Queue Group Index */
 static inline int
-aqDepth(int qg_idx, struct rte_acc100_conf *acc100_conf)
+aqDepth(int qg_idx, struct rte_acc_conf *acc_conf)
 {
-	struct rte_acc100_queue_topology *q_top = NULL;
-	int acc_enum = accFromQgid(qg_idx, acc100_conf);
-	qtopFromAcc(&q_top, acc_enum, acc100_conf);
+	struct rte_acc_queue_topology *q_top = NULL;
+	int acc_enum = accFromQgid(qg_idx, acc_conf);
+	qtopFromAcc(&q_top, acc_enum, acc_conf);
 	if (unlikely(q_top == NULL))
 		return 1;
 	return RTE_MAX(1, q_top->aq_depth_log2);
@@ -148,39 +106,39 @@ aqDepth(int qg_idx, struct rte_acc100_conf *acc100_conf)
 
 /* Return the AQ depth for a Queue Group Index */
 static inline int
-aqNum(int qg_idx, struct rte_acc100_conf *acc100_conf)
+aqNum(int qg_idx, struct rte_acc_conf *acc_conf)
 {
-	struct rte_acc100_queue_topology *q_top = NULL;
-	int acc_enum = accFromQgid(qg_idx, acc100_conf);
-	qtopFromAcc(&q_top, acc_enum, acc100_conf);
+	struct rte_acc_queue_topology *q_top = NULL;
+	int acc_enum = accFromQgid(qg_idx, acc_conf);
+	qtopFromAcc(&q_top, acc_enum, acc_conf);
 	if (unlikely(q_top == NULL))
 		return 0;
 	return q_top->num_aqs_per_groups;
 }
 
 static void
-initQTop(struct rte_acc100_conf *acc100_conf)
+initQTop(struct rte_acc_conf *acc_conf)
 {
-	acc100_conf->q_ul_4g.num_aqs_per_groups = 0;
-	acc100_conf->q_ul_4g.num_qgroups = 0;
-	acc100_conf->q_ul_4g.first_qgroup_index = -1;
-	acc100_conf->q_ul_5g.num_aqs_per_groups = 0;
-	acc100_conf->q_ul_5g.num_qgroups = 0;
-	acc100_conf->q_ul_5g.first_qgroup_index = -1;
-	acc100_conf->q_dl_4g.num_aqs_per_groups = 0;
-	acc100_conf->q_dl_4g.num_qgroups = 0;
-	acc100_conf->q_dl_4g.first_qgroup_index = -1;
-	acc100_conf->q_dl_5g.num_aqs_per_groups = 0;
-	acc100_conf->q_dl_5g.num_qgroups = 0;
-	acc100_conf->q_dl_5g.first_qgroup_index = -1;
+	acc_conf->q_ul_4g.num_aqs_per_groups = 0;
+	acc_conf->q_ul_4g.num_qgroups = 0;
+	acc_conf->q_ul_4g.first_qgroup_index = -1;
+	acc_conf->q_ul_5g.num_aqs_per_groups = 0;
+	acc_conf->q_ul_5g.num_qgroups = 0;
+	acc_conf->q_ul_5g.first_qgroup_index = -1;
+	acc_conf->q_dl_4g.num_aqs_per_groups = 0;
+	acc_conf->q_dl_4g.num_qgroups = 0;
+	acc_conf->q_dl_4g.first_qgroup_index = -1;
+	acc_conf->q_dl_5g.num_aqs_per_groups = 0;
+	acc_conf->q_dl_5g.num_qgroups = 0;
+	acc_conf->q_dl_5g.first_qgroup_index = -1;
 }
 
 static inline void
-updateQtop(uint8_t acc, uint8_t qg, struct rte_acc100_conf *acc100_conf,
-		struct acc100_device *d) {
+updateQtop(uint8_t acc, uint8_t qg, struct rte_acc_conf *acc_conf,
+		struct acc_device *d) {
 	uint32_t reg;
-	struct rte_acc100_queue_topology *q_top = NULL;
-	qtopFromAcc(&q_top, acc, acc100_conf);
+	struct rte_acc_queue_topology *q_top = NULL;
+	qtopFromAcc(&q_top, acc, acc_conf);
 	if (unlikely(q_top == NULL))
 		return;
 	uint16_t aq;
@@ -188,17 +146,17 @@ updateQtop(uint8_t acc, uint8_t qg, struct rte_acc100_conf *acc100_conf,
 	if (q_top->first_qgroup_index == -1) {
 		q_top->first_qgroup_index = qg;
 		/* Can be optimized to assume all are enabled by default */
-		reg = acc100_reg_read(d, queue_offset(d->pf_device,
+		reg = acc_reg_read(d, queue_offset(d->pf_device,
 				0, qg, ACC100_NUM_AQS - 1));
-		if (reg & ACC100_QUEUE_ENABLE) {
+		if (reg & ACC_QUEUE_ENABLE) {
 			q_top->num_aqs_per_groups = ACC100_NUM_AQS;
 			return;
 		}
 		q_top->num_aqs_per_groups = 0;
 		for (aq = 0; aq < ACC100_NUM_AQS; aq++) {
-			reg = acc100_reg_read(d, queue_offset(d->pf_device,
+			reg = acc_reg_read(d, queue_offset(d->pf_device,
 					0, qg, aq));
-			if (reg & ACC100_QUEUE_ENABLE)
+			if (reg & ACC_QUEUE_ENABLE)
 				q_top->num_aqs_per_groups++;
 		}
 	}
@@ -208,8 +166,8 @@ updateQtop(uint8_t acc, uint8_t qg, struct rte_acc100_conf *acc100_conf,
 static inline void
 fetch_acc100_config(struct rte_bbdev *dev)
 {
-	struct acc100_device *d = dev->data->dev_private;
-	struct rte_acc100_conf *acc100_conf = &d->acc100_conf;
+	struct acc_device *d = dev->data->dev_private;
+	struct rte_acc_conf *acc_conf = &d->acc_conf;
 	const struct acc100_registry_addr *reg_addr;
 	uint8_t acc, qg;
 	uint32_t reg, reg_aq, reg_len0, reg_len1;
@@ -225,201 +183,80 @@ fetch_acc100_config(struct rte_bbdev *dev)
 	else
 		reg_addr = &vf_reg_addr;
 
-	d->ddr_size = (1 + acc100_reg_read(d, reg_addr->ddr_range)) << 10;
+	d->ddr_size = (1 + acc_reg_read(d, reg_addr->ddr_range)) << 10;
 
 	/* Single VF Bundle by VF */
-	acc100_conf->num_vf_bundles = 1;
-	initQTop(acc100_conf);
-
-	struct rte_acc100_queue_topology *q_top = NULL;
-	int qman_func_id[ACC100_NUM_ACCS] = {ACC100_ACCMAP_0, ACC100_ACCMAP_1,
-			ACC100_ACCMAP_2, ACC100_ACCMAP_3, ACC100_ACCMAP_4};
-	reg = acc100_reg_read(d, reg_addr->qman_group_func);
-	for (qg = 0; qg < ACC100_NUM_QGRPS_PER_WORD; qg++) {
-		reg_aq = acc100_reg_read(d,
+	acc_conf->num_vf_bundles = 1;
+	initQTop(acc_conf);
+
+	struct rte_acc_queue_topology *q_top = NULL;
+	int qman_func_id[ACC100_NUM_ACCS] = {ACC_ACCMAP_0, ACC_ACCMAP_1,
+			ACC_ACCMAP_2, ACC_ACCMAP_3, ACC_ACCMAP_4};
+	reg = acc_reg_read(d, reg_addr->qman_group_func);
+	for (qg = 0; qg < ACC_NUM_QGRPS_PER_WORD; qg++) {
+		reg_aq = acc_reg_read(d,
 				queue_offset(d->pf_device, 0, qg, 0));
-		if (reg_aq & ACC100_QUEUE_ENABLE) {
+		if (reg_aq & ACC_QUEUE_ENABLE) {
 			uint32_t idx = (reg >> (qg * 4)) & 0x7;
 			if (idx < ACC100_NUM_ACCS) {
 				acc = qman_func_id[idx];
-				updateQtop(acc, qg, acc100_conf, d);
+				updateQtop(acc, qg, acc_conf, d);
 			}
 		}
 	}
 
 	/* Check the depth of the AQs*/
-	reg_len0 = acc100_reg_read(d, reg_addr->depth_log0_offset);
-	reg_len1 = acc100_reg_read(d, reg_addr->depth_log1_offset);
+	reg_len0 = acc_reg_read(d, reg_addr->depth_log0_offset);
+	reg_len1 = acc_reg_read(d, reg_addr->depth_log1_offset);
 	for (acc = 0; acc < NUM_ACC; acc++) {
-		qtopFromAcc(&q_top, acc, acc100_conf);
-		if (q_top->first_qgroup_index < ACC100_NUM_QGRPS_PER_WORD)
+		qtopFromAcc(&q_top, acc, acc_conf);
+		if (q_top->first_qgroup_index < ACC_NUM_QGRPS_PER_WORD)
 			q_top->aq_depth_log2 = (reg_len0 >>
 					(q_top->first_qgroup_index * 4))
 					& 0xF;
 		else
 			q_top->aq_depth_log2 = (reg_len1 >>
 					((q_top->first_qgroup_index -
-					ACC100_NUM_QGRPS_PER_WORD) * 4))
+					ACC_NUM_QGRPS_PER_WORD) * 4))
 					& 0xF;
 	}
 
 	/* Read PF mode */
 	if (d->pf_device) {
-		reg_mode = acc100_reg_read(d, HWPfHiPfMode);
-		acc100_conf->pf_mode_en = (reg_mode == ACC100_PF_VAL) ? 1 : 0;
+		reg_mode = acc_reg_read(d, HWPfHiPfMode);
+		acc_conf->pf_mode_en = (reg_mode == ACC_PF_VAL) ? 1 : 0;
 	}
 
 	rte_bbdev_log_debug(
 			"%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u AQ %u %u %u %u Len %u %u %u %u\n",
 			(d->pf_device) ? "PF" : "VF",
-			(acc100_conf->input_pos_llr_1_bit) ? "POS" : "NEG",
-			(acc100_conf->output_pos_llr_1_bit) ? "POS" : "NEG",
-			acc100_conf->q_ul_4g.num_qgroups,
-			acc100_conf->q_dl_4g.num_qgroups,
-			acc100_conf->q_ul_5g.num_qgroups,
-			acc100_conf->q_dl_5g.num_qgroups,
-			acc100_conf->q_ul_4g.num_aqs_per_groups,
-			acc100_conf->q_dl_4g.num_aqs_per_groups,
-			acc100_conf->q_ul_5g.num_aqs_per_groups,
-			acc100_conf->q_dl_5g.num_aqs_per_groups,
-			acc100_conf->q_ul_4g.aq_depth_log2,
-			acc100_conf->q_dl_4g.aq_depth_log2,
-			acc100_conf->q_ul_5g.aq_depth_log2,
-			acc100_conf->q_dl_5g.aq_depth_log2);
-}
-
-static void
-free_base_addresses(void **base_addrs, int size)
-{
-	int i;
-	for (i = 0; i < size; i++)
-		rte_free(base_addrs[i]);
-}
-
-static inline uint32_t
-get_desc_len(void)
-{
-	return sizeof(union acc100_dma_desc);
-}
-
-/* Allocate the 2 * 64MB block for the sw rings */
-static int
-alloc_2x64mb_sw_rings_mem(struct rte_bbdev *dev, struct acc100_device *d,
-		int socket)
-{
-	uint32_t sw_ring_size = ACC100_SIZE_64MBYTE;
-	d->sw_rings_base = rte_zmalloc_socket(dev->device->driver->name,
-			2 * sw_ring_size, RTE_CACHE_LINE_SIZE, socket);
-	if (d->sw_rings_base == NULL) {
-		rte_bbdev_log(ERR, "Failed to allocate memory for %s:%u",
-				dev->device->driver->name,
-				dev->data->dev_id);
-		return -ENOMEM;
-	}
-	uint32_t next_64mb_align_offset = calc_mem_alignment_offset(
-			d->sw_rings_base, ACC100_SIZE_64MBYTE);
-	d->sw_rings = RTE_PTR_ADD(d->sw_rings_base, next_64mb_align_offset);
-	d->sw_rings_iova = rte_malloc_virt2iova(d->sw_rings_base) +
-			next_64mb_align_offset;
-	d->sw_ring_size = ACC100_MAX_QUEUE_DEPTH * get_desc_len();
-	d->sw_ring_max_depth = ACC100_MAX_QUEUE_DEPTH;
-
-	return 0;
-}
-
-/* Attempt to allocate minimised memory space for sw rings */
-static void
-alloc_sw_rings_min_mem(struct rte_bbdev *dev, struct acc100_device *d,
-		uint16_t num_queues, int socket)
-{
-	rte_iova_t sw_rings_base_iova, next_64mb_align_addr_iova;
-	uint32_t next_64mb_align_offset;
-	rte_iova_t sw_ring_iova_end_addr;
-	void *base_addrs[ACC100_SW_RING_MEM_ALLOC_ATTEMPTS];
-	void *sw_rings_base;
-	int i = 0;
-	uint32_t q_sw_ring_size = ACC100_MAX_QUEUE_DEPTH * get_desc_len();
-	uint32_t dev_sw_ring_size = q_sw_ring_size * num_queues;
-
-	/* Find an aligned block of memory to store sw rings */
-	while (i < ACC100_SW_RING_MEM_ALLOC_ATTEMPTS) {
-		/*
-		 * sw_ring allocated memory is guaranteed to be aligned to
-		 * q_sw_ring_size at the condition that the requested size is
-		 * less than the page size
-		 */
-		sw_rings_base = rte_zmalloc_socket(
-				dev->device->driver->name,
-				dev_sw_ring_size, q_sw_ring_size, socket);
-
-		if (sw_rings_base == NULL) {
-			rte_bbdev_log(ERR,
-					"Failed to allocate memory for %s:%u",
-					dev->device->driver->name,
-					dev->data->dev_id);
-			break;
-		}
-
-		sw_rings_base_iova = rte_malloc_virt2iova(sw_rings_base);
-		next_64mb_align_offset = calc_mem_alignment_offset(
-				sw_rings_base, ACC100_SIZE_64MBYTE);
-		next_64mb_align_addr_iova = sw_rings_base_iova +
-				next_64mb_align_offset;
-		sw_ring_iova_end_addr = sw_rings_base_iova + dev_sw_ring_size;
-
-		/* Check if the end of the sw ring memory block is before the
-		 * start of next 64MB aligned mem address
-		 */
-		if (sw_ring_iova_end_addr < next_64mb_align_addr_iova) {
-			d->sw_rings_iova = sw_rings_base_iova;
-			d->sw_rings = sw_rings_base;
-			d->sw_rings_base = sw_rings_base;
-			d->sw_ring_size = q_sw_ring_size;
-			d->sw_ring_max_depth = ACC100_MAX_QUEUE_DEPTH;
-			break;
-		}
-		/* Store the address of the unaligned mem block */
-		base_addrs[i] = sw_rings_base;
-		i++;
-	}
-
-	/* Free all unaligned blocks of mem allocated in the loop */
-	free_base_addresses(base_addrs, i);
-}
-
-/*
- * Find queue_id of a device queue based on details from the Info Ring.
- * If a queue isn't found UINT16_MAX is returned.
- */
-static inline uint16_t
-get_queue_id_from_ring_info(struct rte_bbdev_data *data,
-		const union acc100_info_ring_data ring_data)
-{
-	uint16_t queue_id;
-
-	for (queue_id = 0; queue_id < data->num_queues; ++queue_id) {
-		struct acc100_queue *acc100_q =
-				data->queues[queue_id].queue_private;
-		if (acc100_q != NULL && acc100_q->aq_id == ring_data.aq_id &&
-				acc100_q->qgrp_id == ring_data.qg_id &&
-				acc100_q->vf_id == ring_data.vf_id)
-			return queue_id;
-	}
-
-	return UINT16_MAX;
+			(acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG",
+			(acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",
+			acc_conf->q_ul_4g.num_qgroups,
+			acc_conf->q_dl_4g.num_qgroups,
+			acc_conf->q_ul_5g.num_qgroups,
+			acc_conf->q_dl_5g.num_qgroups,
+			acc_conf->q_ul_4g.num_aqs_per_groups,
+			acc_conf->q_dl_4g.num_aqs_per_groups,
+			acc_conf->q_ul_5g.num_aqs_per_groups,
+			acc_conf->q_dl_5g.num_aqs_per_groups,
+			acc_conf->q_ul_4g.aq_depth_log2,
+			acc_conf->q_dl_4g.aq_depth_log2,
+			acc_conf->q_ul_5g.aq_depth_log2,
+			acc_conf->q_dl_5g.aq_depth_log2);
 }
 
 /* Checks PF Info Ring to find the interrupt cause and handles it accordingly */
 static inline void
-acc100_check_ir(struct acc100_device *acc100_dev)
+acc100_check_ir(struct acc_device *acc100_dev)
 {
-	volatile union acc100_info_ring_data *ring_data;
+	volatile union acc_info_ring_data *ring_data;
 	uint16_t info_ring_head = acc100_dev->info_ring_head;
 	if (acc100_dev->info_ring == NULL)
 		return;
 
 	ring_data = acc100_dev->info_ring + (acc100_dev->info_ring_head &
-			ACC100_INFO_RING_MASK);
+			ACC_INFO_RING_MASK);
 
 	while (ring_data->valid) {
 		if ((ring_data->int_nb < ACC100_PF_INT_DMA_DL_DESC_IRQ) || (
@@ -431,7 +268,7 @@ acc100_check_ir(struct acc100_device *acc100_dev)
 		ring_data->val = 0;
 		info_ring_head++;
 		ring_data = acc100_dev->info_ring +
-				(info_ring_head & ACC100_INFO_RING_MASK);
+				(info_ring_head & ACC_INFO_RING_MASK);
 	}
 }
 
@@ -439,12 +276,12 @@ acc100_check_ir(struct acc100_device *acc100_dev)
 static inline void
 acc100_pf_interrupt_handler(struct rte_bbdev *dev)
 {
-	struct acc100_device *acc100_dev = dev->data->dev_private;
-	volatile union acc100_info_ring_data *ring_data;
-	struct acc100_deq_intr_details deq_intr_det;
+	struct acc_device *acc100_dev = dev->data->dev_private;
+	volatile union acc_info_ring_data *ring_data;
+	struct acc_deq_intr_details deq_intr_det;
 
 	ring_data = acc100_dev->info_ring + (acc100_dev->info_ring_head &
-			ACC100_INFO_RING_MASK);
+			ACC_INFO_RING_MASK);
 
 	while (ring_data->valid) {
 
@@ -481,7 +318,7 @@ acc100_pf_interrupt_handler(struct rte_bbdev *dev)
 		++acc100_dev->info_ring_head;
 		ring_data = acc100_dev->info_ring +
 				(acc100_dev->info_ring_head &
-				ACC100_INFO_RING_MASK);
+				ACC_INFO_RING_MASK);
 	}
 }
 
@@ -489,12 +326,12 @@ acc100_pf_interrupt_handler(struct rte_bbdev *dev)
 static inline void
 acc100_vf_interrupt_handler(struct rte_bbdev *dev)
 {
-	struct acc100_device *acc100_dev = dev->data->dev_private;
-	volatile union acc100_info_ring_data *ring_data;
-	struct acc100_deq_intr_details deq_intr_det;
+	struct acc_device *acc100_dev = dev->data->dev_private;
+	volatile union acc_info_ring_data *ring_data;
+	struct acc_deq_intr_details deq_intr_det;
 
 	ring_data = acc100_dev->info_ring + (acc100_dev->info_ring_head &
-			ACC100_INFO_RING_MASK);
+			ACC_INFO_RING_MASK);
 
 	while (ring_data->valid) {
 
@@ -533,7 +370,7 @@ acc100_vf_interrupt_handler(struct rte_bbdev *dev)
 		ring_data->valid = 0;
 		++acc100_dev->info_ring_head;
 		ring_data = acc100_dev->info_ring + (acc100_dev->info_ring_head
-				& ACC100_INFO_RING_MASK);
+				& ACC_INFO_RING_MASK);
 	}
 }
 
@@ -542,7 +379,7 @@ static void
 acc100_dev_interrupt_handler(void *cb_arg)
 {
 	struct rte_bbdev *dev = cb_arg;
-	struct acc100_device *acc100_dev = dev->data->dev_private;
+	struct acc_device *acc100_dev = dev->data->dev_private;
 
 	/* Read info ring */
 	if (acc100_dev->pf_device)
@@ -555,7 +392,7 @@ acc100_dev_interrupt_handler(void *cb_arg)
 static int
 allocate_info_ring(struct rte_bbdev *dev)
 {
-	struct acc100_device *d = dev->data->dev_private;
+	struct acc_device *d = dev->data->dev_private;
 	const struct acc100_registry_addr *reg_addr;
 	rte_iova_t info_ring_iova;
 	uint32_t phys_low, phys_high;
@@ -570,7 +407,7 @@ allocate_info_ring(struct rte_bbdev *dev)
 		reg_addr = &vf_reg_addr;
 	/* Allocate InfoRing */
 	d->info_ring = rte_zmalloc_socket("Info Ring",
-			ACC100_INFO_RING_NUM_ENTRIES *
+			ACC_INFO_RING_NUM_ENTRIES *
 			sizeof(*d->info_ring), RTE_CACHE_LINE_SIZE,
 			dev->data->socket_id);
 	if (d->info_ring == NULL) {
@@ -585,11 +422,11 @@ allocate_info_ring(struct rte_bbdev *dev)
 	/* Setup Info Ring */
 	phys_high = (uint32_t)(info_ring_iova >> 32);
 	phys_low  = (uint32_t)(info_ring_iova);
-	acc100_reg_write(d, reg_addr->info_ring_hi, phys_high);
-	acc100_reg_write(d, reg_addr->info_ring_lo, phys_low);
-	acc100_reg_write(d, reg_addr->info_ring_en, ACC100_REG_IRQ_EN_ALL);
-	d->info_ring_head = (acc100_reg_read(d, reg_addr->info_ring_ptr) &
-			0xFFF) / sizeof(union acc100_info_ring_data);
+	acc_reg_write(d, reg_addr->info_ring_hi, phys_high);
+	acc_reg_write(d, reg_addr->info_ring_lo, phys_low);
+	acc_reg_write(d, reg_addr->info_ring_en, ACC100_REG_IRQ_EN_ALL);
+	d->info_ring_head = (acc_reg_read(d, reg_addr->info_ring_ptr) &
+			0xFFF) / sizeof(union acc_info_ring_data);
 	return 0;
 }
 
@@ -599,11 +436,11 @@ static int
 acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
 {
 	uint32_t phys_low, phys_high, value;
-	struct acc100_device *d = dev->data->dev_private;
+	struct acc_device *d = dev->data->dev_private;
 	const struct acc100_registry_addr *reg_addr;
 	int ret;
 
-	if (d->pf_device && !d->acc100_conf.pf_mode_en) {
+	if (d->pf_device && !d->acc_conf.pf_mode_en) {
 		rte_bbdev_log(NOTICE,
 				"%s has PF mode disabled. This PF can't be used.",
 				dev->data->name);
@@ -629,7 +466,7 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
 	 * Note : Assuming only VF0 bundle is used for PF mode
 	 */
 	phys_high = (uint32_t)(d->sw_rings_iova >> 32);
-	phys_low  = (uint32_t)(d->sw_rings_iova & ~(ACC100_SIZE_64MBYTE-1));
+	phys_low  = (uint32_t)(d->sw_rings_iova & ~(ACC_SIZE_64MBYTE-1));
 
 	/* Choose correct registry addresses for the device type */
 	if (d->pf_device)
@@ -642,23 +479,23 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
 
 	/* Release AXI from PF */
 	if (d->pf_device)
-		acc100_reg_write(d, HWPfDmaAxiControl, 1);
+		acc_reg_write(d, HWPfDmaAxiControl, 1);
 
-	acc100_reg_write(d, reg_addr->dma_ring_ul5g_hi, phys_high);
-	acc100_reg_write(d, reg_addr->dma_ring_ul5g_lo, phys_low);
-	acc100_reg_write(d, reg_addr->dma_ring_dl5g_hi, phys_high);
-	acc100_reg_write(d, reg_addr->dma_ring_dl5g_lo, phys_low);
-	acc100_reg_write(d, reg_addr->dma_ring_ul4g_hi, phys_high);
-	acc100_reg_write(d, reg_addr->dma_ring_ul4g_lo, phys_low);
-	acc100_reg_write(d, reg_addr->dma_ring_dl4g_hi, phys_high);
-	acc100_reg_write(d, reg_addr->dma_ring_dl4g_lo, phys_low);
+	acc_reg_write(d, reg_addr->dma_ring_ul5g_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_ul5g_lo, phys_low);
+	acc_reg_write(d, reg_addr->dma_ring_dl5g_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_dl5g_lo, phys_low);
+	acc_reg_write(d, reg_addr->dma_ring_ul4g_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_ul4g_lo, phys_low);
+	acc_reg_write(d, reg_addr->dma_ring_dl4g_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_dl4g_lo, phys_low);
 
 	/*
 	 * Configure Ring Size to the max queue ring size
 	 * (used for wrapping purpose)
 	 */
 	value = log2_basic(d->sw_ring_size / 64);
-	acc100_reg_write(d, reg_addr->ring_size, value);
+	acc_reg_write(d, reg_addr->ring_size, value);
 
 	/* Configure tail pointer for use when SDONE enabled */
 	d->tail_ptrs = rte_zmalloc_socket(
@@ -676,14 +513,14 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
 
 	phys_high = (uint32_t)(d->tail_ptr_iova >> 32);
 	phys_low  = (uint32_t)(d->tail_ptr_iova);
-	acc100_reg_write(d, reg_addr->tail_ptrs_ul5g_hi, phys_high);
-	acc100_reg_write(d, reg_addr->tail_ptrs_ul5g_lo, phys_low);
-	acc100_reg_write(d, reg_addr->tail_ptrs_dl5g_hi, phys_high);
-	acc100_reg_write(d, reg_addr->tail_ptrs_dl5g_lo, phys_low);
-	acc100_reg_write(d, reg_addr->tail_ptrs_ul4g_hi, phys_high);
-	acc100_reg_write(d, reg_addr->tail_ptrs_ul4g_lo, phys_low);
-	acc100_reg_write(d, reg_addr->tail_ptrs_dl4g_hi, phys_high);
-	acc100_reg_write(d, reg_addr->tail_ptrs_dl4g_lo, phys_low);
+	acc_reg_write(d, reg_addr->tail_ptrs_ul5g_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_ul5g_lo, phys_low);
+	acc_reg_write(d, reg_addr->tail_ptrs_dl5g_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_dl5g_lo, phys_low);
+	acc_reg_write(d, reg_addr->tail_ptrs_ul4g_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_ul4g_lo, phys_low);
+	acc_reg_write(d, reg_addr->tail_ptrs_dl4g_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_dl4g_lo, phys_low);
 
 	ret = allocate_info_ring(dev);
 	if (ret < 0) {
@@ -694,7 +531,7 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
 	}
 
 	d->harq_layout = rte_zmalloc_socket("HARQ Layout",
-			ACC100_HARQ_LAYOUT * sizeof(*d->harq_layout),
+			ACC_HARQ_LAYOUT * sizeof(*d->harq_layout),
 			RTE_CACHE_LINE_SIZE, dev->data->socket_id);
 	if (d->harq_layout == NULL) {
 		rte_bbdev_log(ERR, "Failed to allocate harq_layout for %s:%u",
@@ -718,7 +555,7 @@ static int
 acc100_intr_enable(struct rte_bbdev *dev)
 {
 	int ret;
-	struct acc100_device *d = dev->data->dev_private;
+	struct acc_device *d = dev->data->dev_private;
 
 	/* Only MSI are currently supported */
 	if (rte_intr_type_get(dev->intr_handle) == RTE_INTR_HANDLE_VFIO_MSI ||
@@ -762,7 +599,7 @@ acc100_intr_enable(struct rte_bbdev *dev)
 static int
 acc100_dev_close(struct rte_bbdev *dev)
 {
-	struct acc100_device *d = dev->data->dev_private;
+	struct acc_device *d = dev->data->dev_private;
 	acc100_check_ir(d);
 	if (d->sw_rings_base != NULL) {
 		rte_free(d->tail_ptrs);
@@ -771,7 +608,7 @@ acc100_dev_close(struct rte_bbdev *dev)
 		d->sw_rings_base = NULL;
 	}
 	/* Ensure all in flight HW transactions are completed */
-	usleep(ACC100_LONG_WAIT);
+	usleep(ACC_LONG_WAIT);
 	return 0;
 }
 
@@ -784,12 +621,12 @@ static int
 acc100_find_free_queue_idx(struct rte_bbdev *dev,
 		const struct rte_bbdev_queue_conf *conf)
 {
-	struct acc100_device *d = dev->data->dev_private;
+	struct acc_device *d = dev->data->dev_private;
 	int op_2_acc[5] = {0, UL_4G, DL_4G, UL_5G, DL_5G};
 	int acc = op_2_acc[conf->op_type];
-	struct rte_acc100_queue_topology *qtop = NULL;
+	struct rte_acc_queue_topology *qtop = NULL;
 
-	qtopFromAcc(&qtop, acc, &(d->acc100_conf));
+	qtopFromAcc(&qtop, acc, &(d->acc_conf));
 	if (qtop == NULL)
 		return -1;
 	/* Identify matching QGroup Index which are sorted in priority order */
@@ -802,7 +639,7 @@ acc100_find_free_queue_idx(struct rte_bbdev *dev,
 		return -1;
 	}
 	/* Find a free AQ_idx  */
-	uint16_t aq_idx;
+	uint64_t aq_idx;
 	for (aq_idx = 0; aq_idx < qtop->num_aqs_per_groups; aq_idx++) {
 		if (((d->q_assigned_bit_map[group_idx] >> aq_idx) & 0x1) == 0) {
 			/* Mark the Queue as assigned */
@@ -821,8 +658,8 @@ static int
 acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
 		const struct rte_bbdev_queue_conf *conf)
 {
-	struct acc100_device *d = dev->data->dev_private;
-	struct acc100_queue *q;
+	struct acc_device *d = dev->data->dev_private;
+	struct acc_queue *q;
 	int16_t q_idx;
 
 	/* Allocate the queue data structure. */
@@ -842,37 +679,37 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
 	q->ring_addr_iova = d->sw_rings_iova + (d->sw_ring_size * queue_id);
 
 	/* Prepare the Ring with default descriptor format */
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	unsigned int desc_idx, b_idx;
 	int fcw_len = (conf->op_type == RTE_BBDEV_OP_LDPC_ENC ?
-		ACC100_FCW_LE_BLEN : (conf->op_type == RTE_BBDEV_OP_TURBO_DEC ?
-		ACC100_FCW_TD_BLEN : ACC100_FCW_LD_BLEN));
+		ACC_FCW_LE_BLEN : (conf->op_type == RTE_BBDEV_OP_TURBO_DEC ?
+		ACC_FCW_TD_BLEN : ACC_FCW_LD_BLEN));
 
 	for (desc_idx = 0; desc_idx < d->sw_ring_max_depth; desc_idx++) {
 		desc = q->ring_addr + desc_idx;
-		desc->req.word0 = ACC100_DMA_DESC_TYPE;
+		desc->req.word0 = ACC_DMA_DESC_TYPE;
 		desc->req.word1 = 0; /**< Timestamp */
 		desc->req.word2 = 0;
 		desc->req.word3 = 0;
-		uint64_t fcw_offset = (desc_idx << 8) + ACC100_DESC_FCW_OFFSET;
+		uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
 		desc->req.data_ptrs[0].blen = fcw_len;
-		desc->req.data_ptrs[0].blkid = ACC100_DMA_BLKID_FCW;
+		desc->req.data_ptrs[0].blkid = ACC_DMA_BLKID_FCW;
 		desc->req.data_ptrs[0].last = 0;
 		desc->req.data_ptrs[0].dma_ext = 0;
-		for (b_idx = 1; b_idx < ACC100_DMA_MAX_NUM_POINTERS - 1;
+		for (b_idx = 1; b_idx < ACC_DMA_MAX_NUM_POINTERS - 1;
 				b_idx++) {
-			desc->req.data_ptrs[b_idx].blkid = ACC100_DMA_BLKID_IN;
+			desc->req.data_ptrs[b_idx].blkid = ACC_DMA_BLKID_IN;
 			desc->req.data_ptrs[b_idx].last = 1;
 			desc->req.data_ptrs[b_idx].dma_ext = 0;
 			b_idx++;
 			desc->req.data_ptrs[b_idx].blkid =
-					ACC100_DMA_BLKID_OUT_ENC;
+					ACC_DMA_BLKID_OUT_ENC;
 			desc->req.data_ptrs[b_idx].last = 1;
 			desc->req.data_ptrs[b_idx].dma_ext = 0;
 		}
 		/* Preset some fields of LDPC FCW */
-		desc->req.fcw_ld.FCWversion = ACC100_FCW_VER;
+		desc->req.fcw_ld.FCWversion = ACC_FCW_VER;
 		desc->req.fcw_ld.gain_i = 1;
 		desc->req.fcw_ld.gain_h = 1;
 	}
@@ -925,8 +762,8 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
 	q->vf_id = (q_idx >> ACC100_VF_ID_SHIFT)  & 0x3F;
 	q->aq_id = q_idx & 0xF;
 	q->aq_depth = (conf->op_type ==  RTE_BBDEV_OP_TURBO_DEC) ?
-			(1 << d->acc100_conf.q_ul_4g.aq_depth_log2) :
-			(1 << d->acc100_conf.q_dl_4g.aq_depth_log2);
+			(1 << d->acc_conf.q_ul_4g.aq_depth_log2) :
+			(1 << d->acc_conf.q_dl_4g.aq_depth_log2);
 
 	q->mmio_reg_enqueue = RTE_PTR_ADD(d->mmio_base,
 			queue_offset(d->pf_device,
@@ -945,13 +782,13 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
 static int
 acc100_queue_release(struct rte_bbdev *dev, uint16_t q_id)
 {
-	struct acc100_device *d = dev->data->dev_private;
-	struct acc100_queue *q = dev->data->queues[q_id].queue_private;
+	struct acc_device *d = dev->data->dev_private;
+	struct acc_queue *q = dev->data->queues[q_id].queue_private;
 
 	if (q != NULL) {
 		/* Mark the Queue as un-assigned */
-		d->q_assigned_bit_map[q->qgrp_id] &= (0xFFFFFFFF -
-				(1 << q->aq_id));
+		d->q_assigned_bit_map[q->qgrp_id] &= (0xFFFFFFFFFFFFFFFF -
+				(uint64_t) (1 << q->aq_id));
 		rte_free(q->lb_in);
 		rte_free(q->lb_out);
 		rte_free(q);
@@ -966,7 +803,7 @@ static void
 acc100_dev_info_get(struct rte_bbdev *dev,
 		struct rte_bbdev_driver_info *dev_info)
 {
-	struct acc100_device *d = dev->data->dev_private;
+	struct acc_device *d = dev->data->dev_private;
 	int i;
 
 	static const struct rte_bbdev_op_cap bbdev_capabilities[] = {
@@ -1056,7 +893,7 @@ acc100_dev_info_get(struct rte_bbdev *dev,
 
 	static struct rte_bbdev_queue_conf default_queue_conf;
 	default_queue_conf.socket = dev->data->socket_id;
-	default_queue_conf.queue_size = ACC100_MAX_QUEUE_DEPTH;
+	default_queue_conf.queue_size = ACC_MAX_QUEUE_DEPTH;
 
 	dev_info->driver_name = dev->device->driver->name;
 
@@ -1066,27 +903,27 @@ acc100_dev_info_get(struct rte_bbdev *dev,
 
 	/* Expose number of queues */
 	dev_info->num_queues[RTE_BBDEV_OP_NONE] = 0;
-	dev_info->num_queues[RTE_BBDEV_OP_TURBO_DEC] = d->acc100_conf.q_ul_4g.num_aqs_per_groups *
-			d->acc100_conf.q_ul_4g.num_qgroups;
-	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = d->acc100_conf.q_dl_4g.num_aqs_per_groups *
-			d->acc100_conf.q_dl_4g.num_qgroups;
-	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = d->acc100_conf.q_ul_5g.num_aqs_per_groups *
-			d->acc100_conf.q_ul_5g.num_qgroups;
-	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = d->acc100_conf.q_dl_5g.num_aqs_per_groups *
-			d->acc100_conf.q_dl_5g.num_qgroups;
-	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = d->acc100_conf.q_ul_4g.num_qgroups;
-	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = d->acc100_conf.q_dl_4g.num_qgroups;
-	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = d->acc100_conf.q_ul_5g.num_qgroups;
-	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = d->acc100_conf.q_dl_5g.num_qgroups;
+	dev_info->num_queues[RTE_BBDEV_OP_TURBO_DEC] = d->acc_conf.q_ul_4g.num_aqs_per_groups *
+			d->acc_conf.q_ul_4g.num_qgroups;
+	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = d->acc_conf.q_dl_4g.num_aqs_per_groups *
+			d->acc_conf.q_dl_4g.num_qgroups;
+	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = d->acc_conf.q_ul_5g.num_aqs_per_groups *
+			d->acc_conf.q_ul_5g.num_qgroups;
+	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_aqs_per_groups *
+			d->acc_conf.q_dl_5g.num_qgroups;
+	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = d->acc_conf.q_ul_4g.num_qgroups;
+	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = d->acc_conf.q_dl_4g.num_qgroups;
+	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = d->acc_conf.q_ul_5g.num_qgroups;
+	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_qgroups;
 	dev_info->max_num_queues = 0;
 	for (i = RTE_BBDEV_OP_TURBO_DEC; i <= RTE_BBDEV_OP_LDPC_ENC; i++)
 		dev_info->max_num_queues += dev_info->num_queues[i];
-	dev_info->queue_size_lim = ACC100_MAX_QUEUE_DEPTH;
+	dev_info->queue_size_lim = ACC_MAX_QUEUE_DEPTH;
 	dev_info->hardware_accelerated = true;
 	dev_info->max_dl_queue_priority =
-			d->acc100_conf.q_dl_4g.num_qgroups - 1;
+			d->acc_conf.q_dl_4g.num_qgroups - 1;
 	dev_info->max_ul_queue_priority =
-			d->acc100_conf.q_ul_4g.num_qgroups - 1;
+			d->acc_conf.q_ul_4g.num_qgroups - 1;
 	dev_info->default_queue_conf = default_queue_conf;
 	dev_info->cpu_flag_reqs = NULL;
 	dev_info->min_alignment = 64;
@@ -1103,7 +940,7 @@ acc100_dev_info_get(struct rte_bbdev *dev,
 static int
 acc100_queue_intr_enable(struct rte_bbdev *dev, uint16_t queue_id)
 {
-	struct acc100_queue *q = dev->data->queues[queue_id].queue_private;
+	struct acc_queue *q = dev->data->queues[queue_id].queue_private;
 
 	if (rte_intr_type_get(dev->intr_handle) != RTE_INTR_HANDLE_VFIO_MSI &&
 			rte_intr_type_get(dev->intr_handle) != RTE_INTR_HANDLE_UIO)
@@ -1116,7 +953,7 @@ acc100_queue_intr_enable(struct rte_bbdev *dev, uint16_t queue_id)
 static int
 acc100_queue_intr_disable(struct rte_bbdev *dev, uint16_t queue_id)
 {
-	struct acc100_queue *q = dev->data->queues[queue_id].queue_private;
+	struct acc_queue *q = dev->data->queues[queue_id].queue_private;
 
 	if (rte_intr_type_get(dev->intr_handle) != RTE_INTR_HANDLE_VFIO_MSI &&
 			rte_intr_type_get(dev->intr_handle) != RTE_INTR_HANDLE_UIO)
@@ -1159,132 +996,10 @@ static struct rte_pci_id pci_id_acc100_vf_map[] = {
 	{.device_id = 0},
 };
 
-/* Read flag value 0/1 from bitmap */
-static inline bool
-check_bit(uint32_t bitmap, uint32_t bitmask)
-{
-	return bitmap & bitmask;
-}
-
-static inline char *
-mbuf_append(struct rte_mbuf *m_head, struct rte_mbuf *m, uint16_t len)
-{
-	if (unlikely(len > rte_pktmbuf_tailroom(m)))
-		return NULL;
-
-	char *tail = (char *)m->buf_addr + m->data_off + m->data_len;
-	m->data_len = (uint16_t)(m->data_len + len);
-	m_head->pkt_len  = (m_head->pkt_len + len);
-	return tail;
-}
-
-/* Fill in a frame control word for turbo encoding. */
-static inline void
-acc100_fcw_te_fill(const struct rte_bbdev_enc_op *op, struct acc100_fcw_te *fcw)
-{
-	fcw->code_block_mode = op->turbo_enc.code_block_mode;
-	if (fcw->code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) {
-		fcw->k_neg = op->turbo_enc.tb_params.k_neg;
-		fcw->k_pos = op->turbo_enc.tb_params.k_pos;
-		fcw->c_neg = op->turbo_enc.tb_params.c_neg;
-		fcw->c = op->turbo_enc.tb_params.c;
-		fcw->ncb_neg = op->turbo_enc.tb_params.ncb_neg;
-		fcw->ncb_pos = op->turbo_enc.tb_params.ncb_pos;
-
-		if (check_bit(op->turbo_enc.op_flags,
-				RTE_BBDEV_TURBO_RATE_MATCH)) {
-			fcw->bypass_rm = 0;
-			fcw->cab = op->turbo_enc.tb_params.cab;
-			fcw->ea = op->turbo_enc.tb_params.ea;
-			fcw->eb = op->turbo_enc.tb_params.eb;
-		} else {
-			/* E is set to the encoding output size when RM is
-			 * bypassed.
-			 */
-			fcw->bypass_rm = 1;
-			fcw->cab = fcw->c_neg;
-			fcw->ea = 3 * fcw->k_neg + 12;
-			fcw->eb = 3 * fcw->k_pos + 12;
-		}
-	} else { /* For CB mode */
-		fcw->k_pos = op->turbo_enc.cb_params.k;
-		fcw->ncb_pos = op->turbo_enc.cb_params.ncb;
-
-		if (check_bit(op->turbo_enc.op_flags,
-				RTE_BBDEV_TURBO_RATE_MATCH)) {
-			fcw->bypass_rm = 0;
-			fcw->eb = op->turbo_enc.cb_params.e;
-		} else {
-			/* E is set to the encoding output size when RM is
-			 * bypassed.
-			 */
-			fcw->bypass_rm = 1;
-			fcw->eb = 3 * fcw->k_pos + 12;
-		}
-	}
-
-	fcw->bypass_rv_idx1 = check_bit(op->turbo_enc.op_flags,
-			RTE_BBDEV_TURBO_RV_INDEX_BYPASS);
-	fcw->code_block_crc = check_bit(op->turbo_enc.op_flags,
-			RTE_BBDEV_TURBO_CRC_24B_ATTACH);
-	fcw->rv_idx1 = op->turbo_enc.rv_index;
-}
-
-/* Compute value of k0.
- * Based on 3GPP 38.212 Table 5.4.2.1-2
- * Starting position of different redundancy versions, k0
- */
-static inline uint16_t
-get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
-{
-	if (rv_index == 0)
-		return 0;
-	uint16_t n = (bg == 1 ? ACC100_N_ZC_1 : ACC100_N_ZC_2) * z_c;
-	if (n_cb == n) {
-		if (rv_index == 1)
-			return (bg == 1 ? ACC100_K0_1_1 : ACC100_K0_1_2) * z_c;
-		else if (rv_index == 2)
-			return (bg == 1 ? ACC100_K0_2_1 : ACC100_K0_2_2) * z_c;
-		else
-			return (bg == 1 ? ACC100_K0_3_1 : ACC100_K0_3_2) * z_c;
-	}
-	/* LBRM case - includes a division by N */
-	if (unlikely(z_c == 0))
-		return 0;
-	if (rv_index == 1)
-		return (((bg == 1 ? ACC100_K0_1_1 : ACC100_K0_1_2) * n_cb)
-				/ n) * z_c;
-	else if (rv_index == 2)
-		return (((bg == 1 ? ACC100_K0_2_1 : ACC100_K0_2_2) * n_cb)
-				/ n) * z_c;
-	else
-		return (((bg == 1 ? ACC100_K0_3_1 : ACC100_K0_3_2) * n_cb)
-				/ n) * z_c;
-}
-
-/* Fill in a frame control word for LDPC encoding. */
-static inline void
-acc100_fcw_le_fill(const struct rte_bbdev_enc_op *op,
-		struct acc100_fcw_le *fcw, int num_cb)
-{
-	fcw->qm = op->ldpc_enc.q_m;
-	fcw->nfiller = op->ldpc_enc.n_filler;
-	fcw->BG = (op->ldpc_enc.basegraph - 1);
-	fcw->Zc = op->ldpc_enc.z_c;
-	fcw->ncb = op->ldpc_enc.n_cb;
-	fcw->k0 = get_k0(fcw->ncb, fcw->Zc, op->ldpc_enc.basegraph,
-			op->ldpc_enc.rv_index);
-	fcw->rm_e = op->ldpc_enc.cb_params.e;
-	fcw->crc_select = check_bit(op->ldpc_enc.op_flags,
-			RTE_BBDEV_LDPC_CRC_24B_ATTACH);
-	fcw->bypass_intlv = check_bit(op->ldpc_enc.op_flags,
-			RTE_BBDEV_LDPC_INTERLEAVER_BYPASS);
-	fcw->mcb_count = num_cb;
-}
 
 /* Fill in a frame control word for turbo decoding. */
 static inline void
-acc100_fcw_td_fill(const struct rte_bbdev_dec_op *op, struct acc100_fcw_td *fcw)
+acc100_fcw_td_fill(const struct rte_bbdev_dec_op *op, struct acc_fcw_td *fcw)
 {
 	/* Note : Early termination is always enabled for 4GUL */
 	fcw->fcw_ver = 1;
@@ -1304,13 +1019,13 @@ acc100_fcw_td_fill(const struct rte_bbdev_dec_op *op, struct acc100_fcw_td *fcw)
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 
 static inline bool
-is_acc100(struct acc100_queue *q)
+is_acc100(struct acc_queue *q)
 {
 	return (q->d->device_variant == ACC100_VARIANT);
 }
 
 static inline bool
-validate_op_required(struct acc100_queue *q)
+validate_op_required(struct acc_queue *q)
 {
 	return is_acc100(q);
 }
@@ -1318,8 +1033,8 @@ validate_op_required(struct acc100_queue *q)
 
 /* Fill in a frame control word for LDPC decoding. */
 static inline void
-acc100_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc100_fcw_ld *fcw,
-		union acc100_harq_layout_data *harq_layout)
+acc100_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc_fcw_ld *fcw,
+		union acc_harq_layout_data *harq_layout)
 {
 	uint16_t harq_out_length, harq_in_length, ncb_p, k0_p, parity_offset;
 	uint16_t harq_index;
@@ -1362,13 +1077,13 @@ acc100_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc100_fcw_ld *fcw,
 	fcw->llr_pack_mode = check_bit(op->ldpc_dec.op_flags,
 			RTE_BBDEV_LDPC_LLR_COMPRESSION);
 	harq_index = op->ldpc_dec.harq_combined_output.offset /
-			ACC100_HARQ_OFFSET;
+			ACC_HARQ_OFFSET;
 #ifdef ACC100_EXT_MEM
 	/* Limit cases when HARQ pruning is valid */
 	harq_prun = ((op->ldpc_dec.harq_combined_output.offset %
-			ACC100_HARQ_OFFSET) == 0) &&
+			ACC_HARQ_OFFSET) == 0) &&
 			(op->ldpc_dec.harq_combined_output.offset <= UINT16_MAX
-			* ACC100_HARQ_OFFSET);
+			* ACC_HARQ_OFFSET);
 #endif
 	if (fcw->hcin_en > 0) {
 		harq_in_length = op->ldpc_dec.harq_combined_input.length;
@@ -1423,7 +1138,7 @@ acc100_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc100_fcw_ld *fcw,
 		harq_out_length = (uint16_t) fcw->hcin_size0;
 		harq_out_length = RTE_MIN(RTE_MAX(harq_out_length, l), ncb_p);
 		harq_out_length = (harq_out_length + 0x3F) & 0xFFC0;
-		if ((k0_p > fcw->hcin_size0 + ACC100_HARQ_OFFSET_THRESHOLD) &&
+		if ((k0_p > fcw->hcin_size0 + ACC_HARQ_OFFSET_THRESHOLD) &&
 				harq_prun) {
 			fcw->hcout_size0 = (uint16_t) fcw->hcin_size0;
 			fcw->hcout_offset = k0_p & 0xFFC0;
@@ -1442,16 +1157,10 @@ acc100_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc100_fcw_ld *fcw,
 	}
 }
 
-/* Convert offset to harq index for harq_layout structure */
-static inline uint32_t hq_index(uint32_t offset)
-{
-	return (offset >> ACC100_HARQ_OFFSET_SHIFT) & ACC100_HARQ_OFFSET_MASK;
-}
-
 /* Fill in a frame control word for LDPC decoding for ACC101 */
 static inline void
-acc101_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc100_fcw_ld *fcw,
-		union acc100_harq_layout_data *harq_layout)
+acc101_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc_fcw_ld *fcw,
+		union acc_harq_layout_data *harq_layout)
 {
 	uint16_t harq_out_length, harq_in_length, ncb_p, k0_p, parity_offset;
 	uint32_t harq_index;
@@ -1591,7 +1300,7 @@ acc101_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc100_fcw_ld *fcw,
  *
  */
 static inline int
-acc100_dma_fill_blk_type_in(struct acc100_dma_req_desc *desc,
+acc100_dma_fill_blk_type_in(struct acc_dma_req_desc *desc,
 		struct rte_mbuf **input, uint32_t *offset, uint32_t cb_len,
 		uint32_t *seg_total_left, int next_triplet)
 {
@@ -1605,14 +1314,14 @@ acc100_dma_fill_blk_type_in(struct acc100_dma_req_desc *desc,
 	desc->data_ptrs[next_triplet].address =
 			rte_pktmbuf_iova_offset(m, *offset);
 	desc->data_ptrs[next_triplet].blen = part_len;
-	desc->data_ptrs[next_triplet].blkid = ACC100_DMA_BLKID_IN;
+	desc->data_ptrs[next_triplet].blkid = ACC_DMA_BLKID_IN;
 	desc->data_ptrs[next_triplet].last = 0;
 	desc->data_ptrs[next_triplet].dma_ext = 0;
 	*offset += part_len;
 	next_triplet++;
 
 	while (cb_len > 0) {
-		if (next_triplet < ACC100_DMA_MAX_NUM_POINTERS_IN && m->next != NULL) {
+		if (next_triplet < ACC_DMA_MAX_NUM_POINTERS_IN && m->next != NULL) {
 
 			m = m->next;
 			*seg_total_left = rte_pktmbuf_data_len(m);
@@ -1623,7 +1332,7 @@ acc100_dma_fill_blk_type_in(struct acc100_dma_req_desc *desc,
 					rte_pktmbuf_iova_offset(m, 0);
 			desc->data_ptrs[next_triplet].blen = part_len;
 			desc->data_ptrs[next_triplet].blkid =
-					ACC100_DMA_BLKID_IN;
+					ACC_DMA_BLKID_IN;
 			desc->data_ptrs[next_triplet].last = 0;
 			desc->data_ptrs[next_triplet].dma_ext = 0;
 			cb_len -= part_len;
@@ -1645,134 +1354,9 @@ acc100_dma_fill_blk_type_in(struct acc100_dma_req_desc *desc,
 	return next_triplet;
 }
 
-/* Fills descriptor with data pointers of one block type.
- * Returns index of next triplet on success, other value if lengths of
- * output data and processed mbuf do not match.
- */
-static inline int
-acc100_dma_fill_blk_type_out(struct acc100_dma_req_desc *desc,
-		struct rte_mbuf *output, uint32_t out_offset,
-		uint32_t output_len, int next_triplet, int blk_id)
-{
-	desc->data_ptrs[next_triplet].address =
-			rte_pktmbuf_iova_offset(output, out_offset);
-	desc->data_ptrs[next_triplet].blen = output_len;
-	desc->data_ptrs[next_triplet].blkid = blk_id;
-	desc->data_ptrs[next_triplet].last = 0;
-	desc->data_ptrs[next_triplet].dma_ext = 0;
-	next_triplet++;
-
-	return next_triplet;
-}
-
-static inline void
-acc100_header_init(struct acc100_dma_req_desc *desc)
-{
-	desc->word0 = ACC100_DMA_DESC_TYPE;
-	desc->word1 = 0; /**< Timestamp could be disabled */
-	desc->word2 = 0;
-	desc->word3 = 0;
-	desc->numCBs = 1;
-}
-
-#ifdef RTE_LIBRTE_BBDEV_DEBUG
-/* Check if any input data is unexpectedly left for processing */
-static inline int
-check_mbuf_total_left(uint32_t mbuf_total_left)
-{
-	if (mbuf_total_left == 0)
-		return 0;
-	rte_bbdev_log(ERR,
-		"Some date still left for processing: mbuf_total_left = %u",
-		mbuf_total_left);
-	return -EINVAL;
-}
-#endif
-
-static inline int
-acc100_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
-		struct acc100_dma_req_desc *desc, struct rte_mbuf **input,
-		struct rte_mbuf *output, uint32_t *in_offset,
-		uint32_t *out_offset, uint32_t *out_length,
-		uint32_t *mbuf_total_left, uint32_t *seg_total_left, uint8_t r)
-{
-	int next_triplet = 1; /* FCW already done */
-	uint32_t e, ea, eb, length;
-	uint16_t k, k_neg, k_pos;
-	uint8_t cab, c_neg;
-
-	desc->word0 = ACC100_DMA_DESC_TYPE;
-	desc->word1 = 0; /**< Timestamp could be disabled */
-	desc->word2 = 0;
-	desc->word3 = 0;
-	desc->numCBs = 1;
-
-	if (op->turbo_enc.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) {
-		ea = op->turbo_enc.tb_params.ea;
-		eb = op->turbo_enc.tb_params.eb;
-		cab = op->turbo_enc.tb_params.cab;
-		k_neg = op->turbo_enc.tb_params.k_neg;
-		k_pos = op->turbo_enc.tb_params.k_pos;
-		c_neg = op->turbo_enc.tb_params.c_neg;
-		e = (r < cab) ? ea : eb;
-		k = (r < c_neg) ? k_neg : k_pos;
-	} else {
-		e = op->turbo_enc.cb_params.e;
-		k = op->turbo_enc.cb_params.k;
-	}
-
-	if (check_bit(op->turbo_enc.op_flags, RTE_BBDEV_TURBO_CRC_24B_ATTACH))
-		length = (k - 24) >> 3;
-	else
-		length = k >> 3;
-
-	if (unlikely((*mbuf_total_left == 0) || (*mbuf_total_left < length))) {
-		rte_bbdev_log(ERR,
-				"Mismatch between mbuf length and included CB sizes: mbuf len %u, cb len %u",
-				*mbuf_total_left, length);
-		return -1;
-	}
-
-	next_triplet = acc100_dma_fill_blk_type_in(desc, input, in_offset,
-			length, seg_total_left, next_triplet);
-	if (unlikely(next_triplet < 0)) {
-		rte_bbdev_log(ERR,
-				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
-				op);
-		return -1;
-	}
-	desc->data_ptrs[next_triplet - 1].last = 1;
-	desc->m2dlen = next_triplet;
-	*mbuf_total_left -= length;
-
-	/* Set output length */
-	if (check_bit(op->turbo_enc.op_flags, RTE_BBDEV_TURBO_RATE_MATCH))
-		/* Integer round up division by 8 */
-		*out_length = (e + 7) >> 3;
-	else
-		*out_length = (k >> 3) * 3 + 2;
-
-	next_triplet = acc100_dma_fill_blk_type_out(desc, output, *out_offset,
-			*out_length, next_triplet, ACC100_DMA_BLKID_OUT_ENC);
-	if (unlikely(next_triplet < 0)) {
-		rte_bbdev_log(ERR,
-				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
-				op);
-		return -1;
-	}
-	op->turbo_enc.output.length += *out_length;
-	*out_offset += *out_length;
-	desc->data_ptrs[next_triplet - 1].last = 1;
-	desc->d2mlen = next_triplet - desc->m2dlen;
-
-	desc->op_addr = op;
-
-	return 0;
-}
-
 static inline int
 acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
-		struct acc100_dma_req_desc *desc, struct rte_mbuf **input,
+		struct acc_dma_req_desc *desc, struct rte_mbuf **input,
 		struct rte_mbuf *output, uint32_t *in_offset,
 		uint32_t *out_offset, uint32_t *out_length,
 		uint32_t *mbuf_total_left, uint32_t *seg_total_left)
@@ -1781,7 +1365,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
 	uint16_t K, in_length_in_bits, in_length_in_bytes;
 	struct rte_bbdev_op_ldpc_enc *enc = &op->ldpc_enc;
 
-	acc100_header_init(desc);
+	acc_header_init(desc);
 
 	K = (enc->basegraph == 1 ? 22 : 10) * enc->z_c;
 	in_length_in_bits = K - enc->n_filler;
@@ -1815,8 +1399,8 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
 	/* Integer round up division by 8 */
 	*out_length = (enc->cb_params.e + 7) >> 3;
 
-	next_triplet = acc100_dma_fill_blk_type_out(desc, output, *out_offset,
-			*out_length, next_triplet, ACC100_DMA_BLKID_OUT_ENC);
+	next_triplet = acc_dma_fill_blk_type(desc, output, *out_offset,
+			*out_length, next_triplet, ACC_DMA_BLKID_OUT_ENC);
 	op->ldpc_enc.output.length += *out_length;
 	*out_offset += *out_length;
 	desc->data_ptrs[next_triplet - 1].last = 1;
@@ -1830,7 +1414,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
 
 static inline int
 acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
-		struct acc100_dma_req_desc *desc, struct rte_mbuf **input,
+		struct acc_dma_req_desc *desc, struct rte_mbuf **input,
 		struct rte_mbuf *h_output, struct rte_mbuf *s_output,
 		uint32_t *in_offset, uint32_t *h_out_offset,
 		uint32_t *s_out_offset, uint32_t *h_out_length,
@@ -1842,7 +1426,7 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 	uint16_t crc24_overlap = 0;
 	uint32_t e, kw;
 
-	desc->word0 = ACC100_DMA_DESC_TYPE;
+	desc->word0 = ACC_DMA_DESC_TYPE;
 	desc->word1 = 0; /**< Timestamp could be disabled */
 	desc->word2 = 0;
 	desc->word3 = 0;
@@ -1899,10 +1483,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 	desc->m2dlen = next_triplet;
 	*mbuf_total_left -= kw;
 
-	next_triplet = acc100_dma_fill_blk_type_out(
+	next_triplet = acc_dma_fill_blk_type(
 			desc, h_output, *h_out_offset,
 			(k - crc24_overlap) >> 3, next_triplet,
-			ACC100_DMA_BLKID_OUT_HARD);
+			ACC_DMA_BLKID_OUT_HARD);
 	if (unlikely(next_triplet < 0)) {
 		rte_bbdev_log(ERR,
 				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
@@ -1926,9 +1510,9 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 		else
 			*s_out_length = (k * 3) + 12;
 
-		next_triplet = acc100_dma_fill_blk_type_out(desc, s_output,
+		next_triplet = acc_dma_fill_blk_type(desc, s_output,
 				*s_out_offset, *s_out_length, next_triplet,
-				ACC100_DMA_BLKID_OUT_SOFT);
+				ACC_DMA_BLKID_OUT_SOFT);
 		if (unlikely(next_triplet < 0)) {
 			rte_bbdev_log(ERR,
 					"Mismatch between data to process and mbuf data length in bbdev_op: %p",
@@ -1950,12 +1534,12 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 
 static inline int
 acc100_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
-		struct acc100_dma_req_desc *desc,
+		struct acc_dma_req_desc *desc,
 		struct rte_mbuf **input, struct rte_mbuf *h_output,
 		uint32_t *in_offset, uint32_t *h_out_offset,
 		uint32_t *h_out_length, uint32_t *mbuf_total_left,
 		uint32_t *seg_total_left,
-		struct acc100_fcw_ld *fcw)
+		struct acc_fcw_ld *fcw)
 {
 	struct rte_bbdev_op_ldpc_dec *dec = &op->ldpc_dec;
 	int next_triplet = 1; /* FCW already done */
@@ -1965,7 +1549,7 @@ acc100_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 	bool h_comp = check_bit(dec->op_flags,
 			RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION);
 
-	acc100_header_init(desc);
+	acc_header_init(desc);
 
 	if (check_bit(op->ldpc_dec.op_flags,
 			RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP))
@@ -2007,16 +1591,16 @@ acc100_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 		desc->data_ptrs[next_triplet].address =
 				dec->harq_combined_input.offset;
 		desc->data_ptrs[next_triplet].blen = h_p_size;
-		desc->data_ptrs[next_triplet].blkid = ACC100_DMA_BLKID_IN_HARQ;
+		desc->data_ptrs[next_triplet].blkid = ACC_DMA_BLKID_IN_HARQ;
 		desc->data_ptrs[next_triplet].dma_ext = 1;
 #ifndef ACC100_EXT_MEM
-		acc100_dma_fill_blk_type_out(
+		acc_dma_fill_blk_type(
 				desc,
 				op->ldpc_dec.harq_combined_input.data,
 				op->ldpc_dec.harq_combined_input.offset,
 				h_p_size,
 				next_triplet,
-				ACC100_DMA_BLKID_IN_HARQ);
+				ACC_DMA_BLKID_IN_HARQ);
 #endif
 		next_triplet++;
 	}
@@ -2025,9 +1609,9 @@ acc100_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 	desc->m2dlen = next_triplet;
 	*mbuf_total_left -= input_length;
 
-	next_triplet = acc100_dma_fill_blk_type_out(desc, h_output,
+	next_triplet = acc_dma_fill_blk_type(desc, h_output,
 			*h_out_offset, output_length >> 3, next_triplet,
-			ACC100_DMA_BLKID_OUT_HARD);
+			ACC_DMA_BLKID_OUT_HARD);
 
 	if (check_bit(op->ldpc_dec.op_flags,
 				RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {
@@ -2045,16 +1629,16 @@ acc100_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 		desc->data_ptrs[next_triplet].address =
 				dec->harq_combined_output.offset;
 		desc->data_ptrs[next_triplet].blen = h_p_size;
-		desc->data_ptrs[next_triplet].blkid = ACC100_DMA_BLKID_OUT_HARQ;
+		desc->data_ptrs[next_triplet].blkid = ACC_DMA_BLKID_OUT_HARQ;
 		desc->data_ptrs[next_triplet].dma_ext = 1;
 #ifndef ACC100_EXT_MEM
-		acc100_dma_fill_blk_type_out(
+		acc_dma_fill_blk_type(
 				desc,
 				dec->harq_combined_output.data,
 				dec->harq_combined_output.offset,
 				h_p_size,
 				next_triplet,
-				ACC100_DMA_BLKID_OUT_HARQ);
+				ACC_DMA_BLKID_OUT_HARQ);
 #endif
 		next_triplet++;
 	}
@@ -2072,11 +1656,11 @@ acc100_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 
 static inline void
 acc100_dma_desc_ld_update(struct rte_bbdev_dec_op *op,
-		struct acc100_dma_req_desc *desc,
+		struct acc_dma_req_desc *desc,
 		struct rte_mbuf *input, struct rte_mbuf *h_output,
 		uint32_t *in_offset, uint32_t *h_out_offset,
 		uint32_t *h_out_length,
-		union acc100_harq_layout_data *harq_layout)
+		union acc_harq_layout_data *harq_layout)
 {
 	int next_triplet = 1; /* FCW already done */
 	desc->data_ptrs[next_triplet].address =
@@ -2108,10 +1692,10 @@ acc100_dma_desc_ld_update(struct rte_bbdev_dec_op *op,
 		op->ldpc_dec.harq_combined_output.length =
 				prev_op->ldpc_dec.harq_combined_output.length;
 		int16_t hq_idx = op->ldpc_dec.harq_combined_output.offset /
-				ACC100_HARQ_OFFSET;
+				ACC_HARQ_OFFSET;
 		int16_t prev_hq_idx =
 				prev_op->ldpc_dec.harq_combined_output.offset
-				/ ACC100_HARQ_OFFSET;
+				/ ACC_HARQ_OFFSET;
 		harq_layout[hq_idx].val = harq_layout[prev_hq_idx].val;
 #ifndef ACC100_EXT_MEM
 		struct rte_bbdev_op_data ho =
@@ -2126,84 +1710,10 @@ acc100_dma_desc_ld_update(struct rte_bbdev_dec_op *op,
 	desc->op_addr = op;
 }
 
-
-/* Enqueue a number of operations to HW and update software rings */
-static inline void
-acc100_dma_enqueue(struct acc100_queue *q, uint16_t n,
-		struct rte_bbdev_stats *queue_stats)
-{
-	union acc100_enqueue_reg_fmt enq_req;
-#ifdef RTE_BBDEV_OFFLOAD_COST
-	uint64_t start_time = 0;
-	queue_stats->acc_offload_cycles = 0;
-#else
-	RTE_SET_USED(queue_stats);
-#endif
-
-	enq_req.val = 0;
-	/* Setting offset, 100b for 256 DMA Desc */
-	enq_req.addr_offset = ACC100_DESC_OFFSET;
-
-	/* Split ops into batches */
-	do {
-		union acc100_dma_desc *desc;
-		uint16_t enq_batch_size;
-		uint64_t offset;
-		rte_iova_t req_elem_addr;
-
-		enq_batch_size = RTE_MIN(n, MAX_ENQ_BATCH_SIZE);
-
-		/* Set flag on last descriptor in a batch */
-		desc = q->ring_addr + ((q->sw_ring_head + enq_batch_size - 1) &
-				q->sw_ring_wrap_mask);
-		desc->req.last_desc_in_batch = 1;
-
-		/* Calculate the 1st descriptor's address */
-		offset = ((q->sw_ring_head & q->sw_ring_wrap_mask) *
-				sizeof(union acc100_dma_desc));
-		req_elem_addr = q->ring_addr_iova + offset;
-
-		/* Fill enqueue struct */
-		enq_req.num_elem = enq_batch_size;
-		/* low 6 bits are not needed */
-		enq_req.req_elem_addr = (uint32_t)(req_elem_addr >> 6);
-
-#ifdef RTE_LIBRTE_BBDEV_DEBUG
-		rte_memdump(stderr, "Req sdone", desc, sizeof(*desc));
-#endif
-		rte_bbdev_log_debug(
-				"Enqueue %u reqs (phys %#"PRIx64") to reg %p",
-				enq_batch_size,
-				req_elem_addr,
-				(void *)q->mmio_reg_enqueue);
-
-		rte_wmb();
-
-#ifdef RTE_BBDEV_OFFLOAD_COST
-		/* Start time measurement for enqueue function offload. */
-		start_time = rte_rdtsc_precise();
-#endif
-		rte_bbdev_log(DEBUG, "Debug : MMIO Enqueue");
-		mmio_write(q->mmio_reg_enqueue, enq_req.val);
-
-#ifdef RTE_BBDEV_OFFLOAD_COST
-		queue_stats->acc_offload_cycles +=
-				rte_rdtsc_precise() - start_time;
-#endif
-
-		q->aq_enqueued++;
-		q->sw_ring_head += enq_batch_size;
-		n -= enq_batch_size;
-
-	} while (n);
-
-
-}
-
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 /* Validates turbo encoder parameters */
 static inline int
-validate_enc_op(struct rte_bbdev_enc_op *op, struct acc100_queue *q)
+validate_enc_op(struct rte_bbdev_enc_op *op, struct acc_queue *q)
 {
 	struct rte_bbdev_op_turbo_enc *turbo_enc = &op->turbo_enc;
 	struct rte_bbdev_op_enc_turbo_cb_params *cb = NULL;
@@ -2344,7 +1854,7 @@ validate_enc_op(struct rte_bbdev_enc_op *op, struct acc100_queue *q)
 }
 /* Validates LDPC encoder parameters */
 static inline int
-validate_ldpc_enc_op(struct rte_bbdev_enc_op *op, struct acc100_queue *q)
+validate_ldpc_enc_op(struct rte_bbdev_enc_op *op, struct acc_queue *q)
 {
 	struct rte_bbdev_op_ldpc_enc *ldpc_enc = &op->ldpc_enc;
 
@@ -2400,7 +1910,7 @@ validate_ldpc_enc_op(struct rte_bbdev_enc_op *op, struct acc100_queue *q)
 
 /* Validates LDPC decoder parameters */
 static inline int
-validate_ldpc_dec_op(struct rte_bbdev_dec_op *op, struct acc100_queue *q)
+validate_ldpc_dec_op(struct rte_bbdev_dec_op *op, struct acc_queue *q)
 {
 	struct rte_bbdev_op_ldpc_dec *ldpc_dec = &op->ldpc_dec;
 
@@ -2448,10 +1958,10 @@ validate_ldpc_dec_op(struct rte_bbdev_dec_op *op, struct acc100_queue *q)
 
 /* Enqueue one encode operations for ACC100 device in CB mode */
 static inline int
-enqueue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
+enqueue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 		uint16_t total_enqueued_cbs)
 {
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	int ret;
 	uint32_t in_offset, out_offset, out_length, mbuf_total_left,
 		seg_total_left;
@@ -2468,7 +1978,7 @@ enqueue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
-	acc100_fcw_te_fill(op, &desc->req.fcw_te);
+	acc_fcw_te_fill(op, &desc->req.fcw_te);
 
 	input = op->turbo_enc.input.data;
 	output_head = output = op->turbo_enc.output.data;
@@ -2479,7 +1989,7 @@ enqueue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 	seg_total_left = rte_pktmbuf_data_len(op->turbo_enc.input.data)
 			- in_offset;
 
-	ret = acc100_dma_desc_te_fill(op, &desc->req, &input, output,
+	ret = acc_dma_desc_te_fill(op, &desc->req, &input, output,
 			&in_offset, &out_offset, &out_length, &mbuf_total_left,
 			&seg_total_left, 0);
 
@@ -2501,10 +2011,10 @@ enqueue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 
 /* Enqueue one encode operations for ACC100 device in CB mode */
 static inline int
-enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
+enqueue_ldpc_enc_n_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ops,
 		uint16_t total_enqueued_cbs, int16_t num)
 {
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	uint32_t out_length;
 	struct rte_mbuf *output_head, *output;
 	int i, next_triplet;
@@ -2522,10 +2032,10 @@ enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
 	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
-	acc100_fcw_le_fill(ops[0], &desc->req.fcw_le, num);
+	acc_fcw_le_fill(ops[0], &desc->req.fcw_le, num, 0);
 
 	/** This could be done at polling */
-	acc100_header_init(&desc->req);
+	acc_header_init(&desc->req);
 	desc->req.numCBs = num;
 
 	in_length_in_bytes = ops[0]->ldpc_enc.input.data->data_len;
@@ -2564,10 +2074,10 @@ enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
 
 /* Enqueue one encode operations for ACC100 device in CB mode */
 static inline int
-enqueue_ldpc_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
+enqueue_ldpc_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 		uint16_t total_enqueued_cbs)
 {
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	int ret;
 	uint32_t in_offset, out_offset, out_length, mbuf_total_left,
 		seg_total_left;
@@ -2584,7 +2094,7 @@ enqueue_ldpc_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
-	acc100_fcw_le_fill(op, &desc->req.fcw_le, 1);
+	acc_fcw_le_fill(op, &desc->req.fcw_le, 1, 0);
 
 	input = op->ldpc_enc.input.data;
 	output_head = output = op->ldpc_enc.output.data;
@@ -2619,10 +2129,10 @@ enqueue_ldpc_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 
 /* Enqueue one encode operations for ACC100 device in TB mode. */
 static inline int
-enqueue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
+enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 		uint16_t total_enqueued_cbs, uint8_t cbs_in_tb)
 {
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	int ret;
 	uint8_t r, c;
 	uint32_t in_offset, out_offset, out_length, mbuf_total_left,
@@ -2641,8 +2151,8 @@ enqueue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC100_DESC_FCW_OFFSET;
-	acc100_fcw_te_fill(op, &desc->req.fcw_te);
+	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	acc_fcw_te_fill(op, &desc->req.fcw_te);
 
 	input = op->turbo_enc.input.data;
 	output_head = output = op->turbo_enc.output.data;
@@ -2660,9 +2170,9 @@ enqueue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
 				& q->sw_ring_wrap_mask);
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
-		desc->req.data_ptrs[0].blen = ACC100_FCW_TE_BLEN;
+		desc->req.data_ptrs[0].blen = ACC_FCW_TE_BLEN;
 
-		ret = acc100_dma_desc_te_fill(op, &desc->req, &input, output,
+		ret = acc_dma_desc_te_fill(op, &desc->req, &input, output,
 				&in_offset, &out_offset, &out_length,
 				&mbuf_total_left, &seg_total_left, r);
 		if (unlikely(ret < 0))
@@ -2705,7 +2215,7 @@ enqueue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 /* Validates turbo decoder parameters */
 static inline int
-validate_dec_op(struct rte_bbdev_dec_op *op, struct acc100_queue *q)
+validate_dec_op(struct rte_bbdev_dec_op *op, struct acc_queue *q)
 {
 	struct rte_bbdev_op_turbo_dec *turbo_dec = &op->turbo_dec;
 	struct rte_bbdev_op_dec_turbo_cb_params *cb = NULL;
@@ -2843,10 +2353,10 @@ validate_dec_op(struct rte_bbdev_dec_op *op, struct acc100_queue *q)
 
 /** Enqueue one decode operations for ACC100 device in CB mode */
 static inline int
-enqueue_dec_one_op_cb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
+enqueue_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		uint16_t total_enqueued_cbs)
 {
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	int ret;
 	uint32_t in_offset, h_out_offset, s_out_offset, s_out_length,
 		h_out_length, mbuf_total_left, seg_total_left;
@@ -2915,10 +2425,10 @@ enqueue_dec_one_op_cb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 }
 
 static inline int
-harq_loopback(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
+harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		uint16_t total_enqueued_cbs) {
-	struct acc100_fcw_ld *fcw;
-	union acc100_dma_desc *desc;
+	struct acc_fcw_ld *fcw;
+	union acc_dma_desc *desc;
 	int next_triplet = 1;
 	struct rte_mbuf *hq_output_head, *hq_output;
 	uint16_t harq_dma_length_in, harq_dma_length_out;
@@ -2943,24 +2453,24 @@ harq_loopback(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 
 	bool ddr_mem_in = check_bit(op->ldpc_dec.op_flags,
 			RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_IN_ENABLE);
-	union acc100_harq_layout_data *harq_layout = q->d->harq_layout;
+	union acc_harq_layout_data *harq_layout = q->d->harq_layout;
 	uint16_t harq_index = (ddr_mem_in ?
 			op->ldpc_dec.harq_combined_input.offset :
 			op->ldpc_dec.harq_combined_output.offset)
-			/ ACC100_HARQ_OFFSET;
+			/ ACC_HARQ_OFFSET;
 
 	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
 	fcw = &desc->req.fcw_ld;
 	/* Set the FCW from loopback into DDR */
-	memset(fcw, 0, sizeof(struct acc100_fcw_ld));
-	fcw->FCWversion = ACC100_FCW_VER;
+	memset(fcw, 0, sizeof(struct acc_fcw_ld));
+	fcw->FCWversion = ACC_FCW_VER;
 	fcw->qm = 2;
 	fcw->Zc = 384;
-	if (harq_in_length < 16 * ACC100_N_ZC_1)
+	if (harq_in_length < 16 * ACC_N_ZC_1)
 		fcw->Zc = 16;
-	fcw->ncb = fcw->Zc * ACC100_N_ZC_1;
+	fcw->ncb = fcw->Zc * ACC_N_ZC_1;
 	fcw->rm_e = 2;
 	fcw->hcin_en = 1;
 	fcw->hcout_en = 1;
@@ -2990,32 +2500,32 @@ harq_loopback(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 	fcw->gain_h = 1;
 
 	/* Set the prefix of descriptor. This could be done at polling */
-	acc100_header_init(&desc->req);
+	acc_header_init(&desc->req);
 
 	/* Null LLR input for Decoder */
 	desc->req.data_ptrs[next_triplet].address =
 			q->lb_in_addr_iova;
 	desc->req.data_ptrs[next_triplet].blen = 2;
-	desc->req.data_ptrs[next_triplet].blkid = ACC100_DMA_BLKID_IN;
+	desc->req.data_ptrs[next_triplet].blkid = ACC_DMA_BLKID_IN;
 	desc->req.data_ptrs[next_triplet].last = 0;
 	desc->req.data_ptrs[next_triplet].dma_ext = 0;
 	next_triplet++;
 
 	/* HARQ Combine input from either Memory interface */
 	if (!ddr_mem_in) {
-		next_triplet = acc100_dma_fill_blk_type_out(&desc->req,
+		next_triplet = acc_dma_fill_blk_type(&desc->req,
 				op->ldpc_dec.harq_combined_input.data,
 				op->ldpc_dec.harq_combined_input.offset,
 				harq_dma_length_in,
 				next_triplet,
-				ACC100_DMA_BLKID_IN_HARQ);
+				ACC_DMA_BLKID_IN_HARQ);
 	} else {
 		desc->req.data_ptrs[next_triplet].address =
 				op->ldpc_dec.harq_combined_input.offset;
 		desc->req.data_ptrs[next_triplet].blen =
 				harq_dma_length_in;
 		desc->req.data_ptrs[next_triplet].blkid =
-				ACC100_DMA_BLKID_IN_HARQ;
+				ACC_DMA_BLKID_IN_HARQ;
 		desc->req.data_ptrs[next_triplet].dma_ext = 1;
 		next_triplet++;
 	}
@@ -3025,8 +2535,8 @@ harq_loopback(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 	/* Dropped decoder hard output */
 	desc->req.data_ptrs[next_triplet].address =
 			q->lb_out_addr_iova;
-	desc->req.data_ptrs[next_triplet].blen = ACC100_BYTES_IN_WORD;
-	desc->req.data_ptrs[next_triplet].blkid = ACC100_DMA_BLKID_OUT_HARD;
+	desc->req.data_ptrs[next_triplet].blen = ACC_BYTES_IN_WORD;
+	desc->req.data_ptrs[next_triplet].blkid = ACC_DMA_BLKID_OUT_HARD;
 	desc->req.data_ptrs[next_triplet].last = 0;
 	desc->req.data_ptrs[next_triplet].dma_ext = 0;
 	next_triplet++;
@@ -3040,19 +2550,19 @@ harq_loopback(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 		desc->req.data_ptrs[next_triplet].blen =
 				harq_dma_length_out;
 		desc->req.data_ptrs[next_triplet].blkid =
-				ACC100_DMA_BLKID_OUT_HARQ;
+				ACC_DMA_BLKID_OUT_HARQ;
 		desc->req.data_ptrs[next_triplet].dma_ext = 1;
 		next_triplet++;
 	} else {
 		hq_output_head = op->ldpc_dec.harq_combined_output.data;
 		hq_output = op->ldpc_dec.harq_combined_output.data;
-		next_triplet = acc100_dma_fill_blk_type_out(
+		next_triplet = acc_dma_fill_blk_type(
 				&desc->req,
 				op->ldpc_dec.harq_combined_output.data,
 				op->ldpc_dec.harq_combined_output.offset,
 				harq_dma_length_out,
 				next_triplet,
-				ACC100_DMA_BLKID_OUT_HARQ);
+				ACC_DMA_BLKID_OUT_HARQ);
 		/* HARQ output */
 		mbuf_append(hq_output_head, hq_output, harq_dma_length_out);
 		op->ldpc_dec.harq_combined_output.length =
@@ -3068,7 +2578,7 @@ harq_loopback(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 
 /** Enqueue one decode operations for ACC100 device in CB mode */
 static inline int
-enqueue_ldpc_dec_one_op_cb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
+enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		uint16_t total_enqueued_cbs, bool same_op)
 {
 	int ret;
@@ -3085,7 +2595,7 @@ enqueue_ldpc_dec_one_op_cb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 		return -EINVAL;
 	}
 #endif
-	union acc100_dma_desc *desc;
+	union acc_dma_desc *desc;
 	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
@@ -3102,36 +2612,36 @@ enqueue_ldpc_dec_one_op_cb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 		return -EFAULT;
 	}
 #endif
-	union acc100_harq_layout_data *harq_layout = q->d->harq_layout;
+	union acc_harq_layout_data *harq_layout = q->d->harq_layout;
 
 	if (same_op) {
-		union acc100_dma_desc *prev_desc;
+		union acc_dma_desc *prev_desc;
 		desc_idx = ((q->sw_ring_head + total_enqueued_cbs - 1)
 				& q->sw_ring_wrap_mask);
 		prev_desc = q->ring_addr + desc_idx;
 		uint8_t *prev_ptr = (uint8_t *) prev_desc;
 		uint8_t *new_ptr = (uint8_t *) desc;
 		/* Copy first 4 words and BDESCs */
-		rte_memcpy(new_ptr, prev_ptr, ACC100_5GUL_SIZE_0);
-		rte_memcpy(new_ptr + ACC100_5GUL_OFFSET_0,
-				prev_ptr + ACC100_5GUL_OFFSET_0,
-				ACC100_5GUL_SIZE_1);
+		rte_memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0);
+		rte_memcpy(new_ptr + ACC_5GUL_OFFSET_0,
+				prev_ptr + ACC_5GUL_OFFSET_0,
+				ACC_5GUL_SIZE_1);
 		desc->req.op_addr = prev_desc->req.op_addr;
 		/* Copy FCW */
-		rte_memcpy(new_ptr + ACC100_DESC_FCW_OFFSET,
-				prev_ptr + ACC100_DESC_FCW_OFFSET,
-				ACC100_FCW_LD_BLEN);
+		rte_memcpy(new_ptr + ACC_DESC_FCW_OFFSET,
+				prev_ptr + ACC_DESC_FCW_OFFSET,
+				ACC_FCW_LD_BLEN);
 		acc100_dma_desc_ld_update(op, &desc->req, input, h_output,
 				&in_offset, &h_out_offset,
 				&h_out_length, harq_layout);
 	} else {
-		struct acc100_fcw_ld *fcw;
+		struct acc_fcw_ld *fcw;
 		uint32_t seg_total_left;
 		fcw = &desc->req.fcw_ld;
 		q->d->fcw_ld_fill(op, fcw, harq_layout);
 
 		/* Special handling when overusing mbuf */
-		if (fcw->rm_e < ACC100_MAX_E_MBUF)
+		if (fcw->rm_e < ACC_MAX_E_MBUF)
 			seg_total_left = rte_pktmbuf_data_len(input)
 					- in_offset;
 		else
@@ -3171,10 +2681,10 @@ enqueue_ldpc_dec_one_op_cb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 
 /* Enqueue one decode operations for ACC100 device in TB mode */
 static inline int
-enqueue_ldpc_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
+enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		uint16_t total_enqueued_cbs, uint8_t cbs_in_tb)
 {
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	int ret;
 	uint8_t r, c;
 	uint32_t in_offset, h_out_offset,
@@ -3193,8 +2703,8 @@ enqueue_ldpc_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC100_DESC_FCW_OFFSET;
-	union acc100_harq_layout_data *harq_layout = q->d->harq_layout;
+	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	union acc_harq_layout_data *harq_layout = q->d->harq_layout;
 	q->d->fcw_ld_fill(op, &desc->req.fcw_ld, harq_layout);
 
 	input = op->ldpc_dec.input.data;
@@ -3214,7 +2724,7 @@ enqueue_ldpc_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
 				& q->sw_ring_wrap_mask);
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
-		desc->req.data_ptrs[0].blen = ACC100_FCW_LD_BLEN;
+		desc->req.data_ptrs[0].blen = ACC_FCW_LD_BLEN;
 		ret = acc100_dma_desc_ld_fill(op, &desc->req, &input,
 				h_output, &in_offset, &h_out_offset,
 				&h_out_length,
@@ -3260,10 +2770,10 @@ enqueue_ldpc_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 
 /* Enqueue one decode operations for ACC100 device in TB mode */
 static inline int
-enqueue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
+enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		uint16_t total_enqueued_cbs, uint8_t cbs_in_tb)
 {
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	int ret;
 	uint8_t r, c;
 	uint32_t in_offset, h_out_offset, s_out_offset, s_out_length,
@@ -3283,7 +2793,7 @@ enqueue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC100_DESC_FCW_OFFSET;
+	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
 	acc100_fcw_td_fill(op, &desc->req.fcw_td);
 
 	input = op->turbo_dec.input.data;
@@ -3305,7 +2815,7 @@ enqueue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
 				& q->sw_ring_wrap_mask);
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
-		desc->req.data_ptrs[0].blen = ACC100_FCW_TD_BLEN;
+		desc->req.data_ptrs[0].blen = ACC_FCW_TD_BLEN;
 		ret = acc100_dma_desc_td_fill(op, &desc->req, &input,
 				h_output, s_output, &in_offset, &h_out_offset,
 				&s_out_offset, &h_out_length, &s_out_length,
@@ -3360,91 +2870,15 @@ enqueue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
 	return current_enqueued_cbs;
 }
 
-/* Calculates number of CBs in processed encoder TB based on 'r' and input
- * length.
- */
-static inline uint8_t
-get_num_cbs_in_tb_enc(struct rte_bbdev_op_turbo_enc *turbo_enc)
-{
-	uint8_t c, c_neg, r, crc24_bits = 0;
-	uint16_t k, k_neg, k_pos;
-	uint8_t cbs_in_tb = 0;
-	int32_t length;
-
-	length = turbo_enc->input.length;
-	r = turbo_enc->tb_params.r;
-	c = turbo_enc->tb_params.c;
-	c_neg = turbo_enc->tb_params.c_neg;
-	k_neg = turbo_enc->tb_params.k_neg;
-	k_pos = turbo_enc->tb_params.k_pos;
-	crc24_bits = 0;
-	if (check_bit(turbo_enc->op_flags, RTE_BBDEV_TURBO_CRC_24B_ATTACH))
-		crc24_bits = 24;
-	while (length > 0 && r < c) {
-		k = (r < c_neg) ? k_neg : k_pos;
-		length -= (k - crc24_bits) >> 3;
-		r++;
-		cbs_in_tb++;
-	}
-
-	return cbs_in_tb;
-}
-
-/* Calculates number of CBs in processed decoder TB based on 'r' and input
- * length.
- */
-static inline uint16_t
-get_num_cbs_in_tb_dec(struct rte_bbdev_op_turbo_dec *turbo_dec)
-{
-	uint8_t c, c_neg, r = 0;
-	uint16_t kw, k, k_neg, k_pos, cbs_in_tb = 0;
-	int32_t length;
-
-	length = turbo_dec->input.length;
-	r = turbo_dec->tb_params.r;
-	c = turbo_dec->tb_params.c;
-	c_neg = turbo_dec->tb_params.c_neg;
-	k_neg = turbo_dec->tb_params.k_neg;
-	k_pos = turbo_dec->tb_params.k_pos;
-	while (length > 0 && r < c) {
-		k = (r < c_neg) ? k_neg : k_pos;
-		kw = RTE_ALIGN_CEIL(k + 4, 32) * 3;
-		length -= kw;
-		r++;
-		cbs_in_tb++;
-	}
-
-	return cbs_in_tb;
-}
-
-/* Calculates number of CBs in processed decoder TB based on 'r' and input
- * length.
- */
-static inline uint16_t
-get_num_cbs_in_tb_ldpc_dec(struct rte_bbdev_op_ldpc_dec *ldpc_dec)
-{
-	uint16_t r, cbs_in_tb = 0;
-	int32_t length = ldpc_dec->input.length;
-	r = ldpc_dec->tb_params.r;
-	while (length > 0 && r < ldpc_dec->tb_params.c) {
-		length -=  (r < ldpc_dec->tb_params.cab) ?
-				ldpc_dec->tb_params.ea :
-				ldpc_dec->tb_params.eb;
-		r++;
-		cbs_in_tb++;
-	}
-	return cbs_in_tb;
-}
-
 /* Enqueue encode operations for ACC100 device in CB mode. */
 static uint16_t
 acc100_enqueue_enc_cb(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_enc_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	int32_t avail = q->sw_ring_depth + q->sw_ring_tail - q->sw_ring_head;
 	uint16_t i;
-	union acc100_dma_desc *desc;
+	union acc_dma_desc *desc;
 	int ret;
 
 	for (i = 0; i < num; ++i) {
@@ -3467,7 +2901,7 @@ acc100_enqueue_enc_cb(struct rte_bbdev_queue_data *q_data,
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
-	acc100_dma_enqueue(q, i, &q_data->queue_stats);
+	acc_dma_enqueue(q, i, &q_data->queue_stats);
 
 	/* Update stats */
 	q_data->queue_stats.enqueued_count += i;
@@ -3475,32 +2909,15 @@ acc100_enqueue_enc_cb(struct rte_bbdev_queue_data *q_data,
 	return i;
 }
 
-/* Check we can mux encode operations with common FCW */
-static inline bool
-check_mux(struct rte_bbdev_enc_op **ops, uint16_t num) {
-	uint16_t i;
-	if (num <= 1)
-		return false;
-	for (i = 1; i < num; ++i) {
-		/* Only mux compatible code blocks */
-		if (memcmp((uint8_t *)(&ops[i]->ldpc_enc) + ACC100_ENC_OFFSET,
-				(uint8_t *)(&ops[0]->ldpc_enc) +
-				ACC100_ENC_OFFSET,
-				ACC100_CMP_ENC_SIZE) != 0)
-			return false;
-	}
-	return true;
-}
-
 /** Enqueue encode operations for ACC100 device in CB mode. */
 static inline uint16_t
 acc100_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_enc_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	int32_t avail = q->sw_ring_depth + q->sw_ring_tail - q->sw_ring_head;
 	uint16_t i = 0;
-	union acc100_dma_desc *desc;
+	union acc_dma_desc *desc;
 	int ret, desc_idx = 0;
 	int16_t enq, left = num;
 
@@ -3508,7 +2925,7 @@ acc100_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
 		if (unlikely(avail < 1))
 			break;
 		avail--;
-		enq = RTE_MIN(left, ACC100_MUX_5GDL_DESC);
+		enq = RTE_MIN(left, ACC_MUX_5GDL_DESC);
 		if (check_mux(&ops[i], enq)) {
 			ret = enqueue_ldpc_enc_n_op_cb(q, &ops[i],
 					desc_idx, enq);
@@ -3534,7 +2951,7 @@ acc100_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
-	acc100_dma_enqueue(q, desc_idx, &q_data->queue_stats);
+	acc_dma_enqueue(q, desc_idx, &q_data->queue_stats);
 
 	/* Update stats */
 	q_data->queue_stats.enqueued_count += i;
@@ -3548,7 +2965,7 @@ static uint16_t
 acc100_enqueue_enc_tb(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_enc_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	int32_t avail = q->sw_ring_depth + q->sw_ring_tail - q->sw_ring_head;
 	uint16_t i, enqueued_cbs = 0;
 	uint8_t cbs_in_tb;
@@ -3569,7 +2986,7 @@ acc100_enqueue_enc_tb(struct rte_bbdev_queue_data *q_data,
 	if (unlikely(enqueued_cbs == 0))
 		return 0; /* Nothing to enqueue */
 
-	acc100_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
+	acc_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
 
 	/* Update stats */
 	q_data->queue_stats.enqueued_count += i;
@@ -3610,10 +3027,10 @@ static uint16_t
 acc100_enqueue_dec_cb(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_dec_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	int32_t avail = q->sw_ring_depth + q->sw_ring_tail - q->sw_ring_head;
 	uint16_t i;
-	union acc100_dma_desc *desc;
+	union acc_dma_desc *desc;
 	int ret;
 
 	for (i = 0; i < num; ++i) {
@@ -3636,7 +3053,7 @@ acc100_enqueue_dec_cb(struct rte_bbdev_queue_data *q_data,
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
-	acc100_dma_enqueue(q, i, &q_data->queue_stats);
+	acc_dma_enqueue(q, i, &q_data->queue_stats);
 
 	/* Update stats */
 	q_data->queue_stats.enqueued_count += i;
@@ -3645,25 +3062,12 @@ acc100_enqueue_dec_cb(struct rte_bbdev_queue_data *q_data,
 	return i;
 }
 
-/* Check we can mux encode operations with common FCW */
-static inline bool
-cmp_ldpc_dec_op(struct rte_bbdev_dec_op **ops) {
-	/* Only mux compatible code blocks */
-	if (memcmp((uint8_t *)(&ops[0]->ldpc_dec) + ACC100_DEC_OFFSET,
-			(uint8_t *)(&ops[1]->ldpc_dec) +
-			ACC100_DEC_OFFSET, ACC100_CMP_DEC_SIZE) != 0) {
-		return false;
-	} else
-		return true;
-}
-
-
 /* Enqueue decode operations for ACC100 device in TB mode */
 static uint16_t
 acc100_enqueue_ldpc_dec_tb(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_dec_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	int32_t avail = q->sw_ring_depth + q->sw_ring_tail - q->sw_ring_head;
 	uint16_t i, enqueued_cbs = 0;
 	uint8_t cbs_in_tb;
@@ -3683,7 +3087,7 @@ acc100_enqueue_ldpc_dec_tb(struct rte_bbdev_queue_data *q_data,
 		enqueued_cbs += ret;
 	}
 
-	acc100_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
+	acc_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
 
 	/* Update stats */
 	q_data->queue_stats.enqueued_count += i;
@@ -3696,10 +3100,10 @@ static uint16_t
 acc100_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_dec_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	int32_t avail = q->sw_ring_depth + q->sw_ring_tail - q->sw_ring_head;
 	uint16_t i;
-	union acc100_dma_desc *desc;
+	union acc_dma_desc *desc;
 	int ret;
 	bool same_op = false;
 	for (i = 0; i < num; ++i) {
@@ -3732,7 +3136,7 @@ acc100_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
-	acc100_dma_enqueue(q, i, &q_data->queue_stats);
+	acc_dma_enqueue(q, i, &q_data->queue_stats);
 
 	/* Update stats */
 	q_data->queue_stats.enqueued_count += i;
@@ -3746,7 +3150,7 @@ static uint16_t
 acc100_enqueue_dec_tb(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_dec_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	int32_t avail = q->sw_ring_depth + q->sw_ring_tail - q->sw_ring_head;
 	uint16_t i, enqueued_cbs = 0;
 	uint8_t cbs_in_tb;
@@ -3765,7 +3169,7 @@ acc100_enqueue_dec_tb(struct rte_bbdev_queue_data *q_data,
 		enqueued_cbs += ret;
 	}
 
-	acc100_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
+	acc_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
 
 	/* Update stats */
 	q_data->queue_stats.enqueued_count += i;
@@ -3792,7 +3196,7 @@ static uint16_t
 acc100_enqueue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_dec_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	int32_t aq_avail = q->aq_depth +
 			(q->aq_dequeued - q->aq_enqueued) / 128;
 
@@ -3808,11 +3212,11 @@ acc100_enqueue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
 
 /* Dequeue one encode operations from ACC100 device in CB mode */
 static inline int
-dequeue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
+dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 		uint16_t total_dequeued_cbs, uint32_t *aq_dequeued)
 {
-	union acc100_dma_desc *desc, atom_desc;
-	union acc100_dma_rsp_desc rsp;
+	union acc_dma_desc *desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_enc_op *op;
 	int i;
 
@@ -3822,7 +3226,7 @@ dequeue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
 			__ATOMIC_RELAXED);
 
 	/* Check fdone bit */
-	if (!(atom_desc.rsp.val & ACC100_FDONE))
+	if (!(atom_desc.rsp.val & ACC_FDONE))
 		return -1;
 
 	rsp.val = atom_desc.rsp.val;
@@ -3843,7 +3247,7 @@ dequeue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
 		(*aq_dequeued)++;
 		desc->req.last_desc_in_batch = 0;
 	}
-	desc->rsp.val = ACC100_DMA_DESC_TYPE;
+	desc->rsp.val = ACC_DMA_DESC_TYPE;
 	desc->rsp.add_info_0 = 0; /*Reserved bits */
 	desc->rsp.add_info_1 = 0; /*Reserved bits */
 
@@ -3858,11 +3262,11 @@ dequeue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
 
 /* Dequeue one encode operations from ACC100 device in TB mode */
 static inline int
-dequeue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
+dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 		uint16_t total_dequeued_cbs, uint32_t *aq_dequeued)
 {
-	union acc100_dma_desc *desc, *last_desc, atom_desc;
-	union acc100_dma_rsp_desc rsp;
+	union acc_dma_desc *desc, *last_desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_enc_op *op;
 	uint8_t i = 0;
 	uint16_t current_dequeued_cbs = 0, cbs_in_tb;
@@ -3873,7 +3277,7 @@ dequeue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
 			__ATOMIC_RELAXED);
 
 	/* Check fdone bit */
-	if (!(atom_desc.rsp.val & ACC100_FDONE))
+	if (!(atom_desc.rsp.val & ACC_FDONE))
 		return -1;
 
 	/* Get number of CBs in dequeued TB */
@@ -3887,7 +3291,7 @@ dequeue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
 	 */
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)last_desc,
 			__ATOMIC_RELAXED);
-	if (!(atom_desc.rsp.val & ACC100_SDONE))
+	if (!(atom_desc.rsp.val & ACC_SDONE))
 		return -1;
 
 	/* Dequeue */
@@ -3915,7 +3319,7 @@ dequeue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
 			(*aq_dequeued)++;
 			desc->req.last_desc_in_batch = 0;
 		}
-		desc->rsp.val = ACC100_DMA_DESC_TYPE;
+		desc->rsp.val = ACC_DMA_DESC_TYPE;
 		desc->rsp.add_info_0 = 0;
 		desc->rsp.add_info_1 = 0;
 		total_dequeued_cbs++;
@@ -3931,11 +3335,11 @@ dequeue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op,
 /* Dequeue one decode operation from ACC100 device in CB mode */
 static inline int
 dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
-		struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
+		struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 		uint16_t dequeued_cbs, uint32_t *aq_dequeued)
 {
-	union acc100_dma_desc *desc, atom_desc;
-	union acc100_dma_rsp_desc rsp;
+	union acc_dma_desc *desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_dec_op *op;
 
 	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
@@ -3944,7 +3348,7 @@ dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 			__ATOMIC_RELAXED);
 
 	/* Check fdone bit */
-	if (!(atom_desc.rsp.val & ACC100_FDONE))
+	if (!(atom_desc.rsp.val & ACC_FDONE))
 		return -1;
 
 	rsp.val = atom_desc.rsp.val;
@@ -3973,7 +3377,7 @@ dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 		(*aq_dequeued)++;
 		desc->req.last_desc_in_batch = 0;
 	}
-	desc->rsp.val = ACC100_DMA_DESC_TYPE;
+	desc->rsp.val = ACC_DMA_DESC_TYPE;
 	desc->rsp.add_info_0 = 0;
 	desc->rsp.add_info_1 = 0;
 	*ref_op = op;
@@ -3985,11 +3389,11 @@ dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 /* Dequeue one decode operations from ACC100 device in CB mode */
 static inline int
 dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
-		struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
+		struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 		uint16_t dequeued_cbs, uint32_t *aq_dequeued)
 {
-	union acc100_dma_desc *desc, atom_desc;
-	union acc100_dma_rsp_desc rsp;
+	union acc_dma_desc *desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_dec_op *op;
 
 	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
@@ -3998,7 +3402,7 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 			__ATOMIC_RELAXED);
 
 	/* Check fdone bit */
-	if (!(atom_desc.rsp.val & ACC100_FDONE))
+	if (!(atom_desc.rsp.val & ACC_FDONE))
 		return -1;
 
 	rsp.val = atom_desc.rsp.val;
@@ -4028,7 +3432,7 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 		desc->req.last_desc_in_batch = 0;
 	}
 
-	desc->rsp.val = ACC100_DMA_DESC_TYPE;
+	desc->rsp.val = ACC_DMA_DESC_TYPE;
 	desc->rsp.add_info_0 = 0;
 	desc->rsp.add_info_1 = 0;
 
@@ -4040,11 +3444,11 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 
 /* Dequeue one decode operations from ACC100 device in TB mode. */
 static inline int
-dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
+dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 		uint16_t dequeued_cbs, uint32_t *aq_dequeued)
 {
-	union acc100_dma_desc *desc, *last_desc, atom_desc;
-	union acc100_dma_rsp_desc rsp;
+	union acc_dma_desc *desc, *last_desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_dec_op *op;
 	uint8_t cbs_in_tb = 1, cb_idx = 0;
 
@@ -4054,7 +3458,7 @@ dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
 			__ATOMIC_RELAXED);
 
 	/* Check fdone bit */
-	if (!(atom_desc.rsp.val & ACC100_FDONE))
+	if (!(atom_desc.rsp.val & ACC_FDONE))
 		return -1;
 
 	/* Dequeue */
@@ -4071,7 +3475,7 @@ dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
 	 */
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)last_desc,
 			__ATOMIC_RELAXED);
-	if (!(atom_desc.rsp.val & ACC100_SDONE))
+	if (!(atom_desc.rsp.val & ACC_SDONE))
 		return -1;
 
 	/* Clearing status, it will be set based on response */
@@ -4103,7 +3507,7 @@ dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
 			(*aq_dequeued)++;
 			desc->req.last_desc_in_batch = 0;
 		}
-		desc->rsp.val = ACC100_DMA_DESC_TYPE;
+		desc->rsp.val = ACC_DMA_DESC_TYPE;
 		desc->rsp.add_info_0 = 0;
 		desc->rsp.add_info_1 = 0;
 		dequeued_cbs++;
@@ -4120,7 +3524,7 @@ static uint16_t
 acc100_dequeue_enc(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_enc_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	uint16_t dequeue_num;
 	uint32_t avail = q->sw_ring_head - q->sw_ring_tail;
 	uint32_t aq_dequeued = 0;
@@ -4166,7 +3570,7 @@ static uint16_t
 acc100_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_enc_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	uint32_t avail = q->sw_ring_head - q->sw_ring_tail;
 	uint32_t aq_dequeued = 0;
 	uint16_t dequeue_num, i, dequeued_cbs = 0, dequeued_descs = 0;
@@ -4205,7 +3609,7 @@ static uint16_t
 acc100_dequeue_dec(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_dec_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	uint16_t dequeue_num;
 	uint32_t avail = q->sw_ring_head - q->sw_ring_tail;
 	uint32_t aq_dequeued = 0;
@@ -4250,7 +3654,7 @@ static uint16_t
 acc100_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
 		struct rte_bbdev_dec_op **ops, uint16_t num)
 {
-	struct acc100_queue *q = q_data->queue_private;
+	struct acc_queue *q = q_data->queue_private;
 	uint16_t dequeue_num;
 	uint32_t avail = q->sw_ring_head - q->sw_ring_tail;
 	uint32_t aq_dequeued = 0;
@@ -4310,17 +3714,17 @@ acc100_bbdev_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
 	/* Device variant specific handling */
 	if ((pci_dev->id.device_id == ACC100_PF_DEVICE_ID) ||
 			(pci_dev->id.device_id == ACC100_VF_DEVICE_ID)) {
-		((struct acc100_device *) dev->data->dev_private)->device_variant = ACC100_VARIANT;
-		((struct acc100_device *) dev->data->dev_private)->fcw_ld_fill = acc100_fcw_ld_fill;
+		((struct acc_device *) dev->data->dev_private)->device_variant = ACC100_VARIANT;
+		((struct acc_device *) dev->data->dev_private)->fcw_ld_fill = acc100_fcw_ld_fill;
 	} else {
-		((struct acc100_device *) dev->data->dev_private)->device_variant = ACC101_VARIANT;
-		((struct acc100_device *) dev->data->dev_private)->fcw_ld_fill = acc101_fcw_ld_fill;
+		((struct acc_device *) dev->data->dev_private)->device_variant = ACC101_VARIANT;
+		((struct acc_device *) dev->data->dev_private)->fcw_ld_fill = acc101_fcw_ld_fill;
 	}
 
-	((struct acc100_device *) dev->data->dev_private)->pf_device =
+	((struct acc_device *) dev->data->dev_private)->pf_device =
 			!strcmp(drv->driver.name, RTE_STR(ACC100PF_DRIVER_NAME));
 
-	((struct acc100_device *) dev->data->dev_private)->mmio_base =
+	((struct acc_device *) dev->data->dev_private)->mmio_base =
 			pci_dev->mem_resource[0].addr;
 
 	rte_bbdev_log_debug("Init device %s [%s] @ vaddr %p paddr %#"PRIx64"",
@@ -4349,13 +3753,13 @@ static int acc100_pci_probe(struct rte_pci_driver *pci_drv,
 
 	/* allocate device private memory */
 	bbdev->data->dev_private = rte_zmalloc_socket(dev_name,
-			sizeof(struct acc100_device), RTE_CACHE_LINE_SIZE,
+			sizeof(struct acc_device), RTE_CACHE_LINE_SIZE,
 			pci_dev->device.numa_node);
 
 	if (bbdev->data->dev_private == NULL) {
 		rte_bbdev_log(CRIT,
 				"Allocate of %zu bytes for device \"%s\" failed",
-				sizeof(struct acc100_device), dev_name);
+				sizeof(struct acc_device), dev_name);
 				rte_bbdev_release(bbdev);
 			return -ENOMEM;
 	}
@@ -4373,53 +3777,16 @@ static int acc100_pci_probe(struct rte_pci_driver *pci_drv,
 	return 0;
 }
 
-static int acc100_pci_remove(struct rte_pci_device *pci_dev)
-{
-	struct rte_bbdev *bbdev;
-	int ret;
-	uint8_t dev_id;
-
-	if (pci_dev == NULL)
-		return -EINVAL;
-
-	/* Find device */
-	bbdev = rte_bbdev_get_named_dev(pci_dev->device.name);
-	if (bbdev == NULL) {
-		rte_bbdev_log(CRIT,
-				"Couldn't find HW dev \"%s\" to uninitialise it",
-				pci_dev->device.name);
-		return -ENODEV;
-	}
-	dev_id = bbdev->data->dev_id;
-
-	/* free device private memory before close */
-	rte_free(bbdev->data->dev_private);
-
-	/* Close device */
-	ret = rte_bbdev_close(dev_id);
-	if (ret < 0)
-		rte_bbdev_log(ERR,
-				"Device %i failed to close during uninit: %i",
-				dev_id, ret);
-
-	/* release bbdev from library */
-	rte_bbdev_release(bbdev);
-
-	rte_bbdev_log_debug("Destroyed bbdev = %u", dev_id);
-
-	return 0;
-}
-
 static struct rte_pci_driver acc100_pci_pf_driver = {
 		.probe = acc100_pci_probe,
-		.remove = acc100_pci_remove,
+		.remove = acc_pci_remove,
 		.id_table = pci_id_acc100_pf_map,
 		.drv_flags = RTE_PCI_DRV_NEED_MAPPING
 };
 
 static struct rte_pci_driver acc100_pci_vf_driver = {
 		.probe = acc100_pci_probe,
-		.remove = acc100_pci_remove,
+		.remove = acc_pci_remove,
 		.id_table = pci_id_acc100_vf_map,
 		.drv_flags = RTE_PCI_DRV_NEED_MAPPING
 };
@@ -4437,51 +3804,51 @@ RTE_PMD_REGISTER_PCI_TABLE(ACC100VF_DRIVER_NAME, pci_id_acc100_vf_map);
  * defined.
  */
 static void
-poweron_cleanup(struct rte_bbdev *bbdev, struct acc100_device *d,
-		struct rte_acc100_conf *conf)
+poweron_cleanup(struct rte_bbdev *bbdev, struct acc_device *d,
+		struct rte_acc_conf *conf)
 {
 	int i, template_idx, qg_idx;
 	uint32_t address, status, value;
 	printf("Need to clear power-on 5GUL status in internal memory\n");
 	/* Reset LDPC Cores */
 	for (i = 0; i < ACC100_ENGINES_MAX; i++)
-		acc100_reg_write(d, HWPfFecUl5gCntrlReg +
-				ACC100_ENGINE_OFFSET * i, ACC100_RESET_HI);
-	usleep(ACC100_LONG_WAIT);
+		acc_reg_write(d, HWPfFecUl5gCntrlReg +
+				ACC_ENGINE_OFFSET * i, ACC100_RESET_HI);
+	usleep(ACC_LONG_WAIT);
 	for (i = 0; i < ACC100_ENGINES_MAX; i++)
-		acc100_reg_write(d, HWPfFecUl5gCntrlReg +
-				ACC100_ENGINE_OFFSET * i, ACC100_RESET_LO);
-	usleep(ACC100_LONG_WAIT);
+		acc_reg_write(d, HWPfFecUl5gCntrlReg +
+				ACC_ENGINE_OFFSET * i, ACC100_RESET_LO);
+	usleep(ACC_LONG_WAIT);
 	/* Prepare dummy workload */
 	alloc_2x64mb_sw_rings_mem(bbdev, d, 0);
 	/* Set base addresses */
 	uint32_t phys_high = (uint32_t)(d->sw_rings_iova >> 32);
 	uint32_t phys_low  = (uint32_t)(d->sw_rings_iova &
-			~(ACC100_SIZE_64MBYTE-1));
-	acc100_reg_write(d, HWPfDmaFec5GulDescBaseHiRegVf, phys_high);
-	acc100_reg_write(d, HWPfDmaFec5GulDescBaseLoRegVf, phys_low);
+			~(ACC_SIZE_64MBYTE-1));
+	acc_reg_write(d, HWPfDmaFec5GulDescBaseHiRegVf, phys_high);
+	acc_reg_write(d, HWPfDmaFec5GulDescBaseLoRegVf, phys_low);
 
 	/* Descriptor for a dummy 5GUL code block processing*/
-	union acc100_dma_desc *desc = NULL;
+	union acc_dma_desc *desc = NULL;
 	desc = d->sw_rings;
 	desc->req.data_ptrs[0].address = d->sw_rings_iova +
-			ACC100_DESC_FCW_OFFSET;
-	desc->req.data_ptrs[0].blen = ACC100_FCW_LD_BLEN;
-	desc->req.data_ptrs[0].blkid = ACC100_DMA_BLKID_FCW;
+			ACC_DESC_FCW_OFFSET;
+	desc->req.data_ptrs[0].blen = ACC_FCW_LD_BLEN;
+	desc->req.data_ptrs[0].blkid = ACC_DMA_BLKID_FCW;
 	desc->req.data_ptrs[0].last = 0;
 	desc->req.data_ptrs[0].dma_ext = 0;
 	desc->req.data_ptrs[1].address = d->sw_rings_iova + 512;
-	desc->req.data_ptrs[1].blkid = ACC100_DMA_BLKID_IN;
+	desc->req.data_ptrs[1].blkid = ACC_DMA_BLKID_IN;
 	desc->req.data_ptrs[1].last = 1;
 	desc->req.data_ptrs[1].dma_ext = 0;
 	desc->req.data_ptrs[1].blen = 44;
 	desc->req.data_ptrs[2].address = d->sw_rings_iova + 1024;
-	desc->req.data_ptrs[2].blkid = ACC100_DMA_BLKID_OUT_ENC;
+	desc->req.data_ptrs[2].blkid = ACC_DMA_BLKID_OUT_ENC;
 	desc->req.data_ptrs[2].last = 1;
 	desc->req.data_ptrs[2].dma_ext = 0;
 	desc->req.data_ptrs[2].blen = 5;
 	/* Dummy FCW */
-	desc->req.fcw_ld.FCWversion = ACC100_FCW_VER;
+	desc->req.fcw_ld.FCWversion = ACC_FCW_VER;
 	desc->req.fcw_ld.qm = 1;
 	desc->req.fcw_ld.nfiller = 30;
 	desc->req.fcw_ld.BG = 2 - 1;
@@ -4500,8 +3867,8 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc100_device *d,
 			template_idx++) {
 		/* Check engine power-on status */
 		address = HwPfFecUl5gIbDebugReg +
-				ACC100_ENGINE_OFFSET * template_idx;
-		status = (acc100_reg_read(d, address) >> 4) & 0xF;
+				ACC_ENGINE_OFFSET * template_idx;
+		status = (acc_reg_read(d, address) >> 4) & 0xF;
 		if (status == 0) {
 			engines_to_restart[num_failed_engine] = template_idx;
 			num_failed_engine++;
@@ -4521,14 +3888,14 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc100_device *d,
 				template_idx <= ACC100_SIG_UL_5G_LAST;
 				template_idx++) {
 			address = HWPfQmgrGrpTmplateReg4Indx
-					+ ACC100_BYTES_IN_WORD * template_idx;
+					+ ACC_BYTES_IN_WORD * template_idx;
 			if (template_idx == failed_engine)
-				acc100_reg_write(d, address, value);
+				acc_reg_write(d, address, value);
 			else
-				acc100_reg_write(d, address, 0);
+				acc_reg_write(d, address, 0);
 		}
 		/* Reset descriptor header */
-		desc->req.word0 = ACC100_DMA_DESC_TYPE;
+		desc->req.word0 = ACC_DMA_DESC_TYPE;
 		desc->req.word1 = 0;
 		desc->req.word2 = 0;
 		desc->req.word3 = 0;
@@ -4536,56 +3903,56 @@ poweron_cleanup(struct rte_bbdev *bbdev, struct acc100_device *d,
 		desc->req.m2dlen = 2;
 		desc->req.d2mlen = 1;
 		/* Enqueue the code block for processing */
-		union acc100_enqueue_reg_fmt enq_req;
+		union acc_enqueue_reg_fmt enq_req;
 		enq_req.val = 0;
-		enq_req.addr_offset = ACC100_DESC_OFFSET;
+		enq_req.addr_offset = ACC_DESC_OFFSET;
 		enq_req.num_elem = 1;
 		enq_req.req_elem_addr = 0;
 		rte_wmb();
-		acc100_reg_write(d, HWPfQmgrIngressAq + 0x100, enq_req.val);
-		usleep(ACC100_LONG_WAIT * 100);
+		acc_reg_write(d, HWPfQmgrIngressAq + 0x100, enq_req.val);
+		usleep(ACC_LONG_WAIT * 100);
 		if (desc->req.word0 != 2)
 			printf("DMA Response %#"PRIx32"\n", desc->req.word0);
 	}
 
 	/* Reset LDPC Cores */
 	for (i = 0; i < ACC100_ENGINES_MAX; i++)
-		acc100_reg_write(d, HWPfFecUl5gCntrlReg +
-				ACC100_ENGINE_OFFSET * i,
+		acc_reg_write(d, HWPfFecUl5gCntrlReg +
+				ACC_ENGINE_OFFSET * i,
 				ACC100_RESET_HI);
-	usleep(ACC100_LONG_WAIT);
+	usleep(ACC_LONG_WAIT);
 	for (i = 0; i < ACC100_ENGINES_MAX; i++)
-		acc100_reg_write(d, HWPfFecUl5gCntrlReg +
-				ACC100_ENGINE_OFFSET * i,
+		acc_reg_write(d, HWPfFecUl5gCntrlReg +
+				ACC_ENGINE_OFFSET * i,
 				ACC100_RESET_LO);
-	usleep(ACC100_LONG_WAIT);
-	acc100_reg_write(d, HWPfHi5GHardResetReg, ACC100_RESET_HARD);
-	usleep(ACC100_LONG_WAIT);
+	usleep(ACC_LONG_WAIT);
+	acc_reg_write(d, HWPfHi5GHardResetReg, ACC100_RESET_HARD);
+	usleep(ACC_LONG_WAIT);
 	int numEngines = 0;
 	/* Check engine power-on status again */
 	for (template_idx = ACC100_SIG_UL_5G;
 			template_idx <= ACC100_SIG_UL_5G_LAST;
 			template_idx++) {
 		address = HwPfFecUl5gIbDebugReg +
-				ACC100_ENGINE_OFFSET * template_idx;
-		status = (acc100_reg_read(d, address) >> 4) & 0xF;
+				ACC_ENGINE_OFFSET * template_idx;
+		status = (acc_reg_read(d, address) >> 4) & 0xF;
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC100_BYTES_IN_WORD * template_idx;
+				+ ACC_BYTES_IN_WORD * template_idx;
 		if (status == 1) {
-			acc100_reg_write(d, address, value);
+			acc_reg_write(d, address, value);
 			numEngines++;
 		} else
-			acc100_reg_write(d, address, 0);
+			acc_reg_write(d, address, 0);
 	}
 	printf("Number of 5GUL engines %d\n", numEngines);
 
 	rte_free(d->sw_rings_base);
-	usleep(ACC100_LONG_WAIT);
+	usleep(ACC_LONG_WAIT);
 }
 
 /* Initial configuration of a ACC100 device prior to running configure() */
 static int
-acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
+acc100_configure(const char *dev_name, struct rte_acc_conf *conf)
 {
 	rte_bbdev_log(INFO, "rte_acc100_configure");
 	uint32_t value, address, status;
@@ -4593,10 +3960,10 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name);
 
 	/* Compile time checks */
-	RTE_BUILD_BUG_ON(sizeof(struct acc100_dma_req_desc) != 256);
-	RTE_BUILD_BUG_ON(sizeof(union acc100_dma_desc) != 256);
-	RTE_BUILD_BUG_ON(sizeof(struct acc100_fcw_td) != 24);
-	RTE_BUILD_BUG_ON(sizeof(struct acc100_fcw_te) != 32);
+	RTE_BUILD_BUG_ON(sizeof(struct acc_dma_req_desc) != 256);
+	RTE_BUILD_BUG_ON(sizeof(union acc_dma_desc) != 256);
+	RTE_BUILD_BUG_ON(sizeof(struct acc_fcw_td) != 24);
+	RTE_BUILD_BUG_ON(sizeof(struct acc_fcw_te) != 32);
 
 	if (bbdev == NULL) {
 		rte_bbdev_log(ERR,
@@ -4604,87 +3971,87 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		dev_name);
 		return -ENODEV;
 	}
-	struct acc100_device *d = bbdev->data->dev_private;
+	struct acc_device *d = bbdev->data->dev_private;
 
 	/* Store configuration */
-	rte_memcpy(&d->acc100_conf, conf, sizeof(d->acc100_conf));
+	rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf));
 
-	value = acc100_reg_read(d, HwPfPcieGpexBridgeControl);
+	value = acc_reg_read(d, HwPfPcieGpexBridgeControl);
 	bool firstCfg = (value != ACC100_CFG_PCI_BRIDGE);
 
 	/* PCIe Bridge configuration */
-	acc100_reg_write(d, HwPfPcieGpexBridgeControl, ACC100_CFG_PCI_BRIDGE);
+	acc_reg_write(d, HwPfPcieGpexBridgeControl, ACC100_CFG_PCI_BRIDGE);
 	for (i = 1; i < ACC100_GPEX_AXIMAP_NUM; i++)
-		acc100_reg_write(d,
+		acc_reg_write(d,
 				HwPfPcieGpexAxiAddrMappingWindowPexBaseHigh
 				+ i * 16, 0);
 
 	/* Prevent blocking AXI read on BRESP for AXI Write */
 	address = HwPfPcieGpexAxiPioControl;
 	value = ACC100_CFG_PCI_AXI;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* 5GDL PLL phase shift */
-	acc100_reg_write(d, HWPfChaDl5gPllPhshft0, 0x1);
+	acc_reg_write(d, HWPfChaDl5gPllPhshft0, 0x1);
 
 	/* Explicitly releasing AXI as this may be stopped after PF FLR/BME */
 	address = HWPfDmaAxiControl;
 	value = 1;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Enable granular dynamic clock gating */
 	address = HWPfHiClkGateHystReg;
 	value = ACC100_CLOCK_GATING_EN;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Set default descriptor signature */
 	address = HWPfDmaDescriptorSignatuture;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Enable the Error Detection in DMA */
 	value = ACC100_CFG_DMA_ERROR;
 	address = HWPfDmaErrorDetectionEn;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* AXI Cache configuration */
 	value = ACC100_CFG_AXI_CACHE;
 	address = HWPfDmaAxcacheReg;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Adjust PCIe Lane adaptation */
 	for (i = 0; i < ACC100_QUAD_NUMS; i++)
 		for (j = 0; j < ACC100_LANES_PER_QUAD; j++)
-			acc100_reg_write(d, HwPfPcieLnAdaptctrl + i * ACC100_PCIE_QUAD_OFFSET
+			acc_reg_write(d, HwPfPcieLnAdaptctrl + i * ACC100_PCIE_QUAD_OFFSET
 					+ j * ACC100_PCIE_LANE_OFFSET, ACC100_ADAPT);
 
 	/* Enable PCIe live adaptation */
 	for (i = 0; i < ACC100_QUAD_NUMS; i++)
-		acc100_reg_write(d, HwPfPciePcsEqControl +
+		acc_reg_write(d, HwPfPciePcsEqControl +
 				i * ACC100_PCIE_QUAD_OFFSET, ACC100_PCS_EQ);
 
 	/* Default DMA Configuration (Qmgr Enabled) */
 	address = HWPfDmaConfig0Reg;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 	address = HWPfDmaQmanen;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Default RLIM/ALEN configuration */
 	address = HWPfDmaConfig1Reg;
 	value = (1 << 31) + (23 << 8) + (1 << 6) + 7;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Configure DMA Qmanager addresses */
 	address = HWPfDmaQmgrAddrReg;
 	value = HWPfQmgrEgressQueuesTemplate;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Default Fabric Mode */
 	address = HWPfFabricMode;
 	value = ACC100_FABRIC_MODE;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* ===== Qmgr Configuration ===== */
 	/* Configuration of the AQueue Depth QMGR_GRP_0_DEPTH_LOG2 for UL */
@@ -4694,42 +4061,42 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			conf->q_dl_5g.num_qgroups;
 	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
 		address = HWPfQmgrDepthLog2Grp +
-		ACC100_BYTES_IN_WORD * qg_idx;
+		ACC_BYTES_IN_WORD * qg_idx;
 		value = aqDepth(qg_idx, conf);
-		acc100_reg_write(d, address, value);
+		acc_reg_write(d, address, value);
 		address = HWPfQmgrTholdGrp +
-		ACC100_BYTES_IN_WORD * qg_idx;
+		ACC_BYTES_IN_WORD * qg_idx;
 		value = (1 << 16) + (1 << (aqDepth(qg_idx, conf) - 1));
-		acc100_reg_write(d, address, value);
+		acc_reg_write(d, address, value);
 	}
 
 	/* Template Priority in incremental order */
-	for (template_idx = 0; template_idx < ACC100_NUM_TMPL; template_idx++) {
-		address = HWPfQmgrGrpTmplateReg0Indx + ACC100_BYTES_IN_WORD * template_idx;
-		value = ACC100_TMPL_PRI_0;
-		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg1Indx + ACC100_BYTES_IN_WORD * template_idx;
-		value = ACC100_TMPL_PRI_1;
-		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg2indx + ACC100_BYTES_IN_WORD * template_idx;
-		value = ACC100_TMPL_PRI_2;
-		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg3Indx + ACC100_BYTES_IN_WORD * template_idx;
-		value = ACC100_TMPL_PRI_3;
-		acc100_reg_write(d, address, value);
+	for (template_idx = 0; template_idx < ACC_NUM_TMPL; template_idx++) {
+		address = HWPfQmgrGrpTmplateReg0Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_0;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg1Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_1;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg2indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_2;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg3Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_3;
+		acc_reg_write(d, address, value);
 	}
 
 	address = HWPfQmgrGrpPriority;
 	value = ACC100_CFG_QMGR_HI_P;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Template Configuration */
-	for (template_idx = 0; template_idx < ACC100_NUM_TMPL;
+	for (template_idx = 0; template_idx < ACC_NUM_TMPL;
 			template_idx++) {
 		value = 0;
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC100_BYTES_IN_WORD * template_idx;
-		acc100_reg_write(d, address, value);
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
 	}
 	/* 4GUL */
 	int numQgs = conf->q_ul_4g.num_qgroups;
@@ -4741,8 +4108,8 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			template_idx <= ACC100_SIG_UL_4G_LAST;
 			template_idx++) {
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC100_BYTES_IN_WORD * template_idx;
-		acc100_reg_write(d, address, value);
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
 	}
 	/* 5GUL */
 	numQqsAcc += numQgs;
@@ -4756,15 +4123,15 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			template_idx++) {
 		/* Check engine power-on status */
 		address = HwPfFecUl5gIbDebugReg +
-				ACC100_ENGINE_OFFSET * template_idx;
-		status = (acc100_reg_read(d, address) >> 4) & 0xF;
+				ACC_ENGINE_OFFSET * template_idx;
+		status = (acc_reg_read(d, address) >> 4) & 0xF;
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC100_BYTES_IN_WORD * template_idx;
+				+ ACC_BYTES_IN_WORD * template_idx;
 		if (status == 1) {
-			acc100_reg_write(d, address, value);
+			acc_reg_write(d, address, value);
 			numEngines++;
 		} else
-			acc100_reg_write(d, address, 0);
+			acc_reg_write(d, address, 0);
 	}
 	printf("Number of 5GUL engines %d\n", numEngines);
 	/* 4GDL */
@@ -4777,8 +4144,8 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			template_idx <= ACC100_SIG_DL_4G_LAST;
 			template_idx++) {
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC100_BYTES_IN_WORD * template_idx;
-		acc100_reg_write(d, address, value);
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
 	}
 	/* 5GDL */
 	numQqsAcc += numQgs;
@@ -4790,8 +4157,8 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			template_idx <= ACC100_SIG_DL_5G_LAST;
 			template_idx++) {
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC100_BYTES_IN_WORD * template_idx;
-		acc100_reg_write(d, address, value);
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
 	}
 
 	/* Queue Group Function mapping */
@@ -4802,14 +4169,14 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		acc = accFromQgid(qg_idx, conf);
 		value |= qman_func_id[acc]<<(qg_idx * 4);
 	}
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Configuration of the Arbitration QGroup depth to 1 */
 	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
 		address = HWPfQmgrArbQDepthGrp +
-		ACC100_BYTES_IN_WORD * qg_idx;
+		ACC_BYTES_IN_WORD * qg_idx;
 		value = 0;
-		acc100_reg_write(d, address, value);
+		acc_reg_write(d, address, value);
 	}
 
 	/* Enabling AQueues through the Queue hierarchy*/
@@ -4820,9 +4187,9 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 					qg_idx < totalQgs)
 				value = (1 << aqNum(qg_idx, conf)) - 1;
 			address = HWPfQmgrAqEnableVf
-					+ vf_idx * ACC100_BYTES_IN_WORD;
+					+ vf_idx * ACC_BYTES_IN_WORD;
 			value += (qg_idx << 16);
-			acc100_reg_write(d, address, value);
+			acc_reg_write(d, address, value);
 		}
 	}
 
@@ -4831,10 +4198,10 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
 		for (vf_idx = 0; vf_idx < conf->num_vf_bundles; vf_idx++) {
 			address = HWPfQmgrVfBaseAddr + vf_idx
-					* ACC100_BYTES_IN_WORD + qg_idx
-					* ACC100_BYTES_IN_WORD * 64;
+					* ACC_BYTES_IN_WORD + qg_idx
+					* ACC_BYTES_IN_WORD * 64;
 			value = aram_address;
-			acc100_reg_write(d, address, value);
+			acc_reg_write(d, address, value);
 			/* Offset ARAM Address for next memory bank
 			 * - increment of 4B
 			 */
@@ -4852,29 +4219,29 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	/* ==== HI Configuration ==== */
 
 	/* No Info Ring/MSI by default */
-	acc100_reg_write(d, HWPfHiInfoRingIntWrEnRegPf, 0);
-	acc100_reg_write(d, HWPfHiInfoRingVf2pfLoWrEnReg, 0);
-	acc100_reg_write(d, HWPfHiCfgMsiIntWrEnRegPf, 0xFFFFFFFF);
-	acc100_reg_write(d, HWPfHiCfgMsiVf2pfLoWrEnReg, 0xFFFFFFFF);
+	acc_reg_write(d, HWPfHiInfoRingIntWrEnRegPf, 0);
+	acc_reg_write(d, HWPfHiInfoRingVf2pfLoWrEnReg, 0);
+	acc_reg_write(d, HWPfHiCfgMsiIntWrEnRegPf, 0xFFFFFFFF);
+	acc_reg_write(d, HWPfHiCfgMsiVf2pfLoWrEnReg, 0xFFFFFFFF);
 	/* Prevent Block on Transmit Error */
 	address = HWPfHiBlockTransmitOnErrorEn;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 	/* Prevents to drop MSI */
 	address = HWPfHiMsiDropEnableReg;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 	/* Set the PF Mode register */
 	address = HWPfHiPfMode;
-	value = (conf->pf_mode_en) ? ACC100_PF_VAL : 0;
-	acc100_reg_write(d, address, value);
+	value = (conf->pf_mode_en) ? ACC_PF_VAL : 0;
+	acc_reg_write(d, address, value);
 
 	/* QoS overflow init */
 	value = 1;
 	address = HWPfQosmonAEvalOverflow0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 	address = HWPfQosmonBEvalOverflow0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* HARQ DDR Configuration */
 	unsigned int ddrSizeInMb = ACC100_HARQ_DDR;
@@ -4883,9 +4250,9 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 				* 0x10;
 		value = ((vf_idx * (ddrSizeInMb / 64)) << 16) +
 				(ddrSizeInMb - 1);
-		acc100_reg_write(d, address, value);
+		acc_reg_write(d, address, value);
 	}
-	usleep(ACC100_LONG_WAIT);
+	usleep(ACC_LONG_WAIT);
 
 	/* Workaround in case some 5GUL engines are in an unexpected state */
 	if (numEngines < (ACC100_SIG_UL_5G_LAST + 1))
@@ -4893,7 +4260,7 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 
 	uint32_t version = 0;
 	for (i = 0; i < 4; i++)
-		version += acc100_reg_read(d,
+		version += acc_reg_read(d,
 				HWPfDdrPhyIdtmFwVersion + 4 * i) << (8 * i);
 	if (version != ACC100_PRQ_DDR_VER) {
 		printf("* Note: Not on DDR PRQ version %8x != %08x\n",
@@ -4901,76 +4268,76 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	} else if (firstCfg) {
 		/* ---- DDR configuration at boot up --- */
 		/* Read Clear Ddr training status */
-		acc100_reg_read(d, HWPfChaDdrStDoneStatus);
+		acc_reg_read(d, HWPfChaDdrStDoneStatus);
 		/* Reset PHY/IDTM/UMMC */
-		acc100_reg_write(d, HWPfChaDdrWbRstCfg, 3);
-		acc100_reg_write(d, HWPfChaDdrApbRstCfg, 2);
-		acc100_reg_write(d, HWPfChaDdrPhyRstCfg, 2);
-		acc100_reg_write(d, HWPfChaDdrCpuRstCfg, 3);
-		acc100_reg_write(d, HWPfChaDdrSifRstCfg, 2);
-		usleep(ACC100_MS_IN_US);
+		acc_reg_write(d, HWPfChaDdrWbRstCfg, 3);
+		acc_reg_write(d, HWPfChaDdrApbRstCfg, 2);
+		acc_reg_write(d, HWPfChaDdrPhyRstCfg, 2);
+		acc_reg_write(d, HWPfChaDdrCpuRstCfg, 3);
+		acc_reg_write(d, HWPfChaDdrSifRstCfg, 2);
+		usleep(ACC_MS_IN_US);
 		/* Reset WB and APB resets */
-		acc100_reg_write(d, HWPfChaDdrWbRstCfg, 2);
-		acc100_reg_write(d, HWPfChaDdrApbRstCfg, 3);
+		acc_reg_write(d, HWPfChaDdrWbRstCfg, 2);
+		acc_reg_write(d, HWPfChaDdrApbRstCfg, 3);
 		/* Configure PHY-IDTM */
-		acc100_reg_write(d, HWPfDdrPhyIdletimeout, 0x3e8);
+		acc_reg_write(d, HWPfDdrPhyIdletimeout, 0x3e8);
 		/* IDTM timing registers */
-		acc100_reg_write(d, HWPfDdrPhyRdLatency, 0x13);
-		acc100_reg_write(d, HWPfDdrPhyRdLatencyDbi, 0x15);
-		acc100_reg_write(d, HWPfDdrPhyWrLatency, 0x10011);
+		acc_reg_write(d, HWPfDdrPhyRdLatency, 0x13);
+		acc_reg_write(d, HWPfDdrPhyRdLatencyDbi, 0x15);
+		acc_reg_write(d, HWPfDdrPhyWrLatency, 0x10011);
 		/* Configure SDRAM MRS registers */
-		acc100_reg_write(d, HWPfDdrPhyMr01Dimm, 0x3030b70);
-		acc100_reg_write(d, HWPfDdrPhyMr01DimmDbi, 0x3030b50);
-		acc100_reg_write(d, HWPfDdrPhyMr23Dimm, 0x30);
-		acc100_reg_write(d, HWPfDdrPhyMr67Dimm, 0xc00);
-		acc100_reg_write(d, HWPfDdrPhyMr45Dimm, 0x4000000);
+		acc_reg_write(d, HWPfDdrPhyMr01Dimm, 0x3030b70);
+		acc_reg_write(d, HWPfDdrPhyMr01DimmDbi, 0x3030b50);
+		acc_reg_write(d, HWPfDdrPhyMr23Dimm, 0x30);
+		acc_reg_write(d, HWPfDdrPhyMr67Dimm, 0xc00);
+		acc_reg_write(d, HWPfDdrPhyMr45Dimm, 0x4000000);
 		/* Configure active lanes */
-		acc100_reg_write(d, HWPfDdrPhyDqsCountMax, 0x9);
-		acc100_reg_write(d, HWPfDdrPhyDqsCountNum, 0x9);
+		acc_reg_write(d, HWPfDdrPhyDqsCountMax, 0x9);
+		acc_reg_write(d, HWPfDdrPhyDqsCountNum, 0x9);
 		/* Configure WR/RD leveling timing registers */
-		acc100_reg_write(d, HWPfDdrPhyWrlvlWwRdlvlRr, 0x101212);
+		acc_reg_write(d, HWPfDdrPhyWrlvlWwRdlvlRr, 0x101212);
 		/* Configure what trainings to execute */
-		acc100_reg_write(d, HWPfDdrPhyTrngType, 0x2d3c);
+		acc_reg_write(d, HWPfDdrPhyTrngType, 0x2d3c);
 		/* Releasing PHY reset */
-		acc100_reg_write(d, HWPfChaDdrPhyRstCfg, 3);
+		acc_reg_write(d, HWPfChaDdrPhyRstCfg, 3);
 		/* Configure Memory Controller registers */
-		acc100_reg_write(d, HWPfDdrMemInitPhyTrng0, 0x3);
-		acc100_reg_write(d, HWPfDdrBcDram, 0x3c232003);
-		acc100_reg_write(d, HWPfDdrBcAddrMap, 0x31);
+		acc_reg_write(d, HWPfDdrMemInitPhyTrng0, 0x3);
+		acc_reg_write(d, HWPfDdrBcDram, 0x3c232003);
+		acc_reg_write(d, HWPfDdrBcAddrMap, 0x31);
 		/* Configure UMMC BC timing registers */
-		acc100_reg_write(d, HWPfDdrBcRef, 0xa22);
-		acc100_reg_write(d, HWPfDdrBcTim0, 0x4050501);
-		acc100_reg_write(d, HWPfDdrBcTim1, 0xf0b0476);
-		acc100_reg_write(d, HWPfDdrBcTim2, 0x103);
-		acc100_reg_write(d, HWPfDdrBcTim3, 0x144050a1);
-		acc100_reg_write(d, HWPfDdrBcTim4, 0x23300);
-		acc100_reg_write(d, HWPfDdrBcTim5, 0x4230276);
-		acc100_reg_write(d, HWPfDdrBcTim6, 0x857914);
-		acc100_reg_write(d, HWPfDdrBcTim7, 0x79100232);
-		acc100_reg_write(d, HWPfDdrBcTim8, 0x100007ce);
-		acc100_reg_write(d, HWPfDdrBcTim9, 0x50020);
-		acc100_reg_write(d, HWPfDdrBcTim10, 0x40ee);
+		acc_reg_write(d, HWPfDdrBcRef, 0xa22);
+		acc_reg_write(d, HWPfDdrBcTim0, 0x4050501);
+		acc_reg_write(d, HWPfDdrBcTim1, 0xf0b0476);
+		acc_reg_write(d, HWPfDdrBcTim2, 0x103);
+		acc_reg_write(d, HWPfDdrBcTim3, 0x144050a1);
+		acc_reg_write(d, HWPfDdrBcTim4, 0x23300);
+		acc_reg_write(d, HWPfDdrBcTim5, 0x4230276);
+		acc_reg_write(d, HWPfDdrBcTim6, 0x857914);
+		acc_reg_write(d, HWPfDdrBcTim7, 0x79100232);
+		acc_reg_write(d, HWPfDdrBcTim8, 0x100007ce);
+		acc_reg_write(d, HWPfDdrBcTim9, 0x50020);
+		acc_reg_write(d, HWPfDdrBcTim10, 0x40ee);
 		/* Configure UMMC DFI timing registers */
-		acc100_reg_write(d, HWPfDdrDfiInit, 0x5000);
-		acc100_reg_write(d, HWPfDdrDfiTim0, 0x15030006);
-		acc100_reg_write(d, HWPfDdrDfiTim1, 0x11305);
-		acc100_reg_write(d, HWPfDdrDfiPhyUpdEn, 0x1);
-		acc100_reg_write(d, HWPfDdrUmmcIntEn, 0x1f);
+		acc_reg_write(d, HWPfDdrDfiInit, 0x5000);
+		acc_reg_write(d, HWPfDdrDfiTim0, 0x15030006);
+		acc_reg_write(d, HWPfDdrDfiTim1, 0x11305);
+		acc_reg_write(d, HWPfDdrDfiPhyUpdEn, 0x1);
+		acc_reg_write(d, HWPfDdrUmmcIntEn, 0x1f);
 		/* Release IDTM CPU out of reset */
-		acc100_reg_write(d, HWPfChaDdrCpuRstCfg, 0x2);
+		acc_reg_write(d, HWPfChaDdrCpuRstCfg, 0x2);
 		/* Wait PHY-IDTM to finish static training */
 		for (i = 0; i < ACC100_DDR_TRAINING_MAX; i++) {
-			usleep(ACC100_MS_IN_US);
-			value = acc100_reg_read(d,
+			usleep(ACC_MS_IN_US);
+			value = acc_reg_read(d,
 					HWPfChaDdrStDoneStatus);
 			if (value & 1)
 				break;
 		}
 		printf("DDR Training completed in %d ms", i);
 		/* Enable Memory Controller */
-		acc100_reg_write(d, HWPfDdrUmmcCtrl, 0x401);
+		acc_reg_write(d, HWPfDdrUmmcCtrl, 0x401);
 		/* Release AXI interface reset */
-		acc100_reg_write(d, HWPfChaDdrSifRstCfg, 3);
+		acc_reg_write(d, HWPfChaDdrSifRstCfg, 3);
 	}
 
 	rte_bbdev_log_debug("PF Tip configuration complete for %s", dev_name);
@@ -4980,7 +4347,7 @@ acc100_configure(const char *dev_name, struct rte_acc100_conf *conf)
 
 /* Initial configuration of a ACC101 device prior to running configure() */
 static int
-acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
+acc101_configure(const char *dev_name, struct rte_acc_conf *conf)
 {
 	rte_bbdev_log(INFO, "rte_acc101_configure");
 	uint32_t value, address, status;
@@ -4988,10 +4355,10 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name);
 
 	/* Compile time checks */
-	RTE_BUILD_BUG_ON(sizeof(struct acc100_dma_req_desc) != 256);
-	RTE_BUILD_BUG_ON(sizeof(union acc100_dma_desc) != 256);
-	RTE_BUILD_BUG_ON(sizeof(struct acc100_fcw_td) != 24);
-	RTE_BUILD_BUG_ON(sizeof(struct acc100_fcw_te) != 32);
+	RTE_BUILD_BUG_ON(sizeof(struct acc_dma_req_desc) != 256);
+	RTE_BUILD_BUG_ON(sizeof(union acc_dma_desc) != 256);
+	RTE_BUILD_BUG_ON(sizeof(struct acc_fcw_td) != 24);
+	RTE_BUILD_BUG_ON(sizeof(struct acc_fcw_te) != 32);
 
 	if (bbdev == NULL) {
 		rte_bbdev_log(ERR,
@@ -4999,67 +4366,67 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		dev_name);
 		return -ENODEV;
 	}
-	struct acc100_device *d = bbdev->data->dev_private;
+	struct acc_device *d = bbdev->data->dev_private;
 
 	/* Store configuration */
-	rte_memcpy(&d->acc100_conf, conf, sizeof(d->acc100_conf));
+	rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf));
 
 	/* PCIe Bridge configuration */
-	acc100_reg_write(d, HwPfPcieGpexBridgeControl, ACC101_CFG_PCI_BRIDGE);
+	acc_reg_write(d, HwPfPcieGpexBridgeControl, ACC101_CFG_PCI_BRIDGE);
 	for (i = 1; i < ACC101_GPEX_AXIMAP_NUM; i++)
-		acc100_reg_write(d, HwPfPcieGpexAxiAddrMappingWindowPexBaseHigh + i * 16, 0);
+		acc_reg_write(d, HwPfPcieGpexAxiAddrMappingWindowPexBaseHigh + i * 16, 0);
 
 	/* Prevent blocking AXI read on BRESP for AXI Write */
 	address = HwPfPcieGpexAxiPioControl;
 	value = ACC101_CFG_PCI_AXI;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Explicitly releasing AXI including a 2ms delay on ACC101 */
 	usleep(2000);
-	acc100_reg_write(d, HWPfDmaAxiControl, 1);
+	acc_reg_write(d, HWPfDmaAxiControl, 1);
 
 	/* Set the default 5GDL DMA configuration */
-	acc100_reg_write(d, HWPfDmaInboundDrainDataSize, ACC101_DMA_INBOUND);
+	acc_reg_write(d, HWPfDmaInboundDrainDataSize, ACC101_DMA_INBOUND);
 
 	/* Enable granular dynamic clock gating */
 	address = HWPfHiClkGateHystReg;
 	value = ACC101_CLOCK_GATING_EN;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Set default descriptor signature */
 	address = HWPfDmaDescriptorSignatuture;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Enable the Error Detection in DMA */
 	value = ACC101_CFG_DMA_ERROR;
 	address = HWPfDmaErrorDetectionEn;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* AXI Cache configuration */
 	value = ACC101_CFG_AXI_CACHE;
 	address = HWPfDmaAxcacheReg;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Default DMA Configuration (Qmgr Enabled) */
 	address = HWPfDmaConfig0Reg;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 	address = HWPfDmaQmanen;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Default RLIM/ALEN configuration */
 	address = HWPfDmaConfig1Reg;
 	int alen_r = 0xF;
 	int alen_w = 0x7;
 	value = (1 << 31) + (alen_w << 20)  + (1 << 6) + alen_r;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Configure DMA Qmanager addresses */
 	address = HWPfDmaQmgrAddrReg;
 	value = HWPfQmgrEgressQueuesTemplate;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* ===== Qmgr Configuration ===== */
 	/* Configuration of the AQueue Depth QMGR_GRP_0_DEPTH_LOG2 for UL */
@@ -5069,43 +4436,43 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			conf->q_dl_5g.num_qgroups;
 	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
 		address = HWPfQmgrDepthLog2Grp +
-		ACC101_BYTES_IN_WORD * qg_idx;
+		ACC_BYTES_IN_WORD * qg_idx;
 		value = aqDepth(qg_idx, conf);
-		acc100_reg_write(d, address, value);
+		acc_reg_write(d, address, value);
 		address = HWPfQmgrTholdGrp +
-		ACC101_BYTES_IN_WORD * qg_idx;
+		ACC_BYTES_IN_WORD * qg_idx;
 		value = (1 << 16) + (1 << (aqDepth(qg_idx, conf) - 1));
-		acc100_reg_write(d, address, value);
+		acc_reg_write(d, address, value);
 	}
 
 	/* Template Priority in incremental order */
-	for (template_idx = 0; template_idx < ACC101_NUM_TMPL;
+	for (template_idx = 0; template_idx < ACC_NUM_TMPL;
 			template_idx++) {
-		address = HWPfQmgrGrpTmplateReg0Indx + ACC101_BYTES_IN_WORD * template_idx;
-		value = ACC101_TMPL_PRI_0;
-		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg1Indx + ACC101_BYTES_IN_WORD * template_idx;
-		value = ACC101_TMPL_PRI_1;
-		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg2indx + ACC101_BYTES_IN_WORD * template_idx;
-		value = ACC101_TMPL_PRI_2;
-		acc100_reg_write(d, address, value);
-		address = HWPfQmgrGrpTmplateReg3Indx + ACC101_BYTES_IN_WORD * template_idx;
-		value = ACC101_TMPL_PRI_3;
-		acc100_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg0Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_0;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg1Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_1;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg2indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_2;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg3Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_3;
+		acc_reg_write(d, address, value);
 	}
 
 	address = HWPfQmgrGrpPriority;
 	value = ACC101_CFG_QMGR_HI_P;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Template Configuration */
-	for (template_idx = 0; template_idx < ACC101_NUM_TMPL;
+	for (template_idx = 0; template_idx < ACC_NUM_TMPL;
 			template_idx++) {
 		value = 0;
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC101_BYTES_IN_WORD * template_idx;
-		acc100_reg_write(d, address, value);
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
 	}
 	/* 4GUL */
 	int numQgs = conf->q_ul_4g.num_qgroups;
@@ -5117,8 +4484,8 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			template_idx <= ACC101_SIG_UL_4G_LAST;
 			template_idx++) {
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC101_BYTES_IN_WORD * template_idx;
-		acc100_reg_write(d, address, value);
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
 	}
 	/* 5GUL */
 	numQqsAcc += numQgs;
@@ -5132,15 +4499,15 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			template_idx++) {
 		/* Check engine power-on status */
 		address = HwPfFecUl5gIbDebugReg +
-				ACC101_ENGINE_OFFSET * template_idx;
-		status = (acc100_reg_read(d, address) >> 4) & 0xF;
+				ACC_ENGINE_OFFSET * template_idx;
+		status = (acc_reg_read(d, address) >> 4) & 0xF;
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC101_BYTES_IN_WORD * template_idx;
+				+ ACC_BYTES_IN_WORD * template_idx;
 		if (status == 1) {
-			acc100_reg_write(d, address, value);
+			acc_reg_write(d, address, value);
 			numEngines++;
 		} else
-			acc100_reg_write(d, address, 0);
+			acc_reg_write(d, address, 0);
 	}
 	printf("Number of 5GUL engines %d\n", numEngines);
 	/* 4GDL */
@@ -5153,8 +4520,8 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			template_idx <= ACC101_SIG_DL_4G_LAST;
 			template_idx++) {
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC101_BYTES_IN_WORD * template_idx;
-		acc100_reg_write(d, address, value);
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
 	}
 	/* 5GDL */
 	numQqsAcc += numQgs;
@@ -5166,8 +4533,8 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 			template_idx <= ACC101_SIG_DL_5G_LAST;
 			template_idx++) {
 		address = HWPfQmgrGrpTmplateReg4Indx
-				+ ACC101_BYTES_IN_WORD * template_idx;
-		acc100_reg_write(d, address, value);
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
 	}
 
 	/* Queue Group Function mapping */
@@ -5178,14 +4545,14 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 		acc = accFromQgid(qg_idx, conf);
 		value |= qman_func_id[acc]<<(qg_idx * 4);
 	}
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* Configuration of the Arbitration QGroup depth to 1 */
 	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
 		address = HWPfQmgrArbQDepthGrp +
-		ACC101_BYTES_IN_WORD * qg_idx;
+		ACC_BYTES_IN_WORD * qg_idx;
 		value = 0;
-		acc100_reg_write(d, address, value);
+		acc_reg_write(d, address, value);
 	}
 
 	/* Enabling AQueues through the Queue hierarchy*/
@@ -5196,9 +4563,9 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 					qg_idx < totalQgs)
 				value = (1 << aqNum(qg_idx, conf)) - 1;
 			address = HWPfQmgrAqEnableVf
-					+ vf_idx * ACC101_BYTES_IN_WORD;
+					+ vf_idx * ACC_BYTES_IN_WORD;
 			value += (qg_idx << 16);
-			acc100_reg_write(d, address, value);
+			acc_reg_write(d, address, value);
 		}
 	}
 
@@ -5207,10 +4574,10 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
 		for (vf_idx = 0; vf_idx < conf->num_vf_bundles; vf_idx++) {
 			address = HWPfQmgrVfBaseAddr + vf_idx
-					* ACC101_BYTES_IN_WORD + qg_idx
-					* ACC101_BYTES_IN_WORD * 64;
+					* ACC_BYTES_IN_WORD + qg_idx
+					* ACC_BYTES_IN_WORD * 64;
 			value = aram_address;
-			acc100_reg_write(d, address, value);
+			acc_reg_write(d, address, value);
 			/* Offset ARAM Address for next memory bank
 			 * - increment of 4B
 			 */
@@ -5228,32 +4595,32 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 	/* ==== HI Configuration ==== */
 
 	/* No Info Ring/MSI by default */
-	acc100_reg_write(d, HWPfHiInfoRingIntWrEnRegPf, 0);
-	acc100_reg_write(d, HWPfHiInfoRingVf2pfLoWrEnReg, 0);
-	acc100_reg_write(d, HWPfHiCfgMsiIntWrEnRegPf, 0xFFFFFFFF);
-	acc100_reg_write(d, HWPfHiCfgMsiVf2pfLoWrEnReg, 0xFFFFFFFF);
+	acc_reg_write(d, HWPfHiInfoRingIntWrEnRegPf, 0);
+	acc_reg_write(d, HWPfHiInfoRingVf2pfLoWrEnReg, 0);
+	acc_reg_write(d, HWPfHiCfgMsiIntWrEnRegPf, 0xFFFFFFFF);
+	acc_reg_write(d, HWPfHiCfgMsiVf2pfLoWrEnReg, 0xFFFFFFFF);
 	/* Prevent Block on Transmit Error */
 	address = HWPfHiBlockTransmitOnErrorEn;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 	/* Prevents to drop MSI */
 	address = HWPfHiMsiDropEnableReg;
 	value = 0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 	/* Set the PF Mode register */
 	address = HWPfHiPfMode;
-	value = (conf->pf_mode_en) ? ACC101_PF_VAL : 0;
-	acc100_reg_write(d, address, value);
+	value = (conf->pf_mode_en) ? ACC_PF_VAL : 0;
+	acc_reg_write(d, address, value);
 	/* Explicitly releasing AXI after PF Mode and 2 ms */
 	usleep(2000);
-	acc100_reg_write(d, HWPfDmaAxiControl, 1);
+	acc_reg_write(d, HWPfDmaAxiControl, 1);
 
 	/* QoS overflow init */
 	value = 1;
 	address = HWPfQosmonAEvalOverflow0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 	address = HWPfQosmonBEvalOverflow0;
-	acc100_reg_write(d, address, value);
+	acc_reg_write(d, address, value);
 
 	/* HARQ DDR Configuration */
 	unsigned int ddrSizeInMb = ACC101_HARQ_DDR;
@@ -5262,16 +4629,16 @@ acc101_configure(const char *dev_name, struct rte_acc100_conf *conf)
 				* 0x10;
 		value = ((vf_idx * (ddrSizeInMb / 64)) << 16) +
 				(ddrSizeInMb - 1);
-		acc100_reg_write(d, address, value);
+		acc_reg_write(d, address, value);
 	}
-	usleep(ACC101_LONG_WAIT);
+	usleep(ACC_LONG_WAIT);
 
 	rte_bbdev_log_debug("PF TIP configuration complete for %s", dev_name);
 	return 0;
 }
 
 int
-rte_acc10x_configure(const char *dev_name, struct rte_acc100_conf *conf)
+rte_acc10x_configure(const char *dev_name, struct rte_acc_conf *conf)
 {
 	struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name);
 	if (bbdev == NULL) {
diff --git a/drivers/baseband/acc100/rte_acc_common_cfg.h b/drivers/baseband/acc100/rte_acc_common_cfg.h
new file mode 100644
index 0000000000..8292ef44da
--- /dev/null
+++ b/drivers/baseband/acc100/rte_acc_common_cfg.h
@@ -0,0 +1,101 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Intel Corporation
+ */
+
+#ifndef _RTE_ACC_COMMON_CFG_H_
+#define _RTE_ACC_COMMON_CFG_H_
+
+/**
+ * @file rte_acc100_cfg.h
+ *
+ * Functions for configuring ACC100 HW, exposed directly to applications.
+ * Configuration related to encoding/decoding is done through the
+ * librte_bbdev library.
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**< Number of Virtual Functions ACC300 supports */
+#define RTE_ACC_NUM_VFS 64
+
+/**
+ * Definition of Queue Topology for ACC300 Configuration
+ * Some level of details is abstracted out to expose a clean interface
+ * given that comprehensive flexibility is not required
+ */
+struct rte_acc_queue_topology {
+	/** Number of QGroups in incremental order of priority */
+	uint16_t num_qgroups;
+	/**
+	 * All QGroups have the same number of AQs here.
+	 * Note : Could be made a 16-array if more flexibility is really
+	 * required
+	 */
+	uint16_t num_aqs_per_groups;
+	/**
+	 * Depth of the AQs is the same of all QGroups here. Log2 Enum : 2^N
+	 * Note : Could be made a 16-array if more flexibility is really
+	 * required
+	 */
+	uint16_t aq_depth_log2;
+	/**
+	 * Index of the first Queue Group Index - assuming contiguity
+	 * Initialized as -1
+	 */
+	int8_t first_qgroup_index;
+};
+
+/**
+ * Definition of Arbitration related parameters for ACC300 Configuration
+ */
+struct rte_acc_arbitration {
+	/** Default Weight for VF Fairness Arbitration */
+	uint16_t round_robin_weight;
+	uint32_t gbr_threshold1; /**< Guaranteed Bitrate Threshold 1 */
+	uint32_t gbr_threshold2; /**< Guaranteed Bitrate Threshold 2 */
+};
+
+/**
+ * Structure to pass ACC300 configuration.
+ * Note: all VF Bundles will have the same configuration.
+ */
+struct rte_acc_conf {
+	bool pf_mode_en; /**< 1 if PF is used for dataplane, 0 for VFs */
+	/** 1 if input '1' bit is represented by a positive LLR value, 0 if '1'
+	 * bit is represented by a negative value.
+	 */
+	bool input_pos_llr_1_bit;
+	/** 1 if output '1' bit is represented by a positive value, 0 if '1'
+	 * bit is represented by a negative value.
+	 */
+	bool output_pos_llr_1_bit;
+	uint16_t num_vf_bundles; /**< Number of VF bundles to setup */
+	/** Queue topology for each operation type */
+	struct rte_acc_queue_topology q_ul_4g;
+	struct rte_acc_queue_topology q_dl_4g;
+	struct rte_acc_queue_topology q_ul_5g;
+	struct rte_acc_queue_topology q_dl_5g;
+	struct rte_acc_queue_topology q_fft;
+	struct rte_acc_queue_topology q_mld;
+	/** Arbitration configuration for each operation type */
+	struct rte_acc_arbitration arb_ul_4g[RTE_ACC_NUM_VFS];
+	struct rte_acc_arbitration arb_dl_4g[RTE_ACC_NUM_VFS];
+	struct rte_acc_arbitration arb_ul_5g[RTE_ACC_NUM_VFS];
+	struct rte_acc_arbitration arb_dl_5g[RTE_ACC_NUM_VFS];
+	struct rte_acc_arbitration arb_fft[RTE_ACC_NUM_VFS];
+	struct rte_acc_arbitration arb_mld[RTE_ACC_NUM_VFS];
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_ACC_COMMON_CFG_H_ */
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 03/16] baseband/acc: rename directory from acc100 to acc
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 01/16] baseband/acc100: remove unused registers Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 02/16] baseband/acc100: refactor to segregate common code Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 04/16] baseband/acc: introduce PMD for ACC200 Nicolas Chautru
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Used a common directory for the ACC PMDs

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 MAINTAINERS                                           | 2 +-
 app/test-bbdev/meson.build                            | 4 ++--
 app/test-bbdev/test_bbdev_perf.c                      | 4 ++--
 drivers/baseband/{acc100 => acc}/acc100_pf_enum.h     | 0
 drivers/baseband/{acc100 => acc}/acc100_pmd.h         | 0
 drivers/baseband/{acc100 => acc}/acc100_vf_enum.h     | 0
 drivers/baseband/{acc100 => acc}/acc101_pmd.h         | 0
 drivers/baseband/{acc100 => acc}/acc_common.h         | 0
 drivers/baseband/{acc100 => acc}/meson.build          | 0
 drivers/baseband/{acc100 => acc}/rte_acc100_cfg.h     | 0
 drivers/baseband/{acc100 => acc}/rte_acc100_pmd.c     | 0
 drivers/baseband/{acc100 => acc}/rte_acc_common_cfg.h | 0
 drivers/baseband/{acc100 => acc}/version.map          | 0
 drivers/baseband/meson.build                          | 2 +-
 14 files changed, 6 insertions(+), 6 deletions(-)
 rename drivers/baseband/{acc100 => acc}/acc100_pf_enum.h (100%)
 rename drivers/baseband/{acc100 => acc}/acc100_pmd.h (100%)
 rename drivers/baseband/{acc100 => acc}/acc100_vf_enum.h (100%)
 rename drivers/baseband/{acc100 => acc}/acc101_pmd.h (100%)
 rename drivers/baseband/{acc100 => acc}/acc_common.h (100%)
 rename drivers/baseband/{acc100 => acc}/meson.build (100%)
 rename drivers/baseband/{acc100 => acc}/rte_acc100_cfg.h (100%)
 rename drivers/baseband/{acc100 => acc}/rte_acc100_pmd.c (100%)
 rename drivers/baseband/{acc100 => acc}/rte_acc_common_cfg.h (100%)
 rename drivers/baseband/{acc100 => acc}/version.map (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5472fccf61..0cfaa38774 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1339,7 +1339,7 @@ F: doc/guides/bbdevs/features/fpga_lte_fec.ini
 F: drivers/baseband/fpga_5gnr_fec/
 F: doc/guides/bbdevs/fpga_5gnr_fec.rst
 F: doc/guides/bbdevs/features/fpga_5gnr_fec.ini
-F: drivers/baseband/acc100/
+F: drivers/baseband/acc/
 F: doc/guides/bbdevs/acc100.rst
 F: doc/guides/bbdevs/features/acc100.ini
 F: doc/guides/bbdevs/features/acc101.ini
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 76d4c26999..cd6a5089d5 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -20,8 +20,8 @@ endif
 if dpdk_conf.has('RTE_BASEBAND_FPGA_5GNR_FEC')
     deps += ['baseband_fpga_5gnr_fec']
 endif
-if dpdk_conf.has('RTE_BASEBAND_ACC100')
-    deps += ['baseband_acc100']
+if dpdk_conf.has('RTE_BASEBAND_ACC')
+    deps += ['baseband_acc']
 endif
 if dpdk_conf.has('RTE_LIBRTE_PMD_BBDEV_LA12XX')
     deps += ['baseband_la12xx']
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 3bdd0571c3..e46a0c3b46 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -53,7 +53,7 @@
 #define DL_5G_LOAD_BALANCE 128
 #endif
 
-#ifdef RTE_BASEBAND_ACC100
+#ifdef RTE_BASEBAND_ACC
 #include <rte_acc100_cfg.h>
 #define ACC100PF_DRIVER_NAME   ("intel_acc100_pf")
 #define ACC100VF_DRIVER_NAME   ("intel_acc100_vf")
@@ -706,7 +706,7 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
 				info->dev_name);
 	}
 #endif
-#ifdef RTE_BASEBAND_ACC100
+#ifdef RTE_BASEBAND_ACC
 	if ((get_init_device() == true) &&
 			(!strcmp(info->drv.driver_name, ACC100PF_DRIVER_NAME))) {
 		struct rte_acc_conf conf;
diff --git a/drivers/baseband/acc100/acc100_pf_enum.h b/drivers/baseband/acc/acc100_pf_enum.h
similarity index 100%
rename from drivers/baseband/acc100/acc100_pf_enum.h
rename to drivers/baseband/acc/acc100_pf_enum.h
diff --git a/drivers/baseband/acc100/acc100_pmd.h b/drivers/baseband/acc/acc100_pmd.h
similarity index 100%
rename from drivers/baseband/acc100/acc100_pmd.h
rename to drivers/baseband/acc/acc100_pmd.h
diff --git a/drivers/baseband/acc100/acc100_vf_enum.h b/drivers/baseband/acc/acc100_vf_enum.h
similarity index 100%
rename from drivers/baseband/acc100/acc100_vf_enum.h
rename to drivers/baseband/acc/acc100_vf_enum.h
diff --git a/drivers/baseband/acc100/acc101_pmd.h b/drivers/baseband/acc/acc101_pmd.h
similarity index 100%
rename from drivers/baseband/acc100/acc101_pmd.h
rename to drivers/baseband/acc/acc101_pmd.h
diff --git a/drivers/baseband/acc100/acc_common.h b/drivers/baseband/acc/acc_common.h
similarity index 100%
rename from drivers/baseband/acc100/acc_common.h
rename to drivers/baseband/acc/acc_common.h
diff --git a/drivers/baseband/acc100/meson.build b/drivers/baseband/acc/meson.build
similarity index 100%
rename from drivers/baseband/acc100/meson.build
rename to drivers/baseband/acc/meson.build
diff --git a/drivers/baseband/acc100/rte_acc100_cfg.h b/drivers/baseband/acc/rte_acc100_cfg.h
similarity index 100%
rename from drivers/baseband/acc100/rte_acc100_cfg.h
rename to drivers/baseband/acc/rte_acc100_cfg.h
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
similarity index 100%
rename from drivers/baseband/acc100/rte_acc100_pmd.c
rename to drivers/baseband/acc/rte_acc100_pmd.c
diff --git a/drivers/baseband/acc100/rte_acc_common_cfg.h b/drivers/baseband/acc/rte_acc_common_cfg.h
similarity index 100%
rename from drivers/baseband/acc100/rte_acc_common_cfg.h
rename to drivers/baseband/acc/rte_acc_common_cfg.h
diff --git a/drivers/baseband/acc100/version.map b/drivers/baseband/acc/version.map
similarity index 100%
rename from drivers/baseband/acc100/version.map
rename to drivers/baseband/acc/version.map
diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
index 686e98b2ed..1d732da882 100644
--- a/drivers/baseband/meson.build
+++ b/drivers/baseband/meson.build
@@ -6,7 +6,7 @@ if is_windows
 endif
 
 drivers = [
-        'acc100',
+        'acc',
         'fpga_5gnr_fec',
         'fpga_lte_fec',
         'la12xx',
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 04/16] baseband/acc: introduce PMD for ACC200
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (2 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 03/16] baseband/acc: rename directory from acc100 to acc Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 05/16] baseband/acc: add HW register definitions " Nicolas Chautru
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Introduced stubs for device driver for the ACC200
integrated VRAN accelerator on SPR-EEC

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 MAINTAINERS                            |   3 +
 doc/guides/bbdevs/acc200.rst           | 257 +++++++++++++++++++++++++
 doc/guides/bbdevs/features/acc200.ini  |  14 ++
 doc/guides/bbdevs/features/default.ini |   1 +
 doc/guides/bbdevs/index.rst            |   1 +
 doc/guides/rel_notes/release_22_11.rst |   6 +
 drivers/baseband/acc/acc200_pmd.h      |  32 +++
 drivers/baseband/acc/meson.build       |   2 +-
 drivers/baseband/acc/rte_acc200_pmd.c  | 143 ++++++++++++++
 9 files changed, 458 insertions(+), 1 deletion(-)
 create mode 100644 doc/guides/bbdevs/acc200.rst
 create mode 100644 doc/guides/bbdevs/features/acc200.ini
 create mode 100644 drivers/baseband/acc/acc200_pmd.h
 create mode 100644 drivers/baseband/acc/rte_acc200_pmd.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 0cfaa38774..24f418637c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1343,6 +1343,9 @@ F: drivers/baseband/acc/
 F: doc/guides/bbdevs/acc100.rst
 F: doc/guides/bbdevs/features/acc100.ini
 F: doc/guides/bbdevs/features/acc101.ini
+F: drivers/baseband/acc200/
+F: doc/guides/bbdevs/acc200.rst
+F: doc/guides/bbdevs/features/acc200.ini
 
 Null baseband
 M: Nicolas Chautru <nicolas.chautru@intel.com>
diff --git a/doc/guides/bbdevs/acc200.rst b/doc/guides/bbdevs/acc200.rst
new file mode 100644
index 0000000000..33c4fa9544
--- /dev/null
+++ b/doc/guides/bbdevs/acc200.rst
@@ -0,0 +1,257 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2022 Intel Corporation
+
+Intel(R) ACC200 vRAN Dedicated Accelerator Poll Mode Driver
+===========================================================
+
+The Intel® vRAN Dedicated Accelerator ACC200 peripheral enables cost-effective
+4G and 5G next-generation virtualized Radio Access Network (vRAN) solutions
+integrated on Sapphire Rapids Edge Enhanced Processor (SPR-EE)
+Intel(R)7 based Xeon(R) multi-core server processor.
+
+Features
+--------
+
+The ACC200 includes a 5G Low Density Parity Check (LDPC) encoder/decoder,
+rate match/dematch, Hybrid Automatic Repeat Request (HARQ) with access to DDR
+memory for buffer management, a 4G Turbo encoder/decoder, a
+Fast Fourier Transform (FFT) block providing DFT/iDFT processing offload
+for the 5G Sounding Reference Signal (SRS), a Queue Manager (QMGR), and
+a DMA subsystem.
+There is no dedicated on-card memory for HARQ, this is using coherent memory
+on the CPU side.
+
+These correspond to the following features exposed by the PMD:
+
+- LDPC Encode in the Downlink (5GNR)
+- LDPC Decode in the Uplink (5GNR)
+- Turbo Encode in the Downlink (4G)
+- Turbo Decode in the Uplink (4G)
+- FFT processing
+- SR-IOV with 16 VFs per PF
+- Maximum of 256 queues per VF
+- MSI
+
+ACC200 PMD supports the following BBDEV capabilities:
+
+* For the LDPC encode operation:
+   - ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` :  set to attach CRC24B to CB(s).
+   - ``RTE_BBDEV_LDPC_RATE_MATCH`` :  if set then do not do Rate Match bypass.
+   - ``RTE_BBDEV_LDPC_INTERLEAVER_BYPASS`` : if set then bypass interleaver.
+
+* For the LDPC decode operation:
+   - ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK`` :  check CRC24B from CB(s).
+   - ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP`` :  drops CRC24B bits appended while decoding.
+   - ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK`` :  check CRC24A from CB(s).
+   - ``RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK`` :  check CRC16 from CB(s).
+   - ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE`` :  provides an input for HARQ combining.
+   - ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE`` :  provides an input for HARQ combining.
+   - ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE`` :  disable early termination.
+   - ``RTE_BBDEV_LDPC_DEC_SCATTER_GATHER`` :  supports scatter-gather for input/output data.
+   - ``RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION`` :  supports compression of the HARQ input/output.
+   - ``RTE_BBDEV_LDPC_LLR_COMPRESSION`` :  supports LLR input compression.
+
+* For the turbo encode operation:
+   - ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` :  set to attach CRC24B to CB(s).
+   - ``RTE_BBDEV_TURBO_RATE_MATCH`` :  if set then do not do Rate Match bypass.
+   - ``RTE_BBDEV_TURBO_ENC_INTERRUPTS`` :  set for encoder dequeue interrupts.
+   - ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS`` :  set to bypass RV index.
+   - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER`` :  supports scatter-gather for input/output data.
+
+* For the turbo decode operation:
+   - ``RTE_BBDEV_TURBO_CRC_TYPE_24B`` :  check CRC24B from CB(s).
+   - ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE`` :  perform subblock de-interleave.
+   - ``RTE_BBDEV_TURBO_DEC_INTERRUPTS`` :  set for decoder dequeue interrupts.
+   - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN`` :  set if negative LLR input is supported.
+   - ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP`` :  keep CRC24B bits appended while decoding.
+   - ``RTE_BBDEV_TURBO_DEC_CRC_24B_DROP`` : option to drop the code block CRC after decoding.
+   - ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` :  set early termination feature.
+   - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER`` :  supports scatter-gather for input/output data.
+   - ``RTE_BBDEV_TURBO_HALF_ITERATION_EVEN`` :  set half iteration granularity.
+   - ``RTE_BBDEV_TURBO_SOFT_OUTPUT`` :  set the APP LLR soft output.
+   - ``RTE_BBDEV_TURBO_EQUALIZER`` :  set the turbo equalizer feature.
+   - ``RTE_BBDEV_TURBO_SOFT_OUT_SATURATE`` :  set the soft output saturation.
+   - ``RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH`` :  set to run an extra odd iteration after CRC match.
+   - ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT`` :  set if negative APP LLR output supported.
+   - ``RTE_BBDEV_TURBO_MAP_DEC`` :  supports flexible parallel MAP engine decoding.
+
+* For the FFT operation:
+   - ``RTE_BBDEV_FFT_WINDOWING`` :  flexible windowing capability.
+   - ``RTE_BBDEV_FFT_CS_ADJUSTMENT`` :  flexible adjustment of Cyclic Shift time offset.
+   - ``RTE_BBDEV_FFT_DFT_BYPASS`` :  set for bypass the DFT and get directly into iDFT input.
+   - ``RTE_BBDEV_FFT_IDFT_BYPASS`` :  set for bypass the IDFT and get directly the DFT output.
+   - ``RTE_BBDEV_FFT_WINDOWING_BYPASS`` : set for bypass time domain windowing.
+
+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.
+The bbdev test application has been tested with a configuration 40 x 1GB hugepages.
+The hugepage configuration of a server may be examined using:
+
+.. code-block:: console
+
+   grep Huge* /proc/meminfo
+
+
+Initialization
+--------------
+
+When the device first powers up, its PCI Physical Functions (PF) can be listed
+through these commands for ACC200:
+
+.. code-block:: console
+
+  sudo lspci -vd8086:57c0
+
+The physical and virtual functions are compatible with Linux UIO drivers:
+``vfio`` and ``igb_uio``. However, in order to work the 5G/4G
+FEC device first needs to be bound to one of these linux drivers through DPDK.
+
+
+Bind PF UIO driver(s)
+~~~~~~~~~~~~~~~~~~~~~
+
+Install the DPDK igb_uio driver, bind it with the PF PCI device ID and use
+``lspci`` to confirm the PF device is under use by ``igb_uio`` DPDK UIO driver.
+
+The igb_uio driver may be bound to the PF PCI device using one of two methods
+for ACC200:
+
+
+1. PCI functions (physical or virtual, depending on the use case) can be bound
+to the UIO driver by repeating this command for every function.
+
+.. code-block:: console
+
+  cd <dpdk-top-level-directory>
+  insmod ./build/kmod/igb_uio.ko
+  echo "8086 57c0" > /sys/bus/pci/drivers/igb_uio/new_id
+  lspci -vd8086:57c0
+
+
+2. Another way to bind PF with DPDK UIO driver is by using the ``dpdk-devbind.py`` tool
+
+.. code-block:: console
+
+  cd <dpdk-top-level-directory>
+  ./usertools/dpdk-devbind.py -b igb_uio 0000:f7:00.0
+
+where the PCI device ID (example: 0000:f7:00.0) is obtained using lspci -vd8086:57c0
+
+
+In a similar way the PF may be bound with vfio-pci as any PCIe device.
+
+
+Enable Virtual Functions
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Now, it should be visible in the printouts that PCI PF is under igb_uio control
+"``Kernel driver in use: igb_uio``"
+
+To show the number of available VFs on the device, read ``sriov_totalvfs`` file..
+
+.. code-block:: console
+
+  cat /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_totalvfs
+
+  where 0000\:<b>\:<d>.<f> is the PCI device ID
+
+
+To enable VFs via igb_uio, echo the number of virtual functions intended to
+enable to ``max_vfs`` file..
+
+.. code-block:: console
+
+  echo <num-of-vfs> > /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/max_vfs
+
+
+Afterwards, all VFs must be bound to appropriate UIO drivers as required, same
+way it was done with the physical function previously.
+
+Enabling SR-IOV via vfio driver is pretty much the same, except that the file
+name is different:
+
+.. code-block:: console
+
+  echo <num-of-vfs> > /sys/bus/pci/devices/0000\:<b>\:<d>.<f>/sriov_numvfs
+
+
+Configure the VFs through PF
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The PCI virtual functions must be configured before working or getting assigned
+to VMs/Containers. The configuration involves allocating the number of hardware
+queues, priorities, load balance, bandwidth and other settings necessary for the
+device to perform FEC functions.
+
+This configuration needs to be executed at least once after reboot or PCI FLR and can
+be achieved by using the functions ``rte_acc200_configure()``,
+which sets up the parameters defined in the compatible ``acc200_conf`` structure.
+
+Test Application
+----------------
+
+BBDEV provides a test application, ``test-bbdev.py`` and range of test data for testing
+the functionality of the device, depending on the device's
+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.
+  "-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 -c validation -n 64 -b 1 -v ./ldpc_dec_default.data
+  ./test-bbdev.py -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 device capabilities which may
+cause some testcases to be skipped, but no failure should be reported.
+
+
+Alternate Baseband Device configuration tool
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+On top of the embedded configuration feature supported in test-bbdev using
+"- -init-device" option mentioned above, there is also a tool available to
+perform that device configuration using a companion application.
+The ``pf_bb_config`` application notably enables then to run bbdev-test from
+the VF and not only limited to the PF as captured above.
+
+See for more details: https://github.com/intel/pf-bb-config
+
+Specifically for the BBDEV ACC200 PMD, the command below can be used:
+
+.. code-block:: console
+
+  ./pf_bb_config ACC200 -c ./acc200/acc200_config_vf_5g.cfg
+  ./test-bbdev.py -e="-c 0xff0 -a${VF_PCI_ADDR}" -c validation -n 64 -b 64 -l 1 -v ./ldpc_dec_default.data
diff --git a/doc/guides/bbdevs/features/acc200.ini b/doc/guides/bbdevs/features/acc200.ini
new file mode 100644
index 0000000000..7319aea726
--- /dev/null
+++ b/doc/guides/bbdevs/features/acc200.ini
@@ -0,0 +1,14 @@
+;
+; Supported features of the 'acc200' bbdev driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Turbo Decoder (4G)     = Y
+Turbo Encoder (4G)     = Y
+LDPC Decoder (5G)      = Y
+LDPC Encoder (5G)      = Y
+LLR/HARQ Compression   = Y
+FFT/SRS                = Y
+External DDR Access    = N
+HW Accelerated         = Y
diff --git a/doc/guides/bbdevs/features/default.ini b/doc/guides/bbdevs/features/default.ini
index 494be5e400..428ea6a0de 100644
--- a/doc/guides/bbdevs/features/default.ini
+++ b/doc/guides/bbdevs/features/default.ini
@@ -11,5 +11,6 @@ Turbo Encoder (4G)     =
 LDPC Decoder (5G)      =
 LDPC Encoder (5G)      =
 LLR/HARQ Compression   =
+FFT/SRS                =
 External DDR Access    =
 HW Accelerated         =
diff --git a/doc/guides/bbdevs/index.rst b/doc/guides/bbdevs/index.rst
index cedd706fa6..4e9dea8e4c 100644
--- a/doc/guides/bbdevs/index.rst
+++ b/doc/guides/bbdevs/index.rst
@@ -14,4 +14,5 @@ Baseband Device Drivers
     fpga_lte_fec
     fpga_5gnr_fec
     acc100
+    acc200
     la12xx
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 1a9fb32e22..f11e8aee99 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -152,6 +152,12 @@ New Features
   into single event containing ``rte_event_vector``
   whose event type is ``RTE_EVENT_TYPE_CRYPTODEV_VECTOR``.
 
+* **Added Intel ACC200 bbdev PMD.**
+
+  Added a new ``acc200`` bbdev driver for the Intel\ |reg| ACC200 accelerator
+  integrated on SPR-EE.  See the
+  :doc:`../bbdevs/acc200` BBDEV guide for more details on this new driver.
+
 
 Removed Items
 -------------
diff --git a/drivers/baseband/acc/acc200_pmd.h b/drivers/baseband/acc/acc200_pmd.h
new file mode 100644
index 0000000000..aaa6b7753c
--- /dev/null
+++ b/drivers/baseband/acc/acc200_pmd.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Intel Corporation
+ */
+
+#ifndef _RTE_ACC200_PMD_H_
+#define _RTE_ACC200_PMD_H_
+
+#include "acc_common.h"
+
+/* Helper macro for logging */
+#define rte_bbdev_log(level, fmt, ...) \
+	rte_log(RTE_LOG_ ## level, acc200_logtype, fmt "\n", \
+		##__VA_ARGS__)
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+#define rte_bbdev_log_debug(fmt, ...) \
+		rte_bbdev_log(DEBUG, "acc200_pmd: " fmt, \
+		##__VA_ARGS__)
+#else
+#define rte_bbdev_log_debug(fmt, ...)
+#endif
+
+/* ACC200 PF and VF driver names */
+#define ACC200PF_DRIVER_NAME           intel_acc200_pf
+#define ACC200VF_DRIVER_NAME           intel_acc200_vf
+
+/* ACC200 PCI vendor & device IDs */
+#define RTE_ACC200_VENDOR_ID           (0x8086)
+#define RTE_ACC200_PF_DEVICE_ID        (0x57C0)
+#define RTE_ACC200_VF_DEVICE_ID        (0x57C1)
+
+#endif /* _RTE_ACC200_PMD_H_ */
diff --git a/drivers/baseband/acc/meson.build b/drivers/baseband/acc/meson.build
index 9a1a3b8b07..63912f0621 100644
--- a/drivers/baseband/acc/meson.build
+++ b/drivers/baseband/acc/meson.build
@@ -3,6 +3,6 @@
 
 deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
 
-sources = files('rte_acc100_pmd.c')
+sources = files('rte_acc100_pmd.c', 'rte_acc200_pmd.c')
 
 headers = files('rte_acc100_cfg.h')
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
new file mode 100644
index 0000000000..c59cad1d26
--- /dev/null
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -0,0 +1,143 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Intel Corporation
+ */
+
+#include <unistd.h>
+
+#include <rte_common.h>
+#include <rte_log.h>
+#include <rte_dev.h>
+#include <rte_malloc.h>
+#include <rte_mempool.h>
+#include <rte_byteorder.h>
+#include <rte_errno.h>
+#include <rte_branch_prediction.h>
+#include <rte_hexdump.h>
+#include <rte_pci.h>
+#include <rte_bus_pci.h>
+#ifdef RTE_BBDEV_OFFLOAD_COST
+#include <rte_cycles.h>
+#endif
+
+#include <rte_bbdev.h>
+#include <rte_bbdev_pmd.h>
+#include "acc200_pmd.h"
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+RTE_LOG_REGISTER_DEFAULT(acc200_logtype, DEBUG);
+#else
+RTE_LOG_REGISTER_DEFAULT(acc200_logtype, NOTICE);
+#endif
+
+static int
+acc200_dev_close(struct rte_bbdev *dev)
+{
+	RTE_SET_USED(dev);
+	/* Ensure all in flight HW transactions are completed. */
+	usleep(ACC_LONG_WAIT);
+	return 0;
+}
+
+
+static const struct rte_bbdev_ops acc200_bbdev_ops = {
+	.close = acc200_dev_close,
+};
+
+/* ACC200 PCI PF address map. */
+static struct rte_pci_id pci_id_acc200_pf_map[] = {
+	{
+		RTE_PCI_DEVICE(RTE_ACC200_VENDOR_ID, RTE_ACC200_PF_DEVICE_ID)
+	},
+	{.device_id = 0},
+};
+
+/* ACC200 PCI VF address map. */
+static struct rte_pci_id pci_id_acc200_vf_map[] = {
+	{
+		RTE_PCI_DEVICE(RTE_ACC200_VENDOR_ID, RTE_ACC200_VF_DEVICE_ID)
+	},
+	{.device_id = 0},
+};
+
+/* Initialization Function. */
+static void
+acc200_bbdev_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
+{
+	struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev->device);
+
+	dev->dev_ops = &acc200_bbdev_ops;
+
+	((struct acc_device *) dev->data->dev_private)->pf_device =
+			!strcmp(drv->driver.name,
+					RTE_STR(ACC200PF_DRIVER_NAME));
+	((struct acc_device *) dev->data->dev_private)->mmio_base =
+			pci_dev->mem_resource[0].addr;
+
+	rte_bbdev_log_debug("Init device %s [%s] @ vaddr %p paddr %#"PRIx64"",
+			drv->driver.name, dev->data->name,
+			(void *)pci_dev->mem_resource[0].addr,
+			pci_dev->mem_resource[0].phys_addr);
+}
+
+static int acc200_pci_probe(struct rte_pci_driver *pci_drv,
+	struct rte_pci_device *pci_dev)
+{
+	struct rte_bbdev *bbdev = NULL;
+	char dev_name[RTE_BBDEV_NAME_MAX_LEN];
+
+	if (pci_dev == NULL) {
+		rte_bbdev_log(ERR, "NULL PCI device");
+		return -EINVAL;
+	}
+
+	rte_pci_device_name(&pci_dev->addr, dev_name, sizeof(dev_name));
+
+	/* Allocate memory to be used privately by drivers. */
+	bbdev = rte_bbdev_allocate(pci_dev->device.name);
+	if (bbdev == NULL)
+		return -ENODEV;
+
+	/* allocate device private memory. */
+	bbdev->data->dev_private = rte_zmalloc_socket(dev_name,
+			sizeof(struct acc_device), RTE_CACHE_LINE_SIZE,
+			pci_dev->device.numa_node);
+
+	if (bbdev->data->dev_private == NULL) {
+		rte_bbdev_log(CRIT,
+				"Allocate of %zu bytes for device \"%s\" failed",
+				sizeof(struct acc_device), dev_name);
+				rte_bbdev_release(bbdev);
+			return -ENOMEM;
+	}
+
+	/* Fill HW specific part of device structure. */
+	bbdev->device = &pci_dev->device;
+	bbdev->intr_handle = pci_dev->intr_handle;
+	bbdev->data->socket_id = pci_dev->device.numa_node;
+
+	/* Invoke ACC200 device initialization function. */
+	acc200_bbdev_init(bbdev, pci_drv);
+
+	rte_bbdev_log_debug("Initialised bbdev %s (id = %u)",
+			dev_name, bbdev->data->dev_id);
+	return 0;
+}
+
+static struct rte_pci_driver acc200_pci_pf_driver = {
+		.probe = acc200_pci_probe,
+		.remove = acc_pci_remove,
+		.id_table = pci_id_acc200_pf_map,
+		.drv_flags = RTE_PCI_DRV_NEED_MAPPING
+};
+
+static struct rte_pci_driver acc200_pci_vf_driver = {
+		.probe = acc200_pci_probe,
+		.remove = acc_pci_remove,
+		.id_table = pci_id_acc200_vf_map,
+		.drv_flags = RTE_PCI_DRV_NEED_MAPPING
+};
+
+RTE_PMD_REGISTER_PCI(ACC200PF_DRIVER_NAME, acc200_pci_pf_driver);
+RTE_PMD_REGISTER_PCI_TABLE(ACC200PF_DRIVER_NAME, pci_id_acc200_pf_map);
+RTE_PMD_REGISTER_PCI(ACC200VF_DRIVER_NAME, acc200_pci_vf_driver);
+RTE_PMD_REGISTER_PCI_TABLE(ACC200VF_DRIVER_NAME, pci_id_acc200_vf_map);
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 05/16] baseband/acc: add HW register definitions for ACC200
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (3 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 04/16] baseband/acc: introduce PMD for ACC200 Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 06/16] baseband/acc: add info get function " Nicolas Chautru
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added registers list and structure to access the device.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/acc200_pf_enum.h | 108 +++++++++++++++++
 drivers/baseband/acc/acc200_pmd.h     | 163 ++++++++++++++++++++++++++
 drivers/baseband/acc/acc200_vf_enum.h |  83 +++++++++++++
 3 files changed, 354 insertions(+)
 create mode 100644 drivers/baseband/acc/acc200_pf_enum.h
 create mode 100644 drivers/baseband/acc/acc200_vf_enum.h

diff --git a/drivers/baseband/acc/acc200_pf_enum.h b/drivers/baseband/acc/acc200_pf_enum.h
new file mode 100644
index 0000000000..e52d8f5b19
--- /dev/null
+++ b/drivers/baseband/acc/acc200_pf_enum.h
@@ -0,0 +1,108 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Intel Corporation
+ */
+
+#ifndef ACC200_PF_ENUM_H
+#define ACC200_PF_ENUM_H
+
+/*
+ * ACC200 Register mapping on PF BAR0
+ * This is automatically generated from RDL, format may change with new RDL
+ * Release.
+ * Variable names are as is
+ */
+enum {
+	HWPfQmgrEgressQueuesTemplate          =  0x0007FC00,
+	HWPfQmgrIngressAq                     =  0x00080000,
+	HWPfQmgrDepthLog2Grp                  =  0x00A00200,
+	HWPfQmgrTholdGrp                      =  0x00A00300,
+	HWPfQmgrGrpTmplateReg0Indx            =  0x00A00600,
+	HWPfQmgrGrpTmplateReg1Indx            =  0x00A00700,
+	HWPfQmgrGrpTmplateReg2indx            =  0x00A00800,
+	HWPfQmgrGrpTmplateReg3Indx            =  0x00A00900,
+	HWPfQmgrGrpTmplateReg4Indx            =  0x00A00A00,
+	HWPfQmgrVfBaseAddr                    =  0x00A01000,
+	HWPfQmgrArbQDepthGrp                  =  0x00A02F00,
+	HWPfQmgrGrpFunction0                  =  0x00A02F40,
+	HWPfQmgrGrpFunction1                  =  0x00A02F44,
+	HWPfQmgrGrpPriority                   =  0x00A02F48,
+	HWPfQmgrAqEnableVf                    =  0x00A10000,
+	HWPfQmgrRingSizeVf                    =  0x00A20004,
+	HWPfQmgrGrpDepthLog20Vf               =  0x00A20008,
+	HWPfQmgrGrpDepthLog21Vf               =  0x00A2000C,
+	HWPfFabricM2iBufferReg                =  0x00B30000,
+	HWPfFabricI2Mdma_weight               =  0x00B31044,
+	HwPfFecUl5gIbDebugReg                 =  0x00B40200,
+	HWPfFftConfig0                        =  0x00B58004,
+	HWPfFftRamPageAccess                  =  0x00B5800C,
+	HWPfFftRamOff                         =  0x00B58800,
+	HWPfDmaConfig0Reg                     =  0x00B80000,
+	HWPfDmaConfig1Reg                     =  0x00B80004,
+	HWPfDmaQmgrAddrReg                    =  0x00B80008,
+	HWPfDmaAxcacheReg                     =  0x00B80010,
+	HWPfDmaAxiControl                     =  0x00B8002C,
+	HWPfDmaQmanen                         =  0x00B80040,
+	HWPfDma4gdlIbThld                     =  0x00B800CC,
+	HWPfDmaCfgRrespBresp                  =  0x00B80814,
+	HWPfDmaDescriptorSignatuture          =  0x00B80868,
+	HWPfDmaErrorDetectionEn               =  0x00B80870,
+	HWPfDmaFec5GulDescBaseLoRegVf         =  0x00B88020,
+	HWPfDmaFec5GulDescBaseHiRegVf         =  0x00B88024,
+	HWPfDmaFec5GulRespPtrLoRegVf          =  0x00B88028,
+	HWPfDmaFec5GulRespPtrHiRegVf          =  0x00B8802C,
+	HWPfDmaFec5GdlDescBaseLoRegVf         =  0x00B88040,
+	HWPfDmaFec5GdlDescBaseHiRegVf         =  0x00B88044,
+	HWPfDmaFec5GdlRespPtrLoRegVf          =  0x00B88048,
+	HWPfDmaFec5GdlRespPtrHiRegVf          =  0x00B8804C,
+	HWPfDmaFec4GulDescBaseLoRegVf         =  0x00B88060,
+	HWPfDmaFec4GulDescBaseHiRegVf         =  0x00B88064,
+	HWPfDmaFec4GulRespPtrLoRegVf          =  0x00B88068,
+	HWPfDmaFec4GulRespPtrHiRegVf          =  0x00B8806C,
+	HWPfDmaFec4GdlDescBaseLoRegVf         =  0x00B88080,
+	HWPfDmaFec4GdlDescBaseHiRegVf         =  0x00B88084,
+	HWPfDmaFec4GdlRespPtrLoRegVf          =  0x00B88088,
+	HWPfDmaFec4GdlRespPtrHiRegVf          =  0x00B8808C,
+	HWPDmaFftDescBaseLoRegVf              =  0x00B880A0,
+	HWPDmaFftDescBaseHiRegVf              =  0x00B880A4,
+	HWPDmaFftRespPtrLoRegVf               =  0x00B880A8,
+	HWPDmaFftRespPtrHiRegVf               =  0x00B880AC,
+	HWPfQosmonAEvalOverflow0              =  0x00B90008,
+	HWPfPermonACntrlRegVf                 =  0x00B98000,
+	HWPfQosmonBEvalOverflow0              =  0x00BA0008,
+	HWPfPermonBCntrlRegVf                 =  0x00BA8000,
+	HWPfPermonCCntrlRegVf                 =  0x00BB8000,
+	HWPfHiInfoRingBaseLoRegPf             =  0x00C84014,
+	HWPfHiInfoRingBaseHiRegPf             =  0x00C84018,
+	HWPfHiInfoRingPointerRegPf            =  0x00C8401C,
+	HWPfHiInfoRingIntWrEnRegPf            =  0x00C84020,
+	HWPfHiBlockTransmitOnErrorEn          =  0x00C84038,
+	HWPfHiCfgMsiIntWrEnRegPf              =  0x00C84040,
+	HWPfHiMsixVectorMapperPf              =  0x00C84060,
+	HWPfHiPfMode                          =  0x00C84108,
+	HWPfHiClkGateHystReg                  =  0x00C8410C,
+	HWPfHiMsiDropEnableReg                =  0x00C84114,
+	HWPfHiSectionPowerGatingReq           =  0x00C84128,
+	HWPfHiSectionPowerGatingAck           =  0x00C8412C,
+};
+
+/* TIP PF Interrupt numbers */
+enum {
+	ACC200_PF_INT_QMGR_AQ_OVERFLOW = 0,
+	ACC200_PF_INT_DOORBELL_VF_2_PF = 1,
+	ACC200_PF_INT_ILLEGAL_FORMAT = 2,
+	ACC200_PF_INT_QMGR_DISABLED_ACCESS = 3,
+	ACC200_PF_INT_QMGR_AQ_OVERTHRESHOLD = 4,
+	ACC200_PF_INT_DMA_DL_DESC_IRQ = 5,
+	ACC200_PF_INT_DMA_UL_DESC_IRQ = 6,
+	ACC200_PF_INT_DMA_FFT_DESC_IRQ = 7,
+	ACC200_PF_INT_DMA_UL5G_DESC_IRQ = 8,
+	ACC200_PF_INT_DMA_DL5G_DESC_IRQ = 9,
+	ACC200_PF_INT_DMA_MLD_DESC_IRQ = 10,
+	ACC200_PF_INT_ARAM_ECC_1BIT_ERR = 11,
+	ACC200_PF_INT_PARITY_ERR = 12,
+	ACC200_PF_INT_QMGR_ERR = 13,
+	ACC200_PF_INT_INT_REQ_OVERFLOW = 14,
+	ACC200_PF_INT_APB_TIMEOUT = 15,
+};
+
+#endif /* ACC200_PF_ENUM_H */
diff --git a/drivers/baseband/acc/acc200_pmd.h b/drivers/baseband/acc/acc200_pmd.h
index aaa6b7753c..acead1d17c 100644
--- a/drivers/baseband/acc/acc200_pmd.h
+++ b/drivers/baseband/acc/acc200_pmd.h
@@ -6,6 +6,8 @@
 #define _RTE_ACC200_PMD_H_
 
 #include "acc_common.h"
+#include "acc200_pf_enum.h"
+#include "acc200_vf_enum.h"
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
@@ -29,4 +31,165 @@
 #define RTE_ACC200_PF_DEVICE_ID        (0x57C0)
 #define RTE_ACC200_VF_DEVICE_ID        (0x57C1)
 
+#define ACC200_MAX_PF_MSIX            (256+32)
+#define ACC200_MAX_VF_MSIX            (256+7)
+
+/* Values used in writing to the registers */
+#define ACC200_REG_IRQ_EN_ALL          0x1FF83FF  /* Enable all interrupts */
+
+/* Number of Virtual Functions ACC200 supports */
+#define ACC200_NUM_VFS                  16
+#define ACC200_NUM_QGRPS                16
+#define ACC200_NUM_AQS                  16
+
+#define ACC200_GRP_ID_SHIFT    10 /* Queue Index Hierarchy */
+#define ACC200_VF_ID_SHIFT     4  /* Queue Index Hierarchy */
+#define ACC200_WORDS_IN_ARAM_SIZE (256 * 1024 / 4)
+
+/* Mapping of signals for the available engines */
+#define ACC200_SIG_UL_5G       0
+#define ACC200_SIG_UL_5G_LAST  4
+#define ACC200_SIG_DL_5G      10
+#define ACC200_SIG_DL_5G_LAST 11
+#define ACC200_SIG_UL_4G      12
+#define ACC200_SIG_UL_4G_LAST 16
+#define ACC200_SIG_DL_4G      21
+#define ACC200_SIG_DL_4G_LAST 23
+#define ACC200_SIG_FFT        24
+#define ACC200_SIG_FFT_LAST   24
+
+#define ACC200_NUM_ACCS       5
+
+/* ACC200 Configuration */
+#define ACC200_FABRIC_MODE      0x8000103
+#define ACC200_CFG_DMA_ERROR    0x3DF
+#define ACC200_CFG_AXI_CACHE    0x11
+#define ACC200_CFG_QMGR_HI_P    0x0F0F
+#define ACC200_RESET_HARD       0x1FF
+#define ACC200_ENGINES_MAX      9
+#define ACC200_GPEX_AXIMAP_NUM  17
+#define ACC200_CLOCK_GATING_EN  0x30000
+#define ACC200_FFT_CFG_0        0x2001
+#define ACC200_FFT_RAM_EN       0x80008000
+#define ACC200_FFT_RAM_DIS      0x0
+#define ACC200_FFT_RAM_SIZE     512
+#define ACC200_CLK_EN           0x00010A01
+#define ACC200_CLK_DIS          0x01F10A01
+#define ACC200_PG_MASK_0        0x1F
+#define ACC200_PG_MASK_1        0xF
+#define ACC200_PG_MASK_2        0x1
+#define ACC200_PG_MASK_3        0x0
+#define ACC200_PG_MASK_FFT      1
+#define ACC200_PG_MASK_4GUL     4
+#define ACC200_PG_MASK_5GUL     8
+#define ACC200_STATUS_WAIT      10
+#define ACC200_STATUS_TO        100
+
+struct acc200_registry_addr {
+	unsigned int dma_ring_dl5g_hi;
+	unsigned int dma_ring_dl5g_lo;
+	unsigned int dma_ring_ul5g_hi;
+	unsigned int dma_ring_ul5g_lo;
+	unsigned int dma_ring_dl4g_hi;
+	unsigned int dma_ring_dl4g_lo;
+	unsigned int dma_ring_ul4g_hi;
+	unsigned int dma_ring_ul4g_lo;
+	unsigned int dma_ring_fft_hi;
+	unsigned int dma_ring_fft_lo;
+	unsigned int ring_size;
+	unsigned int info_ring_hi;
+	unsigned int info_ring_lo;
+	unsigned int info_ring_en;
+	unsigned int info_ring_ptr;
+	unsigned int tail_ptrs_dl5g_hi;
+	unsigned int tail_ptrs_dl5g_lo;
+	unsigned int tail_ptrs_ul5g_hi;
+	unsigned int tail_ptrs_ul5g_lo;
+	unsigned int tail_ptrs_dl4g_hi;
+	unsigned int tail_ptrs_dl4g_lo;
+	unsigned int tail_ptrs_ul4g_hi;
+	unsigned int tail_ptrs_ul4g_lo;
+	unsigned int tail_ptrs_fft_hi;
+	unsigned int tail_ptrs_fft_lo;
+	unsigned int depth_log0_offset;
+	unsigned int depth_log1_offset;
+	unsigned int qman_group_func;
+	unsigned int hi_mode;
+	unsigned int pmon_ctrl_a;
+	unsigned int pmon_ctrl_b;
+	unsigned int pmon_ctrl_c;
+};
+
+/* Structure holding registry addresses for PF */
+static const struct acc200_registry_addr pf_reg_addr = {
+	.dma_ring_dl5g_hi = HWPfDmaFec5GdlDescBaseHiRegVf,
+	.dma_ring_dl5g_lo = HWPfDmaFec5GdlDescBaseLoRegVf,
+	.dma_ring_ul5g_hi = HWPfDmaFec5GulDescBaseHiRegVf,
+	.dma_ring_ul5g_lo = HWPfDmaFec5GulDescBaseLoRegVf,
+	.dma_ring_dl4g_hi = HWPfDmaFec4GdlDescBaseHiRegVf,
+	.dma_ring_dl4g_lo = HWPfDmaFec4GdlDescBaseLoRegVf,
+	.dma_ring_ul4g_hi = HWPfDmaFec4GulDescBaseHiRegVf,
+	.dma_ring_ul4g_lo = HWPfDmaFec4GulDescBaseLoRegVf,
+	.dma_ring_fft_hi = HWPDmaFftDescBaseHiRegVf,
+	.dma_ring_fft_lo = HWPDmaFftDescBaseLoRegVf,
+	.ring_size = HWPfQmgrRingSizeVf,
+	.info_ring_hi = HWPfHiInfoRingBaseHiRegPf,
+	.info_ring_lo = HWPfHiInfoRingBaseLoRegPf,
+	.info_ring_en = HWPfHiInfoRingIntWrEnRegPf,
+	.info_ring_ptr = HWPfHiInfoRingPointerRegPf,
+	.tail_ptrs_dl5g_hi = HWPfDmaFec5GdlRespPtrHiRegVf,
+	.tail_ptrs_dl5g_lo = HWPfDmaFec5GdlRespPtrLoRegVf,
+	.tail_ptrs_ul5g_hi = HWPfDmaFec5GulRespPtrHiRegVf,
+	.tail_ptrs_ul5g_lo = HWPfDmaFec5GulRespPtrLoRegVf,
+	.tail_ptrs_dl4g_hi = HWPfDmaFec4GdlRespPtrHiRegVf,
+	.tail_ptrs_dl4g_lo = HWPfDmaFec4GdlRespPtrLoRegVf,
+	.tail_ptrs_ul4g_hi = HWPfDmaFec4GulRespPtrHiRegVf,
+	.tail_ptrs_ul4g_lo = HWPfDmaFec4GulRespPtrLoRegVf,
+	.tail_ptrs_fft_hi = HWPDmaFftRespPtrHiRegVf,
+	.tail_ptrs_fft_lo = HWPDmaFftRespPtrLoRegVf,
+	.depth_log0_offset = HWPfQmgrGrpDepthLog20Vf,
+	.depth_log1_offset = HWPfQmgrGrpDepthLog21Vf,
+	.qman_group_func = HWPfQmgrGrpFunction0,
+	.hi_mode = HWPfHiMsixVectorMapperPf,
+	.pmon_ctrl_a = HWPfPermonACntrlRegVf,
+	.pmon_ctrl_b = HWPfPermonBCntrlRegVf,
+	.pmon_ctrl_c = HWPfPermonCCntrlRegVf,
+};
+
+/* Structure holding registry addresses for VF */
+static const struct acc200_registry_addr vf_reg_addr = {
+	.dma_ring_dl5g_hi = HWVfDmaFec5GdlDescBaseHiRegVf,
+	.dma_ring_dl5g_lo = HWVfDmaFec5GdlDescBaseLoRegVf,
+	.dma_ring_ul5g_hi = HWVfDmaFec5GulDescBaseHiRegVf,
+	.dma_ring_ul5g_lo = HWVfDmaFec5GulDescBaseLoRegVf,
+	.dma_ring_dl4g_hi = HWVfDmaFec4GdlDescBaseHiRegVf,
+	.dma_ring_dl4g_lo = HWVfDmaFec4GdlDescBaseLoRegVf,
+	.dma_ring_ul4g_hi = HWVfDmaFec4GulDescBaseHiRegVf,
+	.dma_ring_ul4g_lo = HWVfDmaFec4GulDescBaseLoRegVf,
+	.dma_ring_fft_hi = HWVfDmaFftDescBaseHiRegVf,
+	.dma_ring_fft_lo = HWVfDmaFftDescBaseLoRegVf,
+	.ring_size = HWVfQmgrRingSizeVf,
+	.info_ring_hi = HWVfHiInfoRingBaseHiVf,
+	.info_ring_lo = HWVfHiInfoRingBaseLoVf,
+	.info_ring_en = HWVfHiInfoRingIntWrEnVf,
+	.info_ring_ptr = HWVfHiInfoRingPointerVf,
+	.tail_ptrs_dl5g_hi = HWVfDmaFec5GdlRespPtrHiRegVf,
+	.tail_ptrs_dl5g_lo = HWVfDmaFec5GdlRespPtrLoRegVf,
+	.tail_ptrs_ul5g_hi = HWVfDmaFec5GulRespPtrHiRegVf,
+	.tail_ptrs_ul5g_lo = HWVfDmaFec5GulRespPtrLoRegVf,
+	.tail_ptrs_dl4g_hi = HWVfDmaFec4GdlRespPtrHiRegVf,
+	.tail_ptrs_dl4g_lo = HWVfDmaFec4GdlRespPtrLoRegVf,
+	.tail_ptrs_ul4g_hi = HWVfDmaFec4GulRespPtrHiRegVf,
+	.tail_ptrs_ul4g_lo = HWVfDmaFec4GulRespPtrLoRegVf,
+	.tail_ptrs_fft_hi = HWVfDmaFftRespPtrHiRegVf,
+	.tail_ptrs_fft_lo = HWVfDmaFftRespPtrLoRegVf,
+	.depth_log0_offset = HWVfQmgrGrpDepthLog20Vf,
+	.depth_log1_offset = HWVfQmgrGrpDepthLog21Vf,
+	.qman_group_func = HWVfQmgrGrpFunction0Vf,
+	.hi_mode = HWVfHiMsixVectorMapperVf,
+	.pmon_ctrl_a = HWVfPmACntrlRegVf,
+	.pmon_ctrl_b = HWVfPmBCntrlRegVf,
+	.pmon_ctrl_c = HWVfPmCCntrlRegVf,
+};
+
 #endif /* _RTE_ACC200_PMD_H_ */
diff --git a/drivers/baseband/acc/acc200_vf_enum.h b/drivers/baseband/acc/acc200_vf_enum.h
new file mode 100644
index 0000000000..0d354208ab
--- /dev/null
+++ b/drivers/baseband/acc/acc200_vf_enum.h
@@ -0,0 +1,83 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Intel Corporation
+ */
+
+#ifndef ACC200_VF_ENUM_H
+#define ACC200_VF_ENUM_H
+
+/*
+ * ACC200 Register mapping on VF BAR0
+ * This is automatically generated from RDL, format may change with new RDL
+ */
+enum {
+	HWVfQmgrIngressAq             =  0x00000000,
+	HWVfHiVfToPfDbellVf           =  0x00000800,
+	HWVfHiPfToVfDbellVf           =  0x00000808,
+	HWVfHiInfoRingBaseLoVf        =  0x00000810,
+	HWVfHiInfoRingBaseHiVf        =  0x00000814,
+	HWVfHiInfoRingPointerVf       =  0x00000818,
+	HWVfHiInfoRingIntWrEnVf       =  0x00000820,
+	HWVfHiInfoRingPf2VfWrEnVf     =  0x00000824,
+	HWVfHiMsixVectorMapperVf      =  0x00000860,
+	HWVfDmaFec5GulDescBaseLoRegVf =  0x00000920,
+	HWVfDmaFec5GulDescBaseHiRegVf =  0x00000924,
+	HWVfDmaFec5GulRespPtrLoRegVf  =  0x00000928,
+	HWVfDmaFec5GulRespPtrHiRegVf  =  0x0000092C,
+	HWVfDmaFec5GdlDescBaseLoRegVf =  0x00000940,
+	HWVfDmaFec5GdlDescBaseHiRegVf =  0x00000944,
+	HWVfDmaFec5GdlRespPtrLoRegVf  =  0x00000948,
+	HWVfDmaFec5GdlRespPtrHiRegVf  =  0x0000094C,
+	HWVfDmaFec4GulDescBaseLoRegVf =  0x00000960,
+	HWVfDmaFec4GulDescBaseHiRegVf =  0x00000964,
+	HWVfDmaFec4GulRespPtrLoRegVf  =  0x00000968,
+	HWVfDmaFec4GulRespPtrHiRegVf  =  0x0000096C,
+	HWVfDmaFec4GdlDescBaseLoRegVf =  0x00000980,
+	HWVfDmaFec4GdlDescBaseHiRegVf =  0x00000984,
+	HWVfDmaFec4GdlRespPtrLoRegVf  =  0x00000988,
+	HWVfDmaFec4GdlRespPtrHiRegVf  =  0x0000098C,
+	HWVfDmaFftDescBaseLoRegVf     =  0x000009A0,
+	HWVfDmaFftDescBaseHiRegVf     =  0x000009A4,
+	HWVfDmaFftRespPtrLoRegVf      =  0x000009A8,
+	HWVfDmaFftRespPtrHiRegVf      =  0x000009AC,
+	HWVfQmgrAqResetVf             =  0x00000E00,
+	HWVfQmgrRingSizeVf            =  0x00000E04,
+	HWVfQmgrGrpDepthLog20Vf       =  0x00000E08,
+	HWVfQmgrGrpDepthLog21Vf       =  0x00000E0C,
+	HWVfQmgrGrpFunction0Vf        =  0x00000E10,
+	HWVfQmgrGrpFunction1Vf        =  0x00000E14,
+	HWVfPmACntrlRegVf             =  0x00000F40,
+	HWVfPmACountVf                =  0x00000F48,
+	HWVfPmAKCntLoVf               =  0x00000F50,
+	HWVfPmAKCntHiVf               =  0x00000F54,
+	HWVfPmADeltaCntLoVf           =  0x00000F60,
+	HWVfPmADeltaCntHiVf           =  0x00000F64,
+	HWVfPmBCntrlRegVf             =  0x00000F80,
+	HWVfPmBCountVf                =  0x00000F88,
+	HWVfPmBKCntLoVf               =  0x00000F90,
+	HWVfPmBKCntHiVf               =  0x00000F94,
+	HWVfPmBDeltaCntLoVf           =  0x00000FA0,
+	HWVfPmBDeltaCntHiVf           =  0x00000FA4,
+	HWVfPmCCntrlRegVf             =  0x00000FC0,
+	HWVfPmCCountVf                =  0x00000FC8,
+	HWVfPmCKCntLoVf               =  0x00000FD0,
+	HWVfPmCKCntHiVf               =  0x00000FD4,
+	HWVfPmCDeltaCntLoVf           =  0x00000FE0,
+	HWVfPmCDeltaCntHiVf           =  0x00000FE4
+};
+
+/* TIP VF Interrupt numbers */
+enum {
+	ACC200_VF_INT_QMGR_AQ_OVERFLOW = 0,
+	ACC200_VF_INT_DOORBELL_PF_2_VF = 1,
+	ACC200_VF_INT_ILLEGAL_FORMAT = 2,
+	ACC200_VF_INT_QMGR_DISABLED_ACCESS = 3,
+	ACC200_VF_INT_QMGR_AQ_OVERTHRESHOLD = 4,
+	ACC200_VF_INT_DMA_DL_DESC_IRQ = 5,
+	ACC200_VF_INT_DMA_UL_DESC_IRQ = 6,
+	ACC200_VF_INT_DMA_FFT_DESC_IRQ = 7,
+	ACC200_VF_INT_DMA_UL5G_DESC_IRQ = 8,
+	ACC200_VF_INT_DMA_DL5G_DESC_IRQ = 9,
+	ACC200_VF_INT_DMA_MLD_DESC_IRQ = 10,
+};
+
+#endif /* ACC200_VF_ENUM_H */
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 06/16] baseband/acc: add info get function for ACC200
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (4 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 05/16] baseband/acc: add HW register definitions " Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 07/16] baseband/acc: add queue configuration " Nicolas Chautru
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added support for info_get to allow to query the device.
Null capability exposed.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/acc200_pmd.h     |   1 +
 drivers/baseband/acc/rte_acc200_pmd.c | 231 ++++++++++++++++++++++++++
 2 files changed, 232 insertions(+)

diff --git a/drivers/baseband/acc/acc200_pmd.h b/drivers/baseband/acc/acc200_pmd.h
index acead1d17c..587b6f6d5b 100644
--- a/drivers/baseband/acc/acc200_pmd.h
+++ b/drivers/baseband/acc/acc200_pmd.h
@@ -8,6 +8,7 @@
 #include "acc_common.h"
 #include "acc200_pf_enum.h"
 #include "acc200_vf_enum.h"
+#include "rte_acc200_cfg.h"
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index c59cad1d26..09d879fe5f 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -29,6 +29,189 @@ RTE_LOG_REGISTER_DEFAULT(acc200_logtype, DEBUG);
 RTE_LOG_REGISTER_DEFAULT(acc200_logtype, NOTICE);
 #endif
 
+/* Calculate the offset of the enqueue register. */
+static inline uint32_t
+queue_offset(bool pf_device, uint8_t vf_id, uint8_t qgrp_id, uint16_t aq_id)
+{
+	if (pf_device)
+		return ((vf_id << 12) + (qgrp_id << 7) + (aq_id << 3) +
+				HWPfQmgrIngressAq);
+	else
+		return ((qgrp_id << 7) + (aq_id << 3) +
+				HWVfQmgrIngressAq);
+}
+
+enum {UL_4G = 0, UL_5G, DL_4G, DL_5G, FFT, NUM_ACC};
+
+/* Return the queue topology for a Queue Group Index. */
+static inline void
+qtopFromAcc(struct rte_acc_queue_topology **qtop, int acc_enum, struct rte_acc_conf *acc_conf)
+{
+	struct rte_acc_queue_topology *p_qtop;
+	p_qtop = NULL;
+
+	switch (acc_enum) {
+	case UL_4G:
+		p_qtop = &(acc_conf->q_ul_4g);
+		break;
+	case UL_5G:
+		p_qtop = &(acc_conf->q_ul_5g);
+		break;
+	case DL_4G:
+		p_qtop = &(acc_conf->q_dl_4g);
+		break;
+	case DL_5G:
+		p_qtop = &(acc_conf->q_dl_5g);
+		break;
+	case FFT:
+		p_qtop = &(acc_conf->q_fft);
+		break;
+	default:
+		/* NOTREACHED. */
+		rte_bbdev_log(ERR, "Unexpected error evaluating %s using %d", __func__, acc_enum);
+		break;
+	}
+	*qtop = p_qtop;
+}
+
+static void
+initQTop(struct rte_acc_conf *acc_conf)
+{
+	acc_conf->q_ul_4g.num_aqs_per_groups = 0;
+	acc_conf->q_ul_4g.num_qgroups = 0;
+	acc_conf->q_ul_4g.first_qgroup_index = -1;
+	acc_conf->q_ul_5g.num_aqs_per_groups = 0;
+	acc_conf->q_ul_5g.num_qgroups = 0;
+	acc_conf->q_ul_5g.first_qgroup_index = -1;
+	acc_conf->q_dl_4g.num_aqs_per_groups = 0;
+	acc_conf->q_dl_4g.num_qgroups = 0;
+	acc_conf->q_dl_4g.first_qgroup_index = -1;
+	acc_conf->q_dl_5g.num_aqs_per_groups = 0;
+	acc_conf->q_dl_5g.num_qgroups = 0;
+	acc_conf->q_dl_5g.first_qgroup_index = -1;
+	acc_conf->q_fft.num_aqs_per_groups = 0;
+	acc_conf->q_fft.num_qgroups = 0;
+	acc_conf->q_fft.first_qgroup_index = -1;
+}
+
+static inline void
+updateQtop(uint8_t acc, uint8_t qg, struct rte_acc_conf *acc_conf, struct acc_device *d) {
+	uint32_t reg;
+	struct rte_acc_queue_topology *q_top = NULL;
+	uint16_t aq;
+
+	qtopFromAcc(&q_top, acc, acc_conf);
+	if (unlikely(q_top == NULL))
+		return;
+	q_top->num_qgroups++;
+	if (q_top->first_qgroup_index == -1) {
+		q_top->first_qgroup_index = qg;
+		/* Can be optimized to assume all are enabled by default. */
+		reg = acc_reg_read(d, queue_offset(d->pf_device, 0, qg, ACC200_NUM_AQS - 1));
+		if (reg & ACC_QUEUE_ENABLE) {
+			q_top->num_aqs_per_groups = ACC200_NUM_AQS;
+			return;
+		}
+		q_top->num_aqs_per_groups = 0;
+		for (aq = 0; aq < ACC200_NUM_AQS; aq++) {
+			reg = acc_reg_read(d, queue_offset(d->pf_device, 0, qg, aq));
+			if (reg & ACC_QUEUE_ENABLE)
+				q_top->num_aqs_per_groups++;
+		}
+	}
+}
+
+/* Fetch configuration enabled for the PF/VF using MMIO Read (slow). */
+static inline void
+fetch_acc200_config(struct rte_bbdev *dev)
+{
+	struct acc_device *d = dev->data->dev_private;
+	struct rte_acc_conf *acc_conf = &d->acc_conf;
+	const struct acc200_registry_addr *reg_addr;
+	uint8_t acc, qg;
+	uint32_t reg_aq, reg_len0, reg_len1, reg0, reg1;
+	uint32_t reg_mode, idx;
+	struct rte_acc_queue_topology *q_top = NULL;
+	int qman_func_id[ACC200_NUM_ACCS] = {ACC_ACCMAP_0, ACC_ACCMAP_1,
+			ACC_ACCMAP_2, ACC_ACCMAP_3, ACC_ACCMAP_4};
+
+	/* No need to retrieve the configuration is already done. */
+	if (d->configured)
+		return;
+
+	/* Choose correct registry addresses for the device type. */
+	if (d->pf_device)
+		reg_addr = &pf_reg_addr;
+	else
+		reg_addr = &vf_reg_addr;
+
+	d->ddr_size = 0;
+
+	/* Single VF Bundle by VF. */
+	acc_conf->num_vf_bundles = 1;
+	initQTop(acc_conf);
+
+	reg0 = acc_reg_read(d, reg_addr->qman_group_func);
+	reg1 = acc_reg_read(d, reg_addr->qman_group_func + 4);
+	for (qg = 0; qg < ACC200_NUM_QGRPS; qg++) {
+		reg_aq = acc_reg_read(d, queue_offset(d->pf_device, 0, qg, 0));
+		if (reg_aq & ACC_QUEUE_ENABLE) {
+			if (qg < ACC_NUM_QGRPS_PER_WORD)
+				idx = (reg0 >> (qg * 4)) & 0x7;
+			else
+				idx = (reg1 >> ((qg -
+					ACC_NUM_QGRPS_PER_WORD) * 4)) & 0x7;
+			if (idx < ACC200_NUM_ACCS) {
+				acc = qman_func_id[idx];
+				updateQtop(acc, qg, acc_conf, d);
+			}
+		}
+	}
+
+	/* Check the depth of the AQs. */
+	reg_len0 = acc_reg_read(d, reg_addr->depth_log0_offset);
+	reg_len1 = acc_reg_read(d, reg_addr->depth_log1_offset);
+	for (acc = 0; acc < NUM_ACC; acc++) {
+		qtopFromAcc(&q_top, acc, acc_conf);
+		if (q_top->first_qgroup_index < ACC_NUM_QGRPS_PER_WORD)
+			q_top->aq_depth_log2 = (reg_len0 >> (q_top->first_qgroup_index * 4)) & 0xF;
+		else
+			q_top->aq_depth_log2 = (reg_len1 >> ((q_top->first_qgroup_index -
+					ACC_NUM_QGRPS_PER_WORD) * 4)) & 0xF;
+	}
+
+	/* Read PF mode. */
+	if (d->pf_device) {
+		reg_mode = acc_reg_read(d, HWPfHiPfMode);
+		acc_conf->pf_mode_en = (reg_mode == ACC_PF_VAL) ? 1 : 0;
+	} else {
+		reg_mode = acc_reg_read(d, reg_addr->hi_mode);
+		acc_conf->pf_mode_en = reg_mode & 1;
+	}
+
+	rte_bbdev_log_debug(
+			"%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u AQ %u %u %u %u %u Len %u %u %u %u %u\n",
+			(d->pf_device) ? "PF" : "VF",
+			(acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG",
+			(acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",
+			acc_conf->q_ul_4g.num_qgroups,
+			acc_conf->q_dl_4g.num_qgroups,
+			acc_conf->q_ul_5g.num_qgroups,
+			acc_conf->q_dl_5g.num_qgroups,
+			acc_conf->q_fft.num_qgroups,
+			acc_conf->q_ul_4g.num_aqs_per_groups,
+			acc_conf->q_dl_4g.num_aqs_per_groups,
+			acc_conf->q_ul_5g.num_aqs_per_groups,
+			acc_conf->q_dl_5g.num_aqs_per_groups,
+			acc_conf->q_fft.num_aqs_per_groups,
+			acc_conf->q_ul_4g.aq_depth_log2,
+			acc_conf->q_dl_4g.aq_depth_log2,
+			acc_conf->q_ul_5g.aq_depth_log2,
+			acc_conf->q_dl_5g.aq_depth_log2,
+			acc_conf->q_fft.aq_depth_log2);
+}
+
+/* Free memory used for software rings. */
 static int
 acc200_dev_close(struct rte_bbdev *dev)
 {
@@ -38,9 +221,57 @@ acc200_dev_close(struct rte_bbdev *dev)
 	return 0;
 }
 
+/* Get ACC200 device info. */
+static void
+acc200_dev_info_get(struct rte_bbdev *dev,
+		struct rte_bbdev_driver_info *dev_info)
+{
+	struct acc_device *d = dev->data->dev_private;
+	int i;
+	static const struct rte_bbdev_op_cap bbdev_capabilities[] = {
+		RTE_BBDEV_END_OF_CAPABILITIES_LIST()
+	};
+
+	static struct rte_bbdev_queue_conf default_queue_conf;
+	default_queue_conf.socket = dev->data->socket_id;
+	default_queue_conf.queue_size = ACC_MAX_QUEUE_DEPTH;
+
+	dev_info->driver_name = dev->device->driver->name;
+
+	/* Read and save the populated config from ACC200 registers. */
+	fetch_acc200_config(dev);
+
+	/* Exposed number of queues. */
+	dev_info->num_queues[RTE_BBDEV_OP_NONE] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_TURBO_DEC] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_FFT] = 0;
+	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = 0;
+	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = 0;
+	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = 0;
+	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = 0;
+	dev_info->queue_priority[RTE_BBDEV_OP_FFT] = 0;
+	dev_info->max_num_queues = 0;
+	for (i = RTE_BBDEV_OP_NONE; i <= RTE_BBDEV_OP_FFT; i++)
+		dev_info->max_num_queues += dev_info->num_queues[i];
+	dev_info->queue_size_lim = ACC_MAX_QUEUE_DEPTH;
+	dev_info->hardware_accelerated = true;
+	dev_info->max_dl_queue_priority =
+			d->acc_conf.q_dl_4g.num_qgroups - 1;
+	dev_info->max_ul_queue_priority =
+			d->acc_conf.q_ul_4g.num_qgroups - 1;
+	dev_info->default_queue_conf = default_queue_conf;
+	dev_info->cpu_flag_reqs = NULL;
+	dev_info->min_alignment = 1;
+	dev_info->capabilities = bbdev_capabilities;
+	dev_info->harq_buffer_size = 0;
+}
 
 static const struct rte_bbdev_ops acc200_bbdev_ops = {
 	.close = acc200_dev_close,
+	.info_get = acc200_dev_info_get,
 };
 
 /* ACC200 PCI PF address map. */
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 07/16] baseband/acc: add queue configuration for ACC200
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (5 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 06/16] baseband/acc: add info get function " Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 08/16] baseband/acc: add LDPC processing functions Nicolas Chautru
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added function to create and configure queues for the
device.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/acc_common.h     |   1 +
 drivers/baseband/acc/rte_acc200_pmd.c | 391 +++++++++++++++++++++++++-
 2 files changed, 391 insertions(+), 1 deletion(-)

diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index f7ef4f8fcb..80c6637290 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -100,6 +100,7 @@
 #define ACC_LIMIT_DL_MUX_BITS          534
 #define ACC_NUM_QGRPS_PER_WORD         8
 #define ACC_MAX_NUM_QGRPS              32
+#define ACC_RING_SIZE_GRANULARITY      64
 
 /* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */
 #define ACC_N_ZC_1 66 /* N = 66 Zc for BG 1 */
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 09d879fe5f..dafcafda60 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -211,16 +211,401 @@ fetch_acc200_config(struct rte_bbdev *dev)
 			acc_conf->q_fft.aq_depth_log2);
 }
 
+/* Allocate 64MB memory used for all software rings. */
+static int
+acc200_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
+{
+	uint32_t phys_low, phys_high, value;
+	struct acc_device *d = dev->data->dev_private;
+	const struct acc200_registry_addr *reg_addr;
+	int ret;
+
+	if (d->pf_device && !d->acc_conf.pf_mode_en) {
+		rte_bbdev_log(NOTICE,
+				"%s has PF mode disabled. This PF can't be used.",
+				dev->data->name);
+		return -ENODEV;
+	}
+	if (!d->pf_device && d->acc_conf.pf_mode_en) {
+		rte_bbdev_log(NOTICE,
+				"%s has PF mode enabled. This VF can't be used.",
+				dev->data->name);
+		return -ENODEV;
+	}
+
+	alloc_sw_rings_min_mem(dev, d, num_queues, socket_id);
+
+	/* If minimal memory space approach failed, then allocate
+	 * the 2 * 64MB block for the sw rings.
+	 */
+	if (d->sw_rings == NULL)
+		alloc_2x64mb_sw_rings_mem(dev, d, socket_id);
+
+	if (d->sw_rings == NULL) {
+		rte_bbdev_log(NOTICE,
+				"Failure allocating sw_rings memory");
+		return -ENOMEM;
+	}
+
+	/* Configure ACC200 with the base address for DMA descriptor rings.
+	 * Same descriptor rings used for UL and DL DMA Engines.
+	 * Note : Assuming only VF0 bundle is used for PF mode.
+	 */
+	phys_high = (uint32_t)(d->sw_rings_iova >> 32);
+	phys_low  = (uint32_t)(d->sw_rings_iova & ~(ACC_SIZE_64MBYTE-1));
+
+	/* Choose correct registry addresses for the device type. */
+	if (d->pf_device)
+		reg_addr = &pf_reg_addr;
+	else
+		reg_addr = &vf_reg_addr;
+
+	/* Read the populated cfg from ACC200 registers. */
+	fetch_acc200_config(dev);
+
+	/* Start Pmon */
+	for (value = 0; value <= 2; value++) {
+		acc_reg_write(d, reg_addr->pmon_ctrl_a, value);
+		acc_reg_write(d, reg_addr->pmon_ctrl_b, value);
+		acc_reg_write(d, reg_addr->pmon_ctrl_c, value);
+	}
+
+	/* Release AXI from PF. */
+	if (d->pf_device)
+		acc_reg_write(d, HWPfDmaAxiControl, 1);
+
+	acc_reg_write(d, reg_addr->dma_ring_ul5g_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_ul5g_lo, phys_low);
+	acc_reg_write(d, reg_addr->dma_ring_dl5g_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_dl5g_lo, phys_low);
+	acc_reg_write(d, reg_addr->dma_ring_ul4g_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_ul4g_lo, phys_low);
+	acc_reg_write(d, reg_addr->dma_ring_dl4g_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_dl4g_lo, phys_low);
+	acc_reg_write(d, reg_addr->dma_ring_fft_hi, phys_high);
+	acc_reg_write(d, reg_addr->dma_ring_fft_lo, phys_low);
+	/*
+	 * Configure Ring Size to the max queue ring size
+	 * (used for wrapping purpose).
+	 */
+	value = log2_basic(d->sw_ring_size / ACC_RING_SIZE_GRANULARITY);
+	acc_reg_write(d, reg_addr->ring_size, value);
+
+	/* Configure tail pointer for use when SDONE enabled. */
+	if (d->tail_ptrs == NULL)
+		d->tail_ptrs = rte_zmalloc_socket(
+				dev->device->driver->name,
+				ACC200_NUM_QGRPS * ACC200_NUM_AQS * sizeof(uint32_t),
+				RTE_CACHE_LINE_SIZE, socket_id);
+	if (d->tail_ptrs == NULL) {
+		rte_bbdev_log(ERR, "Failed to allocate tail ptr for %s:%u",
+				dev->device->driver->name,
+				dev->data->dev_id);
+		ret = -ENOMEM;
+		goto free_sw_rings;
+	}
+	d->tail_ptr_iova = rte_malloc_virt2iova(d->tail_ptrs);
+
+	phys_high = (uint32_t)(d->tail_ptr_iova >> 32);
+	phys_low  = (uint32_t)(d->tail_ptr_iova);
+	acc_reg_write(d, reg_addr->tail_ptrs_ul5g_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_ul5g_lo, phys_low);
+	acc_reg_write(d, reg_addr->tail_ptrs_dl5g_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_dl5g_lo, phys_low);
+	acc_reg_write(d, reg_addr->tail_ptrs_ul4g_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_ul4g_lo, phys_low);
+	acc_reg_write(d, reg_addr->tail_ptrs_dl4g_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_dl4g_lo, phys_low);
+	acc_reg_write(d, reg_addr->tail_ptrs_fft_hi, phys_high);
+	acc_reg_write(d, reg_addr->tail_ptrs_fft_lo, phys_low);
+
+	if (d->harq_layout == NULL)
+		d->harq_layout = rte_zmalloc_socket("HARQ Layout",
+				ACC_HARQ_LAYOUT * sizeof(*d->harq_layout),
+				RTE_CACHE_LINE_SIZE, dev->data->socket_id);
+	if (d->harq_layout == NULL) {
+		rte_bbdev_log(ERR, "Failed to allocate harq_layout for %s:%u",
+				dev->device->driver->name,
+				dev->data->dev_id);
+		ret = -ENOMEM;
+		goto free_tail_ptrs;
+	}
+
+	/* Mark as configured properly */
+	d->configured = true;
+
+	rte_bbdev_log_debug(
+			"ACC200 (%s) configured  sw_rings = %p, sw_rings_iova = %#"
+			PRIx64, dev->data->name, d->sw_rings, d->sw_rings_iova);
+	return 0;
+
+free_tail_ptrs:
+	rte_free(d->tail_ptrs);
+	d->tail_ptrs = NULL;
+free_sw_rings:
+	rte_free(d->sw_rings_base);
+	d->sw_rings = NULL;
+
+	return ret;
+}
+
 /* Free memory used for software rings. */
 static int
 acc200_dev_close(struct rte_bbdev *dev)
 {
-	RTE_SET_USED(dev);
+	struct acc_device *d = dev->data->dev_private;
+	if (d->sw_rings_base != NULL) {
+		rte_free(d->tail_ptrs);
+		rte_free(d->sw_rings_base);
+		rte_free(d->harq_layout);
+		d->sw_rings_base = NULL;
+		d->tail_ptrs = NULL;
+		d->harq_layout = NULL;
+	}
 	/* Ensure all in flight HW transactions are completed. */
 	usleep(ACC_LONG_WAIT);
 	return 0;
 }
 
+/**
+ * Report a ACC200 queue index which is free.
+ * Return 0 to 16k for a valid queue_idx or -1 when no queue is available.
+ * Note : Only supporting VF0 Bundle for PF mode.
+ */
+static int
+acc200_find_free_queue_idx(struct rte_bbdev *dev,
+		const struct rte_bbdev_queue_conf *conf)
+{
+	struct acc_device *d = dev->data->dev_private;
+	int op_2_acc[6] = {0, UL_4G, DL_4G, UL_5G, DL_5G, FFT};
+	int acc = op_2_acc[conf->op_type];
+	struct rte_acc_queue_topology *qtop = NULL;
+	uint16_t group_idx;
+	uint64_t aq_idx;
+
+	qtopFromAcc(&qtop, acc, &(d->acc_conf));
+	if (qtop == NULL)
+		return -1;
+	/* Identify matching QGroup Index which are sorted in priority order. */
+	group_idx = qtop->first_qgroup_index + conf->priority;
+	if (group_idx >= ACC200_NUM_QGRPS ||
+			conf->priority >= qtop->num_qgroups) {
+		rte_bbdev_log(INFO, "Invalid Priority on %s, priority %u",
+				dev->data->name, conf->priority);
+		return -1;
+	}
+	/* Find a free AQ_idx.  */
+	for (aq_idx = 0; aq_idx < qtop->num_aqs_per_groups; aq_idx++) {
+		if (((d->q_assigned_bit_map[group_idx] >> aq_idx) & 0x1) == 0) {
+			/* Mark the Queue as assigned. */
+			d->q_assigned_bit_map[group_idx] |= (1 << aq_idx);
+			/* Report the AQ Index. */
+			return (group_idx << ACC200_GRP_ID_SHIFT) + aq_idx;
+		}
+	}
+	rte_bbdev_log(INFO, "Failed to find free queue on %s, priority %u",
+			dev->data->name, conf->priority);
+	return -1;
+}
+
+/* Setup ACC200 queue. */
+static int
+acc200_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
+		const struct rte_bbdev_queue_conf *conf)
+{
+	struct acc_device *d = dev->data->dev_private;
+	struct acc_queue *q;
+	int16_t q_idx;
+	int ret;
+
+	if (d == NULL) {
+		rte_bbdev_log(ERR, "Undefined device");
+		return -ENODEV;
+	}
+	/* Allocate the queue data structure. */
+	q = rte_zmalloc_socket(dev->device->driver->name, sizeof(*q),
+			RTE_CACHE_LINE_SIZE, conf->socket);
+	if (q == NULL) {
+		rte_bbdev_log(ERR, "Failed to allocate queue memory");
+		return -ENOMEM;
+	}
+
+	q->d = d;
+	q->ring_addr = RTE_PTR_ADD(d->sw_rings, (d->sw_ring_size * queue_id));
+	q->ring_addr_iova = d->sw_rings_iova + (d->sw_ring_size * queue_id);
+
+	/* Prepare the Ring with default descriptor format. */
+	union acc_dma_desc *desc = NULL;
+	unsigned int desc_idx, b_idx;
+	int fcw_len = (conf->op_type == RTE_BBDEV_OP_LDPC_ENC ?
+		ACC_FCW_LE_BLEN : (conf->op_type == RTE_BBDEV_OP_TURBO_DEC ?
+		ACC_FCW_TD_BLEN : (conf->op_type == RTE_BBDEV_OP_LDPC_DEC ?
+		ACC_FCW_LD_BLEN : ACC_FCW_FFT_BLEN)));
+
+	for (desc_idx = 0; desc_idx < d->sw_ring_max_depth; desc_idx++) {
+		desc = q->ring_addr + desc_idx;
+		desc->req.word0 = ACC_DMA_DESC_TYPE;
+		desc->req.word1 = 0; /**< Timestamp. */
+		desc->req.word2 = 0;
+		desc->req.word3 = 0;
+		uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
+		desc->req.data_ptrs[0].blen = fcw_len;
+		desc->req.data_ptrs[0].blkid = ACC_DMA_BLKID_FCW;
+		desc->req.data_ptrs[0].last = 0;
+		desc->req.data_ptrs[0].dma_ext = 0;
+		for (b_idx = 1; b_idx < ACC_DMA_MAX_NUM_POINTERS - 1;
+				b_idx++) {
+			desc->req.data_ptrs[b_idx].blkid = ACC_DMA_BLKID_IN;
+			desc->req.data_ptrs[b_idx].last = 1;
+			desc->req.data_ptrs[b_idx].dma_ext = 0;
+			b_idx++;
+			desc->req.data_ptrs[b_idx].blkid =
+					ACC_DMA_BLKID_OUT_ENC;
+			desc->req.data_ptrs[b_idx].last = 1;
+			desc->req.data_ptrs[b_idx].dma_ext = 0;
+		}
+		/* Preset some fields of LDPC FCW. */
+		desc->req.fcw_ld.FCWversion = ACC_FCW_VER;
+		desc->req.fcw_ld.gain_i = 1;
+		desc->req.fcw_ld.gain_h = 1;
+	}
+
+	q->lb_in = rte_zmalloc_socket(dev->device->driver->name,
+			RTE_CACHE_LINE_SIZE,
+			RTE_CACHE_LINE_SIZE, conf->socket);
+	if (q->lb_in == NULL) {
+		rte_bbdev_log(ERR, "Failed to allocate lb_in memory");
+		ret = -ENOMEM;
+		goto free_q;
+	}
+	q->lb_in_addr_iova = rte_malloc_virt2iova(q->lb_in);
+	q->lb_out = rte_zmalloc_socket(dev->device->driver->name,
+			RTE_CACHE_LINE_SIZE,
+			RTE_CACHE_LINE_SIZE, conf->socket);
+	if (q->lb_out == NULL) {
+		rte_bbdev_log(ERR, "Failed to allocate lb_out memory");
+		ret = -ENOMEM;
+		goto free_lb_in;
+	}
+	q->lb_out_addr_iova = rte_malloc_virt2iova(q->lb_out);
+	q->companion_ring_addr = rte_zmalloc_socket(dev->device->driver->name,
+			d->sw_ring_max_depth * sizeof(*q->companion_ring_addr),
+			RTE_CACHE_LINE_SIZE, conf->socket);
+	if (q->companion_ring_addr == NULL) {
+		rte_bbdev_log(ERR, "Failed to allocate companion_ring memory");
+		ret = -ENOMEM;
+		goto free_lb_out;
+	}
+
+	/*
+	 * Software queue ring wraps synchronously with the HW when it reaches
+	 * the boundary of the maximum allocated queue size, no matter what the
+	 * sw queue size is. This wrapping is guarded by setting the wrap_mask
+	 * to represent the maximum queue size as allocated at the time when
+	 * the device has been setup (in configure()).
+	 *
+	 * The queue depth is set to the queue size value (conf->queue_size).
+	 * This limits the occupancy of the queue at any point of time, so that
+	 * the queue does not get swamped with enqueue requests.
+	 */
+	q->sw_ring_depth = conf->queue_size;
+	q->sw_ring_wrap_mask = d->sw_ring_max_depth - 1;
+
+	q->op_type = conf->op_type;
+
+	q_idx = acc200_find_free_queue_idx(dev, conf);
+	if (q_idx == -1) {
+		ret = -EINVAL;
+		goto free_companion_ring_addr;
+	}
+
+	q->qgrp_id = (q_idx >> ACC200_GRP_ID_SHIFT) & 0xF;
+	q->vf_id = (q_idx >> ACC200_VF_ID_SHIFT)  & 0x3F;
+	q->aq_id = q_idx & 0xF;
+	q->aq_depth = 0;
+	if (conf->op_type ==  RTE_BBDEV_OP_TURBO_DEC)
+		q->aq_depth = (1 << d->acc_conf.q_ul_4g.aq_depth_log2);
+	else if (conf->op_type ==  RTE_BBDEV_OP_TURBO_ENC)
+		q->aq_depth = (1 << d->acc_conf.q_dl_4g.aq_depth_log2);
+	else if (conf->op_type ==  RTE_BBDEV_OP_LDPC_DEC)
+		q->aq_depth = (1 << d->acc_conf.q_ul_5g.aq_depth_log2);
+	else if (conf->op_type ==  RTE_BBDEV_OP_LDPC_ENC)
+		q->aq_depth = (1 << d->acc_conf.q_dl_5g.aq_depth_log2);
+	else if (conf->op_type ==  RTE_BBDEV_OP_FFT)
+		q->aq_depth = (1 << d->acc_conf.q_fft.aq_depth_log2);
+
+	q->mmio_reg_enqueue = RTE_PTR_ADD(d->mmio_base,
+			queue_offset(d->pf_device,
+					q->vf_id, q->qgrp_id, q->aq_id));
+
+	rte_bbdev_log_debug(
+			"Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u, aq_depth=%u, mmio_reg_enqueue=%p base %p\n",
+			dev->data->dev_id, queue_id, q->qgrp_id, q->vf_id,
+			q->aq_id, q->aq_depth, q->mmio_reg_enqueue,
+			d->mmio_base);
+
+	dev->data->queues[queue_id].queue_private = q;
+	return 0;
+
+free_companion_ring_addr:
+	rte_free(q->companion_ring_addr);
+	q->companion_ring_addr = NULL;
+free_lb_out:
+	rte_free(q->lb_out);
+	q->lb_out = NULL;
+free_lb_in:
+	rte_free(q->lb_in);
+	q->lb_in = NULL;
+free_q:
+	rte_free(q);
+	q = NULL;
+
+	return ret;
+}
+
+/* Stop ACC200 queue and clear counters. */
+static int
+acc200_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
+{
+	struct acc_queue *q;
+	q = dev->data->queues[queue_id].queue_private;
+	rte_bbdev_log(INFO, "Queue Stop %d H/T/D %d %d %x OpType %d",
+			queue_id, q->sw_ring_head, q->sw_ring_tail,
+			q->sw_ring_depth, q->op_type);
+	/* ignore all operations in flight and clear counters */
+	q->sw_ring_tail = q->sw_ring_head;
+	q->aq_enqueued = 0;
+	q->aq_dequeued = 0;
+	dev->data->queues[queue_id].queue_stats.enqueued_count = 0;
+	dev->data->queues[queue_id].queue_stats.dequeued_count = 0;
+	dev->data->queues[queue_id].queue_stats.enqueue_err_count = 0;
+	dev->data->queues[queue_id].queue_stats.dequeue_err_count = 0;
+	dev->data->queues[queue_id].queue_stats.enqueue_warn_count = 0;
+	dev->data->queues[queue_id].queue_stats.dequeue_warn_count = 0;
+	return 0;
+}
+
+/* Release ACC200 queue. */
+static int
+acc200_queue_release(struct rte_bbdev *dev, uint16_t q_id)
+{
+	struct acc_device *d = dev->data->dev_private;
+	struct acc_queue *q = dev->data->queues[q_id].queue_private;
+
+	if (q != NULL) {
+		/* Mark the Queue as un-assigned. */
+		d->q_assigned_bit_map[q->qgrp_id] &= (~0ULL - (uint64_t) (1 << q->aq_id));
+		rte_free(q->companion_ring_addr);
+		rte_free(q->lb_in);
+		rte_free(q->lb_out);
+		rte_free(q);
+		dev->data->queues[q_id].queue_private = NULL;
+	}
+
+	return 0;
+}
+
 /* Get ACC200 device info. */
 static void
 acc200_dev_info_get(struct rte_bbdev *dev,
@@ -270,8 +655,12 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 }
 
 static const struct rte_bbdev_ops acc200_bbdev_ops = {
+	.setup_queues = acc200_setup_queues,
 	.close = acc200_dev_close,
 	.info_get = acc200_dev_info_get,
+	.queue_setup = acc200_queue_setup,
+	.queue_release = acc200_queue_release,
+	.queue_stop = acc200_queue_stop,
 };
 
 /* ACC200 PCI PF address map. */
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 08/16] baseband/acc: add LDPC processing functions
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (6 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 07/16] baseband/acc: add queue configuration " Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 09/16] baseband/acc: add LTE " Nicolas Chautru
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added LDPC encode and decode processing functions.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/acc_common.h     |   84 ++
 drivers/baseband/acc/rte_acc200_pmd.c | 1320 ++++++++++++++++++++++++-
 2 files changed, 1399 insertions(+), 5 deletions(-)

diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index 80c6637290..35bd628e6c 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -1302,4 +1302,88 @@ acc_pci_remove(struct rte_pci_device *pci_dev)
 	return 0;
 }
 
+static inline void
+acc_enqueue_status(struct rte_bbdev_queue_data *q_data,
+		enum rte_bbdev_enqueue_status status)
+{
+	q_data->enqueue_status = status;
+	q_data->queue_stats.enqueue_status_count[status]++;
+
+	rte_acc_log(WARNING, "Enqueue Status: %s %#"PRIx64"",
+			rte_bbdev_enqueue_status_str(status),
+			q_data->queue_stats.enqueue_status_count[status]);
+}
+
+static inline void
+acc_enqueue_invalid(struct rte_bbdev_queue_data *q_data)
+{
+	acc_enqueue_status(q_data, RTE_BBDEV_ENQ_STATUS_INVALID_OP);
+}
+
+static inline void
+acc_enqueue_ring_full(struct rte_bbdev_queue_data *q_data)
+{
+	acc_enqueue_status(q_data, RTE_BBDEV_ENQ_STATUS_RING_FULL);
+}
+
+static inline void
+acc_enqueue_queue_full(struct rte_bbdev_queue_data *q_data)
+{
+	acc_enqueue_status(q_data, RTE_BBDEV_ENQ_STATUS_QUEUE_FULL);
+}
+
+/* Number of available descriptor in ring to enqueue */
+static inline uint32_t
+acc_ring_avail_enq(struct acc_queue *q)
+{
+	return (q->sw_ring_depth - 1 + q->sw_ring_tail - q->sw_ring_head) & q->sw_ring_wrap_mask;
+}
+
+/* Number of available descriptor in ring to dequeue */
+static inline uint32_t
+acc_ring_avail_deq(struct acc_queue *q)
+{
+	return (q->sw_ring_depth + q->sw_ring_head - q->sw_ring_tail) & q->sw_ring_wrap_mask;
+}
+
+/* Check room in AQ for the enqueues batches into Qmgr */
+static inline int32_t
+acc_aq_avail(struct rte_bbdev_queue_data *q_data, uint16_t num_ops)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t aq_avail = q->aq_depth -
+			((q->aq_enqueued - q->aq_dequeued +
+			ACC_MAX_QUEUE_DEPTH) % ACC_MAX_QUEUE_DEPTH)
+			- (num_ops >> 7);
+	if (aq_avail <= 0)
+		acc_enqueue_queue_full(q_data);
+	return aq_avail;
+}
+
+/* Calculates number of CBs in processed encoder TB based on 'r' and input
+ * length.
+ */
+static inline uint8_t
+get_num_cbs_in_tb_ldpc_enc(struct rte_bbdev_op_ldpc_enc *ldpc_enc)
+{
+	uint8_t c, r, crc24_bits = 0;
+	uint16_t k = (ldpc_enc->basegraph == 1 ? 22 : 10) * ldpc_enc->z_c
+		- ldpc_enc->n_filler;
+	uint8_t cbs_in_tb = 0;
+	int32_t length;
+
+	length = ldpc_enc->input.length;
+	r = ldpc_enc->tb_params.r;
+	c = ldpc_enc->tb_params.c;
+	crc24_bits = 0;
+	if (check_bit(ldpc_enc->op_flags, RTE_BBDEV_LDPC_CRC_24B_ATTACH))
+		crc24_bits = 24;
+	while (length > 0 && r < c) {
+		length -= (k - crc24_bits) >> 3;
+		r++;
+		cbs_in_tb++;
+	}
+	return cbs_in_tb;
+}
+
 #endif /* _ACC_COMMON_H_ */
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index dafcafda60..049da53ac3 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -564,15 +564,51 @@ acc200_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
 	return ret;
 }
 
+static inline void
+acc200_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
+		uint16_t index)
+{
+	if (op == NULL)
+		return;
+	if (op_type == RTE_BBDEV_OP_LDPC_DEC)
+		rte_bbdev_log(INFO,
+			"  Op 5GUL %d %d %d %d %d %d %d %d %d %d %d %d",
+			index,
+			op->ldpc_dec.basegraph, op->ldpc_dec.z_c,
+			op->ldpc_dec.n_cb, op->ldpc_dec.q_m,
+			op->ldpc_dec.n_filler, op->ldpc_dec.cb_params.e,
+			op->ldpc_dec.op_flags, op->ldpc_dec.rv_index,
+			op->ldpc_dec.iter_max, op->ldpc_dec.iter_count,
+			op->ldpc_dec.harq_combined_input.length
+			);
+	else if (op_type == RTE_BBDEV_OP_LDPC_ENC) {
+		struct rte_bbdev_enc_op *op_dl = (struct rte_bbdev_enc_op *) op;
+		rte_bbdev_log(INFO,
+			"  Op 5GDL %d %d %d %d %d %d %d %d %d",
+			index,
+			op_dl->ldpc_enc.basegraph, op_dl->ldpc_enc.z_c,
+			op_dl->ldpc_enc.n_cb, op_dl->ldpc_enc.q_m,
+			op_dl->ldpc_enc.n_filler, op_dl->ldpc_enc.cb_params.e,
+			op_dl->ldpc_enc.op_flags, op_dl->ldpc_enc.rv_index
+			);
+	}
+}
+
 /* Stop ACC200 queue and clear counters. */
 static int
 acc200_queue_stop(struct rte_bbdev *dev, uint16_t queue_id)
 {
 	struct acc_queue *q;
+	struct rte_bbdev_dec_op *op;
+	uint16_t i;
 	q = dev->data->queues[queue_id].queue_private;
 	rte_bbdev_log(INFO, "Queue Stop %d H/T/D %d %d %x OpType %d",
 			queue_id, q->sw_ring_head, q->sw_ring_tail,
 			q->sw_ring_depth, q->op_type);
+	for (i = 0; i < q->sw_ring_depth; ++i) {
+		op = (q->ring_addr + i)->req.op_addr;
+		acc200_print_op(op, q->op_type, i);
+	}
 	/* ignore all operations in flight and clear counters */
 	q->sw_ring_tail = q->sw_ring_head;
 	q->aq_enqueued = 0;
@@ -614,6 +650,43 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 	struct acc_device *d = dev->data->dev_private;
 	int i;
 	static const struct rte_bbdev_op_cap bbdev_capabilities[] = {
+		{
+			.type   = RTE_BBDEV_OP_LDPC_ENC,
+			.cap.ldpc_enc = {
+				.capability_flags =
+					RTE_BBDEV_LDPC_RATE_MATCH |
+					RTE_BBDEV_LDPC_CRC_24B_ATTACH |
+					RTE_BBDEV_LDPC_INTERLEAVER_BYPASS,
+				.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_24B_CHECK |
+				RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP |
+				RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK |
+				RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK |
+				RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE |
+				RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE |
+				RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE |
+				RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS |
+				RTE_BBDEV_LDPC_DEC_SCATTER_GATHER |
+				RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION |
+				RTE_BBDEV_LDPC_LLR_COMPRESSION,
+			.llr_size = 8,
+			.llr_decimals = 1,
+			.num_buffers_src =
+					RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
+			.num_buffers_hard_out =
+					RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
+			.num_buffers_soft_out = 0,
+			}
+		},
 		RTE_BBDEV_END_OF_CAPABILITIES_LIST()
 	};
 
@@ -630,13 +703,15 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 	dev_info->num_queues[RTE_BBDEV_OP_NONE] = 0;
 	dev_info->num_queues[RTE_BBDEV_OP_TURBO_DEC] = 0;
 	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = 0;
-	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = 0;
-	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = d->acc_conf.q_ul_5g.num_aqs_per_groups *
+			d->acc_conf.q_ul_5g.num_qgroups;
+	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_aqs_per_groups *
+			d->acc_conf.q_dl_5g.num_qgroups;
 	dev_info->num_queues[RTE_BBDEV_OP_FFT] = 0;
 	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = 0;
 	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = 0;
-	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = 0;
-	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = 0;
+	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = d->acc_conf.q_ul_5g.num_qgroups;
+	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_FFT] = 0;
 	dev_info->max_num_queues = 0;
 	for (i = RTE_BBDEV_OP_NONE; i <= RTE_BBDEV_OP_FFT; i++)
@@ -679,13 +754,1248 @@ static struct rte_pci_id pci_id_acc200_vf_map[] = {
 	{.device_id = 0},
 };
 
-/* Initialization Function. */
+/* Fill in a frame control word for LDPC decoding. */
+static inline void
+acc200_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc_fcw_ld *fcw,
+		union acc_harq_layout_data *harq_layout)
+{
+	uint16_t harq_out_length, harq_in_length, ncb_p, k0_p, parity_offset;
+	uint32_t harq_index;
+	uint32_t l;
+
+	fcw->qm = op->ldpc_dec.q_m;
+	fcw->nfiller = op->ldpc_dec.n_filler;
+	fcw->BG = (op->ldpc_dec.basegraph - 1);
+	fcw->Zc = op->ldpc_dec.z_c;
+	fcw->ncb = op->ldpc_dec.n_cb;
+	fcw->k0 = get_k0(fcw->ncb, fcw->Zc, op->ldpc_dec.basegraph,
+			op->ldpc_dec.rv_index);
+	if (op->ldpc_dec.code_block_mode == RTE_BBDEV_CODE_BLOCK)
+		fcw->rm_e = op->ldpc_dec.cb_params.e;
+	else
+		fcw->rm_e = (op->ldpc_dec.tb_params.r <
+				op->ldpc_dec.tb_params.cab) ?
+						op->ldpc_dec.tb_params.ea :
+						op->ldpc_dec.tb_params.eb;
+
+	if (unlikely(check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE) &&
+			(op->ldpc_dec.harq_combined_input.length == 0))) {
+		rte_bbdev_log(WARNING, "Null HARQ input size provided");
+		/* Disable HARQ input in that case to carry forward. */
+		op->ldpc_dec.op_flags ^= RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE;
+	}
+	if (unlikely(fcw->rm_e == 0)) {
+		rte_bbdev_log(WARNING, "Null E input provided");
+		fcw->rm_e = 2;
+	}
+
+	fcw->hcin_en = check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE);
+	fcw->hcout_en = check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE);
+	fcw->crc_select = check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK);
+	fcw->bypass_dec = 0;
+	fcw->bypass_intlv = check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS);
+	if (op->ldpc_dec.q_m == 1) {
+		fcw->bypass_intlv = 1;
+		fcw->qm = 2;
+	}
+	fcw->hcin_decomp_mode = check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION);
+	fcw->hcout_comp_mode = check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION);
+	fcw->llr_pack_mode = check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_LLR_COMPRESSION);
+	harq_index = hq_index(op->ldpc_dec.harq_combined_output.offset);
+
+	if (fcw->hcin_en > 0) {
+		harq_in_length = op->ldpc_dec.harq_combined_input.length;
+		if (fcw->hcin_decomp_mode > 0)
+			harq_in_length = harq_in_length * 8 / 6;
+		harq_in_length = RTE_MIN(harq_in_length, op->ldpc_dec.n_cb
+				- op->ldpc_dec.n_filler);
+		harq_in_length = RTE_ALIGN_CEIL(harq_in_length, 64);
+		fcw->hcin_size0 = harq_in_length;
+		fcw->hcin_offset = 0;
+		fcw->hcin_size1 = 0;
+	} else {
+		fcw->hcin_size0 = 0;
+		fcw->hcin_offset = 0;
+		fcw->hcin_size1 = 0;
+	}
+
+	fcw->itmax = op->ldpc_dec.iter_max;
+	fcw->itstop = check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE);
+	fcw->cnu_algo = ACC_ALGO_MSA;
+	fcw->synd_precoder = fcw->itstop;
+	/*
+	 * These are all implicitly set:
+	 * fcw->synd_post = 0;
+	 * fcw->so_en = 0;
+	 * fcw->so_bypass_rm = 0;
+	 * fcw->so_bypass_intlv = 0;
+	 * fcw->dec_convllr = 0;
+	 * fcw->hcout_convllr = 0;
+	 * fcw->hcout_size1 = 0;
+	 * fcw->so_it = 0;
+	 * fcw->hcout_offset = 0;
+	 * fcw->negstop_th = 0;
+	 * fcw->negstop_it = 0;
+	 * fcw->negstop_en = 0;
+	 * fcw->gain_i = 1;
+	 * fcw->gain_h = 1;
+	 */
+	if (fcw->hcout_en > 0) {
+		parity_offset = (op->ldpc_dec.basegraph == 1 ? 20 : 8)
+			* op->ldpc_dec.z_c - op->ldpc_dec.n_filler;
+		k0_p = (fcw->k0 > parity_offset) ? fcw->k0 - op->ldpc_dec.n_filler : fcw->k0;
+		ncb_p = fcw->ncb - op->ldpc_dec.n_filler;
+		l = k0_p + fcw->rm_e;
+		harq_out_length = (uint16_t) fcw->hcin_size0;
+		harq_out_length = RTE_MIN(RTE_MAX(harq_out_length, l), ncb_p);
+		harq_out_length = RTE_ALIGN_CEIL(harq_out_length, 64);
+		fcw->hcout_size0 = harq_out_length;
+		fcw->hcout_size1 = 0;
+		fcw->hcout_offset = 0;
+		harq_layout[harq_index].offset = fcw->hcout_offset;
+		harq_layout[harq_index].size0 = fcw->hcout_size0;
+	} else {
+		fcw->hcout_size0 = 0;
+		fcw->hcout_size1 = 0;
+		fcw->hcout_offset = 0;
+	}
+
+	fcw->tb_crc_select = 0;
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK))
+		fcw->tb_crc_select = 2;
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK))
+		fcw->tb_crc_select = 1;
+}
+
+static inline int
+acc200_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, struct acc_dma_req_desc *desc,
+		struct rte_mbuf **input, struct rte_mbuf *h_output,
+		uint32_t *in_offset, uint32_t *h_out_offset,
+		uint32_t *h_out_length, uint32_t *mbuf_total_left,
+		uint32_t *seg_total_left, struct acc_fcw_ld *fcw)
+{
+	struct rte_bbdev_op_ldpc_dec *dec = &op->ldpc_dec;
+	int next_triplet = 1; /* FCW already done. */
+	uint32_t input_length;
+	uint16_t output_length, crc24_overlap = 0;
+	uint16_t sys_cols, K, h_p_size, h_np_size;
+	bool h_comp = check_bit(dec->op_flags, RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION);
+
+	acc_header_init(desc);
+
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP))
+		crc24_overlap = 24;
+
+	/* Compute some LDPC BG lengths. */
+	input_length = fcw->rm_e;
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_LLR_COMPRESSION))
+		input_length = (input_length * 3 + 3) / 4;
+	sys_cols = (dec->basegraph == 1) ? 22 : 10;
+	K = sys_cols * dec->z_c;
+	output_length = K - dec->n_filler - crc24_overlap;
+
+	if (unlikely((*mbuf_total_left == 0) || (*mbuf_total_left < input_length))) {
+		rte_bbdev_log(ERR,
+				"Mismatch between mbuf length and included CB sizes: mbuf len %u, cb len %u",
+				*mbuf_total_left, input_length);
+		return -1;
+	}
+
+	next_triplet = acc_dma_fill_blk_type_in(desc, input,
+			in_offset, input_length,
+			seg_total_left, next_triplet,
+			check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_DEC_SCATTER_GATHER));
+
+	if (unlikely(next_triplet < 0)) {
+		rte_bbdev_log(ERR,
+				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
+				op);
+		return -1;
+	}
+
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE)) {
+		if (op->ldpc_dec.harq_combined_input.data == 0) {
+			rte_bbdev_log(ERR, "HARQ input is not defined");
+			return -1;
+		}
+		h_p_size = fcw->hcin_size0 + fcw->hcin_size1;
+		if (h_comp)
+			h_p_size = (h_p_size * 3 + 3) / 4;
+		if (op->ldpc_dec.harq_combined_input.data == 0) {
+			rte_bbdev_log(ERR, "HARQ input is not defined");
+			return -1;
+		}
+		acc_dma_fill_blk_type(
+				desc,
+				op->ldpc_dec.harq_combined_input.data,
+				op->ldpc_dec.harq_combined_input.offset,
+				h_p_size,
+				next_triplet,
+				ACC_DMA_BLKID_IN_HARQ);
+		next_triplet++;
+	}
+
+	desc->data_ptrs[next_triplet - 1].last = 1;
+	desc->m2dlen = next_triplet;
+	*mbuf_total_left -= input_length;
+
+	next_triplet = acc_dma_fill_blk_type(desc, h_output,
+			*h_out_offset, output_length >> 3, next_triplet,
+			ACC_DMA_BLKID_OUT_HARD);
+
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {
+		if (op->ldpc_dec.harq_combined_output.data == 0) {
+			rte_bbdev_log(ERR, "HARQ output is not defined");
+			return -1;
+		}
+
+		/* Pruned size of the HARQ. */
+		h_p_size = fcw->hcout_size0 + fcw->hcout_size1;
+		/* Non-Pruned size of the HARQ. */
+		h_np_size = fcw->hcout_offset > 0 ?
+				fcw->hcout_offset + fcw->hcout_size1 :
+				h_p_size;
+		if (h_comp) {
+			h_np_size = (h_np_size * 3 + 3) / 4;
+			h_p_size = (h_p_size * 3 + 3) / 4;
+		}
+		dec->harq_combined_output.length = h_np_size;
+		acc_dma_fill_blk_type(
+				desc,
+				dec->harq_combined_output.data,
+				dec->harq_combined_output.offset,
+				h_p_size,
+				next_triplet,
+				ACC_DMA_BLKID_OUT_HARQ);
+
+		next_triplet++;
+	}
+
+	*h_out_length = output_length >> 3;
+	dec->hard_output.length += *h_out_length;
+	*h_out_offset += *h_out_length;
+	desc->data_ptrs[next_triplet - 1].last = 1;
+	desc->d2mlen = next_triplet - desc->m2dlen;
+
+	desc->op_addr = op;
+
+	return 0;
+}
+
+static inline void
+acc200_dma_desc_ld_update(struct rte_bbdev_dec_op *op,
+		struct acc_dma_req_desc *desc,
+		struct rte_mbuf *input, struct rte_mbuf *h_output,
+		uint32_t *in_offset, uint32_t *h_out_offset,
+		uint32_t *h_out_length,
+		union acc_harq_layout_data *harq_layout)
+{
+	int next_triplet = 1; /* FCW already done. */
+	desc->data_ptrs[next_triplet].address = rte_pktmbuf_iova_offset(input, *in_offset);
+	next_triplet++;
+
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE)) {
+		struct rte_bbdev_op_data hi = op->ldpc_dec.harq_combined_input;
+		desc->data_ptrs[next_triplet].address =
+				rte_pktmbuf_iova_offset(hi.data, hi.offset);
+		next_triplet++;
+	}
+
+	desc->data_ptrs[next_triplet].address =
+			rte_pktmbuf_iova_offset(h_output, *h_out_offset);
+	*h_out_length = desc->data_ptrs[next_triplet].blen;
+	next_triplet++;
+
+	if (check_bit(op->ldpc_dec.op_flags,
+				RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {
+		/* Adjust based on previous operation. */
+		struct rte_bbdev_dec_op *prev_op = desc->op_addr;
+		op->ldpc_dec.harq_combined_output.length =
+				prev_op->ldpc_dec.harq_combined_output.length;
+		uint32_t harq_idx = hq_index(op->ldpc_dec.harq_combined_output.offset);
+		uint32_t prev_harq_idx = hq_index(prev_op->ldpc_dec.harq_combined_output.offset);
+		harq_layout[harq_idx].val = harq_layout[prev_harq_idx].val;
+		struct rte_bbdev_op_data ho = op->ldpc_dec.harq_combined_output;
+		desc->data_ptrs[next_triplet].address =
+				rte_pktmbuf_iova_offset(ho.data, ho.offset);
+		next_triplet++;
+	}
+
+	op->ldpc_dec.hard_output.length += *h_out_length;
+	desc->op_addr = op;
+}
+
+/* Enqueue one encode operations for ACC200 device in CB mode
+ * multiplexed on the same descriptor.
+ */
+static inline int
+enqueue_ldpc_enc_n_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ops,
+		uint16_t total_enqueued_descs, int16_t num)
+{
+	union acc_dma_desc *desc = NULL;
+	uint32_t out_length;
+	struct rte_mbuf *output_head, *output;
+	int i, next_triplet;
+	uint16_t  in_length_in_bytes;
+	struct rte_bbdev_op_ldpc_enc *enc = &ops[0]->ldpc_enc;
+
+	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_descs)
+			& q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	acc_fcw_le_fill(ops[0], &desc->req.fcw_le, num, 0);
+
+	/** This could be done at polling. */
+	acc_header_init(&desc->req);
+	desc->req.numCBs = num;
+
+	in_length_in_bytes = ops[0]->ldpc_enc.input.data->data_len;
+	out_length = (enc->cb_params.e + 7) >> 3;
+	desc->req.m2dlen = 1 + num;
+	desc->req.d2mlen = num;
+	next_triplet = 1;
+
+	for (i = 0; i < num; i++) {
+		desc->req.data_ptrs[next_triplet].address =
+			rte_pktmbuf_iova_offset(ops[i]->ldpc_enc.input.data, 0);
+		desc->req.data_ptrs[next_triplet].blen = in_length_in_bytes;
+		next_triplet++;
+		desc->req.data_ptrs[next_triplet].address = rte_pktmbuf_iova_offset(
+				ops[i]->ldpc_enc.output.data, 0);
+		desc->req.data_ptrs[next_triplet].blen = out_length;
+		next_triplet++;
+		ops[i]->ldpc_enc.output.length = out_length;
+		output_head = output = ops[i]->ldpc_enc.output.data;
+		mbuf_append(output_head, output, out_length);
+		output->data_len = out_length;
+	}
+
+	desc->req.op_addr = ops[0];
+	/* Keep track of pointers even when multiplexed in single descriptor. */
+	struct acc_ptrs *context_ptrs = q->companion_ring_addr + desc_idx;
+	for (i = 0; i < num; i++)
+		context_ptrs->ptr[i].op_addr = ops[i];
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	rte_memdump(stderr, "FCW", &desc->req.fcw_le,
+			sizeof(desc->req.fcw_le) - 8);
+	rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+
+	/* Number of compatible CBs/ops successfully prepared to enqueue. */
+	return num;
+}
+
+/* Enqueue one encode operations for ACC200 device for a partial TB
+ * all codes blocks have same configuration multiplexed on the same descriptor.
+ */
+static inline void
+enqueue_ldpc_enc_part_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
+		uint16_t total_enqueued_descs, int16_t num_cbs, uint32_t e,
+		uint16_t in_len_B, uint32_t out_len_B, uint32_t *in_offset,
+		uint32_t *out_offset)
+{
+
+	union acc_dma_desc *desc = NULL;
+	struct rte_mbuf *output_head, *output;
+	int i, next_triplet;
+	struct rte_bbdev_op_ldpc_enc *enc = &op->ldpc_enc;
+
+
+	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_descs) & q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	acc_fcw_le_fill(op, &desc->req.fcw_le, num_cbs, e);
+
+	/** This could be done at polling. */
+	acc_header_init(&desc->req);
+	desc->req.numCBs = num_cbs;
+
+	desc->req.m2dlen = 1 + num_cbs;
+	desc->req.d2mlen = num_cbs;
+	next_triplet = 1;
+
+	for (i = 0; i < num_cbs; i++) {
+		desc->req.data_ptrs[next_triplet].address = rte_pktmbuf_iova_offset(
+				enc->input.data, *in_offset);
+		*in_offset += in_len_B;
+		desc->req.data_ptrs[next_triplet].blen = in_len_B;
+		next_triplet++;
+		desc->req.data_ptrs[next_triplet].address = rte_pktmbuf_iova_offset(
+				enc->output.data, *out_offset);
+		*out_offset += out_len_B;
+		desc->req.data_ptrs[next_triplet].blen = out_len_B;
+		next_triplet++;
+		enc->output.length += out_len_B;
+		output_head = output = enc->output.data;
+		mbuf_append(output_head, output, out_len_B);
+	}
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	rte_memdump(stderr, "FCW", &desc->req.fcw_le,
+			sizeof(desc->req.fcw_le) - 8);
+	rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+
+}
+
+/* Enqueue one encode operations for ACC200 device in TB mode.
+ * returns the number of descs used.
+ */
+static inline int
+enqueue_ldpc_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
+		uint16_t enq_descs, uint8_t cbs_in_tb)
+{
+	uint8_t num_a, num_b;
+	uint16_t desc_idx, input_len_B, return_descs;
+	uint8_t r = op->ldpc_enc.tb_params.r;
+	uint8_t cab =  op->ldpc_enc.tb_params.cab;
+	union acc_dma_desc *desc;
+	uint16_t init_enq_descs = enq_descs;
+	uint32_t in_offset = 0, out_offset = 0;
+
+	input_len_B = ((op->ldpc_enc.basegraph == 1 ? 22 : 10) * op->ldpc_enc.z_c) >> 3;
+
+	if (check_bit(op->ldpc_enc.op_flags, RTE_BBDEV_LDPC_CRC_24B_ATTACH))
+		input_len_B -= 3;
+
+	if (r < cab) {
+		num_a = cab - r;
+		num_b = cbs_in_tb - cab;
+	} else {
+		num_a = 0;
+		num_b = cbs_in_tb - r;
+	}
+
+	while (num_a > 0) {
+		uint32_t e = op->ldpc_enc.tb_params.ea;
+		uint32_t out_len_B = (e + 7) >> 3;
+		uint8_t enq = RTE_MIN(num_a, ACC_MUX_5GDL_DESC);
+		num_a -= enq;
+		enqueue_ldpc_enc_part_tb(q, op, enq_descs, enq, e, input_len_B,
+				out_len_B, &in_offset, &out_offset);
+		enq_descs++;
+	}
+	while (num_b > 0) {
+		uint32_t e = op->ldpc_enc.tb_params.eb;
+		uint32_t out_len_B = (e + 7) >> 3;
+		uint8_t enq = RTE_MIN(num_b, ACC_MUX_5GDL_DESC);
+		num_b -= enq;
+		enqueue_ldpc_enc_part_tb(q, op, enq_descs, enq, e, input_len_B,
+				out_len_B, &in_offset, &out_offset);
+		enq_descs++;
+	}
+
+	return_descs = enq_descs - init_enq_descs;
+	/* Keep total number of CBs in first TB. */
+	desc_idx = ((q->sw_ring_head + init_enq_descs)
+			& q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	desc->req.cbs_in_tb = return_descs; /** Actual number of descriptors. */
+	desc->req.op_addr = op;
+
+	/* Set SDone on last CB descriptor for TB mode. */
+	desc_idx = ((q->sw_ring_head + enq_descs - 1)
+			& q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+	desc->req.op_addr = op;
+	return return_descs;
+}
+
+/** Enqueue one decode operations for ACC200 device in CB mode. */
+static inline int
+enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
+		uint16_t total_enqueued_cbs, bool same_op)
+{
+	int ret, hq_len;
+	union acc_dma_desc *desc;
+	uint16_t desc_idx;
+	struct rte_mbuf *input, *h_output_head, *h_output;
+	uint32_t in_offset, h_out_offset, mbuf_total_left, h_out_length = 0;
+	union acc_harq_layout_data *harq_layout;
+
+	if (op->ldpc_dec.cb_params.e == 0)
+		return -EINVAL;
+
+	desc_idx = ((q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+
+	input = op->ldpc_dec.input.data;
+	h_output_head = h_output = op->ldpc_dec.hard_output.data;
+	in_offset = op->ldpc_dec.input.offset;
+	h_out_offset = op->ldpc_dec.hard_output.offset;
+	mbuf_total_left = op->ldpc_dec.input.length;
+	harq_layout = q->d->harq_layout;
+
+	if (same_op) {
+		union acc_dma_desc *prev_desc;
+		desc_idx = ((q->sw_ring_head + total_enqueued_cbs - 1) & q->sw_ring_wrap_mask);
+		prev_desc = q->ring_addr + desc_idx;
+		uint8_t *prev_ptr = (uint8_t *) prev_desc;
+		uint8_t *new_ptr = (uint8_t *) desc;
+		/* Copy first 4 words and BDESCs. */
+		rte_memcpy(new_ptr, prev_ptr, ACC_5GUL_SIZE_0);
+		rte_memcpy(new_ptr + ACC_5GUL_OFFSET_0,
+				prev_ptr + ACC_5GUL_OFFSET_0,
+				ACC_5GUL_SIZE_1);
+		desc->req.op_addr = prev_desc->req.op_addr;
+		/* Copy FCW. */
+		rte_memcpy(new_ptr + ACC_DESC_FCW_OFFSET,
+				prev_ptr + ACC_DESC_FCW_OFFSET,
+				ACC_FCW_LD_BLEN);
+		acc200_dma_desc_ld_update(op, &desc->req, input, h_output,
+				&in_offset, &h_out_offset,
+				&h_out_length, harq_layout);
+	} else {
+		struct acc_fcw_ld *fcw;
+		uint32_t seg_total_left;
+		fcw = &desc->req.fcw_ld;
+		acc200_fcw_ld_fill(op, fcw, harq_layout);
+
+		/* Special handling when using mbuf or not. */
+		if (check_bit(op->ldpc_dec.op_flags,
+			RTE_BBDEV_LDPC_DEC_SCATTER_GATHER))
+			seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
+		else
+			seg_total_left = fcw->rm_e;
+
+		ret = acc200_dma_desc_ld_fill(op, &desc->req, &input, h_output,
+				&in_offset, &h_out_offset,
+				&h_out_length, &mbuf_total_left,
+				&seg_total_left, fcw);
+		if (unlikely(ret < 0))
+			return ret;
+	}
+
+	/* Hard output. */
+	mbuf_append(h_output_head, h_output, h_out_length);
+	if (op->ldpc_dec.harq_combined_output.length > 0) {
+		/* Push the HARQ output into host memory. */
+		struct rte_mbuf *hq_output_head, *hq_output;
+		hq_output_head = op->ldpc_dec.harq_combined_output.data;
+		hq_output = op->ldpc_dec.harq_combined_output.data;
+		hq_len = op->ldpc_dec.harq_combined_output.length;
+		if (unlikely(!mbuf_append(hq_output_head, hq_output, hq_len))) {
+			rte_bbdev_log(ERR, "HARQ output mbuf issue %d %d\n",
+					hq_output->buf_len,
+					hq_len);
+			return -1;
+		}
+	}
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	rte_memdump(stderr, "FCW", &desc->req.fcw_ld,
+			sizeof(desc->req.fcw_ld) - 8);
+	rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+
+	/* One CB (one op) was successfully prepared to enqueue. */
+	return 1;
+}
+
+
+/* Enqueue one decode operations for ACC200 device in TB mode. */
+static inline int
+enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
+		uint16_t total_enqueued_cbs, uint8_t cbs_in_tb)
+{
+	union acc_dma_desc *desc = NULL;
+	union acc_dma_desc *desc_first = NULL;
+	int ret;
+	uint8_t r, c;
+	uint32_t in_offset, h_out_offset, h_out_length, mbuf_total_left, seg_total_left;
+	struct rte_mbuf *input, *h_output_head, *h_output;
+	uint16_t current_enqueued_cbs = 0;
+	uint16_t sys_cols, trail_len = 0;
+
+	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	desc_first = desc;
+	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	union acc_harq_layout_data *harq_layout = q->d->harq_layout;
+	acc200_fcw_ld_fill(op, &desc->req.fcw_ld, harq_layout);
+
+	input = op->ldpc_dec.input.data;
+	h_output_head = h_output = op->ldpc_dec.hard_output.data;
+	in_offset = op->ldpc_dec.input.offset;
+	h_out_offset = op->ldpc_dec.hard_output.offset;
+	h_out_length = 0;
+	mbuf_total_left = op->ldpc_dec.input.length;
+	c = op->ldpc_dec.tb_params.c;
+	r = op->ldpc_dec.tb_params.r;
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK)) {
+		sys_cols = (op->ldpc_dec.basegraph == 1) ? 22 : 10;
+		trail_len = sys_cols * op->ldpc_dec.z_c -
+				op->ldpc_dec.n_filler - 24;
+	}
+
+	while (mbuf_total_left > 0 && r < c) {
+		if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_DEC_SCATTER_GATHER))
+			seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
+		else
+			seg_total_left = op->ldpc_dec.input.length;
+		/* Set up DMA descriptor. */
+		desc_idx = ((q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask);
+		desc = q->ring_addr + desc_idx;
+		fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
+		desc->req.data_ptrs[0].blen = ACC_FCW_LD_BLEN;
+		rte_memcpy(&desc->req.fcw_ld, &desc_first->req.fcw_ld, ACC_FCW_LD_BLEN);
+		desc->req.fcw_ld.tb_trailer_size = (c - r - 1) * trail_len;
+
+		ret = acc200_dma_desc_ld_fill(op, &desc->req, &input,
+				h_output, &in_offset, &h_out_offset,
+				&h_out_length,
+				&mbuf_total_left, &seg_total_left,
+				&desc->req.fcw_ld);
+
+		if (unlikely(ret < 0))
+			return ret;
+
+		/* Hard output. */
+		mbuf_append(h_output_head, h_output, h_out_length);
+
+		/* Set total number of CBs in TB. */
+		desc->req.cbs_in_tb = cbs_in_tb;
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+		rte_memdump(stderr, "FCW", &desc->req.fcw_td,
+				sizeof(desc->req.fcw_td) - 8);
+		rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+		if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_DEC_SCATTER_GATHER)
+				&& (seg_total_left == 0)) {
+			/* Go to the next mbuf. */
+			input = input->next;
+			in_offset = 0;
+			h_output = h_output->next;
+			h_out_offset = 0;
+		}
+		total_enqueued_cbs++;
+		current_enqueued_cbs++;
+		r++;
+	}
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	if (check_mbuf_total_left(mbuf_total_left) != 0)
+		return -EINVAL;
+#endif
+	/* Set SDone on last CB descriptor for TB mode. */
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+
+	return current_enqueued_cbs;
+}
+
+/** Enqueue encode operations for ACC200 device in CB mode. */
+static inline uint16_t
+acc200_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_enc_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t avail = acc_ring_avail_enq(q);
+	uint16_t i = 0;
+	union acc_dma_desc *desc;
+	int ret, desc_idx = 0;
+	int16_t enq, left = num;
+
+	while (left > 0) {
+		if (unlikely(avail < 1)) {
+			acc_enqueue_ring_full(q_data);
+			break;
+		}
+		avail--;
+		enq = RTE_MIN(left, ACC_MUX_5GDL_DESC);
+		enq = check_mux(&ops[i], enq);
+		ret = enqueue_ldpc_enc_n_op_cb(q, &ops[i], desc_idx, enq);
+		if (ret < 0) {
+			acc_enqueue_invalid(q_data);
+			break;
+		}
+		i += enq;
+		desc_idx++;
+		left = num - i;
+	}
+
+	if (unlikely(i == 0))
+		return 0; /* Nothing to enqueue. */
+
+	/* Set SDone in last CB in enqueued ops for CB mode. */
+	desc = q->ring_addr + ((q->sw_ring_head + desc_idx - 1) & q->sw_ring_wrap_mask);
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+
+	acc_dma_enqueue(q, desc_idx, &q_data->queue_stats);
+
+	/* Update stats. */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+
+	return i;
+}
+
+/* Enqueue LDPC encode operations for ACC200 device in TB mode. */
+static uint16_t
+acc200_enqueue_ldpc_enc_tb(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_enc_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t avail = acc_ring_avail_enq(q);
+	uint16_t i, enqueued_descs = 0;
+	uint8_t cbs_in_tb;
+	int descs_used;
+
+	for (i = 0; i < num; ++i) {
+		cbs_in_tb = get_num_cbs_in_tb_ldpc_enc(&ops[i]->ldpc_enc);
+		/* Check if there are available space for further processing. */
+		if (unlikely((avail - cbs_in_tb < 0) || (cbs_in_tb == 0))) {
+			acc_enqueue_ring_full(q_data);
+			break;
+		}
+
+		descs_used = enqueue_ldpc_enc_one_op_tb(q, ops[i], enqueued_descs, cbs_in_tb);
+		if (descs_used < 0) {
+			acc_enqueue_invalid(q_data);
+			break;
+		}
+		enqueued_descs += descs_used;
+		avail -= descs_used;
+	}
+	if (unlikely(enqueued_descs == 0))
+		return 0; /* Nothing to enqueue. */
+
+	acc_dma_enqueue(q, enqueued_descs, &q_data->queue_stats);
+
+	/* Update stats. */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+
+	return i;
+}
+
+/* Enqueue encode operations for ACC200 device. */
+static uint16_t
+acc200_enqueue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_enc_op **ops, uint16_t num)
+{
+	int32_t aq_avail = acc_aq_avail(q_data, num);
+	if (unlikely((aq_avail <= 0) || (num == 0)))
+		return 0;
+	if (ops[0]->ldpc_enc.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
+		return acc200_enqueue_ldpc_enc_tb(q_data, ops, num);
+	else
+		return acc200_enqueue_ldpc_enc_cb(q_data, ops, num);
+}
+
+/* Enqueue decode operations for ACC200 device in TB mode. */
+static uint16_t
+acc200_enqueue_ldpc_dec_tb(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_dec_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t avail = acc_ring_avail_enq(q);
+	uint16_t i, enqueued_cbs = 0;
+	uint8_t cbs_in_tb;
+	int ret;
+
+	for (i = 0; i < num; ++i) {
+		cbs_in_tb = get_num_cbs_in_tb_ldpc_dec(&ops[i]->ldpc_dec);
+		/* Check if there are available space for further processing. */
+		if (unlikely((avail - cbs_in_tb < 0) ||
+				(cbs_in_tb == 0)))
+			break;
+		avail -= cbs_in_tb;
+
+		ret = enqueue_ldpc_dec_one_op_tb(q, ops[i],
+				enqueued_cbs, cbs_in_tb);
+		if (ret <= 0)
+			break;
+		enqueued_cbs += ret;
+	}
+
+	acc_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
+
+	/* Update stats. */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+	return i;
+}
+
+/* Enqueue decode operations for ACC200 device in CB mode. */
+static uint16_t
+acc200_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_dec_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t avail = acc_ring_avail_enq(q);
+	uint16_t i;
+	union acc_dma_desc *desc;
+	int ret;
+	bool same_op = false;
+
+	for (i = 0; i < num; ++i) {
+		/* Check if there are available space for further processing. */
+		if (unlikely(avail < 1)) {
+			acc_enqueue_ring_full(q_data);
+			break;
+		}
+		avail -= 1;
+
+		rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d %d\n",
+			i, ops[i]->ldpc_dec.op_flags, ops[i]->ldpc_dec.rv_index,
+			ops[i]->ldpc_dec.iter_max, ops[i]->ldpc_dec.iter_count,
+			ops[i]->ldpc_dec.basegraph, ops[i]->ldpc_dec.z_c,
+			ops[i]->ldpc_dec.n_cb, ops[i]->ldpc_dec.q_m,
+			ops[i]->ldpc_dec.n_filler, ops[i]->ldpc_dec.cb_params.e,
+			same_op);
+		ret = enqueue_ldpc_dec_one_op_cb(q, ops[i], i, same_op);
+		if (ret < 0) {
+			acc_enqueue_invalid(q_data);
+			break;
+		}
+	}
+
+	if (unlikely(i == 0))
+		return 0; /* Nothing to enqueue. */
+
+	/* Set SDone in last CB in enqueued ops for CB mode. */
+	desc = q->ring_addr + ((q->sw_ring_head + i - 1) & q->sw_ring_wrap_mask);
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+
+	acc_dma_enqueue(q, i, &q_data->queue_stats);
+
+	/* Update stats. */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+	return i;
+}
+
+/* Enqueue decode operations for ACC200 device. */
+static uint16_t
+acc200_enqueue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_dec_op **ops, uint16_t num)
+{
+	int32_t aq_avail = acc_aq_avail(q_data, num);
+	if (unlikely((aq_avail <= 0) || (num == 0)))
+		return 0;
+	if (ops[0]->ldpc_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
+		return acc200_enqueue_ldpc_dec_tb(q_data, ops, num);
+	else
+		return acc200_enqueue_ldpc_dec_cb(q_data, ops, num);
+}
+
+
+/* Dequeue one encode operations from ACC200 device in CB mode. */
+static inline int
+dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
+		uint16_t *dequeued_ops, uint32_t *aq_dequeued, uint16_t *dequeued_descs)
+{
+	union acc_dma_desc *desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
+	struct rte_bbdev_enc_op *op;
+	int i;
+	struct acc_ptrs *context_ptrs;
+	int desc_idx = ((q->sw_ring_tail + *dequeued_descs) & q->sw_ring_wrap_mask);
+
+	desc = q->ring_addr + desc_idx;
+	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
+
+	/* Check fdone bit. */
+	if (!(atom_desc.rsp.val & ACC_FDONE))
+		return -1;
+
+	rsp.val = atom_desc.rsp.val;
+	rte_bbdev_log_debug("Resp. desc %p: %x", desc, rsp.val);
+
+	/* Dequeue. */
+	op = desc->req.op_addr;
+
+	/* Clearing status, it will be set based on response. */
+	op->status = 0;
+
+	op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
+	op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
+	op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
+
+	if (desc->req.last_desc_in_batch) {
+		(*aq_dequeued)++;
+		desc->req.last_desc_in_batch = 0;
+	}
+	desc->rsp.val = ACC_DMA_DESC_TYPE;
+	desc->rsp.add_info_0 = 0; /* Reserved bits. */
+	desc->rsp.add_info_1 = 0; /* Reserved bits. */
+
+	ref_op[0] = op;
+	context_ptrs = q->companion_ring_addr + desc_idx;
+	for (i = 1 ; i < desc->req.numCBs; i++)
+		ref_op[i] = context_ptrs->ptr[i].op_addr;
+
+	/* One op was successfully dequeued. */
+	(*dequeued_descs)++;
+	*dequeued_ops += desc->req.numCBs;
+	return desc->req.numCBs;
+}
+
+/* Dequeue one LDPC encode operations from ACC200 device in TB mode.
+ * That operation may cover multiple descriptors.
+ */
+static inline int
+dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
+		uint16_t *dequeued_ops, uint32_t *aq_dequeued,
+		uint16_t *dequeued_descs)
+{
+	union acc_dma_desc *desc, *last_desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
+	struct rte_bbdev_enc_op *op;
+	uint8_t i = 0;
+	uint16_t current_dequeued_descs = 0, descs_in_tb;
+
+	desc = q->ring_addr + ((q->sw_ring_tail + *dequeued_descs) & q->sw_ring_wrap_mask);
+	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
+
+	/* Check fdone bit. */
+	if (!(atom_desc.rsp.val & ACC_FDONE))
+		return -1;
+
+	/* Get number of CBs in dequeued TB. */
+	descs_in_tb = desc->req.cbs_in_tb;
+	/* Get last CB */
+	last_desc = q->ring_addr + ((q->sw_ring_tail + *dequeued_descs + descs_in_tb - 1)
+			& q->sw_ring_wrap_mask);
+	/* Check if last CB in TB is ready to dequeue (and thus
+	 * the whole TB) - checking sdone bit. If not return.
+	 */
+	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)last_desc, __ATOMIC_RELAXED);
+	if (!(atom_desc.rsp.val & ACC_SDONE))
+		return -1;
+
+	/* Dequeue. */
+	op = desc->req.op_addr;
+
+	/* Clearing status, it will be set based on response. */
+	op->status = 0;
+
+	while (i < descs_in_tb) {
+		desc = q->ring_addr + ((q->sw_ring_tail + *dequeued_descs) & q->sw_ring_wrap_mask);
+		atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
+		rsp.val = atom_desc.rsp.val;
+		rte_bbdev_log_debug("Resp. desc %p: %x", desc, rsp.val);
+
+		op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
+		op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
+		op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
+
+		if (desc->req.last_desc_in_batch) {
+			(*aq_dequeued)++;
+			desc->req.last_desc_in_batch = 0;
+		}
+		desc->rsp.val = ACC_DMA_DESC_TYPE;
+		desc->rsp.add_info_0 = 0;
+		desc->rsp.add_info_1 = 0;
+		(*dequeued_descs)++;
+		current_dequeued_descs++;
+		i++;
+	}
+
+	*ref_op = op;
+	(*dequeued_ops)++;
+	return current_dequeued_descs;
+}
+
+/* Dequeue one decode operation from ACC200 device in CB mode. */
+static inline int
+dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
+		struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
+		uint16_t dequeued_cbs, uint32_t *aq_dequeued)
+{
+	union acc_dma_desc *desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
+	struct rte_bbdev_dec_op *op;
+
+	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
+
+	/* Check fdone bit. */
+	if (!(atom_desc.rsp.val & ACC_FDONE))
+		return -1;
+
+	rsp.val = atom_desc.rsp.val;
+	rte_bbdev_log_debug("Resp. desc %p: %x\n", desc, rsp.val);
+
+	/* Dequeue. */
+	op = desc->req.op_addr;
+
+	/* Clearing status, it will be set based on response. */
+	op->status = 0;
+	op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
+	op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
+	op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
+	if (op->status != 0) {
+		/* These errors are not expected. */
+		q_data->queue_stats.dequeue_err_count++;
+	}
+
+	/* CRC invalid if error exists. */
+	if (!op->status)
+		op->status |= rsp.crc_status << RTE_BBDEV_CRC_ERROR;
+	op->turbo_dec.iter_count = (uint8_t) rsp.iter_cnt;
+	/* Check if this is the last desc in batch (Atomic Queue). */
+	if (desc->req.last_desc_in_batch) {
+		(*aq_dequeued)++;
+		desc->req.last_desc_in_batch = 0;
+	}
+	desc->rsp.val = ACC_DMA_DESC_TYPE;
+	desc->rsp.add_info_0 = 0;
+	desc->rsp.add_info_1 = 0;
+	*ref_op = op;
+
+	/* One CB (op) was successfully dequeued. */
+	return 1;
+}
+
+/* Dequeue one decode operations from ACC200 device in CB mode. */
+static inline int
+dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
+		struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
+		uint16_t dequeued_cbs, uint32_t *aq_dequeued)
+{
+	union acc_dma_desc *desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
+	struct rte_bbdev_dec_op *op;
+
+	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
+
+	/* Check fdone bit. */
+	if (!(atom_desc.rsp.val & ACC_FDONE))
+		return -1;
+
+	rsp.val = atom_desc.rsp.val;
+	rte_bbdev_log_debug("Resp. desc %p: %x %x %x\n", desc, rsp.val, desc->rsp.add_info_0,
+			desc->rsp.add_info_1);
+
+	/* Dequeue. */
+	op = desc->req.op_addr;
+
+	/* Clearing status, it will be set based on response. */
+	op->status = 0;
+	op->status |= rsp.input_err << RTE_BBDEV_DATA_ERROR;
+	op->status |= rsp.dma_err << RTE_BBDEV_DRV_ERROR;
+	op->status |= rsp.fcw_err << RTE_BBDEV_DRV_ERROR;
+	if (op->status != 0)
+		q_data->queue_stats.dequeue_err_count++;
+
+	op->status |= rsp.crc_status << RTE_BBDEV_CRC_ERROR;
+	if (op->ldpc_dec.hard_output.length > 0 && !rsp.synd_ok)
+		op->status |= 1 << RTE_BBDEV_SYNDROME_ERROR;
+
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK)  ||
+			check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK)) {
+		if (desc->rsp.add_info_1 != 0)
+			op->status |= 1 << RTE_BBDEV_CRC_ERROR;
+	}
+
+	op->ldpc_dec.iter_count = (uint8_t) rsp.iter_cnt;
+
+	/* Check if this is the last desc in batch (Atomic Queue). */
+	if (desc->req.last_desc_in_batch) {
+		(*aq_dequeued)++;
+		desc->req.last_desc_in_batch = 0;
+	}
+
+	desc->rsp.val = ACC_DMA_DESC_TYPE;
+	desc->rsp.add_info_0 = 0;
+	desc->rsp.add_info_1 = 0;
+
+	*ref_op = op;
+
+	/* One CB (op) was successfully dequeued. */
+	return 1;
+}
+
+/* Dequeue one decode operations from ACC200 device in TB mode. */
+static inline int
+dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
+		uint16_t dequeued_cbs, uint32_t *aq_dequeued)
+{
+	union acc_dma_desc *desc, *last_desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
+	struct rte_bbdev_dec_op *op;
+	uint8_t cbs_in_tb = 1, cb_idx = 0;
+	uint32_t tb_crc_check = 0;
+
+	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
+
+	/* Check fdone bit. */
+	if (!(atom_desc.rsp.val & ACC_FDONE))
+		return -1;
+
+	/* Dequeue. */
+	op = desc->req.op_addr;
+
+	/* Get number of CBs in dequeued TB. */
+	cbs_in_tb = desc->req.cbs_in_tb;
+	/* Get last CB. */
+	last_desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs + cbs_in_tb - 1)
+			& q->sw_ring_wrap_mask);
+	/* Check if last CB in TB is ready to dequeue (and thus the whole TB) - checking sdone bit.
+	 * If not return.
+	 */
+	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)last_desc, __ATOMIC_RELAXED);
+	if (!(atom_desc.rsp.val & ACC_SDONE))
+		return -1;
+
+	/* Clearing status, it will be set based on response. */
+	op->status = 0;
+
+	/* Read remaining CBs if exists. */
+	while (cb_idx < cbs_in_tb) {
+		desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+		atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
+		rsp.val = atom_desc.rsp.val;
+		rte_bbdev_log_debug("Resp. desc %p: %x %x %x", desc,
+				rsp.val, desc->rsp.add_info_0,
+				desc->rsp.add_info_1);
+
+		op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
+		op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
+		op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
+
+		if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK))
+			tb_crc_check ^= desc->rsp.add_info_1;
+
+		/* CRC invalid if error exists. */
+		if (!op->status)
+			op->status |= rsp.crc_status << RTE_BBDEV_CRC_ERROR;
+		op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
+				op->turbo_dec.iter_count);
+
+		/* Check if this is the last desc in batch (Atomic Queue). */
+		if (desc->req.last_desc_in_batch) {
+			(*aq_dequeued)++;
+			desc->req.last_desc_in_batch = 0;
+		}
+		desc->rsp.val = ACC_DMA_DESC_TYPE;
+		desc->rsp.add_info_0 = 0;
+		desc->rsp.add_info_1 = 0;
+		dequeued_cbs++;
+		cb_idx++;
+	}
+
+	if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK)) {
+		rte_bbdev_log_debug("TB-CRC Check %x\n", tb_crc_check);
+		if (tb_crc_check > 0)
+			op->status |= 1 << RTE_BBDEV_CRC_ERROR;
+	}
+
+	*ref_op = op;
+
+	return cb_idx;
+}
+
+/* Dequeue LDPC encode operations from ACC200 device. */
+static uint16_t
+acc200_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_enc_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	uint32_t avail = acc_ring_avail_deq(q);
+	uint32_t aq_dequeued = 0;
+	uint16_t i, dequeued_ops = 0, dequeued_descs = 0;
+	int ret, cbm;
+	struct rte_bbdev_enc_op *op;
+	if (avail == 0)
+		return 0;
+	op = (q->ring_addr + (q->sw_ring_tail & q->sw_ring_wrap_mask))->req.op_addr;
+	cbm = op->ldpc_enc.code_block_mode;
+
+	for (i = 0; i < avail; i++) {
+		if (cbm == RTE_BBDEV_TRANSPORT_BLOCK)
+			ret = dequeue_enc_one_op_tb(q, &ops[dequeued_ops],
+					&dequeued_ops, &aq_dequeued,
+					&dequeued_descs);
+		else
+			ret = dequeue_enc_one_op_cb(q, &ops[dequeued_ops],
+					&dequeued_ops, &aq_dequeued,
+					&dequeued_descs);
+		if (ret < 0)
+			break;
+		if (dequeued_ops >= num)
+			break;
+	}
+
+	q->aq_dequeued += aq_dequeued;
+	q->sw_ring_tail += dequeued_descs;
+
+	/* Update enqueue stats. */
+	q_data->queue_stats.dequeued_count += dequeued_ops;
+
+	return dequeued_ops;
+}
+
+/* Dequeue decode operations from ACC200 device. */
+static uint16_t
+acc200_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_dec_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	uint16_t dequeue_num;
+	uint32_t avail = acc_ring_avail_deq(q);
+	uint32_t aq_dequeued = 0;
+	uint16_t i;
+	uint16_t dequeued_cbs = 0;
+	struct rte_bbdev_dec_op *op;
+	int ret;
+
+	dequeue_num = RTE_MIN(avail, num);
+
+	for (i = 0; i < dequeue_num; ++i) {
+		op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
+			& q->sw_ring_wrap_mask))->req.op_addr;
+		if (op->ldpc_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
+			ret = dequeue_dec_one_op_tb(q, &ops[i], dequeued_cbs,
+					&aq_dequeued);
+		else
+			ret = dequeue_ldpc_dec_one_op_cb(
+					q_data, q, &ops[i], dequeued_cbs,
+					&aq_dequeued);
+
+		if (ret <= 0)
+			break;
+		dequeued_cbs += ret;
+	}
+
+	q->aq_dequeued += aq_dequeued;
+	q->sw_ring_tail += dequeued_cbs;
+
+	/* Update enqueue stats. */
+	q_data->queue_stats.dequeued_count += i;
+
+	return i;
+}
+
+/* Initialization Function */
 static void
 acc200_bbdev_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
 {
 	struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev->device);
 
 	dev->dev_ops = &acc200_bbdev_ops;
+	dev->enqueue_ldpc_enc_ops = acc200_enqueue_ldpc_enc;
+	dev->enqueue_ldpc_dec_ops = acc200_enqueue_ldpc_dec;
+	dev->dequeue_ldpc_enc_ops = acc200_dequeue_ldpc_enc;
+	dev->dequeue_ldpc_dec_ops = acc200_dequeue_ldpc_dec;
 
 	((struct acc_device *) dev->data->dev_private)->pf_device =
 			!strcmp(drv->driver.name,
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 09/16] baseband/acc: add LTE processing functions
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (7 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 08/16] baseband/acc: add LDPC processing functions Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 10/16] baseband/acc: add support for FFT operations Nicolas Chautru
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added functions and capability for 4G FEC

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/rte_acc200_pmd.c | 767 +++++++++++++++++++++++++-
 1 file changed, 762 insertions(+), 5 deletions(-)

diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 049da53ac3..f4720990c2 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -650,6 +650,46 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 	struct acc_device *d = dev->data->dev_private;
 	int i;
 	static const struct rte_bbdev_op_cap bbdev_capabilities[] = {
+		{
+			.type = RTE_BBDEV_OP_TURBO_DEC,
+			.cap.turbo_dec = {
+				.capability_flags =
+					RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE |
+					RTE_BBDEV_TURBO_CRC_TYPE_24B |
+					RTE_BBDEV_TURBO_EQUALIZER |
+					RTE_BBDEV_TURBO_SOFT_OUT_SATURATE |
+					RTE_BBDEV_TURBO_HALF_ITERATION_EVEN |
+					RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH |
+					RTE_BBDEV_TURBO_SOFT_OUTPUT |
+					RTE_BBDEV_TURBO_EARLY_TERMINATION |
+					RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN |
+					RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT |
+					RTE_BBDEV_TURBO_MAP_DEC |
+					RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP |
+					RTE_BBDEV_TURBO_DEC_SCATTER_GATHER,
+				.max_llr_modulus = INT8_MAX,
+				.num_buffers_src =
+						RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,
+				.num_buffers_hard_out =
+						RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,
+				.num_buffers_soft_out =
+						RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,
+			}
+		},
+		{
+			.type = RTE_BBDEV_OP_TURBO_ENC,
+			.cap.turbo_enc = {
+				.capability_flags =
+					RTE_BBDEV_TURBO_CRC_24B_ATTACH |
+					RTE_BBDEV_TURBO_RV_INDEX_BYPASS |
+					RTE_BBDEV_TURBO_RATE_MATCH |
+					RTE_BBDEV_TURBO_ENC_SCATTER_GATHER,
+				.num_buffers_src =
+						RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,
+				.num_buffers_dst =
+						RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,
+			}
+		},
 		{
 			.type   = RTE_BBDEV_OP_LDPC_ENC,
 			.cap.ldpc_enc = {
@@ -701,15 +741,17 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 
 	/* Exposed number of queues. */
 	dev_info->num_queues[RTE_BBDEV_OP_NONE] = 0;
-	dev_info->num_queues[RTE_BBDEV_OP_TURBO_DEC] = 0;
-	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_TURBO_DEC] = d->acc_conf.q_ul_4g.num_aqs_per_groups *
+			d->acc_conf.q_ul_4g.num_qgroups;
+	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = d->acc_conf.q_dl_4g.num_aqs_per_groups *
+			d->acc_conf.q_dl_4g.num_qgroups;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = d->acc_conf.q_ul_5g.num_aqs_per_groups *
 			d->acc_conf.q_ul_5g.num_qgroups;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_aqs_per_groups *
 			d->acc_conf.q_dl_5g.num_qgroups;
 	dev_info->num_queues[RTE_BBDEV_OP_FFT] = 0;
-	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = 0;
-	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = 0;
+	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = d->acc_conf.q_ul_4g.num_qgroups;
+	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = d->acc_conf.q_dl_4g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = d->acc_conf.q_ul_5g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_FFT] = 0;
@@ -754,6 +796,70 @@ static struct rte_pci_id pci_id_acc200_vf_map[] = {
 	{.device_id = 0},
 };
 
+/* Fill in a frame control word for turbo decoding. */
+static inline void
+acc200_fcw_td_fill(const struct rte_bbdev_dec_op *op, struct acc_fcw_td *fcw)
+{
+	fcw->fcw_ver = 1;
+	fcw->num_maps = ACC_FCW_TD_AUTOMAP;
+	fcw->bypass_sb_deint = !check_bit(op->turbo_dec.op_flags,
+			RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE);
+	if (op->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) {
+		/* FIXME for TB block */
+		fcw->k_pos = op->turbo_dec.tb_params.k_pos;
+		fcw->k_neg = op->turbo_dec.tb_params.k_neg;
+	} else {
+		fcw->k_pos = op->turbo_dec.cb_params.k;
+		fcw->k_neg = op->turbo_dec.cb_params.k;
+	}
+	fcw->c = 1;
+	fcw->c_neg = 1;
+	if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
+		fcw->soft_output_en = 1;
+		fcw->sw_soft_out_dis = 0;
+		fcw->sw_et_cont = check_bit(op->turbo_dec.op_flags,
+				RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH);
+		fcw->sw_soft_out_saturation = check_bit(op->turbo_dec.op_flags,
+				RTE_BBDEV_TURBO_SOFT_OUT_SATURATE);
+		if (check_bit(op->turbo_dec.op_flags,
+				RTE_BBDEV_TURBO_EQUALIZER)) {
+			fcw->bypass_teq = 0;
+			fcw->ea = op->turbo_dec.cb_params.e;
+			fcw->eb = op->turbo_dec.cb_params.e;
+			if (op->turbo_dec.rv_index == 0)
+				fcw->k0_start_col = ACC_FCW_TD_RVIDX_0;
+			else if (op->turbo_dec.rv_index == 1)
+				fcw->k0_start_col = ACC_FCW_TD_RVIDX_1;
+			else if (op->turbo_dec.rv_index == 2)
+				fcw->k0_start_col = ACC_FCW_TD_RVIDX_2;
+			else
+				fcw->k0_start_col = ACC_FCW_TD_RVIDX_3;
+		} else {
+			fcw->bypass_teq = 1;
+			fcw->eb = 64; /* avoid undefined value */
+		}
+	} else {
+		fcw->soft_output_en = 0;
+		fcw->sw_soft_out_dis = 1;
+		fcw->bypass_teq = 0;
+	}
+
+	fcw->code_block_mode = 1; /* FIXME */
+	fcw->turbo_crc_type = check_bit(op->turbo_dec.op_flags,
+			RTE_BBDEV_TURBO_CRC_TYPE_24B);
+
+	fcw->ext_td_cold_reg_en = 1;
+	fcw->raw_decoder_input_on = 0;
+	fcw->max_iter = RTE_MAX((uint8_t) op->turbo_dec.iter_max, 2);
+	fcw->min_iter = 2;
+	fcw->half_iter_on = !check_bit(op->turbo_dec.op_flags,
+			RTE_BBDEV_TURBO_HALF_ITERATION_EVEN);
+
+	fcw->early_stop_en = check_bit(op->turbo_dec.op_flags,
+			RTE_BBDEV_TURBO_EARLY_TERMINATION) & !fcw->soft_output_en;
+	fcw->ext_scale = 0xF;
+}
+
 /* Fill in a frame control word for LDPC decoding. */
 static inline void
 acc200_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc_fcw_ld *fcw,
@@ -877,7 +983,124 @@ acc200_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc_fcw_ld *fcw,
 }
 
 static inline int
-acc200_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, struct acc_dma_req_desc *desc,
+acc200_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
+		struct acc_dma_req_desc *desc, struct rte_mbuf **input,
+		struct rte_mbuf *h_output, struct rte_mbuf *s_output,
+		uint32_t *in_offset, uint32_t *h_out_offset,
+		uint32_t *s_out_offset, uint32_t *h_out_length,
+		uint32_t *s_out_length, uint32_t *mbuf_total_left,
+		uint32_t *seg_total_left, uint8_t r)
+{
+	int next_triplet = 1; /* FCW already done. */
+	uint16_t k;
+	uint16_t crc24_overlap = 0;
+	uint32_t e, kw;
+
+	desc->word0 = ACC_DMA_DESC_TYPE;
+	desc->word1 = 0; /**< Timestamp could be disabled. */
+	desc->word2 = 0;
+	desc->word3 = 0;
+	desc->numCBs = 1;
+
+	if (op->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) {
+		k = (r < op->turbo_dec.tb_params.c_neg)
+			? op->turbo_dec.tb_params.k_neg
+			: op->turbo_dec.tb_params.k_pos;
+		e = (r < op->turbo_dec.tb_params.cab)
+			? op->turbo_dec.tb_params.ea
+			: op->turbo_dec.tb_params.eb;
+	} else {
+		k = op->turbo_dec.cb_params.k;
+		e = op->turbo_dec.cb_params.e;
+	}
+
+	if ((op->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
+		&& !check_bit(op->turbo_dec.op_flags,
+		RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP))
+		crc24_overlap = 24;
+
+	/* Calculates circular buffer size.
+	 * According to 3gpp 36.212 section 5.1.4.2
+	 *   Kw = 3 * Kpi,
+	 * where:
+	 *   Kpi = nCol * nRow
+	 * where nCol is 32 and nRow can be calculated from:
+	 *   D =< nCol * nRow
+	 * where D is the size of each output from turbo encoder block (k + 4).
+	 */
+	kw = RTE_ALIGN_CEIL(k + 4, 32) * 3;
+
+	if (unlikely((*mbuf_total_left == 0) || (*mbuf_total_left < kw))) {
+		rte_bbdev_log(ERR,
+				"Mismatch between mbuf length and included CB sizes: mbuf len %u, cb len %u",
+				*mbuf_total_left, kw);
+		return -1;
+	}
+
+	next_triplet = acc_dma_fill_blk_type_in(desc, input, in_offset, kw,
+			seg_total_left, next_triplet,
+			check_bit(op->turbo_dec.op_flags,
+			RTE_BBDEV_TURBO_DEC_SCATTER_GATHER));
+	if (unlikely(next_triplet < 0)) {
+		rte_bbdev_log(ERR,
+				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
+				op);
+		return -1;
+	}
+	desc->data_ptrs[next_triplet - 1].last = 1;
+	desc->m2dlen = next_triplet;
+	*mbuf_total_left -= kw;
+	*h_out_length = ((k - crc24_overlap) >> 3);
+	next_triplet = acc_dma_fill_blk_type(
+			desc, h_output, *h_out_offset,
+			*h_out_length, next_triplet, ACC_DMA_BLKID_OUT_HARD);
+	if (unlikely(next_triplet < 0)) {
+		rte_bbdev_log(ERR,
+				"Mismatch between data to process and mbuf data length in bbdev_op: %p",
+				op);
+		return -1;
+	}
+
+	op->turbo_dec.hard_output.length += *h_out_length;
+	*h_out_offset += *h_out_length;
+
+	/* Soft output. */
+	if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
+		if (op->turbo_dec.soft_output.data == 0) {
+			rte_bbdev_log(ERR, "Soft output is not defined");
+			return -1;
+		}
+		if (check_bit(op->turbo_dec.op_flags,
+				RTE_BBDEV_TURBO_EQUALIZER))
+			*s_out_length = e;
+		else
+			*s_out_length = (k * 3) + 12;
+
+		next_triplet = acc_dma_fill_blk_type(desc, s_output,
+				*s_out_offset, *s_out_length, next_triplet,
+				ACC_DMA_BLKID_OUT_SOFT);
+		if (unlikely(next_triplet < 0)) {
+			rte_bbdev_log(ERR,
+					"Mismatch between data to process and mbuf data length in bbdev_op: %p",
+					op);
+			return -1;
+		}
+
+		op->turbo_dec.soft_output.length += *s_out_length;
+		*s_out_offset += *s_out_length;
+	}
+
+	desc->data_ptrs[next_triplet - 1].last = 1;
+	desc->d2mlen = next_triplet - desc->m2dlen;
+
+	desc->op_addr = op;
+
+	return 0;
+}
+
+static inline int
+acc200_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
+		struct acc_dma_req_desc *desc,
 		struct rte_mbuf **input, struct rte_mbuf *h_output,
 		uint32_t *in_offset, uint32_t *h_out_offset,
 		uint32_t *h_out_length, uint32_t *mbuf_total_left,
@@ -1035,6 +1258,47 @@ acc200_dma_desc_ld_update(struct rte_bbdev_dec_op *op,
 	desc->op_addr = op;
 }
 
+/* Enqueue one encode operations for ACC200 device in CB mode */
+static inline int
+enqueue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
+		uint16_t total_enqueued_cbs)
+{
+	union acc_dma_desc *desc = NULL;
+	int ret;
+	uint32_t in_offset, out_offset, out_length, mbuf_total_left, seg_total_left;
+	struct rte_mbuf *input, *output_head, *output;
+
+	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
+			& q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	acc_fcw_te_fill(op, &desc->req.fcw_te);
+
+	input = op->turbo_enc.input.data;
+	output_head = output = op->turbo_enc.output.data;
+	in_offset = op->turbo_enc.input.offset;
+	out_offset = op->turbo_enc.output.offset;
+	out_length = 0;
+	mbuf_total_left = op->turbo_enc.input.length;
+	seg_total_left = rte_pktmbuf_data_len(op->turbo_enc.input.data) - in_offset;
+
+	ret = acc_dma_desc_te_fill(op, &desc->req, &input, output,
+			&in_offset, &out_offset, &out_length, &mbuf_total_left,
+			&seg_total_left, 0);
+
+	if (unlikely(ret < 0))
+		return ret;
+
+	mbuf_append(output_head, output, out_length);
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	rte_memdump(stderr, "FCW", &desc->req.fcw_te,
+			sizeof(desc->req.fcw_te) - 8);
+	rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+	/* One CB (one op) was successfully prepared to enqueue */
+	return 1;
+}
+
 /* Enqueue one encode operations for ACC200 device in CB mode
  * multiplexed on the same descriptor.
  */
@@ -1147,6 +1411,78 @@ enqueue_ldpc_enc_part_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 
 }
 
+/* Enqueue one encode operations for ACC200 device in TB mode. */
+static inline int
+enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
+		uint16_t total_enqueued_cbs, uint8_t cbs_in_tb)
+{
+	union acc_dma_desc *desc = NULL;
+	int ret;
+	uint8_t r, c;
+	uint32_t in_offset, out_offset, out_length, mbuf_total_left,
+		seg_total_left;
+	struct rte_mbuf *input, *output_head, *output;
+	uint16_t current_enqueued_cbs = 0;
+
+	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
+			& q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	acc_fcw_te_fill(op, &desc->req.fcw_te);
+
+	input = op->turbo_enc.input.data;
+	output_head = output = op->turbo_enc.output.data;
+	in_offset = op->turbo_enc.input.offset;
+	out_offset = op->turbo_enc.output.offset;
+	out_length = 0;
+	mbuf_total_left = op->turbo_enc.input.length;
+
+	c = op->turbo_enc.tb_params.c;
+	r = op->turbo_enc.tb_params.r;
+
+	while (mbuf_total_left > 0 && r < c) {
+		seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
+		/* Set up DMA descriptor */
+		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
+				& q->sw_ring_wrap_mask);
+		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
+		desc->req.data_ptrs[0].blen = ACC_FCW_TE_BLEN;
+
+		ret = acc_dma_desc_te_fill(op, &desc->req, &input, output,
+				&in_offset, &out_offset, &out_length,
+				&mbuf_total_left, &seg_total_left, r);
+		if (unlikely(ret < 0))
+			return ret;
+		mbuf_append(output_head, output, out_length);
+
+		/* Set total number of CBs in TB */
+		desc->req.cbs_in_tb = cbs_in_tb;
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+		rte_memdump(stderr, "FCW", &desc->req.fcw_te,
+				sizeof(desc->req.fcw_te) - 8);
+		rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+
+		if (seg_total_left == 0) {
+			/* Go to the next mbuf */
+			input = input->next;
+			in_offset = 0;
+			output = output->next;
+			out_offset = 0;
+		}
+
+		total_enqueued_cbs++;
+		current_enqueued_cbs++;
+		r++;
+	}
+
+	/* Set SDone on last CB descriptor for TB mode. */
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+
+	return current_enqueued_cbs;
+}
+
 /* Enqueue one encode operations for ACC200 device in TB mode.
  * returns the number of descs used.
  */
@@ -1214,6 +1550,62 @@ enqueue_ldpc_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 
 /** Enqueue one decode operations for ACC200 device in CB mode. */
 static inline int
+enqueue_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
+		uint16_t total_enqueued_cbs)
+{
+	union acc_dma_desc *desc = NULL;
+	int ret;
+	uint32_t in_offset, h_out_offset, s_out_offset, s_out_length,
+		h_out_length, mbuf_total_left, seg_total_left;
+	struct rte_mbuf *input, *h_output_head, *h_output,
+		*s_output_head, *s_output;
+
+	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
+			& q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	acc200_fcw_td_fill(op, &desc->req.fcw_td);
+
+	input = op->turbo_dec.input.data;
+	h_output_head = h_output = op->turbo_dec.hard_output.data;
+	s_output_head = s_output = op->turbo_dec.soft_output.data;
+	in_offset = op->turbo_dec.input.offset;
+	h_out_offset = op->turbo_dec.hard_output.offset;
+	s_out_offset = op->turbo_dec.soft_output.offset;
+	h_out_length = s_out_length = 0;
+	mbuf_total_left = op->turbo_dec.input.length;
+	seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
+
+	/* Set up DMA descriptor */
+	desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
+			& q->sw_ring_wrap_mask);
+
+	ret = acc200_dma_desc_td_fill(op, &desc->req, &input, h_output,
+			s_output, &in_offset, &h_out_offset, &s_out_offset,
+			&h_out_length, &s_out_length, &mbuf_total_left,
+			&seg_total_left, 0);
+
+	if (unlikely(ret < 0))
+		return ret;
+
+	/* Hard output */
+	mbuf_append(h_output_head, h_output, h_out_length);
+
+	/* Soft output */
+	if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT))
+		mbuf_append(s_output_head, s_output, s_out_length);
+
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	rte_memdump(stderr, "FCW", &desc->req.fcw_td,
+			sizeof(desc->req.fcw_td));
+	rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+
+	/* One CB (one op) was successfully prepared to enqueue */
+	return 1;
+}
+
+/** Enqueue one decode operations for ACC200 device in CB mode */
+static inline int
 enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		uint16_t total_enqueued_cbs, bool same_op)
 {
@@ -1396,6 +1788,139 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	return current_enqueued_cbs;
 }
 
+/* Enqueue one decode operations for ACC200 device in TB mode */
+static inline int
+enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
+		uint16_t total_enqueued_cbs, uint8_t cbs_in_tb)
+{
+	union acc_dma_desc *desc = NULL;
+	int ret;
+	uint8_t r, c;
+	uint32_t in_offset, h_out_offset, s_out_offset, s_out_length,
+		h_out_length, mbuf_total_left, seg_total_left;
+	struct rte_mbuf *input, *h_output_head, *h_output,
+		*s_output_head, *s_output;
+	uint16_t current_enqueued_cbs = 0;
+
+	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
+			& q->sw_ring_wrap_mask);
+	desc = q->ring_addr + desc_idx;
+	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	acc200_fcw_td_fill(op, &desc->req.fcw_td);
+
+	input = op->turbo_dec.input.data;
+	h_output_head = h_output = op->turbo_dec.hard_output.data;
+	s_output_head = s_output = op->turbo_dec.soft_output.data;
+	in_offset = op->turbo_dec.input.offset;
+	h_out_offset = op->turbo_dec.hard_output.offset;
+	s_out_offset = op->turbo_dec.soft_output.offset;
+	h_out_length = s_out_length = 0;
+	mbuf_total_left = op->turbo_dec.input.length;
+	c = op->turbo_dec.tb_params.c;
+	r = op->turbo_dec.tb_params.r;
+
+	while (mbuf_total_left > 0 && r < c) {
+
+		seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
+
+		/* Set up DMA descriptor */
+		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
+				& q->sw_ring_wrap_mask);
+		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
+		desc->req.data_ptrs[0].blen = ACC_FCW_TD_BLEN;
+		ret = acc200_dma_desc_td_fill(op, &desc->req, &input,
+				h_output, s_output, &in_offset, &h_out_offset,
+				&s_out_offset, &h_out_length, &s_out_length,
+				&mbuf_total_left, &seg_total_left, r);
+
+		if (unlikely(ret < 0))
+			return ret;
+
+		/* Hard output */
+		mbuf_append(h_output_head, h_output, h_out_length);
+
+		/* Soft output */
+		if (check_bit(op->turbo_dec.op_flags,
+				RTE_BBDEV_TURBO_SOFT_OUTPUT))
+			mbuf_append(s_output_head, s_output, s_out_length);
+
+		/* Set total number of CBs in TB */
+		desc->req.cbs_in_tb = cbs_in_tb;
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+		rte_memdump(stderr, "FCW", &desc->req.fcw_td,
+				sizeof(desc->req.fcw_td) - 8);
+		rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+
+		if (seg_total_left == 0) {
+			/* Go to the next mbuf */
+			input = input->next;
+			in_offset = 0;
+			h_output = h_output->next;
+			h_out_offset = 0;
+
+			if (check_bit(op->turbo_dec.op_flags,
+					RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
+				s_output = s_output->next;
+				s_out_offset = 0;
+			}
+		}
+
+		total_enqueued_cbs++;
+		current_enqueued_cbs++;
+		r++;
+	}
+
+	/* Set SDone on last CB descriptor for TB mode */
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+
+	return current_enqueued_cbs;
+}
+
+/* Enqueue encode operations for ACC200 device in CB mode. */
+static uint16_t
+acc200_enqueue_enc_cb(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_enc_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t avail = acc_ring_avail_enq(q);
+	uint16_t i;
+	union acc_dma_desc *desc;
+	int ret;
+
+	for (i = 0; i < num; ++i) {
+		/* Check if there are available space for further processing */
+		if (unlikely(avail - 1 < 0)) {
+			acc_enqueue_ring_full(q_data);
+			break;
+		}
+		avail -= 1;
+
+		ret = enqueue_enc_one_op_cb(q, ops[i], i);
+		if (ret < 0) {
+			acc_enqueue_invalid(q_data);
+			break;
+		}
+	}
+
+	if (unlikely(i == 0))
+		return 0; /* Nothing to enqueue */
+
+	/* Set SDone in last CB in enqueued ops for CB mode*/
+	desc = q->ring_addr + ((q->sw_ring_head + i - 1)
+			& q->sw_ring_wrap_mask);
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+
+	acc_dma_enqueue(q, i, &q_data->queue_stats);
+
+	/* Update stats */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+	return i;
+}
+
 /** Enqueue encode operations for ACC200 device in CB mode. */
 static inline uint16_t
 acc200_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
@@ -1443,6 +1968,45 @@ acc200_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
 	return i;
 }
 
+/* Enqueue encode operations for ACC200 device in TB mode. */
+static uint16_t
+acc200_enqueue_enc_tb(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_enc_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t avail = acc_ring_avail_enq(q);
+	uint16_t i, enqueued_cbs = 0;
+	uint8_t cbs_in_tb;
+	int ret;
+
+	for (i = 0; i < num; ++i) {
+		cbs_in_tb = get_num_cbs_in_tb_enc(&ops[i]->turbo_enc);
+		/* Check if there are available space for further processing */
+		if (unlikely((avail - cbs_in_tb < 0) || (cbs_in_tb == 0))) {
+			acc_enqueue_ring_full(q_data);
+			break;
+		}
+		avail -= cbs_in_tb;
+
+		ret = enqueue_enc_one_op_tb(q, ops[i], enqueued_cbs, cbs_in_tb);
+		if (ret <= 0) {
+			acc_enqueue_invalid(q_data);
+			break;
+		}
+		enqueued_cbs += ret;
+	}
+	if (unlikely(enqueued_cbs == 0))
+		return 0; /* Nothing to enqueue */
+
+	acc_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
+
+	/* Update stats */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+
+	return i;
+}
+
 /* Enqueue LDPC encode operations for ACC200 device in TB mode. */
 static uint16_t
 acc200_enqueue_ldpc_enc_tb(struct rte_bbdev_queue_data *q_data,
@@ -1482,6 +2046,20 @@ acc200_enqueue_ldpc_enc_tb(struct rte_bbdev_queue_data *q_data,
 	return i;
 }
 
+/* Enqueue encode operations for ACC200 device. */
+static uint16_t
+acc200_enqueue_enc(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_enc_op **ops, uint16_t num)
+{
+	int32_t aq_avail = acc_aq_avail(q_data, num);
+	if (unlikely((aq_avail <= 0) || (num == 0)))
+		return 0;
+	if (ops[0]->turbo_enc.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
+		return acc200_enqueue_enc_tb(q_data, ops, num);
+	else
+		return acc200_enqueue_enc_cb(q_data, ops, num);
+}
+
 /* Enqueue encode operations for ACC200 device. */
 static uint16_t
 acc200_enqueue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
@@ -1496,6 +2074,47 @@ acc200_enqueue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
 		return acc200_enqueue_ldpc_enc_cb(q_data, ops, num);
 }
 
+
+/* Enqueue decode operations for ACC200 device in CB mode. */
+static uint16_t
+acc200_enqueue_dec_cb(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_dec_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t avail = acc_ring_avail_enq(q);
+	uint16_t i;
+	union acc_dma_desc *desc;
+	int ret;
+
+	for (i = 0; i < num; ++i) {
+		/* Check if there are available space for further processing. */
+		if (unlikely(avail - 1 < 0))
+			break;
+		avail -= 1;
+
+		ret = enqueue_dec_one_op_cb(q, ops[i], i);
+		if (ret < 0)
+			break;
+	}
+
+	if (unlikely(i == 0))
+		return 0; /* Nothing to enqueue. */
+
+	/* Set SDone in last CB in enqueued ops for CB mode. */
+	desc = q->ring_addr + ((q->sw_ring_head + i - 1)
+			& q->sw_ring_wrap_mask);
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+
+	acc_dma_enqueue(q, i, &q_data->queue_stats);
+
+	/* Update stats. */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+
+	return i;
+}
+
 /* Enqueue decode operations for ACC200 device in TB mode. */
 static uint16_t
 acc200_enqueue_ldpc_dec_tb(struct rte_bbdev_queue_data *q_data,
@@ -1580,6 +2199,58 @@ acc200_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
 	return i;
 }
 
+
+/* Enqueue decode operations for ACC200 device in TB mode */
+static uint16_t
+acc200_enqueue_dec_tb(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_dec_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	int32_t avail = acc_ring_avail_enq(q);
+	uint16_t i, enqueued_cbs = 0;
+	uint8_t cbs_in_tb;
+	int ret;
+
+	for (i = 0; i < num; ++i) {
+		cbs_in_tb = get_num_cbs_in_tb_dec(&ops[i]->turbo_dec);
+		/* Check if there are available space for further processing */
+		if (unlikely((avail - cbs_in_tb < 0) || (cbs_in_tb == 0))) {
+			acc_enqueue_ring_full(q_data);
+			break;
+		}
+		avail -= cbs_in_tb;
+
+		ret = enqueue_dec_one_op_tb(q, ops[i], enqueued_cbs, cbs_in_tb);
+		if (ret <= 0) {
+			acc_enqueue_invalid(q_data);
+			break;
+		}
+		enqueued_cbs += ret;
+	}
+
+	acc_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats);
+
+	/* Update stats */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+
+	return i;
+}
+
+/* Enqueue decode operations for ACC200 device. */
+static uint16_t
+acc200_enqueue_dec(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_dec_op **ops, uint16_t num)
+{
+	int32_t aq_avail = acc_aq_avail(q_data, num);
+	if (unlikely((aq_avail <= 0) || (num == 0)))
+		return 0;
+	if (ops[0]->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
+		return acc200_enqueue_dec_tb(q_data, ops, num);
+	else
+		return acc200_enqueue_dec_cb(q_data, ops, num);
+}
+
 /* Enqueue decode operations for ACC200 device. */
 static uint16_t
 acc200_enqueue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
@@ -1904,6 +2575,48 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 	return cb_idx;
 }
 
+/* Dequeue encode operations from ACC200 device. */
+static uint16_t
+acc200_dequeue_enc(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_enc_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	uint32_t avail = acc_ring_avail_deq(q);
+	uint32_t aq_dequeued = 0;
+	uint16_t i, dequeued_ops = 0, dequeued_descs = 0;
+	int ret, cbm;
+	struct rte_bbdev_enc_op *op;
+	if (avail == 0)
+		return 0;
+	op = (q->ring_addr + (q->sw_ring_tail &
+			q->sw_ring_wrap_mask))->req.op_addr;
+
+	cbm = op->turbo_enc.code_block_mode;
+
+	for (i = 0; i < num; i++) {
+		if (cbm == RTE_BBDEV_TRANSPORT_BLOCK)
+			ret = dequeue_enc_one_op_tb(q, &ops[dequeued_ops],
+					&dequeued_ops, &aq_dequeued,
+					&dequeued_descs);
+		else
+			ret = dequeue_enc_one_op_cb(q, &ops[dequeued_ops],
+					&dequeued_ops, &aq_dequeued,
+					&dequeued_descs);
+		if (ret < 0)
+			break;
+		if (dequeued_ops >= num)
+			break;
+	}
+
+	q->aq_dequeued += aq_dequeued;
+	q->sw_ring_tail += dequeued_descs;
+
+	/* Update enqueue stats */
+	q_data->queue_stats.dequeued_count += dequeued_ops;
+
+	return dequeued_ops;
+}
+
 /* Dequeue LDPC encode operations from ACC200 device. */
 static uint16_t
 acc200_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
@@ -1944,6 +2657,46 @@ acc200_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
 	return dequeued_ops;
 }
 
+/* Dequeue decode operations from ACC200 device. */
+static uint16_t
+acc200_dequeue_dec(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_dec_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	uint16_t dequeue_num;
+	uint32_t avail = acc_ring_avail_deq(q);
+	uint32_t aq_dequeued = 0;
+	uint16_t i;
+	uint16_t dequeued_cbs = 0;
+	struct rte_bbdev_dec_op *op;
+	int ret;
+
+	dequeue_num = (avail < num) ? avail : num;
+
+	for (i = 0; i < dequeue_num; ++i) {
+		op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
+			& q->sw_ring_wrap_mask))->req.op_addr;
+		if (op->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
+			ret = dequeue_dec_one_op_tb(q, &ops[i], dequeued_cbs,
+					&aq_dequeued);
+		else
+			ret = dequeue_dec_one_op_cb(q_data, q, &ops[i],
+					dequeued_cbs, &aq_dequeued);
+
+		if (ret <= 0)
+			break;
+		dequeued_cbs += ret;
+	}
+
+	q->aq_dequeued += aq_dequeued;
+	q->sw_ring_tail += dequeued_cbs;
+
+	/* Update enqueue stats */
+	q_data->queue_stats.dequeued_count += i;
+
+	return i;
+}
+
 /* Dequeue decode operations from ACC200 device. */
 static uint16_t
 acc200_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
@@ -1992,6 +2745,10 @@ acc200_bbdev_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
 	struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev->device);
 
 	dev->dev_ops = &acc200_bbdev_ops;
+	dev->enqueue_enc_ops = acc200_enqueue_enc;
+	dev->enqueue_dec_ops = acc200_enqueue_dec;
+	dev->dequeue_enc_ops = acc200_dequeue_enc;
+	dev->dequeue_dec_ops = acc200_dequeue_dec;
 	dev->enqueue_ldpc_enc_ops = acc200_enqueue_ldpc_enc;
 	dev->enqueue_ldpc_dec_ops = acc200_enqueue_ldpc_dec;
 	dev->dequeue_ldpc_enc_ops = acc200_dequeue_ldpc_enc;
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 10/16] baseband/acc: add support for FFT operations
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (8 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 09/16] baseband/acc: add LTE " Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 11/16] baseband/acc: support interrupt Nicolas Chautru
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added functions and capability for FFT processing

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/rte_acc200_pmd.c | 235 +++++++++++++++++++++++++-
 1 file changed, 233 insertions(+), 2 deletions(-)

diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index f4720990c2..3a8c52e253 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -727,6 +727,21 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 			.num_buffers_soft_out = 0,
 			}
 		},
+		{
+			.type	= RTE_BBDEV_OP_FFT,
+			.cap.fft = {
+				.capability_flags =
+						RTE_BBDEV_FFT_WINDOWING |
+						RTE_BBDEV_FFT_CS_ADJUSTMENT |
+						RTE_BBDEV_FFT_DFT_BYPASS |
+						RTE_BBDEV_FFT_IDFT_BYPASS |
+						RTE_BBDEV_FFT_WINDOWING_BYPASS,
+				.num_buffers_src =
+						RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
+				.num_buffers_dst =
+						RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
+			}
+		},
 		RTE_BBDEV_END_OF_CAPABILITIES_LIST()
 	};
 
@@ -749,12 +764,13 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 			d->acc_conf.q_ul_5g.num_qgroups;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_aqs_per_groups *
 			d->acc_conf.q_dl_5g.num_qgroups;
-	dev_info->num_queues[RTE_BBDEV_OP_FFT] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_FFT] = d->acc_conf.q_fft.num_aqs_per_groups *
+			d->acc_conf.q_fft.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = d->acc_conf.q_ul_4g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = d->acc_conf.q_dl_4g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = d->acc_conf.q_ul_5g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_qgroups;
-	dev_info->queue_priority[RTE_BBDEV_OP_FFT] = 0;
+	dev_info->queue_priority[RTE_BBDEV_OP_FFT] = d->acc_conf.q_fft.num_qgroups;
 	dev_info->max_num_queues = 0;
 	for (i = RTE_BBDEV_OP_NONE; i <= RTE_BBDEV_OP_FFT; i++)
 		dev_info->max_num_queues += dev_info->num_queues[i];
@@ -2738,6 +2754,219 @@ acc200_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
 	return i;
 }
 
+/* Fill in a frame control word for FFT processing. */
+static inline void
+acc200_fcw_fft_fill(struct rte_bbdev_fft_op *op, struct acc_fcw_fft *fcw)
+{
+	fcw->in_frame_size = op->fft.input_sequence_size;
+	fcw->leading_pad_size = op->fft.input_leading_padding;
+	fcw->out_frame_size = op->fft.output_sequence_size;
+	fcw->leading_depad_size = op->fft.output_leading_depadding;
+	fcw->cs_window_sel = op->fft.window_index[0] +
+			(op->fft.window_index[1] << 8) +
+			(op->fft.window_index[2] << 16) +
+			(op->fft.window_index[3] << 24);
+	fcw->cs_window_sel2 = op->fft.window_index[4] +
+			(op->fft.window_index[5] << 8);
+	fcw->cs_enable_bmap = op->fft.cs_bitmap;
+	fcw->num_antennas = op->fft.num_antennas_log2;
+	fcw->idft_size = op->fft.idft_log2;
+	fcw->dft_size = op->fft.dft_log2;
+	fcw->cs_offset = op->fft.cs_time_adjustment;
+	fcw->idft_shift = op->fft.idft_shift;
+	fcw->dft_shift = op->fft.dft_shift;
+	fcw->cs_multiplier = op->fft.ncs_reciprocal;
+	if (check_bit(op->fft.op_flags, RTE_BBDEV_FFT_IDFT_BYPASS)) {
+		if (check_bit(op->fft.op_flags, RTE_BBDEV_FFT_WINDOWING_BYPASS))
+			fcw->bypass = 2;
+		else
+			fcw->bypass = 1;
+	} else if (check_bit(op->fft.op_flags, RTE_BBDEV_FFT_DFT_BYPASS))
+		fcw->bypass = 3;
+	else
+		fcw->bypass = 0;
+}
+
+static inline int
+acc200_dma_desc_fft_fill(struct rte_bbdev_fft_op *op,
+		struct acc_dma_req_desc *desc,
+		struct rte_mbuf *input, struct rte_mbuf *output,
+		uint32_t *in_offset, uint32_t *out_offset)
+{
+	/* FCW already done. */
+	acc_header_init(desc);
+	desc->data_ptrs[1].address = rte_pktmbuf_iova_offset(input, *in_offset);
+	desc->data_ptrs[1].blen = op->fft.input_sequence_size * 4;
+	desc->data_ptrs[1].blkid = ACC_DMA_BLKID_IN;
+	desc->data_ptrs[1].last = 1;
+	desc->data_ptrs[1].dma_ext = 0;
+	desc->data_ptrs[2].address = rte_pktmbuf_iova_offset(output, *out_offset);
+	desc->data_ptrs[2].blen = op->fft.output_sequence_size * 4;
+	desc->data_ptrs[2].blkid = ACC_DMA_BLKID_OUT_HARD;
+	desc->data_ptrs[2].last = 1;
+	desc->data_ptrs[2].dma_ext = 0;
+	desc->m2dlen = 2;
+	desc->d2mlen = 1;
+	desc->ib_ant_offset = op->fft.input_sequence_size;
+	desc->num_ant = op->fft.num_antennas_log2 - 3;
+	int num_cs = 0, i;
+	for (i = 0; i < 12; i++)
+		if (check_bit(op->fft.cs_bitmap, 1 << i))
+			num_cs++;
+	desc->num_cs = num_cs;
+	desc->ob_cyc_offset = op->fft.output_sequence_size;
+	desc->ob_ant_offset = op->fft.output_sequence_size * num_cs;
+	desc->op_addr = op;
+	return 0;
+}
+
+
+/** Enqueue one FFT operation for ACC200 device. */
+static inline int
+enqueue_fft_one_op(struct acc_queue *q, struct rte_bbdev_fft_op *op,
+		uint16_t total_enqueued_cbs)
+{
+	union acc_dma_desc *desc;
+	uint16_t desc_idx;
+	struct rte_mbuf *input, *output;
+	uint32_t in_offset, out_offset;
+	struct acc_fcw_fft *fcw;
+
+	desc_idx = (q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask;
+	desc = q->ring_addr + desc_idx;
+	input = op->fft.base_input.data;
+	output = op->fft.base_output.data;
+	in_offset = op->fft.base_input.offset;
+	out_offset = op->fft.base_output.offset;
+	fcw = &desc->req.fcw_fft;
+
+	acc200_fcw_fft_fill(op, fcw);
+	acc200_dma_desc_fft_fill(op, &desc->req, input, output, &in_offset, &out_offset);
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	rte_memdump(stderr, "FCW", &desc->req.fcw_fft,
+			sizeof(desc->req.fcw_fft));
+	rte_memdump(stderr, "Req Desc.", desc, sizeof(*desc));
+#endif
+	return 1;
+}
+
+/* Enqueue decode operations for ACC200 device. */
+static uint16_t
+acc200_enqueue_fft(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_fft_op **ops, uint16_t num)
+{
+	struct acc_queue *q;
+	int32_t aq_avail, avail;
+	uint16_t i;
+	union acc_dma_desc *desc;
+	int ret;
+
+	aq_avail = acc_aq_avail(q_data, num);
+	if (unlikely((aq_avail <= 0) || (num == 0)))
+		return 0;
+	q = q_data->queue_private;
+	avail = acc_ring_avail_enq(q);
+
+	for (i = 0; i < num; ++i) {
+		/* Check if there are available space for further processing. */
+		if (unlikely(avail < 1))
+			break;
+		avail -= 1;
+		ret = enqueue_fft_one_op(q, ops[i], i);
+		if (ret < 0)
+			break;
+	}
+
+	if (unlikely(i == 0))
+		return 0; /* Nothing to enqueue. */
+
+	/* Set SDone in last CB in enqueued ops for CB mode. */
+	desc = q->ring_addr + ((q->sw_ring_head + i - 1) & q->sw_ring_wrap_mask);
+
+	desc->req.sdone_enable = 1;
+	desc->req.irq_enable = q->irq_enable;
+	acc_dma_enqueue(q, i, &q_data->queue_stats);
+
+	/* Update stats */
+	q_data->queue_stats.enqueued_count += i;
+	q_data->queue_stats.enqueue_err_count += num - i;
+	return i;
+}
+
+
+/* Dequeue one FFT operations from ACC200 device. */
+static inline int
+dequeue_fft_one_op(struct rte_bbdev_queue_data *q_data,
+		struct acc_queue *q, struct rte_bbdev_fft_op **ref_op,
+		uint16_t dequeued_cbs, uint32_t *aq_dequeued)
+{
+	union acc_dma_desc *desc, atom_desc;
+	union acc_dma_rsp_desc rsp;
+	struct rte_bbdev_fft_op *op;
+
+	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
+
+	/* Check fdone bit */
+	if (!(atom_desc.rsp.val & ACC_FDONE))
+		return -1;
+
+	rsp.val = atom_desc.rsp.val;
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	rte_memdump(stderr, "Resp", &desc->rsp.val,
+			sizeof(desc->rsp.val));
+#endif
+	/* Dequeue. */
+	op = desc->req.op_addr;
+
+	/* Clearing status, it will be set based on response. */
+	op->status = 0;
+	op->status |= rsp.input_err << RTE_BBDEV_DATA_ERROR;
+	op->status |= rsp.dma_err << RTE_BBDEV_DRV_ERROR;
+	op->status |= rsp.fcw_err << RTE_BBDEV_DRV_ERROR;
+	if (op->status != 0)
+		q_data->queue_stats.dequeue_err_count++;
+
+	/* Check if this is the last desc in batch (Atomic Queue). */
+	if (desc->req.last_desc_in_batch) {
+		(*aq_dequeued)++;
+		desc->req.last_desc_in_batch = 0;
+	}
+	desc->rsp.val = ACC_DMA_DESC_TYPE;
+	desc->rsp.add_info_0 = 0;
+	*ref_op = op;
+	/* One CB (op) was successfully dequeued. */
+	return 1;
+}
+
+
+/* Dequeue FFT operations from ACC200 device. */
+static uint16_t
+acc200_dequeue_fft(struct rte_bbdev_queue_data *q_data,
+		struct rte_bbdev_fft_op **ops, uint16_t num)
+{
+	struct acc_queue *q = q_data->queue_private;
+	uint16_t dequeue_num, i, dequeued_cbs = 0;
+	uint32_t avail = acc_ring_avail_deq(q);
+	uint32_t aq_dequeued = 0;
+	int ret;
+
+	dequeue_num = RTE_MIN(avail, num);
+
+	for (i = 0; i < dequeue_num; ++i) {
+		ret = dequeue_fft_one_op(q_data, q, &ops[i], dequeued_cbs, &aq_dequeued);
+		if (ret <= 0)
+			break;
+		dequeued_cbs += ret;
+	}
+
+	q->aq_dequeued += aq_dequeued;
+	q->sw_ring_tail += dequeued_cbs;
+	/* Update enqueue stats. */
+	q_data->queue_stats.dequeued_count += i;
+	return i;
+}
+
 /* Initialization Function */
 static void
 acc200_bbdev_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
@@ -2753,6 +2982,8 @@ acc200_bbdev_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
 	dev->enqueue_ldpc_dec_ops = acc200_enqueue_ldpc_dec;
 	dev->dequeue_ldpc_enc_ops = acc200_dequeue_ldpc_enc;
 	dev->dequeue_ldpc_dec_ops = acc200_dequeue_ldpc_dec;
+	dev->enqueue_fft_ops = acc200_enqueue_fft;
+	dev->dequeue_fft_ops = acc200_dequeue_fft;
 
 	((struct acc_device *) dev->data->dev_private)->pf_device =
 			!strcmp(drv->driver.name,
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 11/16] baseband/acc: support interrupt
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (9 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 10/16] baseband/acc: add support for FFT operations Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 12/16] baseband/acc: add device status and vf2pf comms Nicolas Chautru
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added support for capability and functions for
MSI/MSI-X interrupt and underlying information ring.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/rte_acc200_pmd.c | 302 +++++++++++++++++++++++++-
 1 file changed, 299 insertions(+), 3 deletions(-)

diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 3a8c52e253..828e4a73cd 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -211,6 +211,149 @@ fetch_acc200_config(struct rte_bbdev *dev)
 			acc_conf->q_fft.aq_depth_log2);
 }
 
+/* Checks PF Info Ring to find the interrupt cause and handles it accordingly. */
+static inline void
+acc200_check_ir(struct acc_device *acc200_dev)
+{
+	volatile union acc_info_ring_data *ring_data;
+	uint16_t info_ring_head = acc200_dev->info_ring_head;
+	if (unlikely(acc200_dev->info_ring == NULL))
+		return;
+
+	ring_data = acc200_dev->info_ring + (acc200_dev->info_ring_head & ACC_INFO_RING_MASK);
+
+	while (ring_data->valid) {
+		if ((ring_data->int_nb < ACC200_PF_INT_DMA_DL_DESC_IRQ) || (
+				ring_data->int_nb > ACC200_PF_INT_DMA_DL5G_DESC_IRQ)) {
+			rte_bbdev_log(WARNING, "InfoRing: ITR:%d Info:0x%x",
+				ring_data->int_nb, ring_data->detailed_info);
+			/* Initialize Info Ring entry and move forward. */
+			ring_data->val = 0;
+		}
+		info_ring_head++;
+		ring_data = acc200_dev->info_ring + (info_ring_head & ACC_INFO_RING_MASK);
+	}
+}
+
+/* Interrupt handler triggered by ACC200 dev for handling specific interrupt. */
+static void
+acc200_dev_interrupt_handler(void *cb_arg)
+{
+	struct rte_bbdev *dev = cb_arg;
+	struct acc_device *acc200_dev = dev->data->dev_private;
+	volatile union acc_info_ring_data *ring_data;
+	struct acc_deq_intr_details deq_intr_det;
+
+	ring_data = acc200_dev->info_ring + (acc200_dev->info_ring_head & ACC_INFO_RING_MASK);
+
+	while (ring_data->valid) {
+		if (acc200_dev->pf_device) {
+			rte_bbdev_log_debug(
+					"ACC200 PF Interrupt received, Info Ring data: 0x%x -> %d",
+					ring_data->val, ring_data->int_nb);
+
+			switch (ring_data->int_nb) {
+			case ACC200_PF_INT_DMA_DL_DESC_IRQ:
+			case ACC200_PF_INT_DMA_UL_DESC_IRQ:
+			case ACC200_PF_INT_DMA_FFT_DESC_IRQ:
+			case ACC200_PF_INT_DMA_UL5G_DESC_IRQ:
+			case ACC200_PF_INT_DMA_DL5G_DESC_IRQ:
+				deq_intr_det.queue_id = get_queue_id_from_ring_info(
+						dev->data, *ring_data);
+				if (deq_intr_det.queue_id == UINT16_MAX) {
+					rte_bbdev_log(ERR,
+							"Couldn't find queue: aq_id: %u, qg_id: %u, vf_id: %u",
+							ring_data->aq_id,
+							ring_data->qg_id,
+							ring_data->vf_id);
+					return;
+				}
+				rte_bbdev_pmd_callback_process(dev,
+						RTE_BBDEV_EVENT_DEQUEUE, &deq_intr_det);
+				break;
+			default:
+				rte_bbdev_pmd_callback_process(dev, RTE_BBDEV_EVENT_ERROR, NULL);
+				break;
+			}
+		} else {
+			rte_bbdev_log_debug(
+					"ACC200 VF Interrupt received, Info Ring data: 0x%x\n",
+					ring_data->val);
+			switch (ring_data->int_nb) {
+			case ACC200_VF_INT_DMA_DL_DESC_IRQ:
+			case ACC200_VF_INT_DMA_UL_DESC_IRQ:
+			case ACC200_VF_INT_DMA_FFT_DESC_IRQ:
+			case ACC200_VF_INT_DMA_UL5G_DESC_IRQ:
+			case ACC200_VF_INT_DMA_DL5G_DESC_IRQ:
+				/* VFs are not aware of their vf_id - it's set to 0.  */
+				ring_data->vf_id = 0;
+				deq_intr_det.queue_id = get_queue_id_from_ring_info(
+						dev->data, *ring_data);
+				if (deq_intr_det.queue_id == UINT16_MAX) {
+					rte_bbdev_log(ERR,
+							"Couldn't find queue: aq_id: %u, qg_id: %u",
+							ring_data->aq_id,
+							ring_data->qg_id);
+					return;
+				}
+				rte_bbdev_pmd_callback_process(dev,
+						RTE_BBDEV_EVENT_DEQUEUE, &deq_intr_det);
+				break;
+			default:
+				rte_bbdev_pmd_callback_process(dev, RTE_BBDEV_EVENT_ERROR, NULL);
+				break;
+			}
+		}
+
+		/* Initialize Info Ring entry and move forward. */
+		ring_data->val = 0;
+		++acc200_dev->info_ring_head;
+		ring_data = acc200_dev->info_ring +
+				(acc200_dev->info_ring_head & ACC_INFO_RING_MASK);
+	}
+}
+
+/* Allocate and setup inforing. */
+static int
+allocate_info_ring(struct rte_bbdev *dev)
+{
+	struct acc_device *d = dev->data->dev_private;
+	const struct acc200_registry_addr *reg_addr;
+	rte_iova_t info_ring_iova;
+	uint32_t phys_low, phys_high;
+
+	if (d->info_ring != NULL)
+		return 0; /* Already configured. */
+
+	/* Choose correct registry addresses for the device type. */
+	if (d->pf_device)
+		reg_addr = &pf_reg_addr;
+	else
+		reg_addr = &vf_reg_addr;
+	/* Allocate InfoRing */
+	d->info_ring = rte_zmalloc_socket("Info Ring", ACC_INFO_RING_NUM_ENTRIES *
+			sizeof(*d->info_ring), RTE_CACHE_LINE_SIZE, dev->data->socket_id);
+	if (d->info_ring == NULL) {
+		rte_bbdev_log(ERR,
+				"Failed to allocate Info Ring for %s:%u",
+				dev->device->driver->name,
+				dev->data->dev_id);
+		return -ENOMEM;
+	}
+	info_ring_iova = rte_malloc_virt2iova(d->info_ring);
+
+	/* Setup Info Ring. */
+	phys_high = (uint32_t)(info_ring_iova >> 32);
+	phys_low  = (uint32_t)(info_ring_iova);
+	acc_reg_write(d, reg_addr->info_ring_hi, phys_high);
+	acc_reg_write(d, reg_addr->info_ring_lo, phys_low);
+	acc_reg_write(d, reg_addr->info_ring_en, ACC200_REG_IRQ_EN_ALL);
+	d->info_ring_head = (acc_reg_read(d, reg_addr->info_ring_ptr) &
+			0xFFF) / sizeof(union acc_info_ring_data);
+	return 0;
+}
+
+
 /* Allocate 64MB memory used for all software rings. */
 static int
 acc200_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
@@ -319,6 +462,14 @@ acc200_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
 	acc_reg_write(d, reg_addr->tail_ptrs_fft_hi, phys_high);
 	acc_reg_write(d, reg_addr->tail_ptrs_fft_lo, phys_low);
 
+	ret = allocate_info_ring(dev);
+	if (ret < 0) {
+		rte_bbdev_log(ERR, "Failed to allocate info_ring for %s:%u",
+				dev->device->driver->name,
+				dev->data->dev_id);
+		/* Continue */
+	}
+
 	if (d->harq_layout == NULL)
 		d->harq_layout = rte_zmalloc_socket("HARQ Layout",
 				ACC_HARQ_LAYOUT * sizeof(*d->harq_layout),
@@ -349,17 +500,120 @@ acc200_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
 	return ret;
 }
 
+static int
+acc200_intr_enable(struct rte_bbdev *dev)
+{
+	int ret;
+	struct acc_device *d = dev->data->dev_private;
+	/*
+	 * MSI/MSI-X are supported.
+	 * Option controlled by vfio-intr through EAL parameter.
+	 */
+	if (rte_intr_type_get(dev->intr_handle) == RTE_INTR_HANDLE_VFIO_MSI) {
+
+		ret = allocate_info_ring(dev);
+		if (ret < 0) {
+			rte_bbdev_log(ERR,
+					"Couldn't allocate info ring for device: %s",
+					dev->data->name);
+			return ret;
+		}
+		ret = rte_intr_enable(dev->intr_handle);
+		if (ret < 0) {
+			rte_bbdev_log(ERR,
+					"Couldn't enable interrupts for device: %s",
+					dev->data->name);
+			rte_free(d->info_ring);
+			return ret;
+		}
+		ret = rte_intr_callback_register(dev->intr_handle,
+				acc200_dev_interrupt_handler, dev);
+		if (ret < 0) {
+			rte_bbdev_log(ERR,
+					"Couldn't register interrupt callback for device: %s",
+					dev->data->name);
+			rte_free(d->info_ring);
+			return ret;
+		}
+
+		return 0;
+	} else if (rte_intr_type_get(dev->intr_handle) == RTE_INTR_HANDLE_VFIO_MSIX) {
+		int i, max_queues;
+		struct acc_device *acc200_dev = dev->data->dev_private;
+
+		ret = allocate_info_ring(dev);
+		if (ret < 0) {
+			rte_bbdev_log(ERR,
+					"Couldn't allocate info ring for device: %s",
+					dev->data->name);
+			return ret;
+		}
+
+		if (acc200_dev->pf_device)
+			max_queues = ACC200_MAX_PF_MSIX;
+		else
+			max_queues = ACC200_MAX_VF_MSIX;
+
+		if (rte_intr_efd_enable(dev->intr_handle, max_queues)) {
+			rte_bbdev_log(ERR, "Failed to create fds for %u queues",
+					dev->data->num_queues);
+			return -1;
+		}
+
+		for (i = 0; i < max_queues; ++i) {
+			if (rte_intr_efds_index_set(dev->intr_handle, i,
+					rte_intr_fd_get(dev->intr_handle)))
+				return -rte_errno;
+		}
+
+		if (rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec",
+				dev->data->num_queues)) {
+			rte_bbdev_log(ERR, "Failed to allocate %u vectors",
+					dev->data->num_queues);
+			return -ENOMEM;
+		}
+
+		ret = rte_intr_enable(dev->intr_handle);
+
+		if (ret < 0) {
+			rte_bbdev_log(ERR,
+					"Couldn't enable interrupts for device: %s",
+					dev->data->name);
+			rte_free(d->info_ring);
+			return ret;
+		}
+		ret = rte_intr_callback_register(dev->intr_handle,
+				acc200_dev_interrupt_handler, dev);
+		if (ret < 0) {
+			rte_bbdev_log(ERR,
+					"Couldn't register interrupt callback for device: %s",
+					dev->data->name);
+			rte_free(d->info_ring);
+			return ret;
+		}
+
+		return 0;
+	}
+
+	rte_bbdev_log(ERR, "ACC200 (%s) supports only VFIO MSI/MSI-X interrupts\n",
+			dev->data->name);
+	return -ENOTSUP;
+}
+
 /* Free memory used for software rings. */
 static int
 acc200_dev_close(struct rte_bbdev *dev)
 {
 	struct acc_device *d = dev->data->dev_private;
+	acc200_check_ir(d);
 	if (d->sw_rings_base != NULL) {
 		rte_free(d->tail_ptrs);
+		rte_free(d->info_ring);
 		rte_free(d->sw_rings_base);
 		rte_free(d->harq_layout);
-		d->sw_rings_base = NULL;
 		d->tail_ptrs = NULL;
+		d->info_ring = NULL;
+		d->sw_rings_base = NULL;
 		d->harq_layout = NULL;
 	}
 	/* Ensure all in flight HW transactions are completed. */
@@ -662,6 +916,7 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 					RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH |
 					RTE_BBDEV_TURBO_SOFT_OUTPUT |
 					RTE_BBDEV_TURBO_EARLY_TERMINATION |
+					RTE_BBDEV_TURBO_DEC_INTERRUPTS |
 					RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN |
 					RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT |
 					RTE_BBDEV_TURBO_MAP_DEC |
@@ -683,6 +938,7 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 					RTE_BBDEV_TURBO_CRC_24B_ATTACH |
 					RTE_BBDEV_TURBO_RV_INDEX_BYPASS |
 					RTE_BBDEV_TURBO_RATE_MATCH |
+					RTE_BBDEV_TURBO_ENC_INTERRUPTS |
 					RTE_BBDEV_TURBO_ENC_SCATTER_GATHER,
 				.num_buffers_src =
 						RTE_BBDEV_TURBO_MAX_CODE_BLOCKS,
@@ -696,7 +952,8 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 				.capability_flags =
 					RTE_BBDEV_LDPC_RATE_MATCH |
 					RTE_BBDEV_LDPC_CRC_24B_ATTACH |
-					RTE_BBDEV_LDPC_INTERLEAVER_BYPASS,
+					RTE_BBDEV_LDPC_INTERLEAVER_BYPASS |
+					RTE_BBDEV_LDPC_ENC_INTERRUPTS,
 				.num_buffers_src =
 						RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
 				.num_buffers_dst =
@@ -717,7 +974,8 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 				RTE_BBDEV_LDPC_DEINTERLEAVER_BYPASS |
 				RTE_BBDEV_LDPC_DEC_SCATTER_GATHER |
 				RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION |
-				RTE_BBDEV_LDPC_LLR_COMPRESSION,
+				RTE_BBDEV_LDPC_LLR_COMPRESSION |
+				RTE_BBDEV_LDPC_DEC_INTERRUPTS,
 			.llr_size = 8,
 			.llr_decimals = 1,
 			.num_buffers_src =
@@ -785,15 +1043,46 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 	dev_info->min_alignment = 1;
 	dev_info->capabilities = bbdev_capabilities;
 	dev_info->harq_buffer_size = 0;
+
+	acc200_check_ir(d);
+}
+
+static int
+acc200_queue_intr_enable(struct rte_bbdev *dev, uint16_t queue_id)
+{
+	struct acc_queue *q = dev->data->queues[queue_id].queue_private;
+
+	if (rte_intr_type_get(dev->intr_handle) != RTE_INTR_HANDLE_VFIO_MSI &&
+			rte_intr_type_get(dev->intr_handle) != RTE_INTR_HANDLE_VFIO_MSIX)
+		return -ENOTSUP;
+
+	q->irq_enable = 1;
+	return 0;
+}
+
+static int
+acc200_queue_intr_disable(struct rte_bbdev *dev, uint16_t queue_id)
+{
+	struct acc_queue *q = dev->data->queues[queue_id].queue_private;
+
+	if (rte_intr_type_get(dev->intr_handle) != RTE_INTR_HANDLE_VFIO_MSI &&
+			rte_intr_type_get(dev->intr_handle) != RTE_INTR_HANDLE_VFIO_MSIX)
+		return -ENOTSUP;
+
+	q->irq_enable = 0;
+	return 0;
 }
 
 static const struct rte_bbdev_ops acc200_bbdev_ops = {
 	.setup_queues = acc200_setup_queues,
+	.intr_enable = acc200_intr_enable,
 	.close = acc200_dev_close,
 	.info_get = acc200_dev_info_get,
 	.queue_setup = acc200_queue_setup,
 	.queue_release = acc200_queue_release,
 	.queue_stop = acc200_queue_stop,
+	.queue_intr_enable = acc200_queue_intr_enable,
+	.queue_intr_disable = acc200_queue_intr_disable
 };
 
 /* ACC200 PCI PF address map. */
@@ -2430,6 +2719,7 @@ dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 	if (op->status != 0) {
 		/* These errors are not expected. */
 		q_data->queue_stats.dequeue_err_count++;
+		acc200_check_ir(q->d);
 	}
 
 	/* CRC invalid if error exists. */
@@ -2494,6 +2784,9 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 
 	op->ldpc_dec.iter_count = (uint8_t) rsp.iter_cnt;
 
+	if (op->status & (1 << RTE_BBDEV_DRV_ERROR))
+		acc200_check_ir(q->d);
+
 	/* Check if this is the last desc in batch (Atomic Queue). */
 	if (desc->req.last_desc_in_batch) {
 		(*aq_dequeued)++;
@@ -2927,6 +3220,9 @@ dequeue_fft_one_op(struct rte_bbdev_queue_data *q_data,
 	if (op->status != 0)
 		q_data->queue_stats.dequeue_err_count++;
 
+	if (op->status & (1 << RTE_BBDEV_DRV_ERROR))
+		acc200_check_ir(q->d);
+
 	/* Check if this is the last desc in batch (Atomic Queue). */
 	if (desc->req.last_desc_in_batch) {
 		(*aq_dequeued)++;
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 12/16] baseband/acc: add device status and vf2pf comms
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (10 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 11/16] baseband/acc: support interrupt Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 13/16] baseband/acc: add PF configure companion function Nicolas Chautru
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added support to expose the device status seen from the
host through v2pf mailbox communication.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/rte_acc200_pmd.c | 30 +++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 828e4a73cd..522603e095 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -211,6 +211,33 @@ fetch_acc200_config(struct rte_bbdev *dev)
 			acc_conf->q_fft.aq_depth_log2);
 }
 
+static inline void
+acc200_vf2pf(struct acc_device *d, unsigned int payload)
+{
+	acc_reg_write(d, HWVfHiVfToPfDbellVf, payload);
+}
+
+/* Request device status information. */
+static inline uint32_t
+acc200_device_status(struct rte_bbdev *dev)
+{
+	struct acc_device *d = dev->data->dev_private;
+	uint32_t reg, time_out = 0;
+
+	if (d->pf_device)
+		return RTE_BBDEV_DEV_NOT_SUPPORTED;
+
+	acc200_vf2pf(d, ACC_VF2PF_STATUS_REQUEST);
+	reg = acc_reg_read(d, HWVfHiPfToVfDbellVf);
+	while ((time_out < ACC200_STATUS_TO) && (reg == RTE_BBDEV_DEV_NOSTATUS)) {
+		usleep(ACC200_STATUS_WAIT); /*< Wait or VF->PF->VF Comms */
+		reg = acc_reg_read(d, HWVfHiPfToVfDbellVf);
+		time_out++;
+	}
+
+	return reg;
+}
+
 /* Checks PF Info Ring to find the interrupt cause and handles it accordingly. */
 static inline void
 acc200_check_ir(struct acc_device *acc200_dev)
@@ -484,6 +511,7 @@ acc200_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
 
 	/* Mark as configured properly */
 	d->configured = true;
+	acc200_vf2pf(d, ACC_VF2PF_USING_VF);
 
 	rte_bbdev_log_debug(
 			"ACC200 (%s) configured  sw_rings = %p, sw_rings_iova = %#"
@@ -1011,6 +1039,8 @@ acc200_dev_info_get(struct rte_bbdev *dev,
 
 	/* Read and save the populated config from ACC200 registers. */
 	fetch_acc200_config(dev);
+	/* Check the status of device. */
+	dev_info->device_status = acc200_device_status(dev);
 
 	/* Exposed number of queues. */
 	dev_info->num_queues[RTE_BBDEV_OP_NONE] = 0;
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 13/16] baseband/acc: add PF configure companion function
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (11 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 12/16] baseband/acc: add device status and vf2pf comms Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 14/16] baseband/acc: simplify meson dependency Nicolas Chautru
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added configure function notably to configure the device from
the PF within DPDK and bbdev-test (without external dependency).
That function is kept common to all ACC devices.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Acked-by: Hernan Vargas <hernan.vargas@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c              |  74 ++-
 drivers/baseband/acc/acc100_pmd.h             |   2 +-
 drivers/baseband/acc/acc200_cfg.h             |  32 ++
 drivers/baseband/acc/acc200_pmd.h             |   2 +-
 drivers/baseband/acc/meson.build              |   2 +-
 drivers/baseband/acc/rte_acc100_pmd.c         |   7 +-
 drivers/baseband/acc/rte_acc200_pmd.c         | 458 ++++++++++++++++++
 .../acc/{rte_acc100_cfg.h => rte_acc_cfg.h}   |  16 +-
 drivers/baseband/acc/rte_acc_common_cfg.h     |  12 +-
 drivers/baseband/acc/version.map              |   2 +-
 10 files changed, 585 insertions(+), 22 deletions(-)
 create mode 100644 drivers/baseband/acc/acc200_cfg.h
 rename drivers/baseband/acc/{rte_acc100_cfg.h => rte_acc_cfg.h} (67%)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index e46a0c3b46..85c68a10ce 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -54,7 +54,7 @@
 #endif
 
 #ifdef RTE_BASEBAND_ACC
-#include <rte_acc100_cfg.h>
+#include <rte_acc_cfg.h>
 #define ACC100PF_DRIVER_NAME   ("intel_acc100_pf")
 #define ACC100VF_DRIVER_NAME   ("intel_acc100_vf")
 #define ACC100_QMGR_NUM_AQS 16
@@ -63,6 +63,14 @@
 #define ACC100_QMGR_INVALID_IDX -1
 #define ACC100_QMGR_RR 1
 #define ACC100_QOS_GBR 0
+#define ACC200PF_DRIVER_NAME   ("intel_acc200_pf")
+#define ACC200VF_DRIVER_NAME   ("intel_acc200_vf")
+#define ACC200_QMGR_NUM_AQS 16
+#define ACC200_QMGR_NUM_QGS 2
+#define ACC200_QMGR_AQ_DEPTH 5
+#define ACC200_QMGR_INVALID_IDX -1
+#define ACC200_QMGR_RR 1
+#define ACC200_QOS_GBR 0
 #endif
 
 #define OPS_CACHE_SIZE 256U
@@ -757,11 +765,73 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
 		conf.q_dl_5g.aq_depth_log2 = ACC100_QMGR_AQ_DEPTH;
 
 		/* setup PF with configuration information */
-		ret = rte_acc10x_configure(info->dev_name, &conf);
+		ret = rte_acc_configure(info->dev_name, &conf);
 		TEST_ASSERT_SUCCESS(ret,
 				"Failed to configure ACC100 PF for bbdev %s",
 				info->dev_name);
 	}
+	if ((get_init_device() == true) &&
+		(!strcmp(info->drv.driver_name, ACC200PF_DRIVER_NAME))) {
+		struct rte_acc_conf conf;
+		unsigned int i;
+
+		printf("Configure ACC200 FEC Driver %s with default values\n",
+				info->drv.driver_name);
+
+		/* clear default configuration before initialization */
+		memset(&conf, 0, sizeof(struct rte_acc_conf));
+
+		/* Always set in PF mode for built-in configuration */
+		conf.pf_mode_en = true;
+		for (i = 0; i < RTE_ACC_NUM_VFS; ++i) {
+			conf.arb_dl_4g[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_dl_4g[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_dl_4g[i].round_robin_weight = ACC200_QMGR_RR;
+			conf.arb_ul_4g[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_ul_4g[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_ul_4g[i].round_robin_weight = ACC200_QMGR_RR;
+			conf.arb_dl_5g[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_dl_5g[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_dl_5g[i].round_robin_weight = ACC200_QMGR_RR;
+			conf.arb_ul_5g[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_ul_5g[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_ul_5g[i].round_robin_weight = ACC200_QMGR_RR;
+			conf.arb_fft[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_fft[i].gbr_threshold1 = ACC200_QOS_GBR;
+			conf.arb_fft[i].round_robin_weight = ACC200_QMGR_RR;
+		}
+
+		conf.input_pos_llr_1_bit = true;
+		conf.output_pos_llr_1_bit = true;
+		conf.num_vf_bundles = 1; /**< Number of VF bundles to setup */
+
+		conf.q_ul_4g.num_qgroups = ACC200_QMGR_NUM_QGS;
+		conf.q_ul_4g.first_qgroup_index = ACC200_QMGR_INVALID_IDX;
+		conf.q_ul_4g.num_aqs_per_groups = ACC200_QMGR_NUM_AQS;
+		conf.q_ul_4g.aq_depth_log2 = ACC200_QMGR_AQ_DEPTH;
+		conf.q_dl_4g.num_qgroups = ACC200_QMGR_NUM_QGS;
+		conf.q_dl_4g.first_qgroup_index = ACC200_QMGR_INVALID_IDX;
+		conf.q_dl_4g.num_aqs_per_groups = ACC200_QMGR_NUM_AQS;
+		conf.q_dl_4g.aq_depth_log2 = ACC200_QMGR_AQ_DEPTH;
+		conf.q_ul_5g.num_qgroups = ACC200_QMGR_NUM_QGS;
+		conf.q_ul_5g.first_qgroup_index = ACC200_QMGR_INVALID_IDX;
+		conf.q_ul_5g.num_aqs_per_groups = ACC200_QMGR_NUM_AQS;
+		conf.q_ul_5g.aq_depth_log2 = ACC200_QMGR_AQ_DEPTH;
+		conf.q_dl_5g.num_qgroups = ACC200_QMGR_NUM_QGS;
+		conf.q_dl_5g.first_qgroup_index = ACC200_QMGR_INVALID_IDX;
+		conf.q_dl_5g.num_aqs_per_groups = ACC200_QMGR_NUM_AQS;
+		conf.q_dl_5g.aq_depth_log2 = ACC200_QMGR_AQ_DEPTH;
+		conf.q_fft.num_qgroups = ACC200_QMGR_NUM_QGS;
+		conf.q_fft.first_qgroup_index = ACC200_QMGR_INVALID_IDX;
+		conf.q_fft.num_aqs_per_groups = ACC200_QMGR_NUM_AQS;
+		conf.q_fft.aq_depth_log2 = ACC200_QMGR_AQ_DEPTH;
+
+		/* setup PF with configuration information */
+		ret = rte_acc_configure(info->dev_name, &conf);
+		TEST_ASSERT_SUCCESS(ret,
+				"Failed to configure ACC200 PF for bbdev %s",
+				info->dev_name);
+	}
 #endif
 	/* Let's refresh this now this is configured */
 	rte_bbdev_info_get(dev_id, info);
diff --git a/drivers/baseband/acc/acc100_pmd.h b/drivers/baseband/acc/acc100_pmd.h
index b325948904..9486e98521 100644
--- a/drivers/baseband/acc/acc100_pmd.h
+++ b/drivers/baseband/acc/acc100_pmd.h
@@ -7,7 +7,7 @@
 
 #include "acc100_pf_enum.h"
 #include "acc100_vf_enum.h"
-#include "rte_acc100_cfg.h"
+#include "rte_acc_cfg.h"
 #include "acc_common.h"
 
 /* Helper macro for logging */
diff --git a/drivers/baseband/acc/acc200_cfg.h b/drivers/baseband/acc/acc200_cfg.h
new file mode 100644
index 0000000000..d77506b560
--- /dev/null
+++ b/drivers/baseband/acc/acc200_cfg.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Intel Corporation
+ */
+
+#ifndef _ACC200_CFG_H_
+#define _ACC200_CFG_H_
+
+/**
+ * @file acc200_cfg.h
+ *
+ * Functions for configuring ACC200 HW.
+ * Configuration related to encoding/decoding is done through the
+ * librte_bbdev library.
+ */
+
+/**
+ * Configure a ACC200 device.
+ *
+ * @param dev_name
+ *   The name of the device. This is the short form of PCI BDF, e.g. 00:01.0.
+ *   It can also be retrieved for a bbdev device from the dev_name field in the
+ *   rte_bbdev_info structure returned by rte_bbdev_info_get().
+ * @param conf
+ *   Configuration to apply to ACC200 HW.
+ *
+ * @return
+ *   Zero on success, negative value on failure.
+ */
+int
+acc200_configure(const char *dev_name, struct rte_acc_conf *conf);
+
+#endif /* _ACC200_CFG_H_ */
diff --git a/drivers/baseband/acc/acc200_pmd.h b/drivers/baseband/acc/acc200_pmd.h
index 587b6f6d5b..f3f2627ae9 100644
--- a/drivers/baseband/acc/acc200_pmd.h
+++ b/drivers/baseband/acc/acc200_pmd.h
@@ -8,7 +8,7 @@
 #include "acc_common.h"
 #include "acc200_pf_enum.h"
 #include "acc200_vf_enum.h"
-#include "rte_acc200_cfg.h"
+#include "acc200_cfg.h"
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/drivers/baseband/acc/meson.build b/drivers/baseband/acc/meson.build
index 63912f0621..d74ace1481 100644
--- a/drivers/baseband/acc/meson.build
+++ b/drivers/baseband/acc/meson.build
@@ -5,4 +5,4 @@ deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
 
 sources = files('rte_acc100_pmd.c', 'rte_acc200_pmd.c')
 
-headers = files('rte_acc100_cfg.h')
+headers = files('rte_acc_cfg.h')
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 9cb7b74c64..9ba8bd84d5 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -23,6 +23,7 @@
 #include <rte_bbdev_pmd.h>
 #include "acc100_pmd.h"
 #include "acc101_pmd.h"
+#include "acc200_cfg.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 RTE_LOG_REGISTER_DEFAULT(acc100_logtype, DEBUG);
@@ -4638,7 +4639,7 @@ acc101_configure(const char *dev_name, struct rte_acc_conf *conf)
 }
 
 int
-rte_acc10x_configure(const char *dev_name, struct rte_acc_conf *conf)
+rte_acc_configure(const char *dev_name, struct rte_acc_conf *conf)
 {
 	struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name);
 	if (bbdev == NULL) {
@@ -4650,6 +4651,8 @@ rte_acc10x_configure(const char *dev_name, struct rte_acc_conf *conf)
 	printf("Configure dev id %x\n", pci_dev->id.device_id);
 	if (pci_dev->id.device_id == ACC100_PF_DEVICE_ID)
 		return acc100_configure(dev_name, conf);
-	else
+	else if (pci_dev->id.device_id == ACC101_PF_DEVICE_ID)
 		return acc101_configure(dev_name, conf);
+	else
+		return acc200_configure(dev_name, conf);
 }
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index 522603e095..a67f0dd2f3 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -43,6 +43,27 @@ queue_offset(bool pf_device, uint8_t vf_id, uint8_t qgrp_id, uint16_t aq_id)
 
 enum {UL_4G = 0, UL_5G, DL_4G, DL_5G, FFT, NUM_ACC};
 
+/* Return the accelerator enum for a Queue Group Index. */
+static inline int
+accFromQgid(int qg_idx, const struct rte_acc_conf *acc_conf)
+{
+	int accQg[ACC200_NUM_QGRPS];
+	int NumQGroupsPerFn[NUM_ACC];
+	int acc, qgIdx, qgIndex = 0;
+	for (qgIdx = 0; qgIdx < ACC200_NUM_QGRPS; qgIdx++)
+		accQg[qgIdx] = 0;
+	NumQGroupsPerFn[UL_4G] = acc_conf->q_ul_4g.num_qgroups;
+	NumQGroupsPerFn[UL_5G] = acc_conf->q_ul_5g.num_qgroups;
+	NumQGroupsPerFn[DL_4G] = acc_conf->q_dl_4g.num_qgroups;
+	NumQGroupsPerFn[DL_5G] = acc_conf->q_dl_5g.num_qgroups;
+	NumQGroupsPerFn[FFT] = acc_conf->q_fft.num_qgroups;
+	for (acc = UL_4G;  acc < NUM_ACC; acc++)
+		for (qgIdx = 0; qgIdx < NumQGroupsPerFn[acc]; qgIdx++)
+			accQg[qgIndex++] = acc;
+	acc = accQg[qg_idx];
+	return acc;
+}
+
 /* Return the queue topology for a Queue Group Index. */
 static inline void
 qtopFromAcc(struct rte_acc_queue_topology **qtop, int acc_enum, struct rte_acc_conf *acc_conf)
@@ -74,6 +95,36 @@ qtopFromAcc(struct rte_acc_queue_topology **qtop, int acc_enum, struct rte_acc_c
 	*qtop = p_qtop;
 }
 
+/* Return the AQ depth for a Queue Group Index. */
+static inline int
+aqDepth(int qg_idx, struct rte_acc_conf *acc_conf)
+{
+	struct rte_acc_queue_topology *q_top = NULL;
+
+	int acc_enum = accFromQgid(qg_idx, acc_conf);
+	qtopFromAcc(&q_top, acc_enum, acc_conf);
+
+	if (unlikely(q_top == NULL))
+		return 0;
+
+	return q_top->aq_depth_log2;
+}
+
+/* Return the AQ depth for a Queue Group Index. */
+static inline int
+aqNum(int qg_idx, struct rte_acc_conf *acc_conf)
+{
+	struct rte_acc_queue_topology *q_top = NULL;
+
+	int acc_enum = accFromQgid(qg_idx, acc_conf);
+	qtopFromAcc(&q_top, acc_enum, acc_conf);
+
+	if (unlikely(q_top == NULL))
+		return 0;
+
+	return q_top->num_aqs_per_groups;
+}
+
 static void
 initQTop(struct rte_acc_conf *acc_conf)
 {
@@ -3385,3 +3436,410 @@ RTE_PMD_REGISTER_PCI(ACC200PF_DRIVER_NAME, acc200_pci_pf_driver);
 RTE_PMD_REGISTER_PCI_TABLE(ACC200PF_DRIVER_NAME, pci_id_acc200_pf_map);
 RTE_PMD_REGISTER_PCI(ACC200VF_DRIVER_NAME, acc200_pci_vf_driver);
 RTE_PMD_REGISTER_PCI_TABLE(ACC200VF_DRIVER_NAME, pci_id_acc200_vf_map);
+
+/* Initial configuration of a ACC200 device prior to running configure(). */
+int
+acc200_configure(const char *dev_name, struct rte_acc_conf *conf)
+{
+	rte_bbdev_log(INFO, "acc200_configure");
+	uint32_t value, address, status;
+	int qg_idx, template_idx, vf_idx, acc, i, rlim, alen, timestamp, totalQgs, numEngines;
+	int numQgs, numQqsAcc;
+	struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name);
+
+	/* Compile time checks. */
+	RTE_BUILD_BUG_ON(sizeof(struct acc_dma_req_desc) != 256);
+	RTE_BUILD_BUG_ON(sizeof(union acc_dma_desc) != 256);
+	RTE_BUILD_BUG_ON(sizeof(struct acc_fcw_td) != 24);
+	RTE_BUILD_BUG_ON(sizeof(struct acc_fcw_te) != 32);
+
+	if (bbdev == NULL) {
+		rte_bbdev_log(ERR,
+		"Invalid dev_name (%s), or device is not yet initialised",
+		dev_name);
+		return -ENODEV;
+	}
+	struct acc_device *d = bbdev->data->dev_private;
+
+	/* Store configuration. */
+	rte_memcpy(&d->acc_conf, conf, sizeof(d->acc_conf));
+
+	/* Check we are already out of PG. */
+	status = acc_reg_read(d, HWPfHiSectionPowerGatingAck);
+	if (status > 0) {
+		if (status != ACC200_PG_MASK_0) {
+			rte_bbdev_log(ERR, "Unexpected status %x %x",
+					status, ACC200_PG_MASK_0);
+			return -ENODEV;
+		}
+		/* Clock gate sections that will be un-PG. */
+		acc_reg_write(d, HWPfHiClkGateHystReg, ACC200_CLK_DIS);
+		/* Un-PG required sections. */
+		acc_reg_write(d, HWPfHiSectionPowerGatingReq,
+				ACC200_PG_MASK_1);
+		status = acc_reg_read(d, HWPfHiSectionPowerGatingAck);
+		if (status != ACC200_PG_MASK_1) {
+			rte_bbdev_log(ERR, "Unexpected status %x %x",
+					status, ACC200_PG_MASK_1);
+			return -ENODEV;
+		}
+		acc_reg_write(d, HWPfHiSectionPowerGatingReq,
+				ACC200_PG_MASK_2);
+		status = acc_reg_read(d, HWPfHiSectionPowerGatingAck);
+		if (status != ACC200_PG_MASK_2) {
+			rte_bbdev_log(ERR, "Unexpected status %x %x",
+					status, ACC200_PG_MASK_2);
+			return -ENODEV;
+		}
+		acc_reg_write(d, HWPfHiSectionPowerGatingReq,
+				ACC200_PG_MASK_3);
+		status = acc_reg_read(d, HWPfHiSectionPowerGatingAck);
+		if (status != ACC200_PG_MASK_3) {
+			rte_bbdev_log(ERR, "Unexpected status %x %x",
+					status, ACC200_PG_MASK_3);
+			return -ENODEV;
+		}
+		/* Enable clocks for all sections. */
+		acc_reg_write(d, HWPfHiClkGateHystReg, ACC200_CLK_EN);
+	}
+
+	/* Explicitly releasing AXI as this may be stopped after PF FLR/BME. */
+	address = HWPfDmaAxiControl;
+	value = 1;
+	acc_reg_write(d, address, value);
+
+	/* Set the fabric mode. */
+	address = HWPfFabricM2iBufferReg;
+	value = ACC200_FABRIC_MODE;
+	acc_reg_write(d, address, value);
+
+	/* Set default descriptor signature. */
+	address = HWPfDmaDescriptorSignatuture;
+	value = 0;
+	acc_reg_write(d, address, value);
+
+	/* Enable the Error Detection in DMA. */
+	value = ACC200_CFG_DMA_ERROR;
+	address = HWPfDmaErrorDetectionEn;
+	acc_reg_write(d, address, value);
+
+	/* AXI Cache configuration. */
+	value = ACC200_CFG_AXI_CACHE;
+	address = HWPfDmaAxcacheReg;
+	acc_reg_write(d, address, value);
+
+	/* AXI Response configuration. */
+	acc_reg_write(d, HWPfDmaCfgRrespBresp, 0x0);
+
+	/* Default DMA Configuration (Qmgr Enabled). */
+	address = HWPfDmaConfig0Reg;
+	value = 0;
+	acc_reg_write(d, address, value);
+	address = HWPfDmaQmanen;
+	value = 0;
+	acc_reg_write(d, address, value);
+
+	/* Default RLIM/ALEN configuration. */
+	rlim = 0;
+	alen = 1;
+	timestamp = 0;
+	address = HWPfDmaConfig1Reg;
+	value = (1 << 31) + (rlim << 8) + (timestamp << 6) + alen;
+	acc_reg_write(d, address, value);
+
+	/* Default FFT configuration. */
+	address = HWPfFftConfig0;
+	value = ACC200_FFT_CFG_0;
+	acc_reg_write(d, address, value);
+
+	/* Configure DMA Qmanager addresses. */
+	address = HWPfDmaQmgrAddrReg;
+	value = HWPfQmgrEgressQueuesTemplate;
+	acc_reg_write(d, address, value);
+
+	/* ===== Qmgr Configuration ===== */
+	/* Configuration of the AQueue Depth QMGR_GRP_0_DEPTH_LOG2 for UL. */
+	totalQgs = conf->q_ul_4g.num_qgroups +
+			conf->q_ul_5g.num_qgroups +
+			conf->q_dl_4g.num_qgroups +
+			conf->q_dl_5g.num_qgroups +
+			conf->q_fft.num_qgroups;
+	for (qg_idx = 0; qg_idx < ACC200_NUM_QGRPS; qg_idx++) {
+		address = HWPfQmgrDepthLog2Grp +
+				ACC_BYTES_IN_WORD * qg_idx;
+		value = aqDepth(qg_idx, conf);
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrTholdGrp +
+				ACC_BYTES_IN_WORD * qg_idx;
+		value = (1 << 16) + (1 << (aqDepth(qg_idx, conf) - 1));
+		acc_reg_write(d, address, value);
+	}
+
+	/* Template Priority in incremental order. */
+	for (template_idx = 0; template_idx < ACC_NUM_TMPL;
+			template_idx++) {
+		address = HWPfQmgrGrpTmplateReg0Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_0;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg1Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_1;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg2indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_2;
+		acc_reg_write(d, address, value);
+		address = HWPfQmgrGrpTmplateReg3Indx + ACC_BYTES_IN_WORD * template_idx;
+		value = ACC_TMPL_PRI_3;
+		acc_reg_write(d, address, value);
+	}
+
+	address = HWPfQmgrGrpPriority;
+	value = ACC200_CFG_QMGR_HI_P;
+	acc_reg_write(d, address, value);
+
+	/* Template Configuration. */
+	for (template_idx = 0; template_idx < ACC_NUM_TMPL;
+			template_idx++) {
+		value = 0;
+		address = HWPfQmgrGrpTmplateReg4Indx
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
+	}
+	/* 4GUL */
+	numQgs = conf->q_ul_4g.num_qgroups;
+	numQqsAcc = 0;
+	value = 0;
+	for (qg_idx = numQqsAcc; qg_idx < (numQgs + numQqsAcc); qg_idx++)
+		value |= (1 << qg_idx);
+	for (template_idx = ACC200_SIG_UL_4G;
+			template_idx <= ACC200_SIG_UL_4G_LAST;
+			template_idx++) {
+		address = HWPfQmgrGrpTmplateReg4Indx
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
+	}
+	/* 5GUL */
+	numQqsAcc += numQgs;
+	numQgs	= conf->q_ul_5g.num_qgroups;
+	value = 0;
+	numEngines = 0;
+	for (qg_idx = numQqsAcc; qg_idx < (numQgs + numQqsAcc); qg_idx++)
+		value |= (1 << qg_idx);
+	for (template_idx = ACC200_SIG_UL_5G;
+			template_idx <= ACC200_SIG_UL_5G_LAST;
+			template_idx++) {
+		/* Check engine power-on status */
+		address = HwPfFecUl5gIbDebugReg + ACC_ENGINE_OFFSET * template_idx;
+		status = (acc_reg_read(d, address) >> 4) & 0x7;
+		address = HWPfQmgrGrpTmplateReg4Indx
+				+ ACC_BYTES_IN_WORD * template_idx;
+		if (status == 1) {
+			acc_reg_write(d, address, value);
+			numEngines++;
+		} else
+			acc_reg_write(d, address, 0);
+	}
+	printf("Number of 5GUL engines %d\n", numEngines);
+	/* 4GDL */
+	numQqsAcc += numQgs;
+	numQgs	= conf->q_dl_4g.num_qgroups;
+	value = 0;
+	for (qg_idx = numQqsAcc; qg_idx < (numQgs + numQqsAcc); qg_idx++)
+		value |= (1 << qg_idx);
+	for (template_idx = ACC200_SIG_DL_4G;
+			template_idx <= ACC200_SIG_DL_4G_LAST;
+			template_idx++) {
+		address = HWPfQmgrGrpTmplateReg4Indx
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
+	}
+	/* 5GDL */
+	numQqsAcc += numQgs;
+	numQgs	= conf->q_dl_5g.num_qgroups;
+	value = 0;
+	for (qg_idx = numQqsAcc; qg_idx < (numQgs + numQqsAcc); qg_idx++)
+		value |= (1 << qg_idx);
+	for (template_idx = ACC200_SIG_DL_5G;
+			template_idx <= ACC200_SIG_DL_5G_LAST;
+			template_idx++) {
+		address = HWPfQmgrGrpTmplateReg4Indx
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
+	}
+	/* FFT */
+	numQqsAcc += numQgs;
+	numQgs	= conf->q_fft.num_qgroups;
+	value = 0;
+	for (qg_idx = numQqsAcc; qg_idx < (numQgs + numQqsAcc); qg_idx++)
+		value |= (1 << qg_idx);
+	for (template_idx = ACC200_SIG_FFT;
+			template_idx <= ACC200_SIG_FFT_LAST;
+			template_idx++) {
+		address = HWPfQmgrGrpTmplateReg4Indx
+				+ ACC_BYTES_IN_WORD * template_idx;
+		acc_reg_write(d, address, value);
+	}
+
+	/* Queue Group Function mapping. */
+	int qman_func_id[8] = {0, 2, 1, 3, 4, 0, 0, 0};
+	value = 0;
+	for (qg_idx = 0; qg_idx < ACC_NUM_QGRPS_PER_WORD; qg_idx++) {
+		acc = accFromQgid(qg_idx, conf);
+		value |= qman_func_id[acc] << (qg_idx * 4);
+	}
+	acc_reg_write(d, HWPfQmgrGrpFunction0, value);
+	value = 0;
+	for (qg_idx = 0; qg_idx < ACC_NUM_QGRPS_PER_WORD; qg_idx++) {
+		acc = accFromQgid(qg_idx + ACC_NUM_QGRPS_PER_WORD, conf);
+		value |= qman_func_id[acc] << (qg_idx * 4);
+	}
+	acc_reg_write(d, HWPfQmgrGrpFunction1, value);
+
+	/* Configuration of the Arbitration QGroup depth to 1. */
+	for (qg_idx = 0; qg_idx < ACC200_NUM_QGRPS; qg_idx++) {
+		address = HWPfQmgrArbQDepthGrp +
+				ACC_BYTES_IN_WORD * qg_idx;
+		value = 0;
+		acc_reg_write(d, address, value);
+	}
+
+	/* This pointer to ARAM (256kB) is shifted by 2 (4B per register). */
+	uint32_t aram_address = 0;
+	for (qg_idx = 0; qg_idx < totalQgs; qg_idx++) {
+		for (vf_idx = 0; vf_idx < conf->num_vf_bundles; vf_idx++) {
+			address = HWPfQmgrVfBaseAddr + vf_idx
+					* ACC_BYTES_IN_WORD + qg_idx
+					* ACC_BYTES_IN_WORD * 64;
+			value = aram_address;
+			acc_reg_write(d, address, value);
+			/* Offset ARAM Address for next memory bank - increment of 4B. */
+			aram_address += aqNum(qg_idx, conf) *
+					(1 << aqDepth(qg_idx, conf));
+		}
+	}
+
+	if (aram_address > ACC200_WORDS_IN_ARAM_SIZE) {
+		rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d\n",
+				aram_address, ACC200_WORDS_IN_ARAM_SIZE);
+		return -EINVAL;
+	}
+
+	/* Performance tuning. */
+	acc_reg_write(d, HWPfFabricI2Mdma_weight, 0x0FFF);
+	acc_reg_write(d, HWPfDma4gdlIbThld, 0x1f10);
+
+	/* ==== HI Configuration ==== */
+
+	/* No Info Ring/MSI by default. */
+	address = HWPfHiInfoRingIntWrEnRegPf;
+	value = 0;
+	acc_reg_write(d, address, value);
+	address = HWPfHiCfgMsiIntWrEnRegPf;
+	value = 0xFFFFFFFF;
+	acc_reg_write(d, address, value);
+	/* Prevent Block on Transmit Error. */
+	address = HWPfHiBlockTransmitOnErrorEn;
+	value = 0;
+	acc_reg_write(d, address, value);
+	/* Prevents to drop MSI. */
+	address = HWPfHiMsiDropEnableReg;
+	value = 0;
+	acc_reg_write(d, address, value);
+	/* Set the PF Mode register. */
+	address = HWPfHiPfMode;
+	value = (conf->pf_mode_en) ? ACC_PF_VAL : 0;
+	acc_reg_write(d, address, value);
+
+	/* QoS overflow init. */
+	value = 1;
+	address = HWPfQosmonAEvalOverflow0;
+	acc_reg_write(d, address, value);
+	address = HWPfQosmonBEvalOverflow0;
+	acc_reg_write(d, address, value);
+
+	/* Configure the FFT RAM LUT. */
+	uint32_t fft_lut[ACC200_FFT_RAM_SIZE] = {
+	0x1FFFF, 0x1FFFF, 0x1FFFE, 0x1FFFA, 0x1FFF6, 0x1FFF1, 0x1FFEA, 0x1FFE2,
+	0x1FFD9, 0x1FFCE, 0x1FFC2, 0x1FFB5, 0x1FFA7, 0x1FF98, 0x1FF87, 0x1FF75,
+	0x1FF62, 0x1FF4E, 0x1FF38, 0x1FF21, 0x1FF09, 0x1FEF0, 0x1FED6, 0x1FEBA,
+	0x1FE9D, 0x1FE7F, 0x1FE5F, 0x1FE3F, 0x1FE1D, 0x1FDFA, 0x1FDD5, 0x1FDB0,
+	0x1FD89, 0x1FD61, 0x1FD38, 0x1FD0D, 0x1FCE1, 0x1FCB4, 0x1FC86, 0x1FC57,
+	0x1FC26, 0x1FBF4, 0x1FBC1, 0x1FB8D, 0x1FB58, 0x1FB21, 0x1FAE9, 0x1FAB0,
+	0x1FA75, 0x1FA3A, 0x1F9FD, 0x1F9BF, 0x1F980, 0x1F93F, 0x1F8FD, 0x1F8BA,
+	0x1F876, 0x1F831, 0x1F7EA, 0x1F7A3, 0x1F75A, 0x1F70F, 0x1F6C4, 0x1F677,
+	0x1F629, 0x1F5DA, 0x1F58A, 0x1F539, 0x1F4E6, 0x1F492, 0x1F43D, 0x1F3E7,
+	0x1F38F, 0x1F337, 0x1F2DD, 0x1F281, 0x1F225, 0x1F1C8, 0x1F169, 0x1F109,
+	0x1F0A8, 0x1F046, 0x1EFE2, 0x1EF7D, 0x1EF18, 0x1EEB0, 0x1EE48, 0x1EDDF,
+	0x1ED74, 0x1ED08, 0x1EC9B, 0x1EC2D, 0x1EBBE, 0x1EB4D, 0x1EADB, 0x1EA68,
+	0x1E9F4, 0x1E97F, 0x1E908, 0x1E891, 0x1E818, 0x1E79E, 0x1E722, 0x1E6A6,
+	0x1E629, 0x1E5AA, 0x1E52A, 0x1E4A9, 0x1E427, 0x1E3A3, 0x1E31F, 0x1E299,
+	0x1E212, 0x1E18A, 0x1E101, 0x1E076, 0x1DFEB, 0x1DF5E, 0x1dED0, 0x1DE41,
+	0x1DDB1, 0x1DD20, 0x1DC8D, 0x1DBFA, 0x1DB65, 0x1DACF, 0x1DA38, 0x1D9A0,
+	0x1D907, 0x1D86C, 0x1D7D1, 0x1D734, 0x1D696, 0x1D5F7, 0x1D557, 0x1D4B6,
+	0x1D413, 0x1D370, 0x1D2CB, 0x1D225, 0x1D17E, 0x1D0D6, 0x1D02D, 0x1CF83,
+	0x1CED8, 0x1CE2B, 0x1CD7E, 0x1CCCF, 0x1CC1F, 0x1CB6E, 0x1CABC, 0x1CA09,
+	0x1C955, 0x1C89F, 0x1C7E9, 0x1C731, 0x1C679, 0x1C5BF, 0x1C504, 0x1C448,
+	0x1C38B, 0x1C2CD, 0x1C20E, 0x1C14E, 0x1C08C, 0x1BFCA, 0x1BF06, 0x1BE42,
+	0x1BD7C, 0x1BCB5, 0x1BBED, 0x1BB25, 0x1BA5B, 0x1B990, 0x1B8C4, 0x1B7F6,
+	0x1B728, 0x1B659, 0x1B589, 0x1B4B7, 0x1B3E5, 0x1B311, 0x1B23D, 0x1B167,
+	0x1B091, 0x1AFB9, 0x1AEE0, 0x1AE07, 0x1AD2C, 0x1AC50, 0x1AB73, 0x1AA95,
+	0x1A9B6, 0x1A8D6, 0x1A7F6, 0x1A714, 0x1A631, 0x1A54D, 0x1A468, 0x1A382,
+	0x1A29A, 0x1A1B2, 0x1A0C9, 0x19FDF, 0x19EF4, 0x19E08, 0x19D1B, 0x19C2D,
+	0x19B3E, 0x19A4E, 0x1995D, 0x1986B, 0x19778, 0x19684, 0x1958F, 0x19499,
+	0x193A2, 0x192AA, 0x191B1, 0x190B8, 0x18FBD, 0x18EC1, 0x18DC4, 0x18CC7,
+	0x18BC8, 0x18AC8, 0x189C8, 0x188C6, 0x187C4, 0x186C1, 0x185BC, 0x184B7,
+	0x183B1, 0x182AA, 0x181A2, 0x18099, 0x17F8F, 0x17E84, 0x17D78, 0x17C6C,
+	0x17B5E, 0x17A4F, 0x17940, 0x17830, 0x1771E, 0x1760C, 0x174F9, 0x173E5,
+	0x172D1, 0x171BB, 0x170A4, 0x16F8D, 0x16E74, 0x16D5B, 0x16C41, 0x16B26,
+	0x16A0A, 0x168ED, 0x167CF, 0x166B1, 0x16592, 0x16471, 0x16350, 0x1622E,
+	0x1610B, 0x15FE8, 0x15EC3, 0x15D9E, 0x15C78, 0x15B51, 0x15A29, 0x15900,
+	0x157D7, 0x156AC, 0x15581, 0x15455, 0x15328, 0x151FB, 0x150CC, 0x14F9D,
+	0x14E6D, 0x14D3C, 0x14C0A, 0x14AD8, 0x149A4, 0x14870, 0x1473B, 0x14606,
+	0x144CF, 0x14398, 0x14260, 0x14127, 0x13FEE, 0x13EB3, 0x13D78, 0x13C3C,
+	0x13B00, 0x139C2, 0x13884, 0x13745, 0x13606, 0x134C5, 0x13384, 0x13242,
+	0x130FF, 0x12FBC, 0x12E78, 0x12D33, 0x12BEE, 0x12AA7, 0x12960, 0x12819,
+	0x126D0, 0x12587, 0x1243D, 0x122F3, 0x121A8, 0x1205C, 0x11F0F, 0x11DC2,
+	0x11C74, 0x11B25, 0x119D6, 0x11886, 0x11735, 0x115E3, 0x11491, 0x1133F,
+	0x111EB, 0x11097, 0x10F42, 0x10dED, 0x10C97, 0x10B40, 0x109E9, 0x10891,
+	0x10738, 0x105DF, 0x10485, 0x1032B, 0x101D0, 0x10074, 0x0FF18, 0x0FDBB,
+	0x0FC5D, 0x0FAFF, 0x0F9A0, 0x0F841, 0x0F6E1, 0x0F580, 0x0F41F, 0x0F2BD,
+	0x0F15B, 0x0EFF8, 0x0EE94, 0x0ED30, 0x0EBCC, 0x0EA67, 0x0E901, 0x0E79A,
+	0x0E633, 0x0E4CC, 0x0E364, 0x0E1FB, 0x0E092, 0x0DF29, 0x0DDBE, 0x0DC54,
+	0x0DAE9, 0x0D97D, 0x0D810, 0x0D6A4, 0x0D536, 0x0D3C8, 0x0D25A, 0x0D0EB,
+	0x0CF7C, 0x0CE0C, 0x0CC9C, 0x0CB2B, 0x0C9B9, 0x0C847, 0x0C6D5, 0x0C562,
+	0x0C3EF, 0x0C27B, 0x0C107, 0x0BF92, 0x0BE1D, 0x0BCA8, 0x0BB32, 0x0B9BB,
+	0x0B844, 0x0B6CD, 0x0B555, 0x0B3DD, 0x0B264, 0x0B0EB, 0x0AF71, 0x0ADF7,
+	0x0AC7D, 0x0AB02, 0x0A987, 0x0A80B, 0x0A68F, 0x0A513, 0x0A396, 0x0A219,
+	0x0A09B, 0x09F1D, 0x09D9E, 0x09C20, 0x09AA1, 0x09921, 0x097A1, 0x09621,
+	0x094A0, 0x0931F, 0x0919E, 0x0901C, 0x08E9A, 0x08D18, 0x08B95, 0x08A12,
+	0x0888F, 0x0870B, 0x08587, 0x08402, 0x0827E, 0x080F9, 0x07F73, 0x07DEE,
+	0x07C68, 0x07AE2, 0x0795B, 0x077D4, 0x0764D, 0x074C6, 0x0733E, 0x071B6,
+	0x0702E, 0x06EA6, 0x06D1D, 0x06B94, 0x06A0B, 0x06881, 0x066F7, 0x0656D,
+	0x063E3, 0x06258, 0x060CE, 0x05F43, 0x05DB7, 0x05C2C, 0x05AA0, 0x05914,
+	0x05788, 0x055FC, 0x0546F, 0x052E3, 0x05156, 0x04FC9, 0x04E3B, 0x04CAE,
+	0x04B20, 0x04992, 0x04804, 0x04676, 0x044E8, 0x04359, 0x041CB, 0x0403C,
+	0x03EAD, 0x03D1D, 0x03B8E, 0x039FF, 0x0386F, 0x036DF, 0x0354F, 0x033BF,
+	0x0322F, 0x0309F, 0x02F0F, 0x02D7E, 0x02BEE, 0x02A5D, 0x028CC, 0x0273B,
+	0x025AA, 0x02419, 0x02288, 0x020F7, 0x01F65, 0x01DD4, 0x01C43, 0x01AB1,
+	0x0191F, 0x0178E, 0x015FC, 0x0146A, 0x012D8, 0x01147, 0x00FB5, 0x00E23,
+	0x00C91, 0x00AFF, 0x0096D, 0x007DB, 0x00648, 0x004B6, 0x00324, 0x00192};
+
+	acc_reg_write(d, HWPfFftRamPageAccess, ACC200_FFT_RAM_EN + 64);
+	for (i = 0; i < ACC200_FFT_RAM_SIZE; i++)
+		acc_reg_write(d, HWPfFftRamOff + i * 4, fft_lut[i]);
+	acc_reg_write(d, HWPfFftRamPageAccess, ACC200_FFT_RAM_DIS);
+
+	/* Enabling AQueues through the Queue hierarchy. */
+	for (vf_idx = 0; vf_idx < ACC200_NUM_VFS; vf_idx++) {
+		for (qg_idx = 0; qg_idx < ACC200_NUM_QGRPS; qg_idx++) {
+			value = 0;
+			if (vf_idx < conf->num_vf_bundles && qg_idx < totalQgs)
+				value = (1 << aqNum(qg_idx, conf)) - 1;
+			address = HWPfQmgrAqEnableVf + vf_idx * ACC_BYTES_IN_WORD;
+			value += (qg_idx << 16);
+			acc_reg_write(d, address, value);
+		}
+	}
+
+	rte_bbdev_log_debug("PF Tip configuration complete for %s", dev_name);
+	return 0;
+}
diff --git a/drivers/baseband/acc/rte_acc100_cfg.h b/drivers/baseband/acc/rte_acc_cfg.h
similarity index 67%
rename from drivers/baseband/acc/rte_acc100_cfg.h
rename to drivers/baseband/acc/rte_acc_cfg.h
index 732c03be24..21bcf88dad 100644
--- a/drivers/baseband/acc/rte_acc100_cfg.h
+++ b/drivers/baseband/acc/rte_acc_cfg.h
@@ -2,13 +2,13 @@
  * Copyright(c) 2022 Intel Corporation
  */
 
-#ifndef _RTE_ACC100_CFG_H_
-#define _RTE_ACC100_CFG_H_
+#ifndef _RTE_ACC_CFG_H_
+#define _RTE_ACC_CFG_H_
 
 /**
- * @file rte_acc100_cfg.h
+ * @file rte_acc_cfg.h
  *
- * Functions for configuring ACC100 HW, exposed directly to applications.
+ * Functions for configuring ACC HW, exposed directly to applications.
  * Configuration related to encoding/decoding is done through the
  * librte_bbdev library.
  *
@@ -26,24 +26,24 @@ extern "C" {
 
 
 /**
- * Configure a ACC100/ACC101 device in PF mode notably for bbdev-test
+ * Configure a ACC device in PF mode notably for bbdev-test
  *
  * @param dev_name
  *   The name of the device. This is the short form of PCI BDF, e.g. 00:01.0.
  *   It can also be retrieved for a bbdev device from the dev_name field in the
  *   rte_bbdev_info structure returned by rte_bbdev_info_get().
  * @param conf
- *   Configuration to apply to ACC100 HW.
+ *   Configuration to apply to ACC HW.
  *
  * @return
  *   Zero on success, negative value on failure.
  */
 __rte_experimental
 int
-rte_acc10x_configure(const char *dev_name, struct rte_acc_conf *conf);
+rte_acc_configure(const char *dev_name, struct rte_acc_conf *conf);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* _RTE_ACC100_CFG_H_ */
+#endif /* _RTE_ACC_CFG_H_ */
diff --git a/drivers/baseband/acc/rte_acc_common_cfg.h b/drivers/baseband/acc/rte_acc_common_cfg.h
index 8292ef44da..cce75d5878 100644
--- a/drivers/baseband/acc/rte_acc_common_cfg.h
+++ b/drivers/baseband/acc/rte_acc_common_cfg.h
@@ -6,9 +6,9 @@
 #define _RTE_ACC_COMMON_CFG_H_
 
 /**
- * @file rte_acc100_cfg.h
+ * @file rte_acc_common_cfg.h
  *
- * Functions for configuring ACC100 HW, exposed directly to applications.
+ * Functions for configuring ACC HW, exposed directly to applications.
  * Configuration related to encoding/decoding is done through the
  * librte_bbdev library.
  *
@@ -23,11 +23,11 @@
 extern "C" {
 #endif
 
-/**< Number of Virtual Functions ACC300 supports */
+/**< Maximum number of Virtual Functions ACC may support */
 #define RTE_ACC_NUM_VFS 64
 
 /**
- * Definition of Queue Topology for ACC300 Configuration
+ * Definition of Queue Topology for ACC Configuration
  * Some level of details is abstracted out to expose a clean interface
  * given that comprehensive flexibility is not required
  */
@@ -54,7 +54,7 @@ struct rte_acc_queue_topology {
 };
 
 /**
- * Definition of Arbitration related parameters for ACC300 Configuration
+ * Definition of Arbitration related parameters for ACC Configuration
  */
 struct rte_acc_arbitration {
 	/** Default Weight for VF Fairness Arbitration */
@@ -64,7 +64,7 @@ struct rte_acc_arbitration {
 };
 
 /**
- * Structure to pass ACC300 configuration.
+ * Structure to pass ACC configuration.
  * Note: all VF Bundles will have the same configuration.
  */
 struct rte_acc_conf {
diff --git a/drivers/baseband/acc/version.map b/drivers/baseband/acc/version.map
index b4ff13e38f..95ae74dd35 100644
--- a/drivers/baseband/acc/version.map
+++ b/drivers/baseband/acc/version.map
@@ -5,5 +5,5 @@ DPDK_23 {
 EXPERIMENTAL {
 	global:
 
-	rte_acc10x_configure;
+	rte_acc_configure;
 };
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 14/16] baseband/acc: simplify meson dependency
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (12 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 13/16] baseband/acc: add PF configure companion function Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 15/16] baseband/acc: add helper function for descriptor index Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 16/16] test-bbdev: unit test capability extension Nicolas Chautru
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Removed some of libraries from the external dependency captured in
meson build file which are not required.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/baseband/acc/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/baseband/acc/meson.build b/drivers/baseband/acc/meson.build
index d74ace1481..77c393b533 100644
--- a/drivers/baseband/acc/meson.build
+++ b/drivers/baseband/acc/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Intel Corporation
 
-deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
+deps += ['bbdev', 'bus_pci']
 
 sources = files('rte_acc100_pmd.c', 'rte_acc200_pmd.c')
 
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 15/16] baseband/acc: add helper function for descriptor index
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (13 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 14/16] baseband/acc: simplify meson dependency Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  2022-10-11 21:15 ` [PATCH v10 16/16] test-bbdev: unit test capability extension Nicolas Chautru
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added set of helper functions used through the code to
track descriptor indexes in a queue ring.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/acc/acc_common.h     |  41 ++++++++-
 drivers/baseband/acc/rte_acc100_pmd.c | 124 ++++++++++----------------
 drivers/baseband/acc/rte_acc200_pmd.c | 124 +++++++++++---------------
 3 files changed, 132 insertions(+), 157 deletions(-)

diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index 35bd628e6c..6f141c95ce 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -865,6 +865,41 @@ acc_fcw_le_fill(const struct rte_bbdev_enc_op *op,
 	fcw->mcb_count = num_cb;
 }
 
+/* Provide the descriptor index on a given queue */
+static inline uint16_t
+acc_desc_idx(struct acc_queue *q, uint16_t offset)
+{
+	return (q->sw_ring_head + offset) & q->sw_ring_wrap_mask;
+}
+
+/* Provide the descriptor pointer on a given queue */
+static inline union acc_dma_desc*
+acc_desc(struct acc_queue *q, uint16_t offset)
+{
+	return q->ring_addr + acc_desc_idx(q, offset);
+}
+
+/* Provide the descriptor index for the tail of a given queue */
+static inline uint16_t
+acc_desc_idx_tail(struct acc_queue *q, uint16_t offset)
+{
+	return (q->sw_ring_tail + offset) & q->sw_ring_wrap_mask;
+}
+
+/* Provide the descriptor tail pointer on a given queue */
+static inline union acc_dma_desc*
+acc_desc_tail(struct acc_queue *q, uint16_t offset)
+{
+	return q->ring_addr + acc_desc_idx_tail(q, offset);
+}
+
+/* Provide the operation pointer from the tail of a given queue */
+static inline void*
+acc_op_tail(struct acc_queue *q, uint16_t offset)
+{
+	return (q->ring_addr + ((q->sw_ring_tail + offset) & q->sw_ring_wrap_mask))->req.op_addr;
+}
+
 /* Enqueue a number of operations to HW and update software rings */
 static inline void
 acc_dma_enqueue(struct acc_queue *q, uint16_t n,
@@ -892,13 +927,11 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
 		enq_batch_size = RTE_MIN(n, MAX_ENQ_BATCH_SIZE);
 
 		/* Set flag on last descriptor in a batch */
-		desc = q->ring_addr + ((q->sw_ring_head + enq_batch_size - 1) &
-				q->sw_ring_wrap_mask);
+		desc = acc_desc(q, enq_batch_size - 1);
 		desc->req.last_desc_in_batch = 1;
 
 		/* Calculate the 1st descriptor's address */
-		offset = ((q->sw_ring_head & q->sw_ring_wrap_mask) *
-				sizeof(union acc_dma_desc));
+		offset = ((q->sw_ring_head & q->sw_ring_wrap_mask) * sizeof(union acc_dma_desc));
 		req_elem_addr = q->ring_addr_iova + offset;
 
 		/* Fill enqueue struct */
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 9ba8bd84d5..e5384223d1 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -1976,9 +1976,7 @@ enqueue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	}
 #endif
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	acc_fcw_te_fill(op, &desc->req.fcw_te);
 
 	input = op->turbo_enc.input.data;
@@ -2030,9 +2028,7 @@ enqueue_ldpc_enc_n_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ops,
 	}
 #endif
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	acc_fcw_le_fill(ops[0], &desc->req.fcw_le, num, 0);
 
 	/** This could be done at polling */
@@ -2092,9 +2088,7 @@ enqueue_ldpc_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	}
 #endif
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	acc_fcw_le_fill(op, &desc->req.fcw_le, 1, 0);
 
 	input = op->ldpc_enc.input.data;
@@ -2139,7 +2133,8 @@ enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	uint32_t in_offset, out_offset, out_length, mbuf_total_left,
 		seg_total_left;
 	struct rte_mbuf *input, *output_head, *output;
-	uint16_t current_enqueued_cbs = 0;
+	uint16_t desc_idx, current_enqueued_cbs = 0;
+	uint64_t fcw_offset;
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	/* Validate op structure */
@@ -2149,10 +2144,9 @@ enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	}
 #endif
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc_idx = acc_desc_idx(q, total_enqueued_cbs);
 	desc = q->ring_addr + desc_idx;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
 	acc_fcw_te_fill(op, &desc->req.fcw_te);
 
 	input = op->turbo_enc.input.data;
@@ -2168,8 +2162,7 @@ enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	while (mbuf_total_left > 0 && r < c) {
 		seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
 		/* Set up DMA descriptor */
-		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
-				& q->sw_ring_wrap_mask);
+		desc = acc_desc(q, total_enqueued_cbs);
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
 		desc->req.data_ptrs[0].blen = ACC_FCW_TE_BLEN;
 
@@ -2372,9 +2365,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	}
 #endif
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	acc100_fcw_td_fill(op, &desc->req.fcw_td);
 
 	input = op->turbo_dec.input.data;
@@ -2395,8 +2386,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 #endif
 
 	/* Set up DMA descriptor */
-	desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc(q, total_enqueued_cbs);
 
 	ret = acc100_dma_desc_td_fill(op, &desc->req, &input, h_output,
 			s_output, &in_offset, &h_out_offset, &s_out_offset,
@@ -2434,6 +2424,7 @@ harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	struct rte_mbuf *hq_output_head, *hq_output;
 	uint16_t harq_dma_length_in, harq_dma_length_out;
 	uint16_t harq_in_length = op->ldpc_dec.harq_combined_input.length;
+
 	if (harq_in_length == 0) {
 		rte_bbdev_log(ERR, "Loopback of invalid null size\n");
 		return -EINVAL;
@@ -2460,9 +2451,7 @@ harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 			op->ldpc_dec.harq_combined_output.offset)
 			/ ACC_HARQ_OFFSET;
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	fcw = &desc->req.fcw_ld;
 	/* Set the FCW from loopback into DDR */
 	memset(fcw, 0, sizeof(struct acc_fcw_ld));
@@ -2597,9 +2586,7 @@ enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	}
 #endif
 	union acc_dma_desc *desc;
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	struct rte_mbuf *input, *h_output_head, *h_output;
 	uint32_t in_offset, h_out_offset, mbuf_total_left, h_out_length = 0;
 	input = op->ldpc_dec.input.data;
@@ -2617,9 +2604,7 @@ enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 
 	if (same_op) {
 		union acc_dma_desc *prev_desc;
-		desc_idx = ((q->sw_ring_head + total_enqueued_cbs - 1)
-				& q->sw_ring_wrap_mask);
-		prev_desc = q->ring_addr + desc_idx;
+		prev_desc = acc_desc(q, total_enqueued_cbs - 1);
 		uint8_t *prev_ptr = (uint8_t *) prev_desc;
 		uint8_t *new_ptr = (uint8_t *) desc;
 		/* Copy first 4 words and BDESCs */
@@ -2691,7 +2676,9 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	uint32_t in_offset, h_out_offset,
 		h_out_length, mbuf_total_left, seg_total_left;
 	struct rte_mbuf *input, *h_output_head, *h_output;
-	uint16_t current_enqueued_cbs = 0;
+	uint16_t desc_idx, current_enqueued_cbs = 0;
+	uint64_t fcw_offset;
+	union acc_harq_layout_data *harq_layout;
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	/* Validate op structure */
@@ -2701,11 +2688,10 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	}
 #endif
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc_idx = acc_desc_idx(q, total_enqueued_cbs);
 	desc = q->ring_addr + desc_idx;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
-	union acc_harq_layout_data *harq_layout = q->d->harq_layout;
+	fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	harq_layout = q->d->harq_layout;
 	q->d->fcw_ld_fill(op, &desc->req.fcw_ld, harq_layout);
 
 	input = op->ldpc_dec.input.data;
@@ -2722,8 +2708,7 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
 
 		/* Set up DMA descriptor */
-		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
-				& q->sw_ring_wrap_mask);
+		desc = acc_desc(q, total_enqueued_cbs);
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
 		desc->req.data_ptrs[0].blen = ACC_FCW_LD_BLEN;
 		ret = acc100_dma_desc_ld_fill(op, &desc->req, &input,
@@ -2781,7 +2766,8 @@ enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		h_out_length, mbuf_total_left, seg_total_left;
 	struct rte_mbuf *input, *h_output_head, *h_output,
 		*s_output_head, *s_output;
-	uint16_t current_enqueued_cbs = 0;
+	uint16_t desc_idx, current_enqueued_cbs = 0;
+	uint64_t fcw_offset;
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	/* Validate op structure */
@@ -2791,10 +2777,9 @@ enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	}
 #endif
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc_idx = acc_desc_idx(q, total_enqueued_cbs);
 	desc = q->ring_addr + desc_idx;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
 	acc100_fcw_td_fill(op, &desc->req.fcw_td);
 
 	input = op->turbo_dec.input.data;
@@ -2813,8 +2798,7 @@ enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
 
 		/* Set up DMA descriptor */
-		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
-				& q->sw_ring_wrap_mask);
+		desc = acc_desc(q, total_enqueued_cbs);
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
 		desc->req.data_ptrs[0].blen = ACC_FCW_TD_BLEN;
 		ret = acc100_dma_desc_td_fill(op, &desc->req, &input,
@@ -2897,8 +2881,7 @@ acc100_enqueue_enc_cb(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue */
 
 	/* Set SDone in last CB in enqueued ops for CB mode*/
-	desc = q->ring_addr + ((q->sw_ring_head + i - 1)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc(q, i - 1);
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
@@ -2947,8 +2930,7 @@ acc100_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue */
 
 	/* Set SDone in last CB in enqueued ops for CB mode*/
-	desc = q->ring_addr + ((q->sw_ring_head + desc_idx - 1)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc(q, desc_idx - 1);
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
@@ -3049,8 +3031,7 @@ acc100_enqueue_dec_cb(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue */
 
 	/* Set SDone in last CB in enqueued ops for CB mode*/
-	desc = q->ring_addr + ((q->sw_ring_head + i - 1)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc(q, i - 1);
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
@@ -3131,8 +3112,7 @@ acc100_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue */
 
 	/* Set SDone in last CB in enqueued ops for CB mode*/
-	desc = q->ring_addr + ((q->sw_ring_head + i - 1)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc(q, i - 1);
 
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
@@ -3220,9 +3200,10 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_enc_op *op;
 	int i;
+	uint16_t desc_idx;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + total_dequeued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc_idx = acc_desc_idx_tail(q, total_dequeued_cbs);
+	desc = q->ring_addr + desc_idx;
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
 			__ATOMIC_RELAXED);
 
@@ -3239,8 +3220,7 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	/* Clearing status, it will be set based on response */
 	op->status = 0;
 
-	op->status |= ((rsp.input_err)
-			? (1 << RTE_BBDEV_DATA_ERROR) : 0);
+	op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
 	op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
 	op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
 
@@ -3272,8 +3252,7 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	uint8_t i = 0;
 	uint16_t current_dequeued_cbs = 0, cbs_in_tb;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + total_dequeued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, total_dequeued_cbs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
 			__ATOMIC_RELAXED);
 
@@ -3284,9 +3263,7 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	/* Get number of CBs in dequeued TB */
 	cbs_in_tb = desc->req.cbs_in_tb;
 	/* Get last CB */
-	last_desc = q->ring_addr + ((q->sw_ring_tail
-			+ total_dequeued_cbs + cbs_in_tb - 1)
-			& q->sw_ring_wrap_mask);
+	last_desc = acc_desc_tail(q, total_dequeued_cbs + cbs_in_tb - 1);
 	/* Check if last CB in TB is ready to dequeue (and thus
 	 * the whole TB) - checking sdone bit. If not return.
 	 */
@@ -3302,9 +3279,7 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	op->status = 0;
 
 	while (i < cbs_in_tb) {
-		desc = q->ring_addr + ((q->sw_ring_tail
-				+ total_dequeued_cbs)
-				& q->sw_ring_wrap_mask);
+		desc = acc_desc_tail(q, total_dequeued_cbs);
 		atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
 				__ATOMIC_RELAXED);
 		rsp.val = atom_desc.rsp.val;
@@ -3343,8 +3318,7 @@ dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_dec_op *op;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, dequeued_cbs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
 			__ATOMIC_RELAXED);
 
@@ -3397,8 +3371,7 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_dec_op *op;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, dequeued_cbs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
 			__ATOMIC_RELAXED);
 
@@ -3453,8 +3426,7 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 	struct rte_bbdev_dec_op *op;
 	uint8_t cbs_in_tb = 1, cb_idx = 0;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, dequeued_cbs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
 			__ATOMIC_RELAXED);
 
@@ -3468,9 +3440,7 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 	/* Get number of CBs in dequeued TB */
 	cbs_in_tb = desc->req.cbs_in_tb;
 	/* Get last CB */
-	last_desc = q->ring_addr + ((q->sw_ring_tail
-			+ dequeued_cbs + cbs_in_tb - 1)
-			& q->sw_ring_wrap_mask);
+	last_desc = acc_desc_tail(q, dequeued_cbs + cbs_in_tb - 1);
 	/* Check if last CB in TB is ready to dequeue (and thus
 	 * the whole TB) - checking sdone bit. If not return.
 	 */
@@ -3484,16 +3454,14 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 
 	/* Read remaining CBs if exists */
 	while (cb_idx < cbs_in_tb) {
-		desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
-				& q->sw_ring_wrap_mask);
+		desc = acc_desc_tail(q, dequeued_cbs);
 		atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
 				__ATOMIC_RELAXED);
 		rsp.val = atom_desc.rsp.val;
 		rte_bbdev_log_debug("Resp. desc %p: %x", desc,
 				rsp.val);
 
-		op->status |= ((rsp.input_err)
-				? (1 << RTE_BBDEV_DATA_ERROR) : 0);
+		op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
 		op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
 		op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
 
@@ -3543,8 +3511,7 @@ acc100_dequeue_enc(struct rte_bbdev_queue_data *q_data,
 	dequeue_num = (avail < num) ? avail : num;
 
 	for (i = 0; i < dequeue_num; ++i) {
-		op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
-			& q->sw_ring_wrap_mask))->req.op_addr;
+		op = acc_op_tail(q, dequeued_cbs);
 		if (op->turbo_enc.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
 			ret = dequeue_enc_one_op_tb(q, &ops[i], dequeued_cbs,
 					&aq_dequeued);
@@ -3627,8 +3594,7 @@ acc100_dequeue_dec(struct rte_bbdev_queue_data *q_data,
 	dequeue_num = (avail < num) ? avail : num;
 
 	for (i = 0; i < dequeue_num; ++i) {
-		op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
-			& q->sw_ring_wrap_mask))->req.op_addr;
+		op = acc_op_tail(q, dequeued_cbs);
 		if (op->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
 			ret = dequeue_dec_one_op_tb(q, &ops[i], dequeued_cbs,
 					&aq_dequeued);
diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
index a67f0dd2f3..e4015163f2 100644
--- a/drivers/baseband/acc/rte_acc200_pmd.c
+++ b/drivers/baseband/acc/rte_acc200_pmd.c
@@ -1654,9 +1654,7 @@ enqueue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	uint32_t in_offset, out_offset, out_length, mbuf_total_left, seg_total_left;
 	struct rte_mbuf *input, *output_head, *output;
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	acc_fcw_te_fill(op, &desc->req.fcw_te);
 
 	input = op->turbo_enc.input.data;
@@ -1698,10 +1696,9 @@ enqueue_ldpc_enc_n_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ops,
 	int i, next_triplet;
 	uint16_t  in_length_in_bytes;
 	struct rte_bbdev_op_ldpc_enc *enc = &ops[0]->ldpc_enc;
+	struct acc_ptrs *context_ptrs;
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_descs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_descs);
 	acc_fcw_le_fill(ops[0], &desc->req.fcw_le, num, 0);
 
 	/** This could be done at polling. */
@@ -1731,7 +1728,7 @@ enqueue_ldpc_enc_n_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ops,
 
 	desc->req.op_addr = ops[0];
 	/* Keep track of pointers even when multiplexed in single descriptor. */
-	struct acc_ptrs *context_ptrs = q->companion_ring_addr + desc_idx;
+	context_ptrs = q->companion_ring_addr + acc_desc_idx(q, total_enqueued_descs);
 	for (i = 0; i < num; i++)
 		context_ptrs->ptr[i].op_addr = ops[i];
 
@@ -1760,9 +1757,7 @@ enqueue_ldpc_enc_part_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	int i, next_triplet;
 	struct rte_bbdev_op_ldpc_enc *enc = &op->ldpc_enc;
 
-
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_descs) & q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_descs);
 	acc_fcw_le_fill(op, &desc->req.fcw_le, num_cbs, e);
 
 	/** This could be done at polling. */
@@ -1808,12 +1803,12 @@ enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	uint32_t in_offset, out_offset, out_length, mbuf_total_left,
 		seg_total_left;
 	struct rte_mbuf *input, *output_head, *output;
-	uint16_t current_enqueued_cbs = 0;
+	uint16_t desc_idx, current_enqueued_cbs = 0;
+	uint64_t fcw_offset;
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc_idx = acc_desc_idx(q, total_enqueued_cbs);
 	desc = q->ring_addr + desc_idx;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
 	acc_fcw_te_fill(op, &desc->req.fcw_te);
 
 	input = op->turbo_enc.input.data;
@@ -1829,8 +1824,7 @@ enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 	while (mbuf_total_left > 0 && r < c) {
 		seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
 		/* Set up DMA descriptor */
-		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
-				& q->sw_ring_wrap_mask);
+		desc = acc_desc(q, total_enqueued_cbs);
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
 		desc->req.data_ptrs[0].blen = ACC_FCW_TE_BLEN;
 
@@ -1877,7 +1871,7 @@ enqueue_ldpc_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 		uint16_t enq_descs, uint8_t cbs_in_tb)
 {
 	uint8_t num_a, num_b;
-	uint16_t desc_idx, input_len_B, return_descs;
+	uint16_t input_len_B, return_descs;
 	uint8_t r = op->ldpc_enc.tb_params.r;
 	uint8_t cab =  op->ldpc_enc.tb_params.cab;
 	union acc_dma_desc *desc;
@@ -1918,16 +1912,12 @@ enqueue_ldpc_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
 
 	return_descs = enq_descs - init_enq_descs;
 	/* Keep total number of CBs in first TB. */
-	desc_idx = ((q->sw_ring_head + init_enq_descs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, init_enq_descs);
 	desc->req.cbs_in_tb = return_descs; /** Actual number of descriptors. */
 	desc->req.op_addr = op;
 
 	/* Set SDone on last CB descriptor for TB mode. */
-	desc_idx = ((q->sw_ring_head + enq_descs - 1)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, enq_descs - 1);
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 	desc->req.op_addr = op;
@@ -1946,9 +1936,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	struct rte_mbuf *input, *h_output_head, *h_output,
 		*s_output_head, *s_output;
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	acc200_fcw_td_fill(op, &desc->req.fcw_td);
 
 	input = op->turbo_dec.input.data;
@@ -1962,8 +1950,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
 
 	/* Set up DMA descriptor */
-	desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc(q, total_enqueued_cbs);
 
 	ret = acc200_dma_desc_td_fill(op, &desc->req, &input, h_output,
 			s_output, &in_offset, &h_out_offset, &s_out_offset,
@@ -1997,7 +1984,6 @@ enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 {
 	int ret, hq_len;
 	union acc_dma_desc *desc;
-	uint16_t desc_idx;
 	struct rte_mbuf *input, *h_output_head, *h_output;
 	uint32_t in_offset, h_out_offset, mbuf_total_left, h_out_length = 0;
 	union acc_harq_layout_data *harq_layout;
@@ -2005,8 +1991,7 @@ enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	if (op->ldpc_dec.cb_params.e == 0)
 		return -EINVAL;
 
-	desc_idx = ((q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask);
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 
 	input = op->ldpc_dec.input.data;
 	h_output_head = h_output = op->ldpc_dec.hard_output.data;
@@ -2017,8 +2002,7 @@ enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 
 	if (same_op) {
 		union acc_dma_desc *prev_desc;
-		desc_idx = ((q->sw_ring_head + total_enqueued_cbs - 1) & q->sw_ring_wrap_mask);
-		prev_desc = q->ring_addr + desc_idx;
+		prev_desc = acc_desc(q, total_enqueued_cbs - 1);
 		uint8_t *prev_ptr = (uint8_t *) prev_desc;
 		uint8_t *new_ptr = (uint8_t *) desc;
 		/* Copy first 4 words and BDESCs. */
@@ -2094,13 +2078,15 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 	uint32_t in_offset, h_out_offset, h_out_length, mbuf_total_left, seg_total_left;
 	struct rte_mbuf *input, *h_output_head, *h_output;
 	uint16_t current_enqueued_cbs = 0;
-	uint16_t sys_cols, trail_len = 0;
+	uint16_t desc_idx, sys_cols, trail_len = 0;
+	uint64_t fcw_offset;
+	union acc_harq_layout_data *harq_layout;
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask);
+	desc_idx = acc_desc_idx(q, total_enqueued_cbs);
 	desc = q->ring_addr + desc_idx;
 	desc_first = desc;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
-	union acc_harq_layout_data *harq_layout = q->d->harq_layout;
+	fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	harq_layout = q->d->harq_layout;
 	acc200_fcw_ld_fill(op, &desc->req.fcw_ld, harq_layout);
 
 	input = op->ldpc_dec.input.data;
@@ -2123,7 +2109,7 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		else
 			seg_total_left = op->ldpc_dec.input.length;
 		/* Set up DMA descriptor. */
-		desc_idx = ((q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask);
+		desc_idx = acc_desc_idx(q, total_enqueued_cbs);
 		desc = q->ring_addr + desc_idx;
 		fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
@@ -2186,12 +2172,12 @@ enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		h_out_length, mbuf_total_left, seg_total_left;
 	struct rte_mbuf *input, *h_output_head, *h_output,
 		*s_output_head, *s_output;
-	uint16_t current_enqueued_cbs = 0;
+	uint16_t desc_idx, current_enqueued_cbs = 0;
+	uint64_t fcw_offset;
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
-			& q->sw_ring_wrap_mask);
+	desc_idx = acc_desc_idx(q, total_enqueued_cbs);
 	desc = q->ring_addr + desc_idx;
-	uint64_t fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
+	fcw_offset = (desc_idx << 8) + ACC_DESC_FCW_OFFSET;
 	acc200_fcw_td_fill(op, &desc->req.fcw_td);
 
 	input = op->turbo_dec.input.data;
@@ -2210,8 +2196,7 @@ enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
 		seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
 
 		/* Set up DMA descriptor */
-		desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs)
-				& q->sw_ring_wrap_mask);
+		desc = acc_desc(q, total_enqueued_cbs);
 		desc->req.data_ptrs[0].address = q->ring_addr_iova + fcw_offset;
 		desc->req.data_ptrs[0].blen = ACC_FCW_TD_BLEN;
 		ret = acc200_dma_desc_td_fill(op, &desc->req, &input,
@@ -2294,8 +2279,7 @@ acc200_enqueue_enc_cb(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue */
 
 	/* Set SDone in last CB in enqueued ops for CB mode*/
-	desc = q->ring_addr + ((q->sw_ring_head + i - 1)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc(q, i - 1);
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
@@ -2341,7 +2325,7 @@ acc200_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue. */
 
 	/* Set SDone in last CB in enqueued ops for CB mode. */
-	desc = q->ring_addr + ((q->sw_ring_head + desc_idx - 1) & q->sw_ring_wrap_mask);
+	desc = acc_desc(q, desc_idx - 1);
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
@@ -2487,8 +2471,7 @@ acc200_enqueue_dec_cb(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue. */
 
 	/* Set SDone in last CB in enqueued ops for CB mode. */
-	desc = q->ring_addr + ((q->sw_ring_head + i - 1)
-			& q->sw_ring_wrap_mask);
+	desc = acc_desc(q, i - 1);
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
@@ -2573,7 +2556,7 @@ acc200_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue. */
 
 	/* Set SDone in last CB in enqueued ops for CB mode. */
-	desc = q->ring_addr + ((q->sw_ring_head + i - 1) & q->sw_ring_wrap_mask);
+	desc = acc_desc(q, i - 1);
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
 
@@ -2662,8 +2645,9 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	struct rte_bbdev_enc_op *op;
 	int i;
 	struct acc_ptrs *context_ptrs;
-	int desc_idx = ((q->sw_ring_tail + *dequeued_descs) & q->sw_ring_wrap_mask);
+	uint16_t desc_idx;
 
+	desc_idx = acc_desc_idx_tail(q, *dequeued_descs);
 	desc = q->ring_addr + desc_idx;
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
 
@@ -2679,7 +2663,6 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 
 	/* Clearing status, it will be set based on response. */
 	op->status = 0;
-
 	op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
 	op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
 	op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
@@ -2717,7 +2700,7 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	uint8_t i = 0;
 	uint16_t current_dequeued_descs = 0, descs_in_tb;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + *dequeued_descs) & q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, *dequeued_descs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
 
 	/* Check fdone bit. */
@@ -2727,8 +2710,7 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	/* Get number of CBs in dequeued TB. */
 	descs_in_tb = desc->req.cbs_in_tb;
 	/* Get last CB */
-	last_desc = q->ring_addr + ((q->sw_ring_tail + *dequeued_descs + descs_in_tb - 1)
-			& q->sw_ring_wrap_mask);
+	last_desc = acc_desc_tail(q, *dequeued_descs + descs_in_tb - 1);
 	/* Check if last CB in TB is ready to dequeue (and thus
 	 * the whole TB) - checking sdone bit. If not return.
 	 */
@@ -2743,7 +2725,7 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
 	op->status = 0;
 
 	while (i < descs_in_tb) {
-		desc = q->ring_addr + ((q->sw_ring_tail + *dequeued_descs) & q->sw_ring_wrap_mask);
+		desc = acc_desc_tail(q, *dequeued_descs);
 		atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
 		rsp.val = atom_desc.rsp.val;
 		rte_bbdev_log_debug("Resp. desc %p: %x", desc, rsp.val);
@@ -2779,7 +2761,7 @@ dequeue_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_dec_op *op;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, dequeued_cbs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
 
 	/* Check fdone bit. */
@@ -2831,7 +2813,7 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_dec_op *op;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, dequeued_cbs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
 
 	/* Check fdone bit. */
@@ -2895,7 +2877,7 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 	uint8_t cbs_in_tb = 1, cb_idx = 0;
 	uint32_t tb_crc_check = 0;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, dequeued_cbs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
 
 	/* Check fdone bit. */
@@ -2908,8 +2890,7 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 	/* Get number of CBs in dequeued TB. */
 	cbs_in_tb = desc->req.cbs_in_tb;
 	/* Get last CB. */
-	last_desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs + cbs_in_tb - 1)
-			& q->sw_ring_wrap_mask);
+	last_desc = acc_desc_tail(q, dequeued_cbs + cbs_in_tb - 1);
 	/* Check if last CB in TB is ready to dequeue (and thus the whole TB) - checking sdone bit.
 	 * If not return.
 	 */
@@ -2922,7 +2903,7 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
 
 	/* Read remaining CBs if exists. */
 	while (cb_idx < cbs_in_tb) {
-		desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+		desc = acc_desc_tail(q, dequeued_cbs);
 		atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
 		rsp.val = atom_desc.rsp.val;
 		rte_bbdev_log_debug("Resp. desc %p: %x %x %x", desc,
@@ -2978,8 +2959,7 @@ acc200_dequeue_enc(struct rte_bbdev_queue_data *q_data,
 	struct rte_bbdev_enc_op *op;
 	if (avail == 0)
 		return 0;
-	op = (q->ring_addr + (q->sw_ring_tail &
-			q->sw_ring_wrap_mask))->req.op_addr;
+	op = acc_op_tail(q, 0);
 
 	cbm = op->turbo_enc.code_block_mode;
 
@@ -3020,7 +3000,7 @@ acc200_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
 	struct rte_bbdev_enc_op *op;
 	if (avail == 0)
 		return 0;
-	op = (q->ring_addr + (q->sw_ring_tail & q->sw_ring_wrap_mask))->req.op_addr;
+	op = acc_op_tail(q, 0);
 	cbm = op->ldpc_enc.code_block_mode;
 
 	for (i = 0; i < avail; i++) {
@@ -3064,8 +3044,7 @@ acc200_dequeue_dec(struct rte_bbdev_queue_data *q_data,
 	dequeue_num = (avail < num) ? avail : num;
 
 	for (i = 0; i < dequeue_num; ++i) {
-		op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
-			& q->sw_ring_wrap_mask))->req.op_addr;
+		op = acc_op_tail(q, dequeued_cbs);
 		if (op->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
 			ret = dequeue_dec_one_op_tb(q, &ops[i], dequeued_cbs,
 					&aq_dequeued);
@@ -3104,8 +3083,7 @@ acc200_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
 	dequeue_num = RTE_MIN(avail, num);
 
 	for (i = 0; i < dequeue_num; ++i) {
-		op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs)
-			& q->sw_ring_wrap_mask))->req.op_addr;
+		op = acc_op_tail(q, dequeued_cbs);
 		if (op->ldpc_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK)
 			ret = dequeue_dec_one_op_tb(q, &ops[i], dequeued_cbs,
 					&aq_dequeued);
@@ -3201,13 +3179,11 @@ enqueue_fft_one_op(struct acc_queue *q, struct rte_bbdev_fft_op *op,
 		uint16_t total_enqueued_cbs)
 {
 	union acc_dma_desc *desc;
-	uint16_t desc_idx;
 	struct rte_mbuf *input, *output;
 	uint32_t in_offset, out_offset;
 	struct acc_fcw_fft *fcw;
 
-	desc_idx = (q->sw_ring_head + total_enqueued_cbs) & q->sw_ring_wrap_mask;
-	desc = q->ring_addr + desc_idx;
+	desc = acc_desc(q, total_enqueued_cbs);
 	input = op->fft.base_input.data;
 	output = op->fft.base_output.data;
 	in_offset = op->fft.base_input.offset;
@@ -3255,7 +3231,7 @@ acc200_enqueue_fft(struct rte_bbdev_queue_data *q_data,
 		return 0; /* Nothing to enqueue. */
 
 	/* Set SDone in last CB in enqueued ops for CB mode. */
-	desc = q->ring_addr + ((q->sw_ring_head + i - 1) & q->sw_ring_wrap_mask);
+	desc = acc_desc(q, i - 1);
 
 	desc->req.sdone_enable = 1;
 	desc->req.irq_enable = q->irq_enable;
@@ -3278,7 +3254,7 @@ dequeue_fft_one_op(struct rte_bbdev_queue_data *q_data,
 	union acc_dma_rsp_desc rsp;
 	struct rte_bbdev_fft_op *op;
 
-	desc = q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask);
+	desc = acc_desc_tail(q, dequeued_cbs);
 	atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
 
 	/* Check fdone bit */
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v10 16/16] test-bbdev: unit test capability extension
  2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
                   ` (14 preceding siblings ...)
  2022-10-11 21:15 ` [PATCH v10 15/16] baseband/acc: add helper function for descriptor index Nicolas Chautru
@ 2022-10-11 21:15 ` Nicolas Chautru
  15 siblings, 0 replies; 17+ messages in thread
From: Nicolas Chautru @ 2022-10-11 21:15 UTC (permalink / raw)
  To: dev, gakhil, maxime.coquelin
  Cc: trix, mdr, bruce.richardson, hemant.agrawal, david.marchand,
	stephen, hernan.vargas, Nic Chautru

From: Nic Chautru <nicolas.chautru@intel.com>

Added support for bbdev level unit test
for the FFT operations and for Soft-Output options.
Also added 2 small test vectors for the FFT operation.

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c            | 542 +++++++++++++++++++-
 app/test-bbdev/test_bbdev_vector.c          | 182 +++++++
 app/test-bbdev/test_bbdev_vector.h          |   1 +
 app/test-bbdev/test_vectors/fft_150.data    | 475 +++++++++++++++++
 app/test-bbdev/test_vectors/fft_byp_28.data | 103 ++++
 5 files changed, 1286 insertions(+), 17 deletions(-)
 create mode 100644 app/test-bbdev/test_vectors/fft_150.data
 create mode 100644 app/test-bbdev/test_vectors/fft_byp_28.data

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 85c68a10ce..c716dd0e46 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -137,6 +137,7 @@ struct test_op_params {
 	struct rte_mempool *mp;
 	struct rte_bbdev_dec_op *ref_dec_op;
 	struct rte_bbdev_enc_op *ref_enc_op;
+	struct rte_bbdev_fft_op *ref_fft_op;
 	uint16_t burst_sz;
 	uint16_t num_to_process;
 	uint16_t num_lcores;
@@ -162,6 +163,7 @@ struct thread_params {
 	struct test_op_params *op_params;
 	struct rte_bbdev_dec_op *dec_ops[MAX_BURST];
 	struct rte_bbdev_enc_op *enc_ops[MAX_BURST];
+	struct rte_bbdev_fft_op *fft_ops[MAX_BURST];
 };
 
 #ifdef RTE_BBDEV_OFFLOAD_COST
@@ -449,6 +451,19 @@ check_dev_cap(const struct rte_bbdev_info *dev_info)
 				return TEST_FAILED;
 			}
 			return TEST_SUCCESS;
+		} else if (op_cap->type == RTE_BBDEV_OP_FFT) {
+			const struct rte_bbdev_op_cap_fft *cap = &op_cap->cap.fft;
+
+			if (!flags_match(test_vector.fft.op_flags, cap->capability_flags)) {
+				printf("Flag Mismatch\n");
+				return TEST_FAILED;
+			}
+			if (nb_inputs > cap->num_buffers_src) {
+				printf("Too many inputs defined: %u, max: %u\n",
+					nb_inputs, cap->num_buffers_src);
+				return TEST_FAILED;
+			}
+			return TEST_SUCCESS;
 		}
 	}
 
@@ -1050,7 +1065,7 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs,
 				op_type, n * ref_entries->nb_segments,
 				mbuf_pool->size);
 
-		if (seg->length > RTE_BBDEV_LDPC_E_MAX_MBUF) {
+		if ((seg->length + RTE_PKTMBUF_HEADROOM) > RTE_BBDEV_LDPC_E_MAX_MBUF) {
 			/*
 			 * Special case when DPDK mbuf cannot handle
 			 * the required input size
@@ -1064,7 +1079,7 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs,
 		bufs[i].length = 0;
 
 		if ((op_type == DATA_INPUT) || (op_type == DATA_HARQ_INPUT)) {
-			if ((op_type == DATA_INPUT) && large_input) {
+			if (large_input) {
 				/* Allocate a fake overused mbuf */
 				data = rte_malloc(NULL, seg->length, 0);
 				TEST_ASSERT_NOT_NULL(data,
@@ -1118,22 +1133,36 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs,
 						op_type);
 			}
 		} else {
-
-			/* allocate chained-mbuf for output buffer */
-			for (j = 1; j < ref_entries->nb_segments; ++j) {
-				struct rte_mbuf *m_tail =
+			if (((op_type == DATA_HARD_OUTPUT) || (op_type == DATA_SOFT_OUTPUT))
+					&& ((seg->length + RTE_PKTMBUF_HEADROOM)
+					> RTE_BBDEV_LDPC_E_MAX_MBUF)) {
+				/* Allocate a fake overused mbuf + margin */
+				data = rte_malloc(NULL, seg->length + 1024, 0);
+				TEST_ASSERT_NOT_NULL(data,
+					"rte malloc failed with %u bytes",
+					seg->length + 1024);
+				m_head->buf_addr = data;
+				m_head->buf_iova = rte_malloc_virt2iova(data);
+				m_head->data_off = 0;
+				m_head->data_len = seg->length;
+			} else {
+				/* allocate chained-mbuf for output buffer */
+				for (j = 1; j < ref_entries->nb_segments; ++j) {
+					struct rte_mbuf *m_tail =
 						rte_pktmbuf_alloc(mbuf_pool);
-				TEST_ASSERT_NOT_NULL(m_tail,
+					TEST_ASSERT_NOT_NULL(m_tail,
 						"Not enough mbufs in %d data type mbuf pool (needed %u, available %u)",
 						op_type,
 						n * ref_entries->nb_segments,
 						mbuf_pool->size);
 
-				ret = rte_pktmbuf_chain(m_head, m_tail);
-				TEST_ASSERT_SUCCESS(ret,
+					ret = rte_pktmbuf_chain(m_head, m_tail);
+					TEST_ASSERT_SUCCESS(ret,
 						"Couldn't chain mbufs from %d data type mbuf pool",
 						op_type);
+				}
 			}
+			bufs[i].length += seg->length;
 		}
 	}
 
@@ -1851,6 +1880,40 @@ copy_reference_ldpc_enc_op(struct rte_bbdev_enc_op **ops, unsigned int n,
 	}
 }
 
+static void
+copy_reference_fft_op(struct rte_bbdev_fft_op **ops, unsigned int n,
+		unsigned int start_idx, struct rte_bbdev_op_data *inputs,
+		struct rte_bbdev_op_data *outputs, struct rte_bbdev_op_data *pwrouts,
+		struct rte_bbdev_fft_op *ref_op)
+{
+	unsigned int i, j;
+	struct rte_bbdev_op_fft *fft = &ref_op->fft;
+	for (i = 0; i < n; i++) {
+		ops[i]->fft.input_sequence_size = fft->input_sequence_size;
+		ops[i]->fft.input_leading_padding = fft->input_leading_padding;
+		ops[i]->fft.output_sequence_size = fft->output_sequence_size;
+		ops[i]->fft.output_leading_depadding =
+				fft->output_leading_depadding;
+		for (j = 0; j < RTE_BBDEV_MAX_CS_2; j++)
+			ops[i]->fft.window_index[j] = fft->window_index[j];
+		ops[i]->fft.cs_bitmap = fft->cs_bitmap;
+		ops[i]->fft.num_antennas_log2 = fft->num_antennas_log2;
+		ops[i]->fft.idft_log2 = fft->idft_log2;
+		ops[i]->fft.dft_log2 = fft->dft_log2;
+		ops[i]->fft.cs_time_adjustment = fft->cs_time_adjustment;
+		ops[i]->fft.idft_shift = fft->idft_shift;
+		ops[i]->fft.dft_shift = fft->dft_shift;
+		ops[i]->fft.ncs_reciprocal = fft->ncs_reciprocal;
+		ops[i]->fft.power_shift = fft->power_shift;
+		ops[i]->fft.fp16_exp_adjust = fft->fp16_exp_adjust;
+		ops[i]->fft.base_output = outputs[start_idx + i];
+		ops[i]->fft.base_input = inputs[start_idx + i];
+		if (pwrouts != NULL)
+			ops[i]->fft.power_meas_output = pwrouts[start_idx + i];
+		ops[i]->fft.op_flags = fft->op_flags;
+	}
+}
+
 static int
 check_dec_status_and_ordering(struct rte_bbdev_dec_op *op,
 		unsigned int order_idx, const int expected_status)
@@ -1897,6 +1960,21 @@ check_enc_status_and_ordering(struct rte_bbdev_enc_op *op,
 	return TEST_SUCCESS;
 }
 
+static int
+check_fft_status_and_ordering(struct rte_bbdev_fft_op *op,
+		unsigned int order_idx, const int expected_status)
+{
+	TEST_ASSERT(op->status == expected_status,
+			"op_status (%d) != expected_status (%d)",
+			op->status, expected_status);
+
+	TEST_ASSERT((void *)(uintptr_t)order_idx == op->opaque_data,
+			"Ordering error, expected %p, got %p",
+			(void *)(uintptr_t)order_idx, op->opaque_data);
+
+	return TEST_SUCCESS;
+}
+
 static inline int
 validate_op_chain(struct rte_bbdev_op_data *op,
 		struct op_data_entries *orig_op)
@@ -2103,6 +2181,59 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op,
 	return TEST_SUCCESS;
 }
 
+
+static inline int
+validate_op_so_chain(struct rte_bbdev_op_data *op,
+		struct op_data_entries *orig_op)
+{
+	struct rte_mbuf *m = op->data;
+	uint8_t i, nb_dst_segments = orig_op->nb_segments;
+	uint32_t j, jj, total_data_size = 0;
+	int8_t *so_orig, *so_out;
+	uint32_t byte_error = 0, cum_error = 0, error, margin_error = 0;
+
+	TEST_ASSERT(nb_dst_segments == m->nb_segs,
+			"Number of segments differ in original (%u) and filled (%u) op",
+			nb_dst_segments, m->nb_segs);
+
+	/* Validate each mbuf segment length. */
+	for (i = 0; i < nb_dst_segments; ++i) {
+		/* Apply offset to the first mbuf segment. */
+		uint16_t offset = (i == 0) ? op->offset : 0;
+		uint16_t data_len = rte_pktmbuf_data_len(m) - offset;
+		total_data_size += orig_op->segments[i].length;
+
+		TEST_ASSERT(orig_op->segments[i].length == data_len,
+				"Length of segment differ in original (%u) and filled (%u) op",
+				orig_op->segments[i].length, data_len);
+		so_orig = (int8_t *) orig_op->segments[i].addr;
+		so_out = rte_pktmbuf_mtod_offset(m, int8_t *, offset);
+		margin_error += data_len / 8; /* Allow for few % errors. */
+
+		/* SO output can have minor differences due to algorithm variations. */
+		for (j = 0, jj = 0; j < data_len; j++, jj++) {
+			if (so_orig[j] != so_out[jj]) {
+				error = (so_orig[j] > so_out[jj]) ? so_orig[j] - so_out[jj] :
+						so_out[jj] - so_orig[j];
+				/* Residual quantization error. */
+				if (error > 32) {
+					printf("Warning: Soft mismatch %d: exp %d act %d => %d\n",
+							j, so_orig[j], so_out[jj], error);
+					byte_error++;
+					cum_error += error;
+				}
+			}
+		}
+		m = m->next;
+	}
+
+	if (byte_error > margin_error)
+		TEST_ASSERT(byte_error <= 1, "Soft output mismatch (%d) %d",
+				byte_error, margin_error);
+
+	return TEST_SUCCESS;
+}
+
 static int
 validate_dec_op(struct rte_bbdev_dec_op **ops, const uint16_t n,
 		struct rte_bbdev_dec_op *ref_op, const int vector_mask)
@@ -2137,7 +2268,7 @@ validate_dec_op(struct rte_bbdev_dec_op **ops, const uint16_t n,
 				i);
 
 		if (ref_op->turbo_dec.op_flags & RTE_BBDEV_TURBO_SOFT_OUTPUT)
-			TEST_ASSERT_SUCCESS(validate_op_chain(soft_output,
+			TEST_ASSERT_SUCCESS(validate_op_so_chain(soft_output,
 					soft_data_orig),
 					"Soft output buffers (CB=%u) are not equal",
 					i);
@@ -2286,6 +2417,76 @@ validate_ldpc_enc_op(struct rte_bbdev_enc_op **ops, const uint16_t n,
 	return TEST_SUCCESS;
 }
 
+
+static inline int
+validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig_op)
+{
+	struct rte_mbuf *m = op->data;
+	uint8_t i, nb_dst_segments = orig_op->nb_segments;
+	int16_t delt, abs_delt, thres_hold = 3;
+	uint32_t j, data_len_iq, error_num;
+	int16_t *ref_out, *op_out;
+
+	TEST_ASSERT(nb_dst_segments == m->nb_segs,
+			"Number of segments differ in original (%u) and filled (%u) op fft",
+			nb_dst_segments, m->nb_segs);
+
+	/* Due to size limitation of mbuf, FFT doesn't use real mbuf. */
+	for (i = 0; i < nb_dst_segments; ++i) {
+		uint16_t offset = (i == 0) ? op->offset : 0;
+		uint32_t data_len = op->length;
+
+		TEST_ASSERT(orig_op->segments[i].length == data_len,
+				"Length of segment differ in original (%u) and filled (%u) op fft",
+				orig_op->segments[i].length, data_len);
+		/* Divided by 2 to get the number of 16bits data. */
+		data_len_iq = data_len >> 1;
+		ref_out = (int16_t *)(orig_op->segments[i].addr);
+		op_out = rte_pktmbuf_mtod_offset(m, int16_t *, offset),
+		error_num = 0;
+		for (j = 0; j < data_len_iq; j++) {
+			delt = ref_out[j] - op_out[j];
+			abs_delt = delt > 0 ? delt : -delt;
+			error_num += (abs_delt > thres_hold ? 1 : 0);
+		}
+		if (error_num > 0) {
+			rte_memdump(stdout, "Buffer A", ref_out, data_len);
+			rte_memdump(stdout, "Buffer B", op_out, data_len);
+			TEST_ASSERT(error_num == 0,
+				"FFT Output are not matched total (%u) errors (%u)",
+				data_len_iq, error_num);
+		}
+
+		m = m->next;
+	}
+
+	return TEST_SUCCESS;
+}
+
+static int
+validate_fft_op(struct rte_bbdev_fft_op **ops, const uint16_t n,
+		struct rte_bbdev_fft_op *ref_op)
+{
+	unsigned int i;
+	int ret;
+	struct op_data_entries *fft_data_orig = &test_vector.entries[DATA_HARD_OUTPUT];
+	struct op_data_entries *fft_pwr_orig = &test_vector.entries[DATA_SOFT_OUTPUT];
+
+	for (i = 0; i < n; ++i) {
+		ret = check_fft_status_and_ordering(ops[i], i, ref_op->status);
+		TEST_ASSERT_SUCCESS(ret, "Checking status and ordering for FFT failed");
+		TEST_ASSERT_SUCCESS(validate_op_fft_chain(
+				&ops[i]->fft.base_output, fft_data_orig),
+				"FFT Output buffers (op=%u) are not matched", i);
+		if (check_bit(ops[i]->fft.op_flags, RTE_BBDEV_FFT_POWER_MEAS))
+			TEST_ASSERT_SUCCESS(validate_op_fft_chain(
+				&ops[i]->fft.power_meas_output, fft_pwr_orig),
+				"FFT Power Output buffers (op=%u) are not matched", i);
+	}
+
+	return TEST_SUCCESS;
+}
+
 static void
 create_reference_dec_op(struct rte_bbdev_dec_op *op)
 {
@@ -2319,6 +2520,16 @@ create_reference_ldpc_dec_op(struct rte_bbdev_dec_op *op)
 	}
 }
 
+static void
+create_reference_fft_op(struct rte_bbdev_fft_op *op)
+{
+	unsigned int i;
+	struct op_data_entries *entry;
+	op->fft = test_vector.fft;
+	entry = &test_vector.entries[DATA_INPUT];
+	for (i = 0; i < entry->nb_segments; ++i)
+		op->fft.base_input.length += entry->segments[i].length;
+}
 
 static void
 create_reference_enc_op(struct rte_bbdev_enc_op *op)
@@ -2422,6 +2633,17 @@ calc_ldpc_enc_TB_size(struct rte_bbdev_enc_op *op)
 	return tb_size;
 }
 
+static uint32_t
+calc_fft_size(struct rte_bbdev_fft_op *op)
+{
+	uint32_t output_size;
+	int num_cs = 0, i;
+	for (i = 0; i < 12; i++)
+		if (check_bit(op->fft.cs_bitmap, 1 << i))
+			num_cs++;
+	output_size = (num_cs * op->fft.output_sequence_size * 4) << op->fft.num_antennas_log2;
+	return output_size;
+}
 
 static int
 init_test_op_params(struct test_op_params *op_params,
@@ -2434,6 +2656,9 @@ init_test_op_params(struct test_op_params *op_params,
 			op_type == RTE_BBDEV_OP_LDPC_DEC)
 		ret = rte_bbdev_dec_op_alloc_bulk(ops_mp,
 				&op_params->ref_dec_op, 1);
+	else if (op_type == RTE_BBDEV_OP_FFT)
+		ret = rte_bbdev_fft_op_alloc_bulk(ops_mp,
+				&op_params->ref_fft_op, 1);
 	else
 		ret = rte_bbdev_enc_op_alloc_bulk(ops_mp,
 				&op_params->ref_enc_op, 1);
@@ -2451,6 +2676,8 @@ init_test_op_params(struct test_op_params *op_params,
 	else if (op_type == RTE_BBDEV_OP_TURBO_ENC
 			|| op_type == RTE_BBDEV_OP_LDPC_ENC)
 		op_params->ref_enc_op->status = expected_status;
+	else if (op_type == RTE_BBDEV_OP_FFT)
+		op_params->ref_fft_op->status = expected_status;
 	return 0;
 }
 
@@ -2517,6 +2744,8 @@ run_test_case_on_device(test_case_function *test_case_func, uint8_t dev_id,
 		create_reference_ldpc_enc_op(op_params->ref_enc_op);
 	else if (test_vector.op_type == RTE_BBDEV_OP_LDPC_DEC)
 		create_reference_ldpc_dec_op(op_params->ref_dec_op);
+	else if (test_vector.op_type == RTE_BBDEV_OP_FFT)
+		create_reference_fft_op(op_params->ref_fft_op);
 
 	for (i = 0; i < ad->nb_queues; ++i) {
 		f_ret = fill_queue_buffers(op_params,
@@ -2728,6 +2957,11 @@ dequeue_event_callback(uint16_t dev_id,
 				&tp->enc_ops[
 					__atomic_load_n(&tp->nb_dequeued, __ATOMIC_RELAXED)],
 				burst_sz);
+	else if (test_vector.op_type == RTE_BBDEV_OP_FFT)
+		deq = rte_bbdev_dequeue_fft_ops(dev_id, queue_id,
+				&tp->fft_ops[
+					__atomic_load_n(&tp->nb_dequeued, __ATOMIC_RELAXED)],
+				burst_sz);
 	else /*RTE_BBDEV_OP_TURBO_ENC*/
 		deq = rte_bbdev_dequeue_enc_ops(dev_id, queue_id,
 				&tp->enc_ops[
@@ -2771,6 +3005,10 @@ dequeue_event_callback(uint16_t dev_id,
 		struct rte_bbdev_enc_op *ref_op = tp->op_params->ref_enc_op;
 		ret = validate_ldpc_enc_op(tp->enc_ops, num_ops, ref_op);
 		rte_bbdev_enc_op_free_bulk(tp->enc_ops, deq);
+	} else if (test_vector.op_type == RTE_BBDEV_OP_FFT) {
+		struct rte_bbdev_fft_op *ref_op = tp->op_params->ref_fft_op;
+		ret = validate_fft_op(tp->fft_ops, num_ops, ref_op);
+		rte_bbdev_fft_op_free_bulk(tp->fft_ops, deq);
 	} else if (test_vector.op_type == RTE_BBDEV_OP_LDPC_DEC) {
 		struct rte_bbdev_dec_op *ref_op = tp->op_params->ref_dec_op;
 		ret = validate_ldpc_dec_op(tp->dec_ops, num_ops, ref_op,
@@ -2793,6 +3031,9 @@ dequeue_event_callback(uint16_t dev_id,
 	case RTE_BBDEV_OP_LDPC_DEC:
 		tb_len_bits = calc_ldpc_dec_TB_size(tp->op_params->ref_dec_op);
 		break;
+	case RTE_BBDEV_OP_FFT:
+		tb_len_bits = calc_fft_size(tp->op_params->ref_fft_op);
+		break;
 	case RTE_BBDEV_OP_LDPC_ENC:
 		tb_len_bits = calc_ldpc_enc_TB_size(tp->op_params->ref_enc_op);
 		break;
@@ -2924,6 +3165,7 @@ throughput_intr_lcore_dec(void *arg)
 	struct rte_bbdev_dec_op *ops[num_to_process];
 	struct test_buffers *bufs = NULL;
 	struct rte_bbdev_info info;
+	struct rte_bbdev_dec_op *ref_op = tp->op_params->ref_dec_op;
 	int ret, i, j;
 	uint16_t num_to_enq, enq;
 
@@ -2949,20 +3191,24 @@ throughput_intr_lcore_dec(void *arg)
 
 	ret = rte_bbdev_dec_op_alloc_bulk(tp->op_params->mp, ops,
 				num_to_process);
-	TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",
-			num_to_process);
+	TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", num_to_process);
+	ref_op->turbo_dec.iter_max = get_iter_max();
 	if (test_vector.op_type != RTE_BBDEV_OP_NONE)
 		copy_reference_dec_op(ops, num_to_process, 0, bufs->inputs,
 				bufs->hard_outputs, bufs->soft_outputs,
 				tp->op_params->ref_dec_op);
 
-	/* Set counter to validate the ordering */
+	/* Set counter to validate the ordering. */
 	for (j = 0; j < num_to_process; ++j)
 		ops[j]->opaque_data = (void *)(uintptr_t)j;
 
 	for (j = 0; j < TEST_REPETITIONS; ++j) {
-		for (i = 0; i < num_to_process; ++i)
+		for (i = 0; i < num_to_process; ++i) {
 			rte_pktmbuf_reset(ops[i]->turbo_dec.hard_output.data);
+			if (ops[i]->turbo_dec.soft_output.data != NULL)
+				rte_pktmbuf_reset(ops[i]->turbo_dec.soft_output.data);
+		}
+
 
 		tp->start_time = rte_rdtsc_precise();
 		for (enqueued = 0; enqueued < num_to_process;) {
@@ -3175,6 +3421,93 @@ throughput_intr_lcore_ldpc_enc(void *arg)
 	return TEST_SUCCESS;
 }
 
+
+static int
+throughput_intr_lcore_fft(void *arg)
+{
+	struct thread_params *tp = arg;
+	unsigned int enqueued;
+	const uint16_t queue_id = tp->queue_id;
+	const uint16_t burst_sz = tp->op_params->burst_sz;
+	const uint16_t num_to_process = tp->op_params->num_to_process;
+	struct rte_bbdev_fft_op *ops[num_to_process];
+	struct test_buffers *bufs = NULL;
+	struct rte_bbdev_info info;
+	int ret, i, j;
+	uint16_t num_to_enq, enq;
+
+	TEST_ASSERT_SUCCESS((burst_sz > MAX_BURST),
+			"BURST_SIZE should be <= %u", MAX_BURST);
+
+	TEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_enable(tp->dev_id, queue_id),
+			"Failed to enable interrupts for dev: %u, queue_id: %u",
+			tp->dev_id, queue_id);
+
+	rte_bbdev_info_get(tp->dev_id, &info);
+
+	TEST_ASSERT_SUCCESS((num_to_process > info.drv.queue_size_lim),
+			"NUM_OPS cannot exceed %u for this device",
+			info.drv.queue_size_lim);
+
+	bufs = &tp->op_params->q_bufs[GET_SOCKET(info.socket_id)][queue_id];
+
+	__atomic_store_n(&tp->processing_status, 0, __ATOMIC_RELAXED);
+	__atomic_store_n(&tp->nb_dequeued, 0, __ATOMIC_RELAXED);
+
+	rte_wait_until_equal_16(&tp->op_params->sync, SYNC_START, __ATOMIC_RELAXED);
+
+	ret = rte_bbdev_fft_op_alloc_bulk(tp->op_params->mp, ops,
+			num_to_process);
+	TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops",
+			num_to_process);
+	if (test_vector.op_type != RTE_BBDEV_OP_NONE)
+		copy_reference_fft_op(ops, num_to_process, 0, bufs->inputs,
+				bufs->hard_outputs, bufs->soft_outputs, tp->op_params->ref_fft_op);
+
+	/* Set counter to validate the ordering */
+	for (j = 0; j < num_to_process; ++j)
+		ops[j]->opaque_data = (void *)(uintptr_t)j;
+
+	for (j = 0; j < TEST_REPETITIONS; ++j) {
+		for (i = 0; i < num_to_process; ++i)
+			rte_pktmbuf_reset(ops[i]->fft.base_output.data);
+
+		tp->start_time = rte_rdtsc_precise();
+		for (enqueued = 0; enqueued < num_to_process;) {
+			num_to_enq = burst_sz;
+
+			if (unlikely(num_to_process - enqueued < num_to_enq))
+				num_to_enq = num_to_process - enqueued;
+
+			enq = 0;
+			do {
+				enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
+						queue_id, &ops[enqueued],
+						num_to_enq);
+			} while (unlikely(enq != num_to_enq));
+			enqueued += enq;
+
+			/* Write to thread burst_sz current number of enqueued
+			 * descriptors. It ensures that proper number of
+			 * descriptors will be dequeued in callback
+			 * function - needed for last batch in case where
+			 * the number of operations is not a multiple of
+			 * burst size.
+			 */
+			__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
+			/* Wait until processing of previous batch is
+			 * completed
+			 */
+			rte_wait_until_equal_16(&tp->nb_dequeued, enqueued, __ATOMIC_RELAXED);
+		}
+		if (j != TEST_REPETITIONS - 1)
+			__atomic_store_n(&tp->nb_dequeued, 0, __ATOMIC_RELAXED);
+	}
+
+	return TEST_SUCCESS;
+}
+
 static int
 throughput_pmd_lcore_dec(void *arg)
 {
@@ -3191,6 +3524,7 @@ throughput_pmd_lcore_dec(void *arg)
 	int i, j, ret;
 	struct rte_bbdev_info info;
 	uint16_t num_to_enq;
+	bool so_enable;
 
 	TEST_ASSERT_SUCCESS((burst_sz > MAX_BURST),
 			"BURST_SIZE should be <= %u", MAX_BURST);
@@ -3207,11 +3541,13 @@ throughput_pmd_lcore_dec(void *arg)
 
 	ret = rte_bbdev_dec_op_alloc_bulk(tp->op_params->mp, ops_enq, num_ops);
 	TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", num_ops);
-
+	ref_op->turbo_dec.iter_max = get_iter_max();
 	if (test_vector.op_type != RTE_BBDEV_OP_NONE)
 		copy_reference_dec_op(ops_enq, num_ops, 0, bufs->inputs,
 				bufs->hard_outputs, bufs->soft_outputs, ref_op);
 
+	so_enable = check_bit(ops_enq[0]->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT);
+
 	/* Set counter to validate the ordering */
 	for (j = 0; j < num_ops; ++j)
 		ops_enq[j]->opaque_data = (void *)(uintptr_t)j;
@@ -3220,6 +3556,9 @@ throughput_pmd_lcore_dec(void *arg)
 
 		for (j = 0; j < num_ops; ++j)
 			mbuf_reset(ops_enq[j]->turbo_dec.hard_output.data);
+		if (so_enable)
+			for (j = 0; j < num_ops; ++j)
+				mbuf_reset(ops_enq[j]->turbo_dec.soft_output.data);
 
 		start_time = rte_rdtsc_precise();
 
@@ -3335,8 +3674,7 @@ bler_pmd_lcore_ldpc_dec(void *arg)
 				mbuf_reset(
 				ops_enq[j]->ldpc_dec.hard_output.data);
 			if (hc_out || loopback)
-				mbuf_reset(
-				ops_enq[j]->ldpc_dec.harq_combined_output.data);
+				mbuf_reset(ops_enq[j]->ldpc_dec.harq_combined_output.data);
 		}
 		if (extDdr)
 			preload_harq_ddr(tp->dev_id, queue_id, ops_enq,
@@ -3703,6 +4041,94 @@ throughput_pmd_lcore_ldpc_enc(void *arg)
 	return TEST_SUCCESS;
 }
 
+static int
+throughput_pmd_lcore_fft(void *arg)
+{
+	struct thread_params *tp = arg;
+	uint16_t enq, deq;
+	uint64_t total_time = 0, start_time;
+	const uint16_t queue_id = tp->queue_id;
+	const uint16_t burst_sz = tp->op_params->burst_sz;
+	const uint16_t num_ops = tp->op_params->num_to_process;
+	struct rte_bbdev_fft_op *ops_enq[num_ops];
+	struct rte_bbdev_fft_op *ops_deq[num_ops];
+	struct rte_bbdev_fft_op *ref_op = tp->op_params->ref_fft_op;
+	struct test_buffers *bufs = NULL;
+	int i, j, ret;
+	struct rte_bbdev_info info;
+	uint16_t num_to_enq;
+
+	TEST_ASSERT_SUCCESS((burst_sz > MAX_BURST),
+			"BURST_SIZE should be <= %u", MAX_BURST);
+
+	rte_bbdev_info_get(tp->dev_id, &info);
+
+	TEST_ASSERT_SUCCESS((num_ops > info.drv.queue_size_lim),
+			"NUM_OPS cannot exceed %u for this device",
+			info.drv.queue_size_lim);
+
+	bufs = &tp->op_params->q_bufs[GET_SOCKET(info.socket_id)][queue_id];
+
+	rte_wait_until_equal_16(&tp->op_params->sync, SYNC_START, __ATOMIC_RELAXED);
+
+	ret = rte_bbdev_fft_op_alloc_bulk(tp->op_params->mp, ops_enq, num_ops);
+	TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", num_ops);
+
+	if (test_vector.op_type != RTE_BBDEV_OP_NONE)
+		copy_reference_fft_op(ops_enq, num_ops, 0, bufs->inputs,
+				bufs->hard_outputs, bufs->soft_outputs, ref_op);
+
+	/* Set counter to validate the ordering */
+	for (j = 0; j < num_ops; ++j)
+		ops_enq[j]->opaque_data = (void *)(uintptr_t)j;
+
+	for (i = 0; i < TEST_REPETITIONS; ++i) {
+
+		for (j = 0; j < num_ops; ++j)
+			mbuf_reset(ops_enq[j]->fft.base_output.data);
+
+		start_time = rte_rdtsc_precise();
+
+		for (enq = 0, deq = 0; enq < num_ops;) {
+			num_to_enq = burst_sz;
+
+			if (unlikely(num_ops - enq < num_to_enq))
+				num_to_enq = num_ops - enq;
+
+			enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
+					queue_id, &ops_enq[enq], num_to_enq);
+
+			deq += rte_bbdev_dequeue_fft_ops(tp->dev_id,
+					queue_id, &ops_deq[deq], enq - deq);
+		}
+
+		/* dequeue the remaining */
+		while (deq < enq) {
+			deq += rte_bbdev_dequeue_fft_ops(tp->dev_id,
+					queue_id, &ops_deq[deq], enq - deq);
+		}
+
+		total_time += rte_rdtsc_precise() - start_time;
+	}
+
+	if (test_vector.op_type != RTE_BBDEV_OP_NONE) {
+		ret = validate_fft_op(ops_deq, num_ops, ref_op);
+		TEST_ASSERT_SUCCESS(ret, "Validation failed!");
+	}
+
+	rte_bbdev_fft_op_free_bulk(ops_enq, num_ops);
+
+	double tb_len_bits = calc_fft_size(ref_op);
+
+	tp->ops_per_sec = ((double)num_ops * TEST_REPETITIONS) /
+			((double)total_time / (double)rte_get_tsc_hz());
+	tp->mbps = (((double)(num_ops * TEST_REPETITIONS * tb_len_bits)) /
+			1000000.0) / ((double)total_time /
+			(double)rte_get_tsc_hz());
+
+	return TEST_SUCCESS;
+}
+
 static void
 print_enc_throughput(struct thread_params *t_params, unsigned int used_cores)
 {
@@ -3918,6 +4344,8 @@ throughput_test(struct active_device *ad,
 			throughput_function = throughput_intr_lcore_enc;
 		else if (test_vector.op_type == RTE_BBDEV_OP_LDPC_ENC)
 			throughput_function = throughput_intr_lcore_ldpc_enc;
+		else if (test_vector.op_type == RTE_BBDEV_OP_FFT)
+			throughput_function = throughput_intr_lcore_fft;
 		else
 			throughput_function = throughput_intr_lcore_enc;
 
@@ -3938,6 +4366,8 @@ throughput_test(struct active_device *ad,
 			throughput_function = throughput_pmd_lcore_enc;
 		else if (test_vector.op_type == RTE_BBDEV_OP_LDPC_ENC)
 			throughput_function = throughput_pmd_lcore_ldpc_enc;
+		else if (test_vector.op_type == RTE_BBDEV_OP_FFT)
+			throughput_function = throughput_pmd_lcore_fft;
 		else
 			throughput_function = throughput_pmd_lcore_enc;
 	}
@@ -4327,6 +4757,74 @@ latency_test_ldpc_enc(struct rte_mempool *mempool,
 	return i;
 }
 
+
+static int
+latency_test_fft(struct rte_mempool *mempool,
+		struct test_buffers *bufs, struct rte_bbdev_fft_op *ref_op,
+		uint16_t dev_id, uint16_t queue_id,
+		const uint16_t num_to_process, uint16_t burst_sz,
+		uint64_t *total_time, uint64_t *min_time, uint64_t *max_time)
+{
+	int ret = TEST_SUCCESS;
+	uint16_t i, j, dequeued;
+	struct rte_bbdev_fft_op *ops_enq[MAX_BURST], *ops_deq[MAX_BURST];
+	uint64_t start_time = 0, last_time = 0;
+
+	for (i = 0, dequeued = 0; dequeued < num_to_process; ++i) {
+		uint16_t enq = 0, deq = 0;
+		bool first_time = true;
+		last_time = 0;
+
+		if (unlikely(num_to_process - dequeued < burst_sz))
+			burst_sz = num_to_process - dequeued;
+
+		ret = rte_bbdev_fft_op_alloc_bulk(mempool, ops_enq, burst_sz);
+		TEST_ASSERT_SUCCESS(ret,
+				"rte_bbdev_fft_op_alloc_bulk() failed");
+		if (test_vector.op_type != RTE_BBDEV_OP_NONE)
+			copy_reference_fft_op(ops_enq, burst_sz, dequeued,
+					bufs->inputs,
+					bufs->hard_outputs, bufs->soft_outputs,
+					ref_op);
+
+		/* Set counter to validate the ordering */
+		for (j = 0; j < burst_sz; ++j)
+			ops_enq[j]->opaque_data = (void *)(uintptr_t)j;
+
+		start_time = rte_rdtsc_precise();
+
+		enq = rte_bbdev_enqueue_fft_ops(dev_id, queue_id,
+				&ops_enq[enq], burst_sz);
+		TEST_ASSERT(enq == burst_sz,
+				"Error enqueueing burst, expected %u, got %u",
+				burst_sz, enq);
+
+		/* Dequeue */
+		do {
+			deq += rte_bbdev_dequeue_fft_ops(dev_id, queue_id,
+					&ops_deq[deq], burst_sz - deq);
+			if (likely(first_time && (deq > 0))) {
+				last_time += rte_rdtsc_precise() - start_time;
+				first_time = false;
+			}
+		} while (unlikely(burst_sz != deq));
+
+		*max_time = RTE_MAX(*max_time, last_time);
+		*min_time = RTE_MIN(*min_time, last_time);
+		*total_time += last_time;
+
+		if (test_vector.op_type != RTE_BBDEV_OP_NONE) {
+			ret = validate_fft_op(ops_deq, burst_sz, ref_op);
+			TEST_ASSERT_SUCCESS(ret, "Validation failed!");
+		}
+
+		rte_bbdev_fft_op_free_bulk(ops_enq, deq);
+		dequeued += deq;
+	}
+
+	return i;
+}
+
 /* Common function for running validation and latency test cases */
 static int
 validation_latency_test(struct active_device *ad,
@@ -4378,6 +4876,12 @@ validation_latency_test(struct active_device *ad,
 				ad->dev_id, queue_id, num_to_process,
 				burst_sz, &total_time, &min_time, &max_time,
 				latency_flag);
+	else if (op_type == RTE_BBDEV_OP_FFT)
+		iter = latency_test_fft(op_params->mp, bufs,
+				op_params->ref_fft_op,
+				ad->dev_id, queue_id,
+				num_to_process, burst_sz, &total_time,
+				&min_time, &max_time);
 	else /* RTE_BBDEV_OP_TURBO_ENC */
 		iter = latency_test_enc(op_params->mp, bufs,
 				op_params->ref_enc_op,
@@ -4837,6 +5341,10 @@ offload_cost_test(struct active_device *ad,
 		iter = offload_latency_test_ldpc_dec(op_params->mp, bufs,
 			op_params->ref_dec_op, ad->dev_id, queue_id,
 			num_to_process, burst_sz, &time_st);
+	else if (op_type == RTE_BBDEV_OP_FFT)
+		iter = offload_latency_test_fft(op_params->mp, bufs,
+			op_params->ref_fft_op, ad->dev_id, queue_id,
+			num_to_process, burst_sz, &time_st);
 	else
 		iter = offload_latency_test_enc(op_params->mp, bufs,
 				op_params->ref_enc_op, ad->dev_id, queue_id,
diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c
index f1c1fe09eb..1125395dbf 100644
--- a/app/test-bbdev/test_bbdev_vector.c
+++ b/app/test-bbdev/test_bbdev_vector.c
@@ -15,6 +15,7 @@
 
 #define VALUE_DELIMITER ","
 #define ENTRY_DELIMITER "="
+#define FFT_WIN_SIZE 12
 
 const char *op_data_prefixes[] = {
 	"input",
@@ -214,6 +215,35 @@ op_ldpc_decoder_flag_strtoul(char *token, uint32_t *op_flag_value)
 	return 0;
 }
 
+
+/* Convert FFT flag from string to unsigned long int. */
+static int
+op_fft_flag_strtoul(char *token, uint32_t *op_flag_value)
+{
+	if (!strcmp(token, "RTE_BBDEV_FFT_WINDOWING"))
+		*op_flag_value = RTE_BBDEV_FFT_WINDOWING;
+	else if (!strcmp(token, "RTE_BBDEV_FFT_CS_ADJUSTMENT"))
+		*op_flag_value = RTE_BBDEV_FFT_CS_ADJUSTMENT;
+	else if (!strcmp(token, "RTE_BBDEV_FFT_DFT_BYPASS"))
+		*op_flag_value = RTE_BBDEV_FFT_DFT_BYPASS;
+	else if (!strcmp(token, "RTE_BBDEV_FFT_IDFT_BYPASS"))
+		*op_flag_value = RTE_BBDEV_FFT_IDFT_BYPASS;
+	else if (!strcmp(token, "RTE_BBDEV_FFT_WINDOWING_BYPASS"))
+		*op_flag_value = RTE_BBDEV_FFT_WINDOWING_BYPASS;
+	else if (!strcmp(token, "RTE_BBDEV_FFT_POWER_MEAS"))
+		*op_flag_value = RTE_BBDEV_FFT_POWER_MEAS;
+	else if (!strcmp(token, "RTE_BBDEV_FFT_FP16_INPUT"))
+		*op_flag_value = RTE_BBDEV_FFT_FP16_INPUT;
+	else if (!strcmp(token, "RTE_BBDEV_FFT_FP16_OUTPUT"))
+		*op_flag_value = RTE_BBDEV_FFT_FP16_OUTPUT;
+	else {
+		printf("The given value is not a FFT flag\n");
+		return -1;
+	}
+
+	return 0;
+}
+
 /* convert turbo encoder flag from string to unsigned long int*/
 static int
 op_encoder_flag_strtoul(char *token, uint32_t *op_flag_value)
@@ -290,6 +320,10 @@ parse_turbo_flags(char *tokens, uint32_t *op_flags,
 			if (op_ldpc_decoder_flag_strtoul(tok, &op_flag_value)
 					== -1)
 				return -1;
+		} else if (op_type == RTE_BBDEV_OP_FFT) {
+			if (op_fft_flag_strtoul(tok, &op_flag_value)
+					== -1)
+				return -1;
 		} else {
 			return -1;
 		}
@@ -317,6 +351,8 @@ op_turbo_type_strtol(char *token, enum rte_bbdev_op_type *op_type)
 		*op_type = RTE_BBDEV_OP_LDPC_ENC;
 	else if (!strcmp(token, "RTE_BBDEV_OP_LDPC_DEC"))
 		*op_type = RTE_BBDEV_OP_LDPC_DEC;
+	else if (!strcmp(token, "RTE_BBDEV_OP_FFT"))
+		*op_type = RTE_BBDEV_OP_FFT;
 	else if (!strcmp(token, "RTE_BBDEV_OP_NONE"))
 		*op_type = RTE_BBDEV_OP_NONE;
 	else {
@@ -857,6 +893,111 @@ parse_ldpc_decoder_params(const char *key_token, char *token,
 	return 0;
 }
 
+
+/* Parse FFT parameters and assigns to global variable. */
+static int
+parse_fft_params(const char *key_token, char *token,
+		struct test_bbdev_vector *vector)
+{
+	int ret = 0, status = 0, i, shift;
+	uint32_t op_flags = 0;
+	char *tok, *err = NULL;
+
+	struct rte_bbdev_op_fft *fft = &vector->fft;
+
+	if (starts_with(key_token, op_data_prefixes[DATA_INPUT])) {
+		ret = parse_data_entry(key_token, token, vector,
+				DATA_INPUT,
+				op_data_prefixes[DATA_INPUT]);
+	} else if (starts_with(key_token, "output")) {
+		ret = parse_data_entry(key_token, token, vector,
+				DATA_HARD_OUTPUT,
+				"output");
+	} else if (starts_with(key_token, "power_output")) {
+		ret = parse_data_entry(key_token, token, vector,
+				DATA_SOFT_OUTPUT,
+				"power_output");
+	} else if (!strcmp(key_token, "in_sequence_size")) {
+		fft->input_sequence_size = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "in_leading_padding")) {
+		fft->input_leading_padding = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "out_sequence_size")) {
+		fft->output_sequence_size = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "out_leading_depadding")) {
+		fft->output_leading_depadding = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "window_index")) {
+		tok = strtok(token, VALUE_DELIMITER);
+		if (tok == NULL)
+			return -1;
+		for (i = 0; i < FFT_WIN_SIZE; i++) {
+			shift = (i % 2) ? 4 : 0;
+			fft->window_index[i / 2] |= (uint32_t) strtoul(tok, &err, 0)
+					<< shift;
+			if (i < (FFT_WIN_SIZE - 1)) {
+				tok = strtok(NULL, VALUE_DELIMITER);
+				if (tok == NULL)
+					return -1;
+			}
+		}
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "cs_bitmap")) {
+		fft->cs_bitmap = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "num_antennas_log2")) {
+		fft->num_antennas_log2 = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "ifft_log2")) {
+		fft->idft_log2 = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "fft_log2")) {
+		fft->dft_log2 = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "cs_time_adjustment")) {
+		fft->cs_time_adjustment = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "ifft_shift")) {
+		fft->idft_shift = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "fft_shift")) {
+		fft->dft_shift = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "ncs_reciprocal")) {
+		fft->ncs_reciprocal = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "power_shift")) {
+		fft->power_shift = (uint32_t) strtoul(token, &err, 0);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "fp16_exponent_adjust")) {
+		fft->fp16_exp_adjust = (uint32_t) strtoul(token, &err, 0);
+		printf("%d\n", fft->fp16_exp_adjust);
+		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+	} else if (!strcmp(key_token, "op_flags")) {
+		vector->mask |= TEST_BBDEV_VF_OP_FLAGS;
+		ret = parse_turbo_flags(token, &op_flags, vector->op_type);
+		if (!ret)
+			fft->op_flags = op_flags;
+	} else if (!strcmp(key_token, "expected_status")) {
+		vector->mask |= TEST_BBDEV_VF_EXPECTED_STATUS;
+		ret = parse_expected_status(token, &status, vector->op_type);
+		if (!ret)
+			vector->expected_status = status;
+	} else {
+		printf("Not valid fft key: '%s'\n", key_token);
+		return -1;
+	}
+
+	if (ret != 0) {
+		printf("Failed with convert '%s\t%s'\n", key_token, token);
+		return -1;
+	}
+
+	return 0;
+}
+
 /* checks the type of key and assigns data */
 static int
 parse_entry(char *entry, struct test_bbdev_vector *vector)
@@ -908,6 +1049,9 @@ parse_entry(char *entry, struct test_bbdev_vector *vector)
 	} else if (vector->op_type == RTE_BBDEV_OP_LDPC_DEC) {
 		if (parse_ldpc_decoder_params(key_token, token, vector) == -1)
 			return -1;
+	} else if (vector->op_type == RTE_BBDEV_OP_FFT) {
+		if (parse_fft_params(key_token, token, vector) == -1)
+			return -1;
 	}
 
 	return 0;
@@ -979,6 +1123,21 @@ check_ldpc_decoder_segments(struct test_bbdev_vector *vector)
 	return 0;
 }
 
+static int
+check_fft_segments(struct test_bbdev_vector *vector)
+{
+	unsigned char i;
+
+	for (i = 0; i < vector->entries[DATA_INPUT].nb_segments; i++)
+		if (vector->entries[DATA_INPUT].segments[i].addr == NULL)
+			return -1;
+
+	for (i = 0; i < vector->entries[DATA_HARD_OUTPUT].nb_segments; i++)
+		if (vector->entries[DATA_HARD_OUTPUT].segments[i].addr == NULL)
+			return -1;
+	return 0;
+}
+
 static int
 check_decoder_llr_spec(struct test_bbdev_vector *vector)
 {
@@ -1192,6 +1351,26 @@ check_ldpc_decoder(struct test_bbdev_vector *vector)
 	return 0;
 }
 
+/* Checks fft parameters. */
+static int
+check_fft(struct test_bbdev_vector *vector)
+{
+	const int mask = vector->mask;
+
+	if (check_fft_segments(vector) < 0)
+		return -1;
+
+	/* Check which params were set. */
+	if (!(mask & TEST_BBDEV_VF_OP_FLAGS)) {
+		printf(
+			"WARNING: op_flags was not specified in vector file and capabilities will not be validated\n");
+	}
+	if (!(mask & TEST_BBDEV_VF_EXPECTED_STATUS))
+		printf(
+			"WARNING: expected_status was not specified in vector file and will be set to 0\n");
+	return 0;
+}
+
 /* checks encoder parameters */
 static int
 check_encoder(struct test_bbdev_vector *vector)
@@ -1350,6 +1529,9 @@ bbdev_check_vector(struct test_bbdev_vector *vector)
 	} else if (vector->op_type == RTE_BBDEV_OP_LDPC_DEC) {
 		if (check_ldpc_decoder(vector) == -1)
 			return -1;
+	} else if (vector->op_type == RTE_BBDEV_OP_FFT) {
+		if (check_fft(vector) == -1)
+			return -1;
 	} else if (vector->op_type != RTE_BBDEV_OP_NONE) {
 		printf("Vector was not filled\n");
 		return -1;
diff --git a/app/test-bbdev/test_bbdev_vector.h b/app/test-bbdev/test_bbdev_vector.h
index 4e5dbf5d50..4c53e8f137 100644
--- a/app/test-bbdev/test_bbdev_vector.h
+++ b/app/test-bbdev/test_bbdev_vector.h
@@ -65,6 +65,7 @@ struct test_bbdev_vector {
 		struct rte_bbdev_op_turbo_enc turbo_enc;
 		struct rte_bbdev_op_ldpc_dec ldpc_dec;
 		struct rte_bbdev_op_ldpc_enc ldpc_enc;
+		struct rte_bbdev_op_fft fft;
 	};
 	/* Additional storage for op data entries */
 	struct op_data_entries entries[DATA_NUM_TYPES];
diff --git a/app/test-bbdev/test_vectors/fft_150.data b/app/test-bbdev/test_vectors/fft_150.data
new file mode 100644
index 0000000000..27425ffd95
--- /dev/null
+++ b/app/test-bbdev/test_vectors/fft_150.data
@@ -0,0 +1,475 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2021 Intel Corporation
+op_type =
+RTE_BBDEV_OP_FFT
+
+input0 =
+0x0045F880, 0xECCCF23C, 0xFD67F739, 0x09A6FA7B, 0xF8B2EF62, 0xFC74F9DC, 0x01A6F7EE, 0xFE7CE87A,
+0x04B1FC1C, 0x0DB00A15, 0xFFD1F5DC, 0xF13AFFCF, 0x03D6FB71, 0xFD7AF000, 0x0EF1F7C4, 0x02C515F8,
+0x0060F277, 0xF71AF467, 0x030BF7CF, 0x050EE88F, 0x0CA105EE, 0xFB0C1403, 0x02E3FC82, 0xFD8FF668,
+0xFDCFFB0C, 0x0B5FED2F, 0x0BC5FF03, 0xF10A138C, 0x0687F859, 0xF819FA87, 0x03B2EFFA, 0x149AFD2D,
+0x10820F4B, 0xE4CD0412, 0x0B4DFD23, 0xF902F2DD, 0x0FD2FB46, 0x0CAEFEC6, 0x00291412, 0xEF93F2F1,
+0x0561FD59, 0x03A3EED9, 0x0F100022, 0x055BFB6E, 0xF73D0F24, 0xFE62F189, 0x0EE3FF31, 0x0D6CF9AE,
+0x0A6B0B3B, 0x16BDFAAE, 0xECFBFBD0, 0x0C53FC19, 0x0C03050D, 0x075703E7, 0x01340C31, 0x1C5104D2,
+0x07D6F986, 0x042008BF, 0x0F050CEF, 0xFE650849, 0x05DB00B8, 0xFF8EF7BB, 0x09D40B9B, 0xFD240127,
+0x0C670A29, 0x03410652, 0x088204FA, 0x0B0CFA8E, 0x01A10AAA, 0xFA9403DD, 0xFEBD0A5C, 0xFD800534,
+0x03EC03FF, 0x01B2FEC4, 0xFC19106B, 0xFA13FAB7, 0xFC70FAC0, 0xF6E60396, 0x0610FCAF, 0x0D47F9BB,
+0xE91009D2, 0x03F8F6C0, 0x0556EFCF, 0xF8B3FA78, 0x031301F4, 0x1171F830, 0xE975FA29, 0x061A0002,
+0x0EBBF9E5, 0x06F9FBC2, 0x0921F949, 0x13A5093E, 0xEEEAF7C3, 0x0297088B, 0x107200BF, 0x0813059D,
+0x03D00AC7, 0x077F0A23, 0xF9DDEDDD, 0xF3310C41, 0x0E6B0474, 0x09A60B0C, 0xFAEE0BFF, 0x059B0363,
+0xFF60F717, 0xF2D301E1, 0x0A6B0F45, 0xF9A61062, 0xF05702EC, 0xFD0B0096, 0xFCAFFE58, 0xF380FFCA,
+0xFBA70D93, 0xF7590DB0, 0xFD7EF9F2, 0x0212FA7F, 0xF48CF927, 0xF9BFFA04, 0xF5180873, 0xECAB0BDD,
+0x0392FDE3, 0xF49C0178, 0xFBE10480, 0xFCD005DE, 0xF77AFC6C, 0x04D21B68, 0x06E8FB97, 0xF97D0589,
+0x0073038E, 0xFAAC0CFA, 0xFAD2F735, 0xF711143A, 0x03A80070, 0xEF16F5BC, 0x08D10142, 0xF898FFC1,
+0x0F3600DD, 0xF71F0F80, 0x060002F9, 0x00E0F2DC, 0x001510D9, 0xF7091034, 0x00B10E23, 0xF0930ADA,
+0xF94BFDC0, 0x0D01FF7F, 0xFD300AB9, 0xEC71F9C4, 0xEFE90A6B, 0xFB54077D, 0x0242FFCA, 0xFC040764,
+0xF6520853, 0xEFCBF9B0, 0xF078F591, 0xEFDC075F, 0xFB90FE11, 0xF6720114, 0xF46B01E9, 0xF910EE5C,
+0xFCEEF607, 0xFC1C0747, 0xF45A0747, 0xFEC0F536, 0xF499FC22, 0xF8BDF5B9, 0x0008F819, 0xF2EA06D3,
+0xECC0F5F8, 0xFF6A019A, 0xF768FB84, 0xFA6AEEF7, 0xFC76ED5D, 0xF2DAFE6F, 0xF8CDEE7B, 0xFBF9F582,
+0xFBA5FF70, 0x102CEFFB, 0x11D6F605, 0xF2D8FF30, 0x16B80258, 0x1B5C0A90, 0x0254F00A, 0x0D01FE59,
+0xF3F606B2, 0xEE7DF945, 0x01F70813, 0x0C6F0FD1, 0x0E19F73D, 0x0C6E0B28, 0xF3DBF44E, 0xF5FAFBA7,
+0xFF17FB8B, 0x001711CE, 0x1150FFBF, 0xFAB813C9, 0xFFB9F052, 0xFDCBFD40, 0xFEDEF439, 0xF6F506C1,
+0x0D3F0B92, 0xF653082C, 0x0FD3EED4, 0xF35C0C40, 0x0D03F532, 0xF8BEF6F4, 0x089E0AF2, 0xF5CDFE92,
+0x0D4D0066, 0xDE0BFC57, 0x0313FFBD, 0x0A1CF617, 0xFCB50B2D, 0xF716F3F2, 0x05750B36, 0xE317EBF4,
+0x0575FA3F, 0x198FF7EE, 0xF7D7FD10, 0x055AF424, 0xF3E1066B, 0xEF07E1FE, 0x06AE05DC, 0x1E6A144F,
+0x03AAF657, 0x0BAAFC47, 0xEF79FC2B, 0x04DEE328, 0x004307F4, 0xFFE62BC2, 0x066FF912, 0x0C0B08BE,
+0xF214F1CF, 0x1098E4D4, 0xF646075D, 0xDDEE1B37, 0x0A2003E8, 0xFB220C15, 0xFD97EB2D, 0x22DFF4E4,
+0xFFE103BA, 0x06B90018, 0xE8D0FD9B, 0x079C042D, 0x0461140A, 0xF128E902, 0x00A703D7, 0xFDA60314,
+0xF867E630, 0x02D0016A, 0xFA93016D, 0xFACDED5D, 0xFE20F99B, 0x0668FF2F, 0x103EF130, 0x076B0C07,
+0x03FDFE6B, 0xFF2DEF7B, 0x0EA00057, 0xFC3B03C5, 0x0C60F638, 0xF6F60CFF, 0x02B30292, 0x0352F4D6,
+0x0471098C, 0x08F60577, 0x0D1EF980, 0xF7940796, 0x06ED05A2, 0x020EF43D, 0xFDF80AD0, 0xFD990A58,
+0x07F7F963, 0xF5FE083C, 0x0557094E, 0x01D1F697, 0xF35AFB3F, 0xFF5C06BE, 0x095AFFC8, 0xF80009C9,
+0x02A710FF, 0x0048F8AA, 0x0704FF0F, 0xFA6A073F, 0xFB9EFE56, 0xF1D705E4, 0xEDE00D22, 0x0157F415,
+0xFB9405ED, 0xF243FD80, 0xFF25F4F8, 0xFA5E009C, 0xF27DF61C, 0x00E3F77E, 0xFA05FD5F, 0xFA09FD6E,
+0x0864EC8B, 0xF97B02CC, 0xFC3EF436, 0x03FEF382, 0xF6F2E9CE, 0x01980635, 0x0700F5C5, 0x0501FE82,
+0x07D4179D, 0x0C60FAF3, 0x067EF432, 0xFC4A11B2, 0x0333FFBF, 0x078AFE72, 0xFE0E04E8, 0x0037FC38,
+0xFE76F88D, 0xE4D901F7, 0xFF89FC59, 0x00E4042C, 0xFE28FE54, 0x001EFC87, 0x0648F601, 0xF619F4BA,
+0xFBAFFB71, 0xFE63FC4B, 0x06BEFC69, 0x005EF4B2, 0x0B3BFA0F, 0xF908ED66, 0x06C8FCC1, 0xFC02FB29,
+0x096300E4, 0xFE90F883, 0x0CD3FABD, 0x0837F910, 0x04F104EE, 0xFB89F2FA, 0x1465F676, 0x040AECD2,
+0x0DEBFC4F, 0x02A1FEA2, 0x03AD06FD, 0xFF75F312, 0x20B214D2, 0x12F4EEEB, 0x177BF940, 0x06150C7C,
+0x06E10440, 0x045CF3F2, 0x07A11E82, 0x1B3D0354, 0x1CBD0781, 0xF94A0E30, 0x05E30ABE, 0x0F2FFE27,
+0xECEA1667, 0x14B61272, 0x0FED10D4, 0xF55B09D8, 0xFECE0ED2, 0x05D505D1, 0xEB29FE95, 0xFC721777,
+0x03FD113D, 0xFA2C0A5A, 0xED320FB3, 0xEC81F68C, 0xF9040DB4, 0x0BE20023, 0xFBEE11AE, 0xF13E0693,
+0xEB83F95F, 0xE753E84B, 0xF473089F, 0x0F7513EE, 0xFACD0FD5, 0xF18405D6, 0xFDCAFB07, 0x00C0DCF9,
+0xF8910062, 0xF5B61FDA, 0x00B30BA8, 0xEFDBF4D1, 0x01E3F964, 0x1022ED24, 0xFB2E00F2, 0xE2F2121B,
+0xF648103C, 0xFC37F033, 0x01F008DA, 0x1ACA006D, 0x0149FAAF, 0xDA1102AF, 0xF7C0FB90, 0x0159F1C1,
+0xFFA1F6A2, 0x0A670C88, 0xFBB8065E, 0xE2B0E7D7, 0x020CFDF1, 0x062BF33E, 0xF9BBFF96, 0x069F1006,
+0xF5F90101, 0xF9C5E90C, 0x059A05A8, 0x0871FA77, 0xFD03F367, 0xF8C30AF3, 0xF01FFDC5, 0x032BEF57,
+0xFC5006AF, 0x0AE6FAEB, 0xFBA1F53B, 0xF737FB17, 0xF606EDAC, 0x05A8FB9F, 0xF251FABF, 0xFEE7FE24,
+0x002DED77, 0x078DF830, 0xFC05F432, 0xF97A0159, 0xF9FEFA95, 0x08750AE2, 0x00D207B6, 0xF20609CC,
+0x022EFCEF, 0xF9F90548, 0x00B40448, 0xF8A1138D, 0xF4FD0970, 0xF78F00A9, 0x0FA708DF, 0xF956FF7D,
+0xF6A3FB8F, 0xF17C1586, 0xF4B502D3, 0xFCB800D3, 0x04181149, 0xFA83FC1F, 0xFFF1FD34, 0xE32C0CA0,
+0xEF5102A9, 0xF5E9066F, 0xF7710B39, 0x044BFAE8, 0xF9D0F411, 0xE272F450, 0xF4B70075, 0xE9D5F7B8,
+0xFDD20A3D, 0x04BD0583, 0x0426F51B, 0xFE04E90D, 0xF6A0FE91, 0xF54BF1EE, 0xF31A1044, 0xFC7301C2,
+0x0A47FA02, 0x0BFAFB7A, 0xFA1B02BE, 0xF9F1EDE8, 0xE6480785, 0x0036FA63, 0x0F16FD67, 0x02271162,
+0xEF750160, 0xFFDCEDF6, 0xEAA6F638, 0x021FFD54, 0x09F90BFF, 0xEA51097B, 0xE748F88B, 0x1267EECF,
+0xF67AF42C, 0xFF320402, 0x051A0BA4, 0xE993FB67, 0xEC16E90B, 0x159CFD51, 0xFC1BF3FC, 0xF59001F7
+
+output0 =
+0xFDD80630, 0xFBC50489, 0xFA60025A, 0xF9C2FFF1, 0xF9E2FD94, 0xFAA8FB79, 0xFBECF9C9, 0xFD89F89A,
+0xFF52F7FF, 0x011AF7FD, 0x02ACF88E, 0x03D3F995, 0x0467FADC, 0x0459FC1E, 0x03BFFD10, 0x02D6FD78,
+0x01EEFD46, 0x015AFC93, 0x014FFBA5, 0x01D5FAD1, 0x02C3FA65, 0x03CDFA87, 0x049EFB2C, 0x04F8FC1E,
+0x04C8FD0C, 0x042BFDAB, 0x0364FDD1, 0x02BCFD80, 0x026EFCE4, 0x028EFC40, 0x0307FBD0, 0x03A8FBB9,
+0x0439FBFA, 0x0490FC76, 0x049DFD01, 0x046EFD75, 0x041EFDBD, 0x03C8FDDA, 0x037BFDDA, 0x0338FDCC,
+0x02F5FDB2, 0x02ACFD82, 0x0266FD2B, 0x023AFCA4, 0x024CFBF5, 0x02B3FB3F, 0x0375FAB2, 0x0476FA7C,
+0x0586FAB6, 0x0668FB59, 0x06F1FC3B, 0x0715FD23, 0x06EDFDDB, 0x06B0FE48, 0x0696FE78, 0x06C4FEA0,
+0x0739FEFE, 0x07C4FFCD, 0x081A011C, 0x07E902CF, 0xFE86FEB1, 0xFF03FE27, 0xFFA2FDBC, 0x005EFD78,
+0x012DFD63, 0x0204FD81, 0x02D5FDD2, 0x0393FE53, 0x0436FEFC, 0x04B6FFC5, 0x051000A4, 0x05440193,
+0x0552028D, 0x0538038E, 0x04F40492, 0x04810593, 0x03DD0687, 0x03070762, 0x02030815, 0x00DE0894,
+0xFFA508D7, 0xFE6C08DB, 0xFD4608A9, 0xFC3D084D, 0xFB5707D8, 0xFA8F075A, 0xF9D806DD, 0xF9250663,
+0xF86705E2, 0xF797054A, 0xF6BA0488, 0xF5DE038A, 0xF51A0246, 0xF48D00BF, 0xF44FFF02, 0xF476FD29,
+0xF50AFB54, 0xF606F9A3, 0xF75BF833, 0xF8F3F718, 0xFAB3F65A, 0xFC84F5FB, 0xFE4FF5F7, 0x0007F645,
+0x019FF6DC, 0x030EF7B6, 0x044AF8CB, 0x0548FA14, 0x05FCFB87, 0x065BFD11, 0x065EFE9F, 0x06050017,
+0x05590160, 0x046B0265, 0x03520318, 0x022A0373, 0x010C037B, 0x000D033A, 0xFF3C02C3, 0xFE9F0227,
+0x0027FD69, 0x009DFDA4, 0x0114FDDC, 0x0188FE10, 0x01F5FE3E, 0x0257FE65, 0x02AEFE85, 0x02F9FEA1,
+0x033AFEBA, 0x0374FED3, 0x03A8FEF0, 0x03DCFF14, 0x0412FF44, 0x044CFF83, 0x048CFFD4, 0x04D00039,
+0x051700B4, 0x055B0143, 0x059901E5, 0x05C70297, 0x05E00353, 0x05DA0414, 0x05B104D3, 0x055C0588,
+0x04DA062D, 0x042806BA, 0x034A0728, 0x02410773, 0x01180797, 0xFFD60791, 0xFE890761, 0xFD3C0707,
+0xFBFD0688, 0xFADA05E6, 0xF9DD0529, 0xF9120457, 0xF87E0377, 0xF8260290, 0xF80A01AA, 0xF82800CB,
+0xF87BFFF9, 0xF8FBFF39, 0xF99CFE8E, 0xFA54FDF8, 0xFB17FD7A, 0xFBD9FD12, 0xFC90FCBF, 0xFD33FC7E,
+0xFDBCFC4D, 0xFE27FC29, 0xFE74FC0F, 0xFEA2FBFF, 0xFEB7FBF5, 0xFEB7FBF2, 0xFEAAFBF4, 0xFE96FBFC,
+0xFE85FC0A, 0xFE7BFC20, 0xFE80FC3C, 0xFE97FC60, 0x00A6FF39, 0x0142FE82, 0x01BCFDFB, 0x020CFDAE,
+0x022EFDA0, 0x0223FDCE, 0x01F2FE35, 0x01A6FECC, 0x014DFF84, 0x00F5004F, 0x00AC011B, 0x007C01DA,
+0x006B027D, 0x007A02FA, 0x00A6034C, 0x00E60372, 0x01310370, 0x0178034E, 0x01AD0318, 0x01C402DA,
+0x01B4029F, 0x01750274, 0x0105025D, 0x0067025D, 0xFFA10270, 0xFEBE028F, 0xFDC902B0, 0xFCD202C3,
+0xFBE602BC, 0xFB15028D, 0xFA6A022D, 0xF9F10196, 0xF9B100C9, 0xF9B0FFCC, 0xF9F1FEAA, 0xFA72FD75,
+0xFB30FC40, 0xFC24FB1F, 0xFD45FA28, 0xFE86F96C, 0xFFDBF8FA, 0x0133F8DA, 0x027EF910, 0x03A9F999,
+0x04A6FA6E, 0x0565FB82, 0x05DCFCC4, 0x0604FE24, 0x05DCFF8E, 0x056600F0, 0x04AC0239, 0x03BD035A,
+0x02AC0448, 0x018D04FA, 0x0078056A, 0xFF810597, 0xFEBB0580, 0xFE32052B, 0xFDEE049D, 0xFDF103E0,
+0xFDBE04AC, 0xFD860450, 0xFD5703F6, 0xFD28039D, 0xFCF40343, 0xFCB002E6, 0xFC5B0283, 0xFBF1021A,
+0xFB7501A5, 0xFAEE0124, 0xFA650094, 0xF9E6FFF4, 0xF97DFF44, 0xF939FE85, 0xF925FDB9, 0xF949FCE5,
+0xF9ABFC0F, 0xFA4CFB3E, 0xFB27FA7D, 0xFC33F9D5, 0xFD65F953, 0xFEAEF8FF, 0xFFFEF8E4, 0x0145F907,
+0x0273F96A, 0x037CFA0D, 0x0457FAEA, 0x04FCFBF5, 0x0568FD20, 0x059DFE5A, 0x059EFF8F, 0x057100AC,
+0x051D01A0, 0x04AC025B, 0x042502D5, 0x0394030A, 0x030002FB, 0x027202B0, 0x01F20236, 0x0186019E,
+0x013300FB, 0x00FC0060, 0x00E4FFDF, 0x00EAFF88, 0x010CFF64, 0x0146FF7A, 0x0193FFC8, 0x01E9004B,
+0x024100F8, 0x029101C3, 0x02CF029E, 0x02F40378, 0x02FA0446, 0x02DD04FB, 0x029C058F, 0x023A05FC,
+0x01BC0641, 0x012A065F, 0x008D065A, 0xFFF00638, 0x005C01BF, 0x001901E6, 0xFFB501EC, 0xFF4F01C0,
+0xFF090169, 0xFEF90105, 0xFF1C00B5, 0xFF5A0093, 0xFF9100A3, 0xFFA600D2, 0xFF910101, 0xFF610116,
+0xFF310108, 0xFF1D00E1, 0xFF3000C2, 0xFF6100C8, 0xFF8B0108, 0xFF86017A, 0xFF3401FC, 0xFE8C025D,
+0xFDA9026E, 0xFCB80215, 0xFBF40153, 0xFB88004C, 0xFB8BFF33, 0xFBF2FE3B, 0xFC9DFD88, 0xFD62FD28,
+0xFE1BFD10, 0xFEB2FD28, 0xFF25FD57, 0xFF79FD8D, 0xFFBBFDC4, 0xFFEFFDFD, 0x0014FE3D, 0x0024FE7F,
+0x001EFEBB, 0x0003FEE6, 0xFFE2FEF7, 0xFFC9FEF3, 0xFFC3FEE6, 0xFFCDFEE2, 0xFFD7FEF1, 0xFFCCFF11,
+0xFF99FF2B, 0xFF42FF20, 0xFEDFFED0, 0xFE9FFE31, 0xFEB3FD56, 0xFF41FC71, 0x004AFBC7, 0x01AAFB99,
+0x0319FC0C, 0x0446FD19, 0x04EBFE90, 0x04E80020, 0x044B0176, 0x034B0257, 0x023302AC, 0x0148028E,
+0xFCA6FDD9, 0xFDA9FCEF, 0xFF0FFC63, 0x00A8FC61, 0x0230FCF4, 0x036AFE08, 0x042BFF6D, 0x046600EA,
+0x0428024B, 0x03920370, 0x02C7044D, 0x01E104E6, 0x00EF0548, 0xFFF50578, 0xFEF10577, 0xFDE80539,
+0xFCEA04B7, 0xFC1003EC, 0xFB7402E5, 0xFB2A01BC, 0xFB380093, 0xFB92FF88, 0xFC1DFEB0, 0xFCBDFE0C,
+0xFD5EFD8F, 0xFDF7FD23, 0xFE96FCB6, 0xFF4EFC45, 0x0035FBDC, 0x0156FB98, 0x02A8FB9C, 0x040FFC03,
+0x0560FCD9, 0x066EFE15, 0x0714FF95, 0x073F012E, 0x06F202AE, 0x064603EE, 0x055F04D3, 0x04680557,
+0x03870589, 0x02D90580, 0x02680561, 0x0230054E, 0x021E0562, 0x021005AE, 0x01E4062E, 0x017906CF,
+0x00BC076D, 0xFFAE07DC, 0xFE6707F4, 0xFD10079C, 0xFBDF06D3, 0xFB0205B2, 0xFA960469, 0xFA9C032F,
+0xFAF90232, 0xFB7B018B, 0xFBF10134, 0xFC33010A, 0xFE97FE54, 0xFF28FE55, 0xFFB0FE80, 0x0022FECF,
+0x0074FF36, 0x00A4FFA9, 0x00B4001E, 0x00A9008D, 0x008600F4, 0x00500151, 0x000801A2, 0xFFAE01E6,
+0xFF430217, 0xFECB0233, 0xFE490235, 0xFDC4021B, 0xFD4001E4, 0xFCC4018F, 0xFC56011E, 0xFBFB0090,
+0xFBBDFFE9, 0xFBA3FF2E, 0xFBB7FE69, 0xFBFCFDA9, 0xFC70FCFF, 0xFD0AFC7A, 0xFDB7FC23, 0xFE64FBFD,
+0xFF00FBFC, 0xFF81FC11, 0xFFE9FC29, 0x0041FC36, 0x009DFC33, 0x010CFC27, 0x0199FC22, 0x0243FC39,
+0x02FDFC7B, 0x03B6FCF3, 0x0456FD9D, 0x04CFFE6F, 0x0517FF58, 0x052E0049, 0x05180137, 0x04DB021E,
+0x047A02F9, 0x03F203C8, 0x03410482, 0x0265051D, 0x01620586, 0x004605AF, 0xFF29058E, 0xFE240526,
+0xFD4D0483, 0xFCB503BD, 0xFC5C02EC, 0xFC3B0226, 0xFC420179, 0xFC5F00E7, 0xFC860069, 0xFCB4FFF7,
+0x0222FC61, 0x01C3FD5D, 0x0145FE80, 0x00BDFFB9, 0x003B00F2, 0xFFD00218, 0xFF830314, 0xFF5803D6,
+0xFF490453, 0xFF4D0486, 0xFF560473, 0xFF550422, 0xFF3D03A5, 0xFF01030F, 0xFE9B0275, 0xFE0C01EA,
+0xFD58017C, 0xFC8A0135, 0xFBB10116, 0xFADC0118, 0xFA1A012E, 0xF97A0149, 0xF9030153, 0xF8BC013D,
+0xF8A300F8, 0xF8B5007C, 0xF8EBFFCA, 0xF93CFEE9, 0xF99FFDE9, 0xFA0CFCDF, 0xFA80FBE3, 0xFAF6FB0D,
+0xFB70FA74, 0xFBEFFA27, 0xFC75FA30, 0xFD03FA8E, 0xFD97FB39, 0xFE2DFC21, 0xFEBFFD31, 0xFF42FE51,
+0xFFA9FF69, 0xFFE90061, 0xFFF6012A, 0xFFCA01B6, 0xFF650200, 0xFEC9020A, 0xFE0301DA, 0xFD240179,
+0xFC4200F3, 0xFB750054, 0xFAD3FFA7, 0xFA70FEF5, 0xFA5CFE43, 0xFA9BFD97, 0xFB2BFCF2, 0xFC01FC58,
+0xFD0AFBCD, 0xFE30FB53, 0xFF56FAF2, 0x0064FAB2, 0x00890181, 0x00D30200, 0x011A0274, 0x015102DA,
+0x016D0331, 0x01650378, 0x013403AE, 0x00D703D4, 0x005303EA, 0xFFAE03EE, 0xFEF503E0, 0xFE3703BC,
+0xFD830380, 0xFCE90329, 0xFC7702B5, 0xFC370224, 0xFC300178, 0xFC6400B6, 0xFCD1FFE5, 0xFD6FFF10,
+0xFE36FE44, 0xFF17FD8E, 0x0005FCFD, 0x00F3FC9D, 0x01D4FC77, 0x029CFC92, 0x0342FCEE, 0x03C1FD87,
+0x0412FE54, 0x0435FF48, 0x042A0052, 0x03F1015F, 0x038F025D, 0x0307033C, 0x026003EE, 0x01A1046A,
+0x00D304AC, 0xFFFE04B2, 0xFF2C0483, 0xFE690426, 0xFDBE03A6, 0xFD33030E, 0xFCD10269, 0xFC9C01C3,
+0xFC960124, 0xFCBC0090, 0xFD0B000D, 0xFD78FF9A, 0xFDFBFF39, 0xFE87FEE7, 0xFF0FFEA4, 0xFF88FE6E,
+0xFFEBFE46, 0x0030FE2B, 0x0057FE21, 0x0060FE27, 0x0053FE42, 0x0038FE71, 0x0017FEB6, 0xFFFCFF0F,
+0x0125006D, 0x0124009C, 0x011900C4, 0x010500E1, 0x00E900F2, 0x00C400F7, 0x009400EF, 0x005700DF,
+0x000D00C7, 0xFFB400AA, 0xFF4E008B, 0xFEDB006B, 0xFE610047, 0xFDE4001C, 0xFD6CFFE8, 0xFCFEFFA4,
+0xFCA3FF4B, 0xFC60FED7, 0xFC3DFE44, 0xFC3DFD93, 0xFC63FCC4, 0xFCB0FBDE, 0xFD24FAEA, 0xFDBEF9F5,
+0xFE79F90E, 0xFF52F845, 0x0042F7AC, 0x0146F751, 0x0255F740, 0x0368F782, 0x0478F819, 0x057BF903,
+0x0668FA38, 0x0737FBAC, 0x07DDFD4D, 0x0853FF09, 0x089100CA, 0x0893027C, 0x0854040D, 0x07D7056D,
+0x0720068E, 0x0635076A, 0x052307FD, 0x03F50846, 0x02BD084A, 0x018A0810, 0x006B07A0, 0xFF6F0705,
+0xFEA0064B, 0xFE07057C, 0xFDA504A2, 0xFD7C03C8, 0xFD8602F6, 0xFDBC0234, 0xFE130188, 0xFE8100F5,
+0xFEFA0080, 0xFF73002A, 0xFFE5FFF2, 0x0048FFD7, 0x009B0546, 0xFF380441, 0xFE78030A, 0xFE3E01F7,
+0xFE4A0134, 0xFE5600BD, 0xFE390065, 0xFDF4FFF3, 0xFDB0FF42, 0xFDA7FE52, 0xFE06FD4F, 0xFED5FC7C,
+0xFFF0FC16, 0x0111FC3A, 0x01EFFCD6, 0x0256FDB0, 0x0241FE7E, 0x01D6FF02, 0x0154FF22, 0x00FBFEF1,
+0x00F0FEA2, 0x012DFE73, 0x0189FE8E, 0x01C8FEFA, 0x01B8FF95, 0x01450027, 0x00810078, 0xFF9C0063,
+0xFECFFFE6, 0xFE49FF21, 0xFE1CFE41, 0xFE3EFD74, 0xFE91FCD4, 0xFEF3FC61, 0xFF51FC0E, 0xFFA7FBC4,
+0x0001FB78, 0x006DFB2D, 0x00F4FAF2, 0x018FFAD7, 0x022DFAE5, 0x02BAFB17, 0x032DFB5E, 0x0387FBA8,
+0x03D8FBED, 0x042EFC35, 0x048BFC92, 0x04E0FD16, 0x050EFDC4, 0x04F4FE87, 0x0484FF2F, 0x03D0FF87,
+0x030EFF69, 0x0288FED5, 0x0286FDF8, 0x0327FD29, 0x0458FCCA, 0x05CCFD26, 0x0713FE54, 0x07BF0029,
+0x03FDFFC6, 0x02AB010C, 0x01510192, 0x00470181, 0xFFBC0127, 0xFFB200D7, 0x000100D4, 0x00640140,
+0x00940211, 0x0058031C, 0xFF97041C, 0xFE6104C5, 0xFCEA04E0, 0xFB7F044F, 0xFA770323, 0xFA1A0195,
+0xFA8F0000, 0xFBCBFECD, 0xFD92FE58, 0xFF7BFED7, 0x010C0046, 0x01D90265, 0x019F04C4, 0x005F06DC,
+0xFE5C083C, 0xFC0A08A0, 0xF9ED080D, 0xF87406CC, 0xF7D1054F, 0xF7EF0413, 0xF87E036D, 0xF90B0378,
+0xF92D0407, 0xF8A904BC, 0xF7830526, 0xF60104F0, 0xF48B03FA, 0xF3890262, 0xF33E007B, 0xF3B6FEAD,
+0xF4C2FD51, 0xF612FC94, 0xF74DFC73, 0xF835FCBD, 0xF8B2FD32, 0xF8D3FD97, 0xF8BEFDCD, 0xF898FDD4,
+0xF875FDBF, 0xF852FD9F, 0xF81CFD76, 0xF7C4FD2E, 0xF751FCA1, 0xF6E9FBAD, 0xF6CCFA4A, 0xF740F897,
+0xF876F6DF, 0xFA72F585, 0xFD02F4E8, 0xFFC5F545, 0xFD8100F8, 0xFD990087, 0xFDC70027, 0xFE02FFDA,
+0xFE44FF9F, 0xFE86FF74, 0xFEC7FF54, 0xFF06FF3C, 0xFF41FF2A, 0xFF7CFF1A, 0xFFB9FF0B, 0xFFFAFEFD,
+0x0045FEF2, 0x009EFEEC, 0x0107FEF4, 0x017FFF14, 0x0201FF58, 0x0281FFC8, 0x02ED0069, 0x03310138,
+0x03390229, 0x02F40328, 0x025D0418, 0x017804DC, 0x00540559, 0xFF0C057A, 0xFDC10535, 0xFC94048E,
+0xFBA50395, 0xFB090262, 0xFACC0115, 0xFAEDFFCC, 0xFB62FEA2, 0xFC18FDAA, 0xFCFCFCEE, 0xFDFAFC72,
+0xFF04FC32, 0x000DFC2C, 0x010EFC5C, 0x0200FCC0, 0x02D8FD58, 0x038AFE20, 0x0407FF10, 0x0443001C,
+0x0433012D, 0x03D70229, 0x033A02F8, 0x02710384, 0x019803C5, 0x00CF03BD, 0x002D037E, 0xFFC30321,
+0xFF9002C2, 0xFF880279, 0xFF970254, 0xFFA50256, 0xFF9D0274, 0xFF74029C, 0xFF2902B8, 0xFEC602BA,
+0x001AFB7E, 0x0038FC3B, 0x004BFD08, 0x005AFDDF, 0x006EFEBA, 0x008DFF91, 0x00BB005E, 0x00FA011D,
+0x014701C8, 0x019E025D, 0x01F702DA, 0x02470341, 0x02840392, 0x02A203D2, 0x02980403, 0x0260042B,
+0x01F6044C, 0x015C0469, 0x00950482, 0xFFAD0498, 0xFEAD04A8, 0xFDA504AE, 0xFCA304A5, 0xFBB7048A,
+0xFAED0456, 0xFA4F0408, 0xF9E5039D, 0xF9B20318, 0xF9B3027D, 0xF9E501D2, 0xFA3E011F, 0xFAB5006F,
+0xFB3EFFCE, 0xFBCDFF43, 0xFC55FEDA, 0xFCCCFE96, 0xFD2AFE7B, 0xFD68FE87, 0xFD82FEB7, 0xFD78FF02,
+0xFD4AFF5E, 0xFCFCFFC0, 0xFC94001A, 0xFC190061, 0xFB93008B, 0xFB0C0090, 0xFA8C006C, 0xFA1C001F,
+0xF9C5FFAA, 0xF98EFF12, 0xF97BFE61, 0xF990FD9F, 0xF9CDFCD5, 0xFA30FC11, 0xFAB4FB59, 0xFB53FAB9,
+0xFC04FA37, 0xFCBDF9D7, 0xFD74F99F, 0xFE20F98F, 0x01DEFFC3, 0x0279FF40, 0x0319FEBF, 0x03BCFE4C,
+0x045DFDF1, 0x04F7FDB5, 0x0582FD9F, 0x05F4FDB2, 0x0644FDF1, 0x0668FE5C, 0x065AFEEF, 0x0613FFA6,
+0x0595007C, 0x04E10167, 0x0400025C, 0x02FE0351, 0x01E90437, 0x00D20501, 0xFFC805A0, 0xFEDC0608,
+0xFE1A062F, 0xFD89060F, 0xFD2C05A4, 0xFD0304F4, 0xFD070407, 0xFD2F02EB, 0xFD7001B3, 0xFDBE0075,
+0xFE0EFF47, 0xFE57FE41, 0xFE94FD74, 0xFEC0FCEF, 0xFEDFFCBA, 0xFEF2FCD5, 0xFEFFFD3A, 0xFF0CFDDA,
+0xFF1EFEA4, 0xFF3AFF81, 0xFF5F005B, 0xFF8E011B, 0xFFC301B0, 0xFFF8020D, 0x0027022D, 0x00490210,
+0x005701BF, 0x00500146, 0x003000B6, 0xFFFB0022, 0xFFB4FF9A, 0xFF62FF2F, 0xFF0DFEEA, 0xFEBDFED1,
+0xFE7BFEE5, 0xFE4DFF20, 0xFE37FF78, 0xFE3DFFE1, 0xFE5D004B, 0xFE9700A9, 0xFEE600F0, 0xFF490116,
+0x0337013F, 0x02E7020D, 0x026502EB, 0x01B403CD, 0x00D604A6, 0xFFD60568, 0xFEC00605, 0xFDA20672,
+0xFC8C06A4, 0xFB8F0695, 0xFAB80643, 0xFA1405AE, 0xF9AA04DE, 0xF97E03DD, 0xF99002B8, 0xF9DA0182,
+0xFA54004C, 0xFAF2FF2B, 0xFBA8FE2E, 0xFC68FD67, 0xFD23FCDF, 0xFDD0FC9C, 0xFE64FC9F, 0xFED8FCE2,
+0xFF29FD5B, 0xFF55FDFA, 0xFF5FFEAE, 0xFF4AFF63, 0xFF1C0008, 0xFEDC008C, 0xFE9000E1, 0xFE410101,
+0xFDF600E9, 0xFDB4009C, 0xFD820024, 0xFD65FF8B, 0xFD5EFEE3, 0xFD70FE39, 0xFD9BFDA0, 0xFDDDFD23,
+0xFE33FCCE, 0xFE9AFCA7, 0xFF0BFCAF, 0xFF81FCE3, 0xFFF6FD3C, 0x0063FDB0, 0x00C4FE33, 0x0115FEB7,
+0x0154FF32, 0x0181FF9A, 0x019DFFE6, 0x01AE0012, 0x01B8001F, 0x01C00010, 0x01CEFFEA, 0x01E4FFB7,
+0x0208FF80, 0x0239FF4F, 0x0274FF31, 0x02B7FF2C, 0xFD78FF08, 0xFDDFFF8A, 0xFDBC0021, 0xFD1C0070,
+0xFC420037, 0xFB8BFF67, 0xFB4EFE2F, 0xFBB6FCE4, 0xFCB4FBE5, 0xFE05FB77, 0xFF4EFBAC, 0x003EFC5F,
+0x00A9FD47, 0x0096FE16, 0x0035FE96, 0xFFC5FEBB, 0xFF77FE9E, 0xFF5CFE6D, 0xFF63FE4E, 0xFF68FE4E,
+0xFF49FE57, 0xFF01FE43, 0xFEA9FDEB, 0xFE73FD42, 0xFE94FC61, 0xFF29FB7E, 0x002BFAD9, 0x016CFAA4,
+0x02ACFAEF, 0x03AEFBA2, 0x0453FC89, 0x049DFD6E, 0x04AFFE2D, 0x04B2FEC1, 0x04C4FF42, 0x04E6FFD5,
+0x04FC0092, 0x04DE0175, 0x046A025C, 0x03A10311, 0x02A30364, 0x01AF0343, 0x010302C4, 0x00C9021E,
+0x0100019A, 0x017E0171, 0x020101B9, 0x0246025D, 0x02280328, 0x01A603DA, 0x00E70446, 0x001D0462,
+0xFF750442, 0xFEFA0411, 0xFE9D03F1, 0xFE3803ED, 0xFDA903EE, 0xFCE903C9, 0xFC140353, 0xFB61027E,
+0x040BFA07, 0x05E7FB13, 0x072FFCC8, 0x07AAFED1, 0x074F00C8, 0x06470253, 0x04E00339, 0x03710374,
+0x02470324, 0x018C0289, 0x014501E9, 0x01510179, 0x01810152, 0x01A20170, 0x019501B4, 0x015001F9,
+0x00E00221, 0x005D0218, 0xFFE401DE, 0xFF890181, 0xFF570114, 0xFF4D00A8, 0xFF64004E, 0xFF91000D,
+0xFFCBFFEB, 0x0005FFEC, 0x0032000E, 0x0045004D, 0x002E009E, 0xFFE400F0, 0xFF660129, 0xFEBF0131,
+0xFE0400F6, 0xFD550071, 0xFCCEFFAB, 0xFC87FEB9, 0xFC8AFDB4, 0xFCD6FCB8, 0xFD5FFBD9, 0xFE16FB23,
+0xFEEDFA9B, 0xFFDBFA43, 0x00D9FA1D, 0x01DEFA2F, 0x02DEFA7D, 0x03C8FB09, 0x0487FBCE, 0x050BFCBE,
+0x0548FDC2, 0x053DFEC3, 0x04F5FFAD, 0x047D0074, 0x03E10116, 0x03270192, 0x025001E5, 0x015A0202,
+0x004D01D6, 0xFF400148, 0xFE5C004D, 0xFDD7FEEC, 0x049F061F, 0x037F0651, 0x0277062F, 0x01A505CA,
+0x01200540, 0x00ED04B8, 0x00FF0455, 0x01380431, 0x01750453, 0x019404B0, 0x017E0532, 0x012905BB,
+0x009B062E, 0xFFE5067A, 0xFF1A0693, 0xFE4C067A, 0xFD890634, 0xFCDA05C8, 0xFC48053B, 0xFBD80494,
+0xFB9203DA, 0xFB7E0319, 0xFB9E0263, 0xFBF001CB, 0xFC660163, 0xFCEA0138, 0xFD63014C, 0xFDB70195,
+0xFDD301FD, 0xFDB0026D, 0xFD5302C9, 0xFCC90300, 0xFC240304, 0xFB7802D6, 0xFAD3027A, 0xFA3D01F6,
+0xF9BC0151, 0xF951008F, 0xF900FFB1, 0xF8CEFEB7, 0xF8C3FDA4, 0xF8EAFC7D, 0xF94AFB4B, 0xF9EBFA1D,
+0xFACEF902, 0xFBF2F80C, 0xFD4EF74C, 0xFED5F6D1, 0x0077F6A6, 0x021FF6D2, 0x03B5F753, 0x0523F823,
+0x0658F931, 0x0747FA69, 0x07F0FBB6, 0x0857FD03, 0x0888FE44, 0x0891FF76, 0x087A009C, 0x084301B9,
+0xFCB307D8, 0xFB7E0505, 0xFA8A0208, 0xF9E2FF11, 0xF98CFC51, 0xF991F9ED, 0xF9F2F807, 0xFAADF6B3,
+0xFBBBF5F9, 0xFD0EF5D5, 0xFE91F63C, 0x002CF718, 0x01C3F84F, 0x0339F9C6, 0x0473FB61, 0x055AFD08,
+0x05DDFEA6, 0x05F3002B, 0x059D018C, 0x04E402C1, 0x03D903C6, 0x02900498, 0x01250534, 0xFFB00599,
+0xFE4705C5, 0xFCFF05B3, 0xFBE30564, 0xFAF904D5, 0xFA410409, 0xF9B70305, 0xF95101CF, 0xF9070072,
+0xF8D1FEFD, 0xF8ACFD7D, 0xF897FC03, 0xF898FA9D, 0xF8B9F957, 0xF907F83B, 0xF98DF74E, 0xFA5BF694,
+0xFB77F60C, 0xFCE4F5B5, 0xFE9FF58D, 0x009CF594, 0x02C7F5CB, 0x0507F634, 0x0741F6D7, 0x0955F7BA,
+0x0B28F8E5, 0x0CA1FA5D, 0x0DADFC23, 0x0E40FE33, 0x0E580082, 0x0DF802FB, 0x0D2C0583, 0x0C0207FA,
+0x0A8D0A39, 0x08E10C1A, 0x07120D7B, 0x05310E3E, 0xFE5BFC58, 0xFE3DFC9D, 0xFE0EFCEB, 0xFDE0FD36,
+0xFDC6FD76, 0xFDD3FDA5, 0xFE14FDC0, 0xFE93FDC8, 0xFF52FDC3, 0x004EFDBB, 0x0179FDBD, 0x02C3FDD7,
+0x0414FE16, 0x0552FE88, 0x0665FF35, 0x07320020, 0x07A70146, 0x07B4029E, 0x07520417, 0x0680059B,
+0x0545070D, 0x03B10854, 0x01D80951, 0xFFD409EC, 0xFDC10A12, 0xFBBD09B7, 0xF9E608D9, 0xF8570781,
+0xF72605C0, 0xF66503B0, 0xF6200172, 0xF659FF2A, 0xF70DFCFE, 0xF832FB12, 0xF9B5F983, 0xFB7EF86B,
+0xFD71F7D6, 0xFF70F7CA, 0x0159F841, 0x0310F92D, 0x0478FA78, 0x057DFC06, 0x060FFDBA, 0x0629FF73,
+0x05CE0115, 0x05060285, 0x03E703B0, 0x02880486, 0x01050500, 0xFF7D051D, 0xFE0D04E2, 0xFCCF045A,
+0xFBD40393, 0xFB2B029E, 0xFAD7018E, 0xFAD50074, 0xFB17FF63, 0xFB8FFE6A, 0xFC26FD94, 0xFCC7FCEB,
+0xFBFDFC7B, 0xFCA7FC9D, 0xFD4CFCAE, 0xFDE4FCAA, 0xFE6AFC93, 0xFEDBFC6D, 0xFF36FC45, 0xFF7CFC25,
+0xFFB3FC1B, 0xFFE0FC31, 0x0008FC6F, 0x0032FCD7, 0x0061FD64, 0x0095FE10, 0x00CDFECC, 0x0101FF88,
+0x01290035, 0x013D00C0, 0x0133011E, 0x01030144, 0x00AA0130, 0x002A00E4, 0xFF8A0065, 0xFED6FFBF,
+0xFE20FF00, 0xFD7DFE37, 0xFD01FD72, 0xFCC3FCBF, 0xFCD1FC28, 0xFD36FBB7, 0xFDF5FB6E, 0xFF06FB53,
+0x005CFB64, 0x01E0FBA3, 0x0376FC0C, 0x0501FC9E, 0x0661FD59, 0x077DFE38, 0x083EFF38, 0x08970055,
+0x08810186, 0x07FF02C0, 0x071C03F9, 0x05EA051F, 0x047D0623, 0x02ED06F4, 0x01530783, 0xFFC107C3,
+0xFE4A07AD, 0xFCFA0740, 0xFBD90680, 0xFAE90579, 0xFA2C043B, 0xF99D02DD, 0xF9390175, 0xF8FD001A,
+0xF8E4FEE2, 0xF8EBFDDC, 0xF912FD12, 0xF955FC89, 0xFE01F827, 0xFEFEF875, 0xFFD8F86F, 0x00EAF822,
+0x0271F7D2, 0x0472F7E0, 0x06B2F89E, 0x08CFFA2D, 0x0A60FC74, 0x0B1BFF21, 0x0AEE01CA, 0x09FC040F,
+0x089505B8, 0x070D06BD, 0x05A70742, 0x047F0780, 0x038B07A9, 0x02AA07D7, 0x01B80805, 0x00A30816,
+0xFF7307E6, 0xFE450760, 0xFD42067F, 0xFC8F0559, 0xFC430411, 0xFC6002CF, 0xFCD901B5, 0xFD9700DD,
+0xFE800052, 0xFF7A001D, 0x0067003C, 0x012B00A4, 0x01AB0141, 0x01D801ED, 0x01B2027C, 0x015602C6,
+0x00F602B3, 0x00CE024C, 0x011001BB, 0x01D20149, 0x02FC0142, 0x044C01DE, 0x0567032B, 0x05F60501,
+0x05C20710, 0x04C808F8, 0x03380A67, 0x01600B38, 0xFF8F0B75, 0xFDF60B51, 0xFC990B09, 0xFB530AC5,
+0xF9EC0A84, 0xF83E0A14, 0xF64E092E, 0xF4580791, 0xF2BC0529, 0xF1E5021D, 0xF219FED2, 0xF362FBC5,
+0x02A8FC39, 0x02CAFDBB, 0x025CFF25, 0x01770040, 0x004900EA, 0xFF00011C, 0xFDC700DF, 0xFCB50047,
+0xFBDAFF64, 0xFB40FE43, 0xFAF8FCEE, 0xFB16FB74, 0xFBB2F9F4, 0xFCD7F89D, 0xFE77F7A8, 0x006AF74A,
+0x026DF79F, 0x0431F8A4, 0x0571FA2D, 0x0605FBF0, 0x05EEFD9D, 0x0554FEED, 0x047CFFBB, 0x03AB000C,
+0x031B0003, 0x02E4FFD8, 0x02FDFFC5, 0x0344FFEF, 0x038B0063, 0x03A80113, 0x038101E1, 0x031002A7,
+0x02600347, 0x018703AB, 0x00A003C7, 0xFFC7039D, 0xFF150336, 0xFEA002A5, 0xFE790207, 0xFEA2017F,
+0xFF0D0133, 0xFF990145, 0x001301C4, 0x004202A3, 0xFFF403B8, 0xFF1304C1, 0xFDA90573, 0xFBE90593,
+0xFA1D0501, 0xF89703CB, 0xF7960222, 0xF735004D, 0xF76BFE94, 0xF80CFD2A, 0xF8E2FC1F, 0xF9BCFB65,
+0xFA86FADB, 0xFB43FA5F, 0xFC0FF9E4, 0xFD04F976, 0x00FAFFEB, 0x00DB0015, 0x00B30026, 0x0092001B,
+0x0086FFFE, 0x0096FFD9, 0x00C3FFBD, 0x0105FFB4, 0x0156FFC5, 0x01A9FFF6, 0x01F60045, 0x023400B1,
+0x025B0138, 0x026101D4, 0x023C027E, 0x01E50328, 0x015903BF, 0x009E042F, 0xFFC20468, 0xFEDD045E,
+0xFE080412, 0xFD590391, 0xFCDF02EE, 0xFC9C0242, 0xFC8A01A0, 0xFC9A0113, 0xFCBE00A0, 0xFCEA0040,
+0xFD1CFFEC, 0xFD57FFA2, 0xFDA1FF61, 0xFDFBFF34, 0xFE62FF25, 0xFEC8FF3D, 0xFF1BFF7F, 0xFF47FFE0,
+0xFF3F004E, 0xFEFE00AF, 0xFE8F00EA, 0xFE0500ED, 0xFD7C00B2, 0xFD0E003D, 0xFCCFFF9E, 0xFCCBFEED,
+0xFD04FE42, 0xFD71FDAF, 0xFE06FD46, 0xFEB0FD10, 0xFF5CFD0F, 0xFFFAFD3F, 0x0079FD98, 0x00CFFE0A,
+0x00F7FE83, 0x00F3FEF1, 0x00CDFF45, 0x0098FF74, 0x0065FF7D, 0x0046FF6A, 0x0044FF4A, 0x0061FF31,
+0xFF4D0493, 0xFEA302A0, 0xFDEF007D, 0xFD36FE4A, 0xFC83FC2A, 0xFBE3FA3C, 0xFB67F899, 0xFB1EF754,
+0xFB16F676, 0xFB5BF600, 0xFBF1F5EA, 0xFCD5F626, 0xFDFEF69F, 0xFF5BF742, 0x00D6F7FB, 0x0258F8BA,
+0x03C7F971, 0x050DFA1B, 0x0618FAB6, 0x06DBFB45, 0x0752FBCF, 0x0780FC59, 0x076DFCEB, 0x0727FD87,
+0x06BFFE2E, 0x0645FEDD, 0x05C8FF8C, 0x05530033, 0x04EE00C7, 0x0499013F, 0x04520193, 0x041501C0,
+0x03DA01C4, 0x039A01A4, 0x03510168, 0x02FD0119, 0x02A200C2, 0x0245006E, 0x01EF0025, 0x01ADFFED,
+0x0187FFC9, 0x0188FFBA, 0x01B4FFBC, 0x020DFFCD, 0x028DFFE7, 0x032B000A, 0x03D90034, 0x04880068,
+0x052700AB, 0x05A60103, 0x05FB0177, 0x061E020D, 0x060D02C7, 0x05CB03A4, 0x0560049D, 0x04D505A4,
+0x043706A6, 0x0390078E, 0x02E90842, 0x024708AC, 0xFD38FDC0, 0xFC6FFE33, 0xFBC9FEC5, 0xFB58FF6B,
+0xFB270014, 0xFB3A00B1, 0xFB910133, 0xFC21018E, 0xFCDD01BC, 0xFDB101BF, 0xFE8A019C, 0xFF540160,
+0xFFFF0119, 0x007D00D9, 0x00CB00B0, 0x00E600AA, 0x00D400D0, 0x009E0123, 0x004E019D, 0xFFF10234,
+0xFF8F02D6, 0xFF320370, 0xFEDE03F1, 0xFE920445, 0xFE4F0462, 0xFE100440, 0xFDCF03E0, 0xFD8B0349,
+0xFD420287, 0xFCF401AC, 0xFCA700C9, 0xFC61FFF1, 0xFC2BFF34, 0xFC0EFE9C, 0xFC12FE31, 0xFC3DFDF2,
+0xFC8FFDDC, 0xFD05FDE5, 0xFD99FE05, 0xFE3FFE2F, 0xFEEAFE5B, 0xFF8CFE81, 0x0019FE9D, 0x0085FEAE,
+0x00CCFEB8, 0x00EDFEBE, 0x00EBFEC4, 0x00CFFED0, 0x00A5FEE3, 0x0079FEFD, 0x0057FF1B, 0x0046FF39,
+0x004BFF4F, 0x0066FF56, 0x0090FF48, 0x00BFFF24, 0x00E6FEE8, 0x00F8FE9A, 0x00E7FE41, 0x00AAFDE8,
+0xFC9B0078, 0xFCB9FF79, 0xFCF1FE5A, 0xFD43FD2D, 0xFDB0FC05, 0xFE37FAF5, 0xFED4FA0B, 0xFF84F955,
+0x0042F8DB, 0x0105F89F, 0x01C7F8A1, 0x0280F8DC, 0x0327F947, 0x03B6F9D7, 0x0428FA82, 0x047CFB3D,
+0x04B2FBFC, 0x04CDFCB9, 0x04D3FD6D, 0x04CCFE13, 0x04C2FEAC, 0x04BDFF37, 0x04C5FFB7, 0x04E1002F,
+0x051300A2, 0x05580115, 0x05AE018C, 0x060C020B, 0x06660294, 0x06B00329, 0x06DD03C9, 0x06E20475,
+0x06B70529, 0x065405E2, 0x05BB0698, 0x04EE0745, 0x03F707E0, 0x02E0085F, 0x01B808B9, 0x009108E6,
+0xFF7708DF, 0xFE7B08A1, 0xFDA6082A, 0xFD01077E, 0xFC8E06A5, 0xFC4C05AA, 0xFC38049B, 0xFC480388,
+0xFC730283, 0xFCAF019C, 0xFCF100E1, 0xFD30005D, 0xFD640015, 0xFD890008, 0xFD9A0032, 0xFD990086,
+0xFD8700F5, 0xFD67016C, 0xFD3D01D9, 0xFD0F0228, 0xFE69004C, 0xFEBBFFE6, 0xFF24FFCF, 0xFF700000,
+0xFF760059, 0xFF2C00A4, 0xFEA800AE, 0xFE1A005C, 0xFDBEFFB1, 0xFDC4FED2, 0xFE41FDFD, 0xFF24FD71,
+0x003EFD5E, 0x014CFDD2, 0x020BFEBB, 0x024DFFE6, 0x02010110, 0x013701F7, 0x001E0269, 0xFEF20251,
+0xFDF501B8, 0xFD5A00C1, 0xFD40FFA3, 0xFDA7FE9C, 0xFE76FDE2, 0xFF80FD9B, 0x0089FDD1, 0x015CFE75,
+0x01CEFF60, 0x01CE005D, 0x01660138, 0x00B701CB, 0xFFEF0205, 0xFF3801F0, 0xFEAE01AA, 0xFE560156,
+0xFE1F0110, 0xFDEB00E0, 0xFDA000B7, 0xFD350075, 0xFCBBFFF8, 0xFC58FF2D, 0xFC40FE1E, 0xFC9CFCF0,
+0xFD79FBE3, 0xFEC3FB36, 0x0042FB18, 0x01AEFB95, 0x02C1FC8F, 0x0350FDCC, 0x0354FF03, 0x02EFFFF9,
+0x0257008F, 0x01C600CC, 0x016500D1, 0x013B00CF, 0x013200EB, 0x01240132, 0x00ED0195, 0x007A01EF,
+0xF92B02B0, 0xF9D40009, 0xFB53FDCF, 0xFD70FC4F, 0xFFD5FBB9, 0x0221FC13, 0x03FAFD3B, 0x0520FEEF,
+0x057100D9, 0x04F602A4, 0x03D30409, 0x024404D7, 0x008E04FE, 0xFEF20486, 0xFDA20391, 0xFCBD024B,
+0xFC4B00E7, 0xFC41FF8F, 0xFC84FE61, 0xFCF5FD69, 0xFD76FCA3, 0xFDF5FBFF, 0xFE6EFB68, 0xFEECFAD0,
+0xFF80FA33, 0x0039F99D, 0x011DF924, 0x0222F8E0, 0x0330F8E3, 0x0423F92D, 0x04DDF9AA, 0x054BFA39,
+0x0571FAAD, 0x0569FAE6, 0x055DFAD3, 0x0579FA7B, 0x05E2F9FE, 0x06A4F988, 0x07B5F944, 0x08F7F954,
+0x0A43F9C2, 0x0B73FA87, 0x0C70FB8C, 0x0D32FCB7, 0x0DBDFDF4, 0x0E1CFF3A, 0x0E56008A, 0x0E6D01E7,
+0x0E560357, 0x0E0604D1, 0x0D73064A, 0x0C9B07AC, 0x0B8608E7, 0x0A4509EF, 0x08E40AC4, 0x076B0B6B,
+0x05D90BE9, 0x04240C3A, 0x02430C4E, 0x00380C04, 0x00E4FF53, 0x013FFEFC, 0x01B4FED6, 0x022DFEE9,
+0x028FFF31, 0x02C3FF9F, 0x02BE001A, 0x027F0086, 0x021600C9, 0x019900D6, 0x012600AA, 0x00D50053,
+0x00B6FFE5, 0x00CCFF7C, 0x010CFF2F, 0x0164FF0F, 0x01BAFF1E, 0x01F8FF54, 0x0211FFA0, 0x0201FFED,
+0x01D00027, 0x018F0043, 0x014E0041, 0x011C002A, 0x0100000E, 0x00F5FFFB, 0x00ECFFFD, 0x00D40011,
+0x009F002C, 0x00450039, 0xFFCD0022, 0xFF4AFFD3, 0xFED8FF47, 0xFE93FE85, 0xFE94FDA5, 0xFEE4FCC5,
+0xFF7DFC07, 0x004AFB85, 0x012EFB4B, 0x020AFB58, 0x02C6FB9D, 0x0356FC02, 0x03BAFC70, 0x03FEFCD7,
+0x0430FD32, 0x045EFD83, 0x048EFDD4, 0x04BFFE2F, 0x04E9FE9B, 0x0500FF18, 0x04FBFF9F, 0x04D50026,
+0x0492009F, 0x04360103, 0x03CC014D, 0x035B017F, 0x02E70199, 0x0274019E, 0x0201018E, 0x01920165,
+0xFD5C025E, 0xFC270172, 0xFB360075, 0xFA92FF71, 0xFA40FE72, 0xFA3CFD7E, 0xFA80FCA0, 0xFB01FBDB,
+0xFBB0FB38, 0xFC7FFAB9, 0xFD5FFA61, 0xFE40FA32, 0xFF19FA2B, 0xFFE1FA4A, 0x0091FA8C, 0x0128FAE9,
+0x01A6FB5D, 0x020CFBE0, 0x025DFC6A, 0x0299FCF3, 0x02C4FD77, 0x02DCFDF1, 0x02E2FE5E, 0x02D3FEBE,
+0x02AFFF12, 0x0271FF5C, 0x021AFF9E, 0x01AAFFDA, 0x01210013, 0x00840047, 0xFFD90073, 0xFF260093,
+0xFE7300A2, 0xFDCB0096, 0xFD34006A, 0xFCB80017, 0xFC5DFF99, 0xFC29FEF0, 0xFC1FFE1E, 0xFC42FD2C,
+0xFC91FC26, 0xFD0DFB1B, 0xFDB3FA1D, 0xFE7EF93F, 0xFF6CF892, 0x0076F826, 0x0195F807, 0x02C1F83B,
+0x03F0F8C3, 0x0515F999, 0x0625FAB1, 0x0712FBFC, 0x07CFFD67, 0x084FFEDC, 0x08880046, 0x08710192,
+0x080802AE, 0x074D038E, 0x06460429, 0x04FF047C, 0xFE1DFC68, 0xFE51FBC1, 0xFE9CFB53, 0xFEF6FB26,
+0xFF5BFB38, 0xFFC3FB87, 0x0028FC0C, 0x0086FCBF, 0x00D8FD94, 0x011CFE7E, 0x0151FF70, 0x0175005C,
+0x018A0137, 0x019001F4, 0x0188028D, 0x017102FB, 0x014B033B, 0x0116034D, 0x00CE0334, 0x007402F5,
+0x00040299, 0xFF7F0226, 0xFEE501A6, 0xFE390121, 0xFD81009D, 0xFCC30020, 0xFC07FFAD, 0xFB58FF41,
+0xFAC0FEDB, 0xFA4AFE77, 0xFA00FE0E, 0xF9E8FD9B, 0xFA08FD18, 0xFA62FC83, 0xFAF3FBDA, 0xFBB6FB21,
+0xFCA3FA5D, 0xFDB0F998, 0xFED1F8DF, 0xFFF7F83F, 0x0118F7C7, 0x0226F783, 0x0318F780, 0x03E4F7C4,
+0x0487F851, 0x04FAF924, 0x053EFA37, 0x0553FB7A, 0x053BFCDD, 0x04FAFE4C, 0x0496FFB1, 0x041400F7,
+0x0379020A, 0x02CD02DB, 0x0217035F, 0x015D0391, 0x00A80370, 0xFFFD0302, 0xFF630252, 0xFEE1016E,
+0x07A9FC16, 0x084FFD8A, 0x08CBFED9, 0x0918FFF6, 0x093100DD, 0x0914018F, 0x08C10210, 0x083A026C,
+0x078702AF, 0x06AF02E3, 0x05BD0312, 0x04BC0342, 0x03B90376, 0x02BC03AC, 0x01CE03DD, 0x00F50401,
+0x00320410, 0xFF8603FE, 0xFEF203C7, 0xFE710365, 0xFE0402DB, 0xFDA9022C, 0xFD620161, 0xFD310088,
+0xFD1BFFAD, 0xFD24FEE0, 0xFD51FE2F, 0xFDA5FDA5, 0xFE20FD4B, 0xFEBFFD26, 0xFF79FD37, 0x0044FD7C,
+0x010FFDEF, 0x01C9FE8A, 0x025FFF43, 0x02BE0010, 0x02D900E7, 0x02A701BF, 0x0223028D, 0x01510348,
+0x003D03E4, 0xFEF70459, 0xFD94049D, 0xFC2D04A6, 0xFADB046D, 0xF9B403EC, 0xF8CC0321, 0xF832020C,
+0xF7EE00B5, 0xF800FF27, 0xF865FD72, 0xF913FBAB, 0xF9FEF9EB, 0xFB18F84B, 0xFC51F6E4, 0xFD9CF5CD,
+0xFEEEF516, 0x003EF4CB, 0x0184F4EE, 0x02BDF57B, 0x01B603F0, 0x010E0487, 0x00150506, 0xFED20535,
+0xFD7304E6, 0xFC3E040A, 0xFB7F02BE, 0xFB680148, 0xFC010004, 0xFD1CFF4A, 0xFE61FF50, 0xFF640011,
+0xFFC90152, 0xFF6402AD, 0xFE4203B5, 0xFCAA0413, 0xFB0303A5, 0xF9B50282, 0xF90A00F4, 0xF917FF5E,
+0xF9BCFE18, 0xFAB0FD57, 0xFBA1FD21, 0xFC4BFD4D, 0xFC92FD9A, 0xFC83FDC5, 0xFC4EFDA2, 0xFC31FD2C,
+0xFC61FC83, 0xFCF9FBE0, 0xFDEBFB82, 0xFF0CFB98, 0x001AFC35, 0x00D2FD46, 0x0101FE9C, 0x0090FFF2,
+0xFF8A00FF, 0xFE1B0187, 0xFC810167, 0xFB08009A, 0xF9F2FF3C, 0xF973FD81, 0xF9A0FBAD, 0xFA71FA06,
+0xFBC2F8C3, 0xFD5BF807, 0xFF02F7D7, 0x0084F81E, 0x01C2F8B7, 0x02B5F979, 0x0368FA45, 0x03F2FB0A,
+0x0466FBCB, 0x04CEFC94, 0x0524FD75, 0x0556FE6F, 0x0552FF79, 0x0510007A, 0x04960158, 0x03FC0201,
+0x0498FFB4, 0x046A0205, 0x03730430, 0x01D305E9, 0xFFC606FA, 0xFD980751, 0xFB8E06FB, 0xF9DD061D,
+0xF8A204E8, 0xF7E40391, 0xF798023F, 0xF7A90113, 0xF7FD001F, 0xF87AFF6C, 0xF907FEFB, 0xF98DFEC8,
+0xF9F8FEC3, 0xFA3CFED9, 0xFA58FEF2, 0xFA57FEFA, 0xFA4DFEE7, 0xFA4FFEBA, 0xFA6FFE84, 0xFAB0FE5D,
+0xFB05FE5C, 0xFB54FE8D, 0xFB80FEE9, 0xFB70FF5A, 0xFB1DFFBB, 0xFA94FFEC, 0xF9F5FFD5, 0xF965FF73,
+0xF907FED7, 0xF8ECFE1F, 0xF916FD6F, 0xF975FCDF, 0xF9F0FC7D, 0xFA71FC47, 0xFAEBFC31, 0xFB5AFC30,
+0xFBC3FC3D, 0xFC28FC5B, 0xFC89FC90, 0xFCDBFCE1, 0xFD0EFD4B, 0xFD15FDC0, 0xFCEBFE29, 0xFC97FE71,
+0xFC30FE87, 0xFBCDFE67, 0xFB86FE1E, 0xFB65FDBF, 0xFB67FD5E, 0xFB81FD03, 0xFBA7FCAD, 0xFBD5FC50,
+0xFC18FBDE, 0xFC87FB57, 0xFD3FFACC, 0xFE51FA64, 0xFC4F0162, 0xFBD10151, 0xFB2D0135, 0xFA6400F2,
+0xF985006F, 0xF8AAFF9C, 0xF7F6FE78, 0xF785FD0F, 0xF76FFB7B, 0xF7BBF9D7, 0xF86BF840, 0xF976F6CD,
+0xFAD0F590, 0xFC6BF497, 0xFE3AF3EA, 0x0031F396, 0x023EF3A3, 0x0450F418, 0x064EF4F9, 0x0820F643,
+0x09ACF7EC, 0x0ADCF9E0, 0x0BA2FC09, 0x0BF5FE4A, 0x0BD60089, 0x0B4D02AD, 0x0A6604A5, 0x09320661,
+0x07BE07DA, 0x0619090B, 0x044E09EF, 0x02670A85, 0x006F0AC8, 0xFE710AB3, 0xFC7C0A42, 0xFAA20972,
+0xF8FA0846, 0xF79C06C8, 0xF69D050B, 0xF60F032C, 0xF5F6014B, 0xF649FF8A, 0xF6F6FE04, 0xF7E1FCCB,
+0xF8EDFBE3, 0xFA01FB44, 0xFB10FAE0, 0xFC13FAA8, 0xFD0EFA93, 0xFE09FAA0, 0xFF04FAD9, 0xFFFAFB49,
+0x00D6FBF7, 0x0181FCE3, 0x01E2FDFD, 0x01E7FF27, 0x018E003F, 0x00E70122, 0x001001BB, 0xFF2A0203,
+0x00E2FEE4, 0x00F1FE76, 0x00DDFE3C, 0x00ABFE38, 0x0064FE67, 0x0013FEC0, 0xFFC3FF38, 0xFF7EFFC0,
+0xFF4C0048, 0xFF3100C2, 0xFF2D0121, 0xFF3B015E, 0xFF540175, 0xFF710167, 0xFF88013C, 0xFF9200FD,
+0xFF8700B6, 0xFF670071, 0xFF30003A, 0xFEE70014, 0xFE910005, 0xFE350008, 0xFDDC0018, 0xFD8C002B,
+0xFD4C0034, 0xFD220029, 0xFD0EFFFF, 0xFD14FFB1, 0xFD32FF3C, 0xFD69FEA3, 0xFDB8FDEE, 0xFE1EFD2A,
+0xFE9CFC65, 0xFF33FBB0, 0xFFE4FB1B, 0x00AEFAB2, 0x0192FA81, 0x028AFA8B, 0x0391FAD2, 0x049DFB51,
+0x05A1FC00, 0x068FFCD5, 0x0757FDC3, 0x07E9FEBE, 0x0839FFBB, 0x083D00B0, 0x07F30196, 0x075B0268,
+0x06800322, 0x056F03C1, 0x043D0445, 0x02FE04AB, 0x01CB04F1, 0x00B70514, 0xFFD60512, 0xFF3304E7,
+0xFED40494, 0xFEB60418, 0xFED30378, 0xFF1C02BA, 0xFD45FFD2, 0xFD5B008D, 0xFD680152, 0xFD680210,
+0xFD5A02B5, 0xFD3B0334, 0xFD0C0382, 0xFCCE039A, 0xFC84037D, 0xFC340332, 0xFBE202C0, 0xFB980234,
+0xFB5D019C, 0xFB380105, 0xFB300079, 0xFB470001, 0xFB7DFFA3, 0xFBCFFF5E, 0xFC36FF32, 0xFCAAFF1A,
+0xFD1FFF10, 0xFD8BFF0F, 0xFDE1FF0F, 0xFE1BFF0C, 0xFE35FF01, 0xFE2DFEEE, 0xFE08FED2, 0xFDCEFEAD,
+0xFD8CFE83, 0xFD4FFE55, 0xFD25FE26, 0xFD1AFDFA, 0xFD39FDD3, 0xFD87FDB2, 0xFE05FD9B, 0xFEACFD90,
+0xFF72FD93, 0x004BFDA7, 0x0125FDCF, 0x01EFFE0E, 0x0299FE66, 0x0315FED6, 0x035AFF5F, 0x0362FFFC,
+0x032F00A7, 0x02C50157, 0x022F0202, 0x0178029C, 0x00AE0318, 0xFFDF036D, 0xFF190390, 0xFE64037E,
+0xFDCA0335, 0xFD4E02BC, 0xFCF2021B, 0xFCB40160, 0xFC92009C, 0xFC87FFE1, 0xFC8EFF41, 0xFCA2FECC,
+0xFEB4FF4A, 0xFF00FF36, 0xFF88FF41, 0x0047FF69, 0x0131FFAA, 0x02330004, 0x03380073, 0x042600F9,
+0x04E40195, 0x055C0247, 0x057F030C, 0x054203E2, 0x04A404BF, 0x03AC059A, 0x02670661, 0x00E80704,
+0xFF47076E, 0xFD9B078D, 0xFBFD0751, 0xFA8306AD, 0xF93E059E, 0xF83E0427, 0xF78B0254, 0xF72C003C,
+0xF723FDFA, 0xF76DFBB0, 0xF809F981, 0xF8F0F790, 0xFA1CF5FC, 0xFB85F4DA, 0xFD20F43A, 0xFEE2F420,
+0x00BAF486, 0x0299F55D, 0x046BF690, 0x061DF804, 0x079AF99B, 0x08CFFB3D, 0x09AEFCD1, 0x0A2CFE45,
+0x0A44FF8D, 0x09F900A5, 0x0955018C, 0x08670247, 0x074402DF, 0x0604035A, 0x04BF03C1, 0x038D0419,
+0x02800463, 0x01A4049E, 0x010104C8, 0x009504DC, 0x005804D4, 0x003F04AB, 0x00390461, 0x003703F6,
+0x002D036E, 0x001002D1, 0xFFDD0228, 0xFF97017D, 0xFE3C0116, 0xFE260096, 0xFE2A0022, 0xFE39FFC9,
+0xFE3DFF8D, 0xFE1CFF5D, 0xFDC7FF18, 0xFD49FE92, 0xFCC9FDA5, 0xFC87FC44, 0xFCC8FA8C, 0xFDC0F8BF,
+0xFF7AF73A, 0x01CBF659, 0x045CF65B, 0x06BEF745, 0x088DF8E4, 0x0991FAD7, 0x09CDFCB2, 0x097FFE1D,
+0x090AFEF8, 0x08CBFF60, 0x08F9FFA4, 0x09900026, 0x0A4E012F, 0x0ACF02D6, 0x0AB004EE, 0x09B60717,
+0x07E608DD, 0x058409DD, 0x02FD09EA, 0x00C80917, 0xFF3807AE, 0xFE6C0618, 0xFE4804B3, 0xFE8403BB,
+0xFECE0338, 0xFEE60301, 0xFEB202D7, 0xFE47027C, 0xFDD501D0, 0xFD9800D5, 0xFDBEFFB1, 0xFE56FE9C,
+0xFF4FFDCC, 0x0080FD65, 0x01B7FD72, 0x02C6FDE4, 0x0391FE9D, 0x040BFF7B, 0x04380061, 0x04220139,
+0x03D801F5, 0x0366028F, 0x02D70302, 0x0238034A, 0x01950369, 0x00F70363, 0x0066033F, 0xFFE60306,
+0x0105FD0C, 0x01CBFE73, 0x020D0001, 0x01CE017C, 0x012E02B3, 0x005E0393, 0xFF890422, 0xFEC9047B,
+0xFE2304BC, 0xFD8A04F7, 0xFCEA052E, 0xFC3A0553, 0xFB800553, 0xFAD10525, 0xFA4804D0, 0xF9F60471,
+0xF9D90429, 0xF9D80418, 0xF9CA044A, 0xF98204AD, 0xF8E3051B, 0xF7E9055F, 0xF6AD0549, 0xF55F04BC,
+0xF43703B6, 0xF3640250, 0xF30600B6, 0xF320FF16, 0xF3A8FD9A, 0xF482FC5E, 0xF594FB6F, 0xF6C3FAD1,
+0xF7FBFA83, 0xF928FA7F, 0xFA3AFAC0, 0xFB1EFB39, 0xFBC7FBD7, 0xFC31FC82, 0xFC60FD21, 0xFC68FDA1,
+0xFC60FDFE, 0xFC5EFE41, 0xFC6CFE7D, 0xFC83FEC8, 0xFC8FFF2E, 0xFC78FFA9, 0xFC2A0021, 0xFBA70079,
+0xFB000090, 0xFA5B005A, 0xF9DDFFDF, 0xF9A2FF3D, 0xF9B1FE9A, 0xF9F6FE19, 0xFA52FDC8, 0xFAA3FD9E,
+0xFAD8FD7F, 0xFAF9FD4B, 0xFB23FCEC, 0xFB7EFC68, 0xFD2B023A, 0xFDE401D0, 0xFE8001DF, 0xFECD0242,
+0xFEAD02C4, 0xFE220327, 0xFD4C0339, 0xFC5E02DF, 0xFB8E0219, 0xFB0E0102, 0xFAF6FFC7, 0xFB49FE9A,
+0xFBF0FDA3, 0xFCCBFCFA, 0xFDB3FCA4, 0xFE88FC93, 0xFF39FCB4, 0xFFC0FCED, 0x0021FD2C, 0x0067FD66,
+0x009DFD96, 0x00CBFDBE, 0x00F5FDDF, 0x0120FDFE, 0x014CFE1E, 0x017BFE40, 0x01ABFE6A, 0x01DCFEA0,
+0x0209FEE6, 0x0228FF40, 0x0230FFAC, 0x02150023, 0x01CF0097, 0x015D00F9, 0x00C10135, 0x0008013D,
+0xFF440103, 0xFE8A0081, 0xFDF2FFB9, 0xFD94FEB3, 0xFD86FD81, 0xFDD8FC3A, 0xFE95FAFD, 0xFFBAF9EC,
+0x013AF92B, 0x02FEF8D5, 0x04E1F901, 0x06BCF9B6, 0x0865FAED, 0x09B7FC94, 0x0A95FE8E, 0x0AEC00B7,
+0x0AB602E9, 0x09F404FD, 0x08B306D1, 0x07080843, 0x050F0937, 0x02F1099A, 0x00DC0964, 0xFF03089E,
+0x0378005E, 0x025F00EB, 0x015A0198, 0x006C0251, 0xFF9502FE, 0xFED20387, 0xFE1D03D8, 0xFD7003E1,
+0xFCC9039A, 0xFC240303, 0xFB850224, 0xFAF1010A, 0xFA73FFC8, 0xFA15FE74, 0xF9E6FD24, 0xF9F0FBED,
+0xFA3CFAE1, 0xFACEFA0E, 0xFBA0F97B, 0xFCAAF92C, 0xFDD9F922, 0xFF18F958, 0x004DF9C7, 0x015EFA68,
+0x0234FB30, 0x02BCFC15, 0x02EBFD0D, 0x02BDFE0D, 0x0239FF07, 0x016EFFEE, 0x007100B6, 0xFF5C0150,
+0xFE4901AF, 0xFD5301C9, 0xFC910196, 0xFC130113, 0xFBE20045, 0xFC01FF34, 0xFC6BFDF1, 0xFD15FC92,
+0xFDF2FB32, 0xFEF2F9EB, 0x0005F8D9, 0x011FF814, 0x0236F7AF, 0x0343F7B2, 0x0442F81D, 0x0532F8E8,
+0x0615F9FF, 0x06EAFB4A, 0x07B1FCAB, 0x0867FE04, 0x0907FF39, 0x098B0033, 0x09EA00E4, 0x0A1C0146,
+0x0A19015D, 0x09DE0137, 0x096900E7, 0x08BD0086, 0xFE1BFD26, 0xFEB9FD53, 0xFF6CFD9E, 0x002CFDFD,
+0x00EDFE68, 0x01A4FED6, 0x0247FF45, 0x02CCFFAF, 0x032C0017, 0x0362007B, 0x036F00DF, 0x03530144,
+0x031401AB, 0x02B80213, 0x02480279, 0x01CA02D8, 0x0147032A, 0x00C30369, 0x0041038C, 0xFFC4038E,
+0xFF4D036B, 0xFEDA0322, 0xFE6D02B3, 0xFE060224, 0xFDA7017A, 0xFD5400BE, 0xFD12FFFB, 0xFCE7FF39,
+0xFCDAFE82, 0xFCF2FDDD, 0xFD34FD50, 0xFDA1FCDE, 0xFE39FC88, 0xFEF6FC50, 0xFFD1FC34, 0x00BEFC34,
+0x01AEFC4F, 0x0293FC84, 0x035EFCD5, 0x0403FD41, 0x0477FDC8, 0x04B4FE6A, 0x04B8FF25, 0x0485FFF4,
+0x042300D0, 0x039901B0, 0x02F30289, 0x023C034D, 0x017E03F1, 0x00C30467, 0x001204A7, 0xFF6F04AA,
+0xFEDE046F, 0xFE5D03F8, 0xFDEF034D, 0xFD91027A, 0xFD43018D, 0xFD060098, 0xFCDDFFAA, 0xFCCAFED3,
+0x062F01CE, 0x053F0146, 0x04380089, 0x032AFFAE, 0x022AFED0, 0x014BFE09, 0x00A1FD6E, 0x003BFD0D,
+0x0024FCF0, 0x005DFD17, 0x00DFFD79, 0x019CFE0C, 0x027EFEBF, 0x0369FF82, 0x04410046, 0x04E800FE,
+0x054701A3, 0x054E022F, 0x04F502A4, 0x043D0304, 0x03350354, 0x01F2039A, 0x008F03D9, 0xFF2A0410,
+0xFDE10440, 0xFCCD0463, 0xFBFF0473, 0xFB81046A, 0xFB530442, 0xFB6903F7, 0xFBB3038A, 0xFC1A02FE,
+0xFC85025A, 0xFCDF01AA, 0xFD1400F7, 0xFD190050, 0xFCEBFFBB, 0xFC8EFF41, 0xFC0FFEE3, 0xFB80FE9D,
+0xFAF5FE69, 0xFA85FE3B, 0xFA43FE07, 0xFA3EFDC2, 0xFA7FFD63, 0xFB07FCE5, 0xFBD3FC4B, 0xFCD9FB9D,
+0xFE0BFAE9, 0xFF59FA41, 0x00B2F9B9, 0x0207F965, 0x034CF954, 0x0477F992, 0x0580FA20, 0x0662FAF9,
+0x071CFC0C, 0x07AAFD45, 0x080AFE89, 0x083AFFBC, 0xFEEB01D4, 0xFECA0170, 0xFEDE010F, 0xFF1E00C9,
+0xFF7800AF, 0xFFD700C4, 0x002B0107, 0x00660170, 0x007D01F8, 0x00670293, 0x001E0338, 0xFF9903D2,
+0xFEDD044E, 0xFDF20496, 0xFCF0049B, 0xFBF10456, 0xFB1203D4, 0xFA640329, 0xF9EB0272, 0xF99A01C8,
+0xF9590135, 0xF90E00B3, 0xF8A8002A, 0xF829FF7E, 0xF7A3FE95, 0xF73AFD60, 0xF712FBE8, 0xF74AFA46,
+0xF7F3F8A0, 0xF909F71D, 0xFA7BF5DE, 0xFC2FF4F9, 0xFE08F474, 0xFFEFF452, 0x01D2F48F, 0x039EF528,
+0x0542F619, 0x06A9F75A, 0x07BFF8DB, 0x0873FA82, 0x08BFFC31, 0x08ADFDC8, 0x0850FF2D, 0x07C60056,
+0x07280148, 0x06870212, 0x05E402C6, 0x0534036F, 0x04680408, 0x03750480, 0x026104BE, 0x014404AD,
+0x00410446, 0xFF7F0399, 0xFF1702C7, 0xFF100200, 0xFF55016D, 0xFFC10128, 0x00260133, 0x005E0179
+
+
+in_sequence_size =
+60
+
+in_leading_padding =
+4
+
+out_sequence_size =
+60
+
+out_leading_depadding =
+0
+
+window_index =
+2, 5, 8, 11, 14, 2, 5, 8, 11, 14, 2, 5
+
+cs_bitmap =
+63
+
+num_antennas_log2 =
+3
+
+ifft_log2 =
+6
+
+fft_log2 =
+6
+
+cs_time_adjustment =
+0
+
+ifft_shift =
+3
+
+fft_shift =
+3
+
+ncs_reciprocal =
+5461
+
+op_flags =
+RTE_BBDEV_FFT_CS_ADJUSTMENT, RTE_BBDEV_FFT_WINDOWING
+
+expected_status =
+OK
+
diff --git a/app/test-bbdev/test_vectors/fft_byp_28.data b/app/test-bbdev/test_vectors/fft_byp_28.data
new file mode 100644
index 0000000000..41d8607a60
--- /dev/null
+++ b/app/test-bbdev/test_vectors/fft_byp_28.data
@@ -0,0 +1,103 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2021 Intel Corporation
+op_type =
+RTE_BBDEV_OP_FFT
+
+input0 =
+0x07F7F9F1, 0xF788FA5C, 0xEFD00A45, 0xF01E0175, 0xFDEC06E6, 0x0270FBED, 0x0F91EEF8, 0xFBDDFA1C,
+0x0465EFCF, 0xF597FB63, 0xE9C7029A, 0xF7B4FBB6, 0xFCE808C3, 0xFB3EF579, 0x1255F4C8, 0xF6FDFC84,
+0x0EE3F2D7, 0xF5C0F227, 0xECF20039, 0xF2AB0099, 0xF4C0064D, 0x070CF1A3, 0x0F92FC3E, 0xF874F8FD,
+0xE6421887, 0xF32001CB, 0x04F8ECEE, 0xF9A5F737, 0x07DC07BC, 0xFC2AFCFC, 0x0AC01797, 0xFD750933,
+0xE27B1122, 0xF33C0479, 0x00BAEA5C, 0xFE51FD33, 0x04EA01FD, 0xFD95FB94, 0x0B3E16F7, 0xFD690791,
+0xDF4B09A5, 0xF64FF865, 0x0C4AEF1A, 0xFB97F847, 0x0081034D, 0xFE34FE2F, 0x05A51C39, 0xFCFF073F,
+0x0ED50134, 0xFBE30144, 0x0ACF02B9, 0xFA9109FD, 0xEEE00B94, 0x040618CC, 0xEC31F6E7, 0xFEB3F427,
+0x0CEE09A6, 0xF2190263, 0x0EC60A12, 0xF72B0937, 0xF2FFFE41, 0xFEE31A1C, 0xF04DF3F8, 0x021DFBDD,
+0xFED10D65, 0xEEF0FBB8, 0x0668071F, 0xF2F40629, 0xFA3BFEBE, 0xFD3610B2, 0xF38BEE76, 0xFE6CF72A,
+0x073110AB, 0x12DC0736, 0x0130FA1B, 0xF79B0D4D, 0x06771042, 0xFADF0173, 0x08091C2C, 0x09B2F7EA,
+0x049A0CE4, 0x1027104B, 0xFF38FCA9, 0xF3090A8D, 0xF7261A8C, 0xFF37FE66, 0x028E244D, 0x0AE9F82A,
+0x041B0D97, 0x08A91347, 0x026BF9F1, 0xF1730B62, 0xF43A0B10, 0x013400EE, 0xFA5A1D0B, 0x084BFA86,
+0x0275017E, 0x07A1EA5C, 0x00AE0651, 0xFD46EF1E, 0xFBC90402, 0x0965FB03, 0x09BE00A9, 0xFCF60E6E,
+0xFE94F9F2, 0x09B2F14B, 0x00EC0AF5, 0x0085ED34, 0x015BFCCD, 0x0BF90476, 0x0A3F007F, 0xF82C1166,
+0x030DF562, 0x0B01F284, 0xF6AE0526, 0x0990EA6E, 0x03D0FEDC, 0x02E2066A, 0x09240362, 0xF3D90FA7,
+0x0ACDF551, 0x0133FE9E, 0x0FF01027, 0xFA56FE3B, 0xF4E408A0, 0xFDAAF68F, 0xFFBB06F4, 0xE7B303DA,
+0x0584FB91, 0xFFD9F899, 0x0C4110D5, 0xFAC6FB3F, 0xFAB809AE, 0xFD6F0630, 0x03190631, 0xE366FE26,
+0x056AF5BA, 0x0119F986, 0x074116E7, 0xFC09F525, 0xF6F60856, 0xF88E0574, 0x002F0ABE, 0xE30CF4FE,
+0x22E70169, 0xF66AFF56, 0xF23B09F8, 0x03DBF777, 0xFE43F915, 0x035AF8D4, 0xF9DF0DC7, 0x05190B31,
+0x23361014, 0xF5C5F8B1, 0xF4F90174, 0xFF82EFEE, 0xFAB7F917, 0x06F5FA3B, 0x03BC0D3B, 0xF9A80A56,
+0x1CA4110D, 0x01FCFA9B, 0xF3000243, 0x0807FC82, 0xFCF7F668, 0x080CFC0B, 0xF84D13A6, 0xFC2004A5,
+0xFED30132, 0xFD80EF38, 0x0A661297, 0x0CAB0996, 0x051303FD, 0xFDE3F4B1, 0xF68E0003, 0xFA840095,
+0xFF840586, 0x0260ECB6, 0x06AB166E, 0x08910C99, 0x03B40831, 0xFEAEFB0C, 0xFA5AF5E0, 0x038403C4,
+0xF7B50127, 0x0C83E9D9, 0x046B181F, 0x08B612A4, 0x024E0B91, 0x01000207, 0xFC97F83A, 0xF8B40DD4
+
+output0 =
+0xFFF0FE8A, 0x01B3FE2F, 0x020EFFF3, 0x000C005A, 0x0040012B, 0xFF70015F, 0xFF40FD66, 0x0120FCAD,
+0x01DAFE8E, 0xFF05FFC8, 0x00EE0080, 0x00350269, 0x0094FCA0, 0x0398FD13, 0x03240016, 0xFF7AFEFE,
+0x006401AB, 0xFDB70295, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0xFB2C034A, 0xFC8F0175, 0xFE6402D8, 0x00810097, 0x015C007D, 0x01760158, 0xFAB702B3, 0xFBC0008C,
+0xFDE80195, 0x0050FFB2, 0x012BFFF2, 0x00EB00CD, 0xFAB30041, 0xFCDDFFFF, 0xFD200228, 0xFFD70030,
+0x004A0030, 0x004A00A4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x0157004F, 0x01B2FFA3, 0x025EFFFE, 0xFE5D048C, 0xFAC301F3, 0xFD5BFE59, 0xFFE10181, 0x0151FF78,
+0x035B00E8, 0xFE3C030C, 0xFB1CFFA5, 0xFE84FC85, 0xFDB80124, 0x0063FF8B, 0x01FC0236, 0xFEEE01EE,
+0xFD31FF7F, 0xFFA1FDC2, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x034202FC, 0xFFFF0471, 0xFE8B012F, 0x002B0237, 0x00A10164, 0x017301DA, 0x029803A6, 0xFE8A03A1,
+0xFE8EFF93, 0xFECC031E, 0xFF180338, 0xFEFE0385, 0x0199041C, 0xFE1B02C8, 0xFF6EFF4A, 0xFEAE0180,
+0xFE6A0189, 0xFE610144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x0143FD7B, 0x03030124, 0xFF5B02E4, 0x00A6FFE1, 0x001901AD, 0xFE4D0120, 0x0109FD68, 0x01A90075,
+0xFE9C0115, 0x01AB0028, 0xFF9D0119, 0xFEACFF0B, 0x01C2FCFD, 0x0211000C, 0xFF02005C, 0x00D600A9,
+0xFFAD0038, 0x001EFF0E, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x0180FE7E, 0x0186FED1, 0x0133FED6, 0xFE52FFE6, 0xFFCB00C9, 0xFEE70242, 0x00ACFE85, 0x019DFF6D,
+0x00B5005F, 0xFF0501FC, 0xFE9100E4, 0xFFA90070, 0x00D0FDE8, 0x017DFEDA, 0x008AFF87, 0xFDF101B9,
+0xFE30001D, 0xFFCD005C, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x032A0018, 0x0472FEFA, 0x05900042, 0x0034FE3D, 0x00AEFF8E, 0xFF5D0008, 0x031F0119, 0x055100BB,
+0x05AE02EC, 0x0036FE6A, 0x00100002, 0xFE78FFDC, 0x03D40175, 0x04410261, 0x035502CE, 0x00A0FE4E,
+0x001EFFCF, 0xFE9DFF4C, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0xFF8AFE0D, 0x01F3FFD6, 0x002A023F, 0x005FFF16, 0x020C003C, 0x00E601EA, 0x003DFE48, 0x025A00FD,
+0xFFA5031A, 0x004C0068, 0x011500DC, 0x00A101A5, 0x0087FD60, 0x01BC01B5, 0xFD6602EA, 0x006A01B3,
+0x00090192, 0x002A0131, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
+
+
+in_sequence_size =
+24
+
+in_leading_padding =
+0
+
+out_sequence_size =
+3
+
+out_leading_depadding =
+0
+
+window_index =
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+
+cs_bitmap =
+255
+
+num_antennas_log2 =
+3
+
+ifft_log2 =
+5
+
+fft_log2 =
+2
+
+cs_time_adjustment =
+0
+
+ifft_shift =
+2
+
+fft_shift =
+3
+
+ncs_reciprocal =
+4096
+
+op_flags =
+RTE_BBDEV_FFT_CS_ADJUSTMENT, RTE_BBDEV_FFT_WINDOWING, RTE_BBDEV_FFT_IDFT_BYPASS
+
+expected_status =
+OK
+
-- 
2.37.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-10-11 21:17 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11 21:15 [PATCH v10 00/16] bbdev ACC200 PMD Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 01/16] baseband/acc100: remove unused registers Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 02/16] baseband/acc100: refactor to segregate common code Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 03/16] baseband/acc: rename directory from acc100 to acc Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 04/16] baseband/acc: introduce PMD for ACC200 Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 05/16] baseband/acc: add HW register definitions " Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 06/16] baseband/acc: add info get function " Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 07/16] baseband/acc: add queue configuration " Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 08/16] baseband/acc: add LDPC processing functions Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 09/16] baseband/acc: add LTE " Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 10/16] baseband/acc: add support for FFT operations Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 11/16] baseband/acc: support interrupt Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 12/16] baseband/acc: add device status and vf2pf comms Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 13/16] baseband/acc: add PF configure companion function Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 14/16] baseband/acc: simplify meson dependency Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 15/16] baseband/acc: add helper function for descriptor index Nicolas Chautru
2022-10-11 21:15 ` [PATCH v10 16/16] test-bbdev: unit test capability extension Nicolas Chautru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).