X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Frawdevs%2Fcnxk_bphy.rst;h=bf7c00e6bcf6972702b0d435ff832cea4209de71;hb=f16662885472d33570b564e62427199d733be363;hp=120f953fb5f0a3fc953c9494eadc1a33a56dbd56;hpb=4d2b226726f4af475fb240e31dcbd453ab3d3dcc;p=dpdk.git diff --git a/doc/guides/rawdevs/cnxk_bphy.rst b/doc/guides/rawdevs/cnxk_bphy.rst index 120f953fb5..bf7c00e6bc 100644 --- a/doc/guides/rawdevs/cnxk_bphy.rst +++ b/doc/guides/rawdevs/cnxk_bphy.rst @@ -17,6 +17,8 @@ Features The BPHY CGX/RPM implements following features in the rawdev API: - Access to BPHY CGX/RPM via a set of predefined messages +- Access to BPHY memory +- Custom interrupt handlers Device Setup ------------ @@ -37,6 +39,9 @@ To perform data transfer use standard ``rte_rawdev_enqueue_buffers()`` and ``rte_rawdev_dequeue_buffers()`` APIs. Not all messages produce sensible responses hence dequeueing is not always necessary. +BPHY CGX/RPM PMD +---------------- + BPHY CGX/RPM PMD accepts ``struct cnxk_bphy_cgx_msg`` messages which differ by type and payload. Message types along with description are listed below. As for the usage examples please refer to ``cnxk_bphy_cgx_dev_selftest()``. @@ -95,18 +100,55 @@ Message must have type set to ``CNXK_BPHY_CGX_MSG_TYPE_START_RXTX`` or ``CNXK_BPHY_CGX_MSG_TYPE_STOP_RXTX``. Former will enable traffic while the latter will do the opposite. +BPHY PMD +-------- + +BPHY PMD accepts ``struct cnxk_bphy_irq_msg`` messages which differ by type and payload. +Message types along with description are listed below. For some usage examples please refer to +``bphy_rawdev_selftest()``. + +Initialize or finalize interrupt handling +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Message is used to setup low level interrupt handling. + +Message must have type set to ``CNXK_BPHY_IRQ_MSG_TYPE_INIT`` or ``CNXK_BPHY_IRQ_MSG_TYPE_FINI``. +The former will setup low level interrupt handling while the latter will tear everything down. There +are also two convenience functions namely ``rte_pmd_bphy_intr_init()`` and +``rte_pmd_bphy_intr_fini()`` that take care of all details. + + +Register or remove interrupt handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Message is used setup custom interrupt handler. + +Message must have type set to ``CNXK_BPHY_IRQ_MSG_TYPE_REGISTER`` or +``CNXK_BPHY_IRQ_MSG_TYPE_UNREGISTER``. The former will register an interrupt handler while the +latter will remove it. Prior sending actual message payload i.e ``struct cnxk_bphy_irq_info`` needs +to be filled with relevant information. There are also two convenience functions namely +``rte_pmd_bphy_intr_register()`` and ``rte_pmd_bphy_intr_unregister()`` that take care of all +details. + +Get device memory +~~~~~~~~~~~~~~~~~ + +Message is used to read device MMIO address. + +Message must have type set to ``CNXK_BPHY_IRQ_MSG_TYPE_MEM_GET``. There's a convenience function +``rte_pmd_bphy_intr_mem_get()`` available that takes care of retrieving that address. + Self test --------- -On EAL initialization, BPHY CGX/RPM devices will be probed and populated into +On EAL initialization BPHY and BPHY CGX/RPM devices will be probed and populated into the raw devices. The rawdev ID of the device can be obtained using invocation of ``rte_rawdev_get_dev_id("NAME:x")`` from the test application, where: -- NAME is the desired subsystem: use "BPHY_CGX" for +- NAME is the desired subsystem: use "BPHY" for regular, and "BPHY_CGX" for RFOE module, - x is the device's bus id specified in "bus:device.func" (BDF) format. Use this identifier for further rawdev function calls. -The driver's selftest rawdev API can be used to verify the BPHY CGX/RPM -functionality. +Selftest rawdev API can be used to verify the BPHY and BPHY CGX/RPM functionality.