]> git.droids-corp.org - dpdk.git/commitdiff
bbdev: add device info for data endianness
authorNicolas Chautru <nicolas.chautru@intel.com>
Sun, 17 Oct 2021 06:53:24 +0000 (12:23 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Mon, 18 Oct 2021 18:11:16 +0000 (20:11 +0200)
Added device information to capture explicitly the assumption
of the input/output data byte endianness being processed.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
doc/guides/rel_notes/release_21_11.rst
drivers/baseband/acc100/rte_acc100_pmd.c
drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
drivers/baseband/null/bbdev_null.c
drivers/baseband/turbo_sw/bbdev_turbo_software.c
lib/bbdev/rte_bbdev.h

index 59f1ce177dcd90e66b87f61c06af1f982eb2ec7d..93788530e47a42f872d5dc87b0d7a8f6904b877a 100644 (file)
@@ -277,6 +277,8 @@ API Changes
 * cryptodev: The structure ``rte_crypto_sym_vec`` was updated to add
   ``dest_sgl`` to support out of place processing.
 
+* bbdev: Added device info related to data byte endianness processing.
+
 
 ABI Changes
 -----------
index 4e2feefc3c90b32e4b963ef35485aa6616ce599f..05fe6f8b6f42378911f4f8edc7443ee6eaafc5bd 100644 (file)
@@ -1089,6 +1089,7 @@ acc100_dev_info_get(struct rte_bbdev *dev,
 #else
        dev_info->harq_buffer_size = 0;
 #endif
+       dev_info->data_endianness = RTE_LITTLE_ENDIAN;
        acc100_check_ir(d);
 }
 
index 6485cc824a81dce81e8ee64ce47e85f912392fe4..ee457f3071b8f2e1e915f323c3df5d21510ba4e5 100644 (file)
@@ -372,6 +372,7 @@ fpga_dev_info_get(struct rte_bbdev *dev,
        dev_info->default_queue_conf = default_queue_conf;
        dev_info->capabilities = bbdev_capabilities;
        dev_info->cpu_flag_reqs = NULL;
+       dev_info->data_endianness = RTE_LITTLE_ENDIAN;
 
        /* Calculates number of queues assigned to device */
        dev_info->max_num_queues = 0;
index 350c4248ebc42eb1b7cccd2bf42af7cc98e33c0b..703bb611a079a60d2155b3a878c4eb5b54cbf432 100644 (file)
@@ -644,6 +644,7 @@ fpga_dev_info_get(struct rte_bbdev *dev,
        dev_info->default_queue_conf = default_queue_conf;
        dev_info->capabilities = bbdev_capabilities;
        dev_info->cpu_flag_reqs = NULL;
+       dev_info->data_endianness = RTE_LITTLE_ENDIAN;
 
        /* Calculates number of queues assigned to device */
        dev_info->max_num_queues = 0;
index 53c538ba44d4ec10b5a0edb81f970d66834ca6ad..753d920e185213ecfbc8d8d0a1da831d1f66fed9 100644 (file)
@@ -77,6 +77,12 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
        dev_info->cpu_flag_reqs = NULL;
        dev_info->min_alignment = 0;
 
+       /* BBDEV null device does not process the data, so
+        * endianness setting is not relevant, but setting it
+        * here for code completeness.
+        */
+       dev_info->data_endianness = RTE_LITTLE_ENDIAN;
+
        rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
 }
 
index e1db2bf20525645778998b203634b0229ead6716..b234bb751a31fd6ab6446ebc97eaebc39d5f4321 100644 (file)
@@ -253,6 +253,7 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
        dev_info->capabilities = bbdev_capabilities;
        dev_info->min_alignment = 64;
        dev_info->harq_buffer_size = 0;
+       dev_info->data_endianness = RTE_LITTLE_ENDIAN;
 
        rte_bbdev_log_debug("got device info from %u\n", dev->data->dev_id);
 }
index 3ebf62e697f50687db09e7837e142863a29013c1..e863bd913f3e8798718ca5b4c05e8565d8a38562 100644 (file)
@@ -309,6 +309,10 @@ struct rte_bbdev_driver_info {
        uint16_t min_alignment;
        /** HARQ memory available in kB */
        uint32_t harq_buffer_size;
+       /** Byte endianness (RTE_BIG_ENDIAN/RTE_LITTLE_ENDIAN) supported
+        *  for input/output data
+        */
+       uint8_t data_endianness;
        /** Default queue configuration used if none is supplied  */
        struct rte_bbdev_queue_conf default_queue_conf;
        /** Device operation capabilities */