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 59f1ce1..9378853 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 4e2feef..05fe6f8 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 6485cc8..ee457f3 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 350c424..703bb61 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 53c538b..753d920 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 e1db2bf..b234bb7 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 3ebf62e..e863bd9 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 */