doc: update bbdev library documentation
PATCH 1/1 doc: update bbdev library documentation
From: "Chalupnik, KamilX" <[email protected]>
Update the documentation describing Wireless Basband Device:
- device capabilities updated
- input/output data buffers description added
- details about implementation of turbo encode/decode operation added
- images presenting CB/TB processing by turbo encoder/decoder added
--- doc/guides/prog_guide/bbdev.rst | 247 +++++++++++++++++++++++--- doc/guides/prog_guide/img/turbo_tb_decode.png | Bin 0 -> 43552 bytes doc/guides/prog_guide/img/turbo_tb_encode.png | Bin 0 -> 46944 bytes 3 files changed, 222 insertions(+), 25 deletions(-) create mode 100644 doc/guides/prog_guide/img/turbo_tb_decode.png create mode 100644 doc/guides/prog_guide/img/turbo_tb_encode.png
doc/guides/prog_guide/bbdev.rst +222 -25
@@ -6,12 +6,12 @@ Wireless Baseband Device Library The Wireless Baseband library provides a common programming framework that abstracts HW accelerators based on FPGA and/or Fixed Function Accelerators that -assist with 3gpp Physical Layer processing. Furthermore, it decouples the +assist with 3GPP Physical Layer processing. Furthermore, it decouples the application from the compute-intensive wireless functions by abstracting their optimized libraries to appear as virtual bbdev devices. The functional scope of the BBDEV library are those functions in relation to -the 3gpp Layer 1 signal processing (channel coding, modulation, ...). +the 3GPP Layer 1 signal processing (channel coding, modulation, ...). The framework currently only supports Turbo Code FEC function.
@@ -167,7 +167,7 @@ Logical Cores, Memory and Queues Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bbdev device Library as the Poll Mode Driver library support NUMA for when -a processor’s logical cores and interfaces utilize its local memory. Therefore +a processor's logical cores and interfaces utilize its local memory. Therefore baseband operations, the mbuf being operated on should be allocated from memory pools created in the local memory. The buffers should, if possible, remain on the local processor to obtain the best performance results and buffer
@@ -202,7 +202,7 @@ structure in the *DPDK API Reference*. A device reports its capabilities when registering itself in the bbdev framework. With the aid of this capabilities mechanism, an application can query devices to -discover which operations within the 3gpp physical layer they are capable of +discover which operations within the 3GPP physical layer they are capable of performing. Below is an example of the capabilities for a PMD it supports in relation to Turbo Encoding and Decoding operations.
@@ -216,7 +216,10 @@ relation to Turbo Encoding and Decoding operations. RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE | RTE_BBDEV_TURBO_POS_LLR_1_BIT_IN | RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN | - RTE_BBDEV_TURBO_CRC_TYPE_24B, + RTE_BBDEV_TURBO_CRC_TYPE_24B | + RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP | + RTE_BBDEV_TURBO_EARLY_TERMINATION, + .max_llr_modulus = 16, .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS, .num_buffers_hard_out = RTE_BBDEV_MAX_CODE_BLOCKS,
@@ -228,6 +231,7 @@ relation to Turbo Encoding and Decoding operations. .cap.turbo_enc = { .capability_flags = RTE_BBDEV_TURBO_CRC_24B_ATTACH | + RTE_BBDEV_TURBO_CRC_24A_ATTACH | RTE_BBDEV_TURBO_RATE_MATCH | RTE_BBDEV_TURBO_RV_INDEX_BYPASS, .num_buffers_src = RTE_BBDEV_MAX_CODE_BLOCKS,
@@ -391,27 +395,101 @@ operation to its allocating pool. void rte_bbdev_enc_op_free_bulk(struct rte_bbdev_enc_op **ops, unsigned int num_ops) -BBDEV Operations -~~~~~~~~~~~~~~~~ +BBDEV Inbound/Outbound Memory +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bbdev operation structure contains all the mutable data relating to -performing Turbo code processing on a referenced mbuf data buffer. It is used -for either encode or decode operations. +performing Turbo coding on a referenced mbuf data buffer. It is used for either +encode or decode operations. Turbo Encode operation accepts one input and one output. - Turbo Decode operation accepts one input and two outputs, called *hard-decision* and *soft-decision* outputs. *Soft-decision* output is optional. -It is expected that the application provides input and output ``mbuf`` pointers +It is expected that the application provides input and output mbuf pointers allocated and ready to use. The baseband framework supports turbo coding on Code Blocks (CB) and Transport Blocks (TB). -For the output buffer(s), the application needs only to provide an allocated and -free mbuf (containing only one mbuf segment), so that bbdev can write the -operation outcome. +For the output buffer(s), the application is required to provide an allocated +and free mbuf, so that bbdev write back the resulting output. + +The support of split "scattered" buffers is a driver-specific feature, so it is +reported individually by the supporting driver as a capability. + +Input and output data buffers are identified by ``rte_bbdev_op_data`` structure, +as follows: + +.. code-block:: c + + struct rte_bbdev_op_data { + struct rte_mbuf *data; + uint32_t offset; + uint32_t length; + }; + + +This structure has three elements: + +- ``data``: This is the mbuf data structure representing the data for BBDEV + operation. + + This mbuf pointer can point to one Code Block (CB) data buffer or multiple CBs + contiguously located next to each other. A Transport Block (TB) represents a + whole piece of data that is divided into one or more CBs. Maximum number of + CBs can be contained in one TB is defined by ``RTE_BBDEV_MAX_CODE_BLOCKS``. + + An mbuf data structure cannot represent more than one TB. The smallest piece + of data that can be contained in one mbuf is one CB. + An mbuf can include one contiguous CB, subset of contiguous CBs that are + belonging to one TB, or all contiguous CBs that are belonging to one TB. + + If a BBDEV PMD supports the extended capability "Scatter-Gather", then it is + capable of collecting (gathering) non-contiguous (scattered) data from + multiple locations in the memory. + This capability is reported by the capability flags: -**Turbo Encode Op structure** + - ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER``, and + + - ``RTE_BBDEV_TURBO_DEC_SCATTER_GATHER``. + + Only if a BBDEV PMD supports this feature, chained mbuf data structures are + accepted. A chained mbuf can represent one non-contiguous CB or multiple + non-contiguous CBs. + The first mbuf segment in the given chained mbuf represents the first piece + of the CB. Offset is only applicable to the first segment. ``length`` is the + total length of the CB. + + BBDEV driver is responsible for identifying where the split is and enqueue + the split data to its internal queues. + + If BBDEV PMD does not support this feature, it will assume inbound mbuf data + contains one segment. + + The output mbuf data though is always one segment, even if the input was a + chained mbuf. + + +- ``offset``: This is the starting point of the BBDEV (encode/decode) operation, + in bytes. + + BBDEV starts to read data past this offset. + In case of chained mbuf, this offset applies only to the first mbuf segment. + + +- ``length``: This is the total data length to be processed in one operation, + in bytes. + + In case the mbuf data is representing one CB, this is the length of the CB + undergoing the operation. + If it is for multiple CBs, this is the total length of those CBs undergoing + the operation. + If it is for one TB, this is the total length of the TB under operation. + In case of chained mbuf, this data length includes the lengths of the + "scattered" data segments undergoing the operation. + + +BBDEV Turbo Encode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: c
@@ -428,8 +506,74 @@ operation outcome. }; }; +The Turbo encode structure is composed of the ``input`` and ``output`` mbuf +data pointers. The provided mbuf pointer of ``input`` needs to be big enough to +stretch for extra CRC trailers. + +``op_flags`` parameter holds all operation related flags, like whether CRC24A is +included by the application or not. -**Turbo Decode Op structure** +``code_block_mode`` flag identifies the mode in which bbdev is operating in. + +The encode interface works on both the code block (CB) and the transport block +(TB). An operation executes in "CB-mode" when the CB is standalone. While +"TB-mode" executes when an operation performs on one or multiple CBs that +belong to a TB. Therefore, a given data can be standalone CB, full-size TB or +partial TB. Partial TB means that only a subset of CBs belonging to a bigger TB +are being enqueued. + + **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_enc_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +In case that the CB is smaller than Z (6144 bits), then effectively the TB = CB. +CRC24A is appended to the tail of the CB. The application is responsible for +calculating and appending CRC24A before calling BBDEV in case that the +underlying driver does not support CRC24A generation. + +In CB-mode, CRC24A/B is an optional operation. +The input ``k`` is the size of the CB (this maps to K as described in 3GPP TS +36.212 section 5.1.2), this size is inclusive of CRC24A/B. +The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case. + +Not all BBDEV PMDs are capable of CRC24A/B calculation. Flags +``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` and ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` +informs the application with relevant capability. These flags can be set in the +``op_flags`` parameter to indicate BBDEV to calculate and append CRC24A to CB +before going forward with Turbo encoding. + +Output format of the CB encode will have the encoded CB in ``e`` size output +(this maps to E described in 3GPP TS 36.212 section 5.1.4.1.2). The output mbuf +buffer size needs to be big enough to hold the encoded buffer of size ``e``. + +In TB-mode, CRC24A is assumed to be pre-calculated and appended to the inbound +TB mbuf data buffer. +The output mbuf data structure is expected to be allocated by the application +with enough room for the output data. + +The difference between the partial and full-size TB is that we need to know the +index of the first CB in this group and the number of CBs contained within. +The first CB index is given by ``r`` but the number of the remaining CBs is +calculated automatically by BBDEV before passing down to the driver. + +The number of remaining CBs should not be confused with ``c``. ``c`` is the +total number of CBs that composes the whole TB (this maps to C as +described in 3GPP TS 36.212 section 5.1.2). + +The ``length`` is total size of the CBs inclusive of any CRC24A and CRC24B in +case they were appended by the application. + +The case when one CB belongs to TB and is being enqueued individually to BBDEV, +this case is considered as a special case of partial TB where its number of CBs +is 1. Therefore, it requires to get processed in TB-mode. + +The figure below visualizes the encoding of CBs using BBDEV interface in +TB-mode. CB-mode is a reduced version, where only one CB exists: + +.. figure:: img/turbo_tb_encode.* + + +BBDEV Turbo Decode Operation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: c
@@ -452,18 +596,71 @@ operation outcome. }; }; -Input and output data buffers are identified by ``rte_bbdev_op_data`` structure. -This structure has three elements: +The Turbo decode structure is composed of the ``input`` and ``output`` mbuf +data pointers. + +``op_flags`` parameter holds all operation related flags, like whether CRC24B is +retained or not. + +``code_block_mode`` flag identifies the mode in which bbdev is operating in. + +Similarly, the decode interface works on both the code block (CB) and the +transport block (TB). An operation executes in "CB-mode" when the CB is +standalone. While "TB-mode" executes when an operation performs on one or +multiple CBs that belong to a TB. Therefore, a given data can be standalone CB, +full-size TB or partial TB. Partial TB means that only a subset of CBs belonging +to a bigger TB are being enqueued. + + **NOTE:** It is assumed that all enqueued ops in one ``rte_bbdev_enqueue_dec_ops()`` + call belong to one mode, either CB-mode or TB-mode. + +The input ``k`` is the size of the decoded CB (this maps to K as described in +3GPP TS 36.212 section 5.1.2), this size is inclusive of CRC24A/B. +The ``length`` is inclusive of CRC24A/B and equals to ``k`` in this case. + +The input encoded CB data is the Virtual Circular Buffer data stream, wk, with +the null padding included as described in 3GPP TS 36.212 section 5.1.4.1.2 and +shown in 3GPP TS 36.212 section 5.1.4.1 Figure 5.1.4-1. +The size of the virtual circular buffer is 3*Kpi, where Kpi is the 32 byte +aligned value of K, as specified in 3GPP TS 36.212 section 5.1.4.1.1. + +Each byte in the input circular buffer is the LLR value of each bit of the +original CB. + +``hard_output`` is a mandatory capability that all BBDEV PMDs support. This is +the decoded CBs of K sizes (CRC24A/B is the last 24-bit in each decoded CB). +Soft output is an optional capability for BBDEV PMDs. Setting flag +``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP`` in ``op_flags`` directs BBDEV to retain +CRC24B at the end of each CB. This might be useful for the application in debug +mode. +An LLR rate matched output is computed in the ``soft_output`` buffer structure +for the given ``e`` size (this maps to E described in 3GPP TS 36.212 section +5.1.4.1.2). The output mbuf buffer size needs to be big enough to hold the +encoded buffer of size ``e``. + +The first CB Virtual Circular Buffer (VCB) index is given by ``r`` but the +number of the remaining CB VCBs is calculated automatically by BBDEV before +passing down to the driver. + +The number of remaining CB VCBs should not be confused with ``c``. ``c`` is the +total number of CBs that composes the whole TB (this maps to C as +described in 3GPP TS 36.212 section 5.1.2). + +The ``length`` is total size of the CBs inclusive of any CRC24A and CRC24B in +case they were appended by the application. + +The case when one CB belongs to TB and is being enqueued individually to BBDEV, +this case is considered as a special case of partial TB where its number of CBs +is 1. Therefore, it requires to get processed in TB-mode. + +The output mbuf data structure is expected to be allocated by the application +with enough room for the output data. -- ``data`` - This is the mbuf reference +The figure below visualizes the decoding of CBs using BBDEV interface in +TB-mode. CB-mode is a reduced version, where only one CB exists: -- ``offset`` - The starting point for the Turbo input/output, in bytes, from the - start of the data in the data buffer. It must be smaller than data_len of the - mbuf's first segment +.. figure:: img/turbo_tb_decode.* -- ``length`` - The length, in bytes, of the buffer on which the Turbo operation - will or has been computed. For the input, the length is set by the application. - For the output(s), the length is computed by the bbdev PMD driver. Sample code -----------
doc/guides/prog_guide/img/turbo_tb_decode.png new file binary +0 -0
doc/guides/prog_guide/img/turbo_tb_encode.png new file binary +0 -0
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
PATCH 1/1 baseband/turbo_sw: offload cost measurement test
From: "Chalupnik, KamilX" <[email protected]>
New test created to measure offload cost. Changes were introduced in API, turbo software driver and test application
--- app/test-bbdev/test_bbdev_perf.c | 333 ++++++++++++++++++----- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 102 ++++--- lib/librte_bbdev/rte_bbdev.h | 4 + 3 files changed, 333 insertions(+), 106 deletions(-)
app/test-bbdev/test_bbdev_perf.c +260 -73
@@ -83,6 +83,28 @@ struct thread_params {struct test_op_params *op_params; }; +/* Stores time statistics */ +struct test_time_stats { +/* Stores software enqueue total working time */ +uint64_t enq_sw_tot_time; +/* Stores minimum value of software enqueue working time */ +uint64_t enq_sw_min_time; +/* Stores maximum value of software enqueue working time */ +uint64_t enq_sw_max_time; +/* Stores turbo enqueue total working time */ +uint64_t enq_tur_tot_time; +/* Stores minimum value of turbo enqueue working time */ +uint64_t enq_tur_min_time; +/* Stores maximum value of turbo enqueue working time */ +uint64_t enq_tur_max_time; +/* Stores dequeue total working time */ +uint64_t deq_tot_time; +/* Stores minimum value of dequeue working time */ +uint64_t deq_min_time; +/* Stores maximum value of dequeue working time */ +uint64_t deq_max_time; +}; +typedef int (test_case_function )(struct active_device *ad,struct test_op_params *op_params);
@@ -1104,7 +1126,6 @@ dequeue_event_callback(uint16_t dev_id,double in_len;struct thread_params *tp = cb_arg; -RTE_SET_USED (ret_param); queue_id = tp->queue_id;
@@ -1649,20 +1670,21 @@ throughput_test(struct active_device *ad, }static int -operation_latency_test_dec (struct rte_mempool *mempool, +latency_test_dec (struct rte_mempool *mempool,struct test_buffers *bufs,struct rte_bbdev_dec_op *ref_op,int vector_mask,uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process,uint16_t burst_sz, -uint64_t *total_time) +uint64_t *total_time,uint64_t *min_time,uint64_t *max_time) {int ret =TEST_SUCCESS ;uint16_t i, j, dequeued;struct rte_bbdev_dec_op *ops_enq[MAX_BURST ], *ops_deq[MAX_BURST ]; -uint64_t start_time =0 ; +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;
@@ -1692,11 +1714,15 @@ operation_latency_test_dec(struct rte_mempool *mempool, deq +=rte_bbdev_dequeue_dec_ops (dev_id, queue_id, &ops_deq[deq], burst_sz - deq);if (likely (first_time && (deq >0 ))) { - *total_time +=rte_rdtsc_precise () - start_time; + 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_dec_op (ops_deq, burst_sz, ref_op, vector_mask);
@@ -1711,20 +1737,21 @@ operation_latency_test_dec(struct rte_mempool *mempool, }static int -operation_latency_test_enc (struct rte_mempool *mempool, +latency_test_enc (struct rte_mempool *mempool,struct test_buffers *bufs,struct rte_bbdev_enc_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 *total_time,uint64_t *min_time,uint64_t *max_time) {int ret =TEST_SUCCESS ;uint16_t i, j, dequeued;struct rte_bbdev_enc_op *ops_enq[MAX_BURST ], *ops_deq[MAX_BURST ]; -uint64_t start_time =0 ; +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;
@@ -1753,11 +1780,15 @@ operation_latency_test_enc(struct rte_mempool *mempool, deq +=rte_bbdev_dequeue_enc_ops (dev_id, queue_id, &ops_deq[deq], burst_sz - deq);if (likely (first_time && (deq >0 ))) { - *total_time +=rte_rdtsc_precise () - start_time; + 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_enc_op (ops_deq, burst_sz, ref_op);TEST_ASSERT_SUCCESS (ret,"Validation failed!" );
@@ -1771,7 +1802,7 @@ operation_latency_test_enc(struct rte_mempool *mempool, }static int -operation_latency_test (struct active_device *ad, +latency_test (struct active_device *ad,struct test_op_params *op_params) {int iter;
@@ -1781,9 +1812,12 @@ operation_latency_test(struct active_device *ad,const uint16_t queue_id = ad->queue_ids[0 ];struct test_buffers *bufs =NULL ;struct rte_bbdev_info info; -uint64_t total_time =0 ; +uint64_t total_time, min_time, max_time;const char *op_type_str; + total_time = max_time =0 ; + min_time =UINT64_MAX ; +TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ),"BURST_SIZE should be <= %u" ,MAX_BURST );
@@ -1798,36 +1832,65 @@ operation_latency_test(struct active_device *ad, info.dev_name, burst_sz, num_to_process, op_type_str);if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) - iter =operation_latency_test_dec (op_params->mp, bufs, + iter =latency_test_dec (op_params->mp, bufs, op_params->ref_dec_op, op_params->vector_mask, ad->dev_id, queue_id, num_to_process, - burst_sz, &total_time); + burst_sz, &total_time, &min_time, &max_time);else - iter =operation_latency_test_enc (op_params->mp, bufs, + iter =latency_test_enc (op_params->mp, bufs, op_params->ref_enc_op, ad->dev_id, queue_id, - num_to_process, burst_sz, &total_time); + num_to_process, burst_sz, &total_time, + &min_time, &max_time);if (iter <=0 )return TEST_FAILED ; -printf ("\toperation avg. latency: %lg cycles, %lg us\n" , +printf ("\toperation latency:\n" +"\t\tavg latency: %lg cycles, %lg us\n" +"\t\tmin latency: %lg cycles, %lg us\n" +"\t\tmax latency: %lg cycles, %lg us\n" , (double )total_time / (double )iter, (double )(total_time *1000000 ) / (double )iter / + (double )rte_get_tsc_hz (), (double )min_time, + (double )(min_time *1000000 ) / (double )rte_get_tsc_hz (), + (double )max_time, (double )(max_time *1000000 ) / (double )rte_get_tsc_hz ());return TEST_SUCCESS ; }static int +get_bbdev_queue_stats (uint16_t dev_id,uint16_t queue_id, +struct rte_bbdev_stats *stats) +{ +struct rte_bbdev *dev = &rte_bbdev_devices[dev_id]; +struct rte_bbdev_stats *q_stats; + +if (queue_id >= dev->data->num_queues) +return -1 ; + + q_stats = &dev->data->queues[queue_id].queue_stats; + + stats->enqueued_count = q_stats->enqueued_count; + stats->dequeued_count = q_stats->dequeued_count; + stats->enqueue_err_count = q_stats->enqueue_err_count; + stats->dequeue_err_count = q_stats->dequeue_err_count; + stats->turbo_perf_time = q_stats->turbo_perf_time; + +return 0 ; +} + +static int offload_latency_test_dec (struct rte_mempool *mempool,struct test_buffers *bufs,struct rte_bbdev_dec_op *ref_op,uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process, -uint16_t burst_sz,uint64_t *enq_total_time, -uint64_t *deq_total_time) +uint16_t burst_sz,struct test_time_stats *time_st) { -int i, dequeued; +int i, dequeued, ret;struct rte_bbdev_dec_op *ops_enq[MAX_BURST ], *ops_deq[MAX_BURST ];uint64_t enq_start_time, deq_start_time; +uint64_t enq_sw_last_time, deq_last_time; +struct rte_bbdev_stats stats;for (i =0 , dequeued =0 ; dequeued < num_to_process; ++i) {uint16_t enq =0 , deq =0 ;
@@ -1843,24 +1906,54 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs, bufs->soft_outputs, ref_op); -/* Start time measurment for enqueue function offload latency */ - enq_start_time =rte_rdtsc (); +/* Start time meas for enqueue function offload latency */ + enq_start_time =rte_rdtsc_precise ();do { enq +=rte_bbdev_enqueue_dec_ops (dev_id, queue_id, &ops_enq[enq], burst_sz - enq); }while (unlikely (burst_sz != enq)); - *enq_total_time +=rte_rdtsc () - enq_start_time; + + ret =get_bbdev_queue_stats (dev_id, queue_id, &stats); +TEST_ASSERT_SUCCESS (ret, +"Failed to get stats for queue (%u) of device (%u)" , + queue_id, dev_id); + + enq_sw_last_time =rte_rdtsc_precise () - enq_start_time - + stats.turbo_perf_time; + time_st->enq_sw_max_time =RTE_MAX (time_st->enq_sw_max_time, + enq_sw_last_time); + time_st->enq_sw_min_time =RTE_MIN (time_st->enq_sw_min_time, + enq_sw_last_time); + time_st->enq_sw_tot_time += enq_sw_last_time; + + time_st->enq_tur_max_time =RTE_MAX (time_st->enq_tur_max_time, + stats.turbo_perf_time); + time_st->enq_tur_min_time =RTE_MIN (time_st->enq_tur_min_time, + stats.turbo_perf_time); + time_st->enq_tur_tot_time += stats.turbo_perf_time;/* ensure enqueue has been completed */ rte_delay_ms (10 ); -/* Start time measurment for dequeue function offload latency */ - deq_start_time =rte_rdtsc (); +/* Start time meas for dequeue function offload latency */ + deq_start_time =rte_rdtsc_precise (); +/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_dec_ops (dev_id, queue_id, + &ops_deq[deq],1 ); + }while (unlikely (deq !=1 )); + + deq_last_time =rte_rdtsc_precise () - deq_start_time; + time_st->deq_max_time =RTE_MAX (time_st->deq_max_time, + deq_last_time); + time_st->deq_min_time =RTE_MIN (time_st->deq_min_time, + deq_last_time); + time_st->deq_tot_time += deq_last_time; + +/* Dequeue remaining operations if needed*/ +while (burst_sz != deq) + deq +=rte_bbdev_dequeue_dec_ops (dev_id, queue_id, &ops_deq[deq], burst_sz - deq); - }while (unlikely (burst_sz != deq)); - *deq_total_time +=rte_rdtsc () - deq_start_time;rte_bbdev_dec_op_free_bulk (ops_enq, deq); dequeued += deq;
@@ -1873,12 +1966,13 @@ static int offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, struct rte_bbdev_enc_op *ref_op, uint16_t dev_id, uint16_t queue_id, const uint16_t num_to_process, - uint16_t burst_sz, uint64_t *enq_total_time, - uint64_t *deq_total_time) + uint16_t burst_sz, struct test_time_stats *time_st) { - int i, dequeued; + int i, dequeued, ret;struct rte_bbdev_enc_op *ops_enq[MAX_BURST ], *ops_deq[MAX_BURST ];uint64_t enq_start_time, deq_start_time; +uint64_t enq_sw_last_time, deq_last_time; +struct rte_bbdev_stats stats;for (i =0 , dequeued =0 ; dequeued < num_to_process; ++i) {uint16_t enq =0 , deq =0 ;
@@ -1893,24 +1987,53 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, bufs->hard_outputs, ref_op); -/* Start time measurment for enqueue function offload latency */ - enq_start_time =rte_rdtsc (); +/* Start time meas for enqueue function offload latency */ + enq_start_time =rte_rdtsc_precise ();do { enq +=rte_bbdev_enqueue_enc_ops (dev_id, queue_id, &ops_enq[enq], burst_sz - enq); }while (unlikely (burst_sz != enq)); - *enq_total_time +=rte_rdtsc () - enq_start_time; + + ret =get_bbdev_queue_stats (dev_id, queue_id, &stats); +TEST_ASSERT_SUCCESS (ret, +"Failed to get stats for queue (%u) of device (%u)" , + queue_id, dev_id); + + enq_sw_last_time =rte_rdtsc_precise () - enq_start_time - + stats.turbo_perf_time; + time_st->enq_sw_max_time =RTE_MAX (time_st->enq_sw_max_time, + enq_sw_last_time); + time_st->enq_sw_min_time =RTE_MIN (time_st->enq_sw_min_time, + enq_sw_last_time); + time_st->enq_sw_tot_time += enq_sw_last_time; + + time_st->enq_tur_max_time =RTE_MAX (time_st->enq_tur_max_time, + stats.turbo_perf_time); + time_st->enq_tur_min_time =RTE_MIN (time_st->enq_tur_min_time, + stats.turbo_perf_time); + time_st->enq_tur_tot_time += stats.turbo_perf_time;/* ensure enqueue has been completed */ rte_delay_ms (10 ); -/* Start time measurment for dequeue function offload latency */ - deq_start_time =rte_rdtsc (); +/* Start time meas for dequeue function offload latency */ + deq_start_time =rte_rdtsc_precise (); +/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_enc_ops (dev_id, queue_id, + &ops_deq[deq],1 ); + }while (unlikely (deq !=1 )); + + deq_last_time =rte_rdtsc_precise () - deq_start_time; + time_st->deq_max_time =RTE_MAX (time_st->deq_max_time, + deq_last_time); + time_st->deq_min_time =RTE_MIN (time_st->deq_min_time, + deq_last_time); + time_st->deq_tot_time += deq_last_time; + +while (burst_sz != deq) + deq +=rte_bbdev_dequeue_enc_ops (dev_id, queue_id, &ops_deq[deq], burst_sz - deq); - }while (unlikely (burst_sz != deq)); - *deq_total_time +=rte_rdtsc () - deq_start_time;rte_bbdev_enc_op_free_bulk (ops_enq, deq); dequeued += deq;
@@ -1920,11 +2043,10 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, }static int -offload_latency_test (struct active_device *ad, +offload_cost_test (struct active_device *ad,struct test_op_params *op_params) {int iter; -uint64_t enq_total_time =0 , deq_total_time =0 ;uint16_t burst_sz = op_params->burst_sz;const uint16_t num_to_process = op_params->num_to_process;const enum rte_bbdev_op_type op_type = test_vector.op_type;
@@ -1932,6 +2054,12 @@ offload_latency_test(struct active_device *ad,struct test_buffers *bufs =NULL ;struct rte_bbdev_info info;const char *op_type_str; +struct test_time_stats time_st; + +memset (&time_st,0 ,sizeof (struct test_time_stats )); + time_st.enq_sw_min_time =UINT64_MAX ; + time_st.enq_tur_min_time =UINT64_MAX ; + time_st.deq_min_time =UINT64_MAX ;TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ),"BURST_SIZE should be <= %u" ,MAX_BURST );
@@ -1949,26 +2077,51 @@ offload_latency_test(struct active_device *ad,if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) iter =offload_latency_test_dec (op_params->mp, bufs, op_params->ref_dec_op, ad->dev_id, queue_id, - num_to_process, burst_sz, &enq_total_time, - &deq_total_time); + 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, - num_to_process, burst_sz, &enq_total_time, - &deq_total_time); + num_to_process, burst_sz, &time_st);if (iter <=0 )return TEST_FAILED ; -printf ("\tenq offload avg. latency: %lg cycles, %lg us\n" , - (double )enq_total_time / (double )iter, - (double )(enq_total_time *1000000 ) / (double )iter / - (double )rte_get_tsc_hz ()); - -printf ("\tdeq offload avg. latency: %lg cycles, %lg us\n" , - (double )deq_total_time / (double )iter, - (double )(deq_total_time *1000000 ) / (double )iter / - (double )rte_get_tsc_hz ()); +printf ("\tenq offload cost latency:\n" +"\t\tsoftware avg %lg cycles, %lg us\n" +"\t\tsoftware min %lg cycles, %lg us\n" +"\t\tsoftware max %lg cycles, %lg us\n" +"\t\tturbo avg %lg cycles, %lg us\n" +"\t\tturbo min %lg cycles, %lg us\n" +"\t\tturbo max %lg cycles, %lg us\n" , + (double )time_st.enq_sw_tot_time / (double )iter, + (double )(time_st.enq_sw_tot_time *1000000 ) / + (double )iter / (double )rte_get_tsc_hz (), + (double )time_st.enq_sw_min_time, + (double )(time_st.enq_sw_min_time *1000000 ) / +rte_get_tsc_hz (), (double )time_st.enq_sw_max_time, + (double )(time_st.enq_sw_max_time *1000000 ) / +rte_get_tsc_hz (), (double )time_st.enq_tur_tot_time / + (double )iter, + (double )(time_st.enq_tur_tot_time *1000000 ) / + (double )iter / (double )rte_get_tsc_hz (), + (double )time_st.enq_tur_min_time, + (double )(time_st.enq_tur_min_time *1000000 ) / +rte_get_tsc_hz (), (double )time_st.enq_tur_max_time, + (double )(time_st.enq_tur_max_time *1000000 ) / +rte_get_tsc_hz ()); + +printf ("\tdeq offload cost latency - one op:\n" +"\t\tavg %lg cycles, %lg us\n" +"\t\tmin %lg cycles, %lg us\n" +"\t\tmax %lg cycles, %lg us\n" , + (double )time_st.deq_tot_time / (double )iter, + (double )(time_st.deq_tot_time *1000000 ) / + (double )iter / (double )rte_get_tsc_hz (), + (double )time_st.deq_min_time, + (double )(time_st.deq_min_time *1000000 ) / +rte_get_tsc_hz (), (double )time_st.deq_max_time, + (double )(time_st.deq_max_time *1000000 ) / +rte_get_tsc_hz ());return TEST_SUCCESS ; }
@@ -1976,21 +2129,28 @@ offload_latency_test(struct active_device *ad,static int offload_latency_empty_q_test_dec (uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process,uint16_t burst_sz, -uint64_t *deq_total_time) +uint64_t *deq_tot_time,uint64_t *deq_min_time, +uint64_t *deq_max_time) {int i, deq_total;struct rte_bbdev_dec_op *ops[MAX_BURST ]; -uint64_t deq_start_time; +uint64_t deq_start_time, deq_last_time;/* Test deq offload latency from an empty queue */ - deq_start_time =rte_rdtsc_precise (); +for (i =0 , deq_total =0 ; deq_total < num_to_process; ++i, deq_total += burst_sz) { + deq_start_time =rte_rdtsc_precise (); +if (unlikely (num_to_process - deq_total < burst_sz)) burst_sz = num_to_process - deq_total;rte_bbdev_dequeue_dec_ops (dev_id, queue_id, ops, burst_sz); + + deq_last_time =rte_rdtsc_precise () - deq_start_time; + *deq_max_time =RTE_MAX (*deq_max_time, deq_last_time); + *deq_min_time =RTE_MIN (*deq_min_time, deq_last_time); + *deq_tot_time += deq_last_time; } - *deq_total_time =rte_rdtsc_precise () - deq_start_time;return i; }
@@ -1998,21 +2158,27 @@ offload_latency_empty_q_test_dec(uint16_t dev_id, uint16_t queue_id,static int offload_latency_empty_q_test_enc (uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process,uint16_t burst_sz, -uint64_t *deq_total_time) +uint64_t *deq_tot_time,uint64_t *deq_min_time, +uint64_t *deq_max_time) {int i, deq_total;struct rte_bbdev_enc_op *ops[MAX_BURST ]; -uint64_t deq_start_time; +uint64_t deq_start_time, deq_last_time;/* Test deq offload latency from an empty queue */ - deq_start_time =rte_rdtsc_precise ();for (i =0 , deq_total =0 ; deq_total < num_to_process; ++i, deq_total += burst_sz) { + deq_start_time =rte_rdtsc_precise (); +if (unlikely (num_to_process - deq_total < burst_sz)) burst_sz = num_to_process - deq_total;rte_bbdev_dequeue_enc_ops (dev_id, queue_id, ops, burst_sz); + + deq_last_time =rte_rdtsc_precise () - deq_start_time; + *deq_max_time =RTE_MAX (*deq_max_time, deq_last_time); + *deq_min_time =RTE_MIN (*deq_min_time, deq_last_time); + *deq_tot_time += deq_last_time; } - *deq_total_time =rte_rdtsc_precise () - deq_start_time;return i; }
@@ -2022,7 +2188,7 @@ offload_latency_empty_q_test(struct active_device *ad, struct test_op_params *op_params) {int iter; -uint64_t deq_total_time =0 ; +uint64_t deq_tot_time, deq_min_time, deq_max_time;uint16_t burst_sz = op_params->burst_sz;const uint16_t num_to_process = op_params->num_to_process;const enum rte_bbdev_op_type op_type = test_vector.op_type;
@@ -2030,6 +2196,9 @@ offload_latency_empty_q_test(struct active_device *ad,struct rte_bbdev_info info;const char *op_type_str; + deq_tot_time = deq_max_time =0 ; + deq_min_time =UINT64_MAX ; +TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ),"BURST_SIZE should be <= %u" ,MAX_BURST );
@@ -2044,18 +2213,26 @@ offload_latency_empty_q_test(struct active_device *ad,if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) iter =offload_latency_empty_q_test_dec (ad->dev_id, queue_id, - num_to_process, burst_sz, &deq_total_time); + num_to_process, burst_sz, &deq_tot_time, + &deq_min_time, &deq_max_time);else iter =offload_latency_empty_q_test_enc (ad->dev_id, queue_id, - num_to_process, burst_sz, &deq_total_time); + num_to_process, burst_sz, &deq_tot_time, + &deq_min_time, &deq_max_time);if (iter <=0 )return TEST_FAILED ; -printf ("\tempty deq offload avg. latency: %lg cycles, %lg us\n" , - (double )deq_total_time / (double )iter, - (double )(deq_total_time *1000000 ) / (double )iter / - (double )rte_get_tsc_hz ()); +printf ("\tempty deq offload\n" +"\t\tavg. latency: %lg cycles, %lg us\n" +"\t\tmin. latency: %lg cycles, %lg us\n" +"\t\tmax. latency: %lg cycles, %lg us\n" , + (double )deq_tot_time / (double )iter, + (double )(deq_tot_time *1000000 ) / (double )iter / + (double )rte_get_tsc_hz (), (double )deq_min_time, + (double )(deq_min_time *1000000 ) /rte_get_tsc_hz (), + (double )deq_max_time, (double )(deq_max_time *1000000 ) / +rte_get_tsc_hz ());return TEST_SUCCESS ; }
@@ -2067,9 +2244,9 @@ throughput_tc(void) }static int -offload_latency_tc (void ) +offload_cost_tc (void ) { -return run_test_case (offload_latency_test); +return run_test_case (offload_cost_test); } static int
@@ -2079,9 +2256,9 @@ offload_latency_empty_q_tc(void) }static int -operation_latency_tc (void ) +latency_tc (void ) { -return run_test_case (operation_latency_test); +return run_test_case (latency_test); } static int
@@ -2105,7 +2282,7 @@ static struct unit_test_suite bbdev_validation_testsuite = { .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, operation_latency_tc), +TEST_CASE_ST (ut_setup, ut_teardown, latency_tc), TEST_CASES_END() /**< NULL terminate unit test array */ } };
@@ -2115,9 +2292,18 @@ static struct unit_test_suite bbdev_latency_testsuite = { .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, offload_latency_tc), +TEST_CASE_ST (ut_setup, ut_teardown, latency_tc), + TEST_CASES_END() /**< NULL terminate unit test array */ + } +}; + +static struct unit_test_suite bbdev_offload_cost_testsuite = { + .suite_name ="BBdev Offload Cost Tests" , + .setup = testsuite_setup, + .teardown = testsuite_teardown, + .unit_test_cases = { +TEST_CASE_ST (ut_setup, ut_teardown, offload_cost_tc),TEST_CASE_ST (ut_setup, ut_teardown, offload_latency_empty_q_tc), -TEST_CASE_ST (ut_setup, ut_teardown, operation_latency_tc),TEST_CASES_END ()/**< NULL terminate unit test array */ } };
@@ -2135,4 +2321,5 @@ static struct unit_test_suite bbdev_interrupt_testsuite = {REGISTER_TEST_COMMAND (throughput, bbdev_throughput_testsuite);REGISTER_TEST_COMMAND (validation, bbdev_validation_testsuite);REGISTER_TEST_COMMAND (latency, bbdev_latency_testsuite); +REGISTER_TEST_COMMAND (offload, bbdev_offload_cost_testsuite);REGISTER_TEST_COMMAND (interrupt, bbdev_interrupt_testsuite);
drivers/baseband/turbo_sw/bbdev_turbo_software.c +69 -33
209 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev.h +4 -0
@@ -239,6 +239,10 @@ struct rte_bbdev_stats {uint64_t enqueue_err_count;/** Total error count on operations dequeued */ uint64_t dequeue_err_count; +#ifdef RTE_TEST_BBDEV +/** It stores turbo decoder/encoder working time. */ +uint64_t turbo_perf_time; +#endif };/**
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH] baseband/turbo_sw: offload cost measurement test
Quoted 9 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] baseband/turbo_sw: offload cost measurement test
Quoted 7 lines
From: "Chalupnik, KamilX" <[email protected]>
New test created to measure offload cost. Changes were introduced in API, turbo software driver and test application
Signed-off-by KamilX Chalupnik <[email protected]>
Re: [PATCH] baseband/turbo_sw: offload cost measurement test
In reply to KamilX ChalupnikQuoted 38 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] baseband/turbo_sw: offload cost measurement testFrom: "Chalupnik, KamilX" <[email protected]>
New test created to measure offload cost. Changes were introduced in API, turbo software driver and test application
Signed-off-by KamilX Chalupnik <[email protected]>
b/drivers/baseband/turbo_sw/bbdev_turbo_software.cindex 302abf5..70691f3 100644drivers/baseband/turbo_sw/bbdev_turbo_software.c +1
-2@@ -9,6 +9,7 @@#include <rte_malloc.h> #include <rte_ring.h> #include <rte_kvargs.h> +#include <rte_cycles.h> #include <rte_bbdev.h> #include <rte_bbdev_pmd.h> @@ -20,18 +21,6 @@#define DRIVER_NAME turbo_sw -/* Turbo SW PMD logging ID */ -static int bbdev_turbo_sw_logtype;
drivers/baseband/turbo_sw/bbdev_turbo_software.c line 34
Quoted 10 lines
drivers/baseband/turbo_sw/bbdev_turbo_software.c +0
-10- -/* Helper macro for logging */ -#define rte_bbdev_log (level, fmt, ...) \ - rte_log(RTE_LOG_ ## level, bbdev_turbo_sw_logtype, fmt "\n", \ - ##__VA_ARGS__) - -#define rte_bbdev_log_debug (fmt, ...) \ - rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ - ##__VA_ARGS__) -
Why deleting logging macros?
This prevents turbo_sw driver from building.
Please ignore my previous Ack, it was set to this patch wrongly..
Thanks,
Amr
PATCH v2 1/1 baseband/turbo_sw: offload cost measurement test
In reply to KamilX ChalupnikNew test created to measure offload cost. Changes were introduced in API, turbo software driver and test application.
v2:
- logging macros reverted
--- app/test-bbdev/test_bbdev_perf.c | 333 ++++++++++++++++++----- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 83 ++++-- lib/librte_bbdev/rte_bbdev.h | 4 + 3 files changed, 329 insertions(+), 91 deletions(-)
app/test-bbdev/test_bbdev_perf.c +260 -73
@@ -83,6 +83,28 @@ struct thread_params {struct test_op_params *op_params; }; +/* Stores time statistics */ +struct test_time_stats { +/* Stores software enqueue total working time */ +uint64_t enq_sw_tot_time; +/* Stores minimum value of software enqueue working time */ +uint64_t enq_sw_min_time; +/* Stores maximum value of software enqueue working time */ +uint64_t enq_sw_max_time; +/* Stores turbo enqueue total working time */ +uint64_t enq_tur_tot_time; +/* Stores minimum value of turbo enqueue working time */ +uint64_t enq_tur_min_time; +/* Stores maximum value of turbo enqueue working time */ +uint64_t enq_tur_max_time; +/* Stores dequeue total working time */ +uint64_t deq_tot_time; +/* Stores minimum value of dequeue working time */ +uint64_t deq_min_time; +/* Stores maximum value of dequeue working time */ +uint64_t deq_max_time; +}; +typedef int (test_case_function )(struct active_device *ad,struct test_op_params *op_params);
@@ -1104,7 +1126,6 @@ dequeue_event_callback(uint16_t dev_id,double in_len;struct thread_params *tp = cb_arg; -RTE_SET_USED (ret_param); queue_id = tp->queue_id;
@@ -1649,20 +1670,21 @@ throughput_test(struct active_device *ad, }static int -operation_latency_test_dec (struct rte_mempool *mempool, +latency_test_dec (struct rte_mempool *mempool,struct test_buffers *bufs,struct rte_bbdev_dec_op *ref_op,int vector_mask,uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process,uint16_t burst_sz, -uint64_t *total_time) +uint64_t *total_time,uint64_t *min_time,uint64_t *max_time) {int ret =TEST_SUCCESS ;uint16_t i, j, dequeued;struct rte_bbdev_dec_op *ops_enq[MAX_BURST ], *ops_deq[MAX_BURST ]; -uint64_t start_time =0 ; +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;
@@ -1692,11 +1714,15 @@ operation_latency_test_dec(struct rte_mempool *mempool, deq +=rte_bbdev_dequeue_dec_ops (dev_id, queue_id, &ops_deq[deq], burst_sz - deq);if (likely (first_time && (deq >0 ))) { - *total_time +=rte_rdtsc_precise () - start_time; + 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_dec_op (ops_deq, burst_sz, ref_op, vector_mask);
@@ -1711,20 +1737,21 @@ operation_latency_test_dec(struct rte_mempool *mempool, }static int -operation_latency_test_enc (struct rte_mempool *mempool, +latency_test_enc (struct rte_mempool *mempool,struct test_buffers *bufs,struct rte_bbdev_enc_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 *total_time,uint64_t *min_time,uint64_t *max_time) {int ret =TEST_SUCCESS ;uint16_t i, j, dequeued;struct rte_bbdev_enc_op *ops_enq[MAX_BURST ], *ops_deq[MAX_BURST ]; -uint64_t start_time =0 ; +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;
@@ -1753,11 +1780,15 @@ operation_latency_test_enc(struct rte_mempool *mempool, deq +=rte_bbdev_dequeue_enc_ops (dev_id, queue_id, &ops_deq[deq], burst_sz - deq);if (likely (first_time && (deq >0 ))) { - *total_time +=rte_rdtsc_precise () - start_time; + 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_enc_op (ops_deq, burst_sz, ref_op);TEST_ASSERT_SUCCESS (ret,"Validation failed!" );
@@ -1771,7 +1802,7 @@ operation_latency_test_enc(struct rte_mempool *mempool, }static int -operation_latency_test (struct active_device *ad, +latency_test (struct active_device *ad,struct test_op_params *op_params) {int iter;
@@ -1781,9 +1812,12 @@ operation_latency_test(struct active_device *ad,const uint16_t queue_id = ad->queue_ids[0 ];struct test_buffers *bufs =NULL ;struct rte_bbdev_info info; -uint64_t total_time =0 ; +uint64_t total_time, min_time, max_time;const char *op_type_str; + total_time = max_time =0 ; + min_time =UINT64_MAX ; +TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ),"BURST_SIZE should be <= %u" ,MAX_BURST );
@@ -1798,36 +1832,65 @@ operation_latency_test(struct active_device *ad, info.dev_name, burst_sz, num_to_process, op_type_str);if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) - iter =operation_latency_test_dec (op_params->mp, bufs, + iter =latency_test_dec (op_params->mp, bufs, op_params->ref_dec_op, op_params->vector_mask, ad->dev_id, queue_id, num_to_process, - burst_sz, &total_time); + burst_sz, &total_time, &min_time, &max_time);else - iter =operation_latency_test_enc (op_params->mp, bufs, + iter =latency_test_enc (op_params->mp, bufs, op_params->ref_enc_op, ad->dev_id, queue_id, - num_to_process, burst_sz, &total_time); + num_to_process, burst_sz, &total_time, + &min_time, &max_time);if (iter <=0 )return TEST_FAILED ; -printf ("\toperation avg. latency: %lg cycles, %lg us\n" , +printf ("\toperation latency:\n" +"\t\tavg latency: %lg cycles, %lg us\n" +"\t\tmin latency: %lg cycles, %lg us\n" +"\t\tmax latency: %lg cycles, %lg us\n" , (double )total_time / (double )iter, (double )(total_time *1000000 ) / (double )iter / + (double )rte_get_tsc_hz (), (double )min_time, + (double )(min_time *1000000 ) / (double )rte_get_tsc_hz (), + (double )max_time, (double )(max_time *1000000 ) / (double )rte_get_tsc_hz ());return TEST_SUCCESS ; }static int +get_bbdev_queue_stats (uint16_t dev_id,uint16_t queue_id, +struct rte_bbdev_stats *stats) +{ +struct rte_bbdev *dev = &rte_bbdev_devices[dev_id]; +struct rte_bbdev_stats *q_stats; + +if (queue_id >= dev->data->num_queues) +return -1 ; + + q_stats = &dev->data->queues[queue_id].queue_stats; + + stats->enqueued_count = q_stats->enqueued_count; + stats->dequeued_count = q_stats->dequeued_count; + stats->enqueue_err_count = q_stats->enqueue_err_count; + stats->dequeue_err_count = q_stats->dequeue_err_count; + stats->turbo_perf_time = q_stats->turbo_perf_time; + +return 0 ; +} + +static int offload_latency_test_dec (struct rte_mempool *mempool,struct test_buffers *bufs,struct rte_bbdev_dec_op *ref_op,uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process, -uint16_t burst_sz,uint64_t *enq_total_time, -uint64_t *deq_total_time) +uint16_t burst_sz,struct test_time_stats *time_st) { -int i, dequeued; +int i, dequeued, ret;struct rte_bbdev_dec_op *ops_enq[MAX_BURST ], *ops_deq[MAX_BURST ];uint64_t enq_start_time, deq_start_time; +uint64_t enq_sw_last_time, deq_last_time; +struct rte_bbdev_stats stats;for (i =0 , dequeued =0 ; dequeued < num_to_process; ++i) {uint16_t enq =0 , deq =0 ;
@@ -1843,24 +1906,54 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs, bufs->soft_outputs, ref_op); -/* Start time measurment for enqueue function offload latency */ - enq_start_time =rte_rdtsc (); +/* Start time meas for enqueue function offload latency */ + enq_start_time =rte_rdtsc_precise ();do { enq +=rte_bbdev_enqueue_dec_ops (dev_id, queue_id, &ops_enq[enq], burst_sz - enq); }while (unlikely (burst_sz != enq)); - *enq_total_time +=rte_rdtsc () - enq_start_time; + + ret =get_bbdev_queue_stats (dev_id, queue_id, &stats); +TEST_ASSERT_SUCCESS (ret, +"Failed to get stats for queue (%u) of device (%u)" , + queue_id, dev_id); + + enq_sw_last_time =rte_rdtsc_precise () - enq_start_time - + stats.turbo_perf_time; + time_st->enq_sw_max_time =RTE_MAX (time_st->enq_sw_max_time, + enq_sw_last_time); + time_st->enq_sw_min_time =RTE_MIN (time_st->enq_sw_min_time, + enq_sw_last_time); + time_st->enq_sw_tot_time += enq_sw_last_time; + + time_st->enq_tur_max_time =RTE_MAX (time_st->enq_tur_max_time, + stats.turbo_perf_time); + time_st->enq_tur_min_time =RTE_MIN (time_st->enq_tur_min_time, + stats.turbo_perf_time); + time_st->enq_tur_tot_time += stats.turbo_perf_time;/* ensure enqueue has been completed */ rte_delay_ms (10 ); -/* Start time measurment for dequeue function offload latency */ - deq_start_time =rte_rdtsc (); +/* Start time meas for dequeue function offload latency */ + deq_start_time =rte_rdtsc_precise (); +/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_dec_ops (dev_id, queue_id, + &ops_deq[deq],1 ); + }while (unlikely (deq !=1 )); + + deq_last_time =rte_rdtsc_precise () - deq_start_time; + time_st->deq_max_time =RTE_MAX (time_st->deq_max_time, + deq_last_time); + time_st->deq_min_time =RTE_MIN (time_st->deq_min_time, + deq_last_time); + time_st->deq_tot_time += deq_last_time; + +/* Dequeue remaining operations if needed*/ +while (burst_sz != deq) + deq +=rte_bbdev_dequeue_dec_ops (dev_id, queue_id, &ops_deq[deq], burst_sz - deq); - }while (unlikely (burst_sz != deq)); - *deq_total_time +=rte_rdtsc () - deq_start_time;rte_bbdev_dec_op_free_bulk (ops_enq, deq); dequeued += deq;
@@ -1873,12 +1966,13 @@ static int offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, struct rte_bbdev_enc_op *ref_op, uint16_t dev_id, uint16_t queue_id, const uint16_t num_to_process, - uint16_t burst_sz, uint64_t *enq_total_time, - uint64_t *deq_total_time) + uint16_t burst_sz, struct test_time_stats *time_st) { - int i, dequeued; + int i, dequeued, ret;struct rte_bbdev_enc_op *ops_enq[MAX_BURST ], *ops_deq[MAX_BURST ];uint64_t enq_start_time, deq_start_time; +uint64_t enq_sw_last_time, deq_last_time; +struct rte_bbdev_stats stats;for (i =0 , dequeued =0 ; dequeued < num_to_process; ++i) {uint16_t enq =0 , deq =0 ;
@@ -1893,24 +1987,53 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, bufs->hard_outputs, ref_op); -/* Start time measurment for enqueue function offload latency */ - enq_start_time =rte_rdtsc (); +/* Start time meas for enqueue function offload latency */ + enq_start_time =rte_rdtsc_precise ();do { enq +=rte_bbdev_enqueue_enc_ops (dev_id, queue_id, &ops_enq[enq], burst_sz - enq); }while (unlikely (burst_sz != enq)); - *enq_total_time +=rte_rdtsc () - enq_start_time; + + ret =get_bbdev_queue_stats (dev_id, queue_id, &stats); +TEST_ASSERT_SUCCESS (ret, +"Failed to get stats for queue (%u) of device (%u)" , + queue_id, dev_id); + + enq_sw_last_time =rte_rdtsc_precise () - enq_start_time - + stats.turbo_perf_time; + time_st->enq_sw_max_time =RTE_MAX (time_st->enq_sw_max_time, + enq_sw_last_time); + time_st->enq_sw_min_time =RTE_MIN (time_st->enq_sw_min_time, + enq_sw_last_time); + time_st->enq_sw_tot_time += enq_sw_last_time; + + time_st->enq_tur_max_time =RTE_MAX (time_st->enq_tur_max_time, + stats.turbo_perf_time); + time_st->enq_tur_min_time =RTE_MIN (time_st->enq_tur_min_time, + stats.turbo_perf_time); + time_st->enq_tur_tot_time += stats.turbo_perf_time;/* ensure enqueue has been completed */ rte_delay_ms (10 ); -/* Start time measurment for dequeue function offload latency */ - deq_start_time =rte_rdtsc (); +/* Start time meas for dequeue function offload latency */ + deq_start_time =rte_rdtsc_precise (); +/* Dequeue one operation */ do { deq +=rte_bbdev_dequeue_enc_ops (dev_id, queue_id, + &ops_deq[deq],1 ); + }while (unlikely (deq !=1 )); + + deq_last_time =rte_rdtsc_precise () - deq_start_time; + time_st->deq_max_time =RTE_MAX (time_st->deq_max_time, + deq_last_time); + time_st->deq_min_time =RTE_MIN (time_st->deq_min_time, + deq_last_time); + time_st->deq_tot_time += deq_last_time; + +while (burst_sz != deq) + deq +=rte_bbdev_dequeue_enc_ops (dev_id, queue_id, &ops_deq[deq], burst_sz - deq); - }while (unlikely (burst_sz != deq)); - *deq_total_time +=rte_rdtsc () - deq_start_time;rte_bbdev_enc_op_free_bulk (ops_enq, deq); dequeued += deq;
@@ -1920,11 +2043,10 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs, }static int -offload_latency_test (struct active_device *ad, +offload_cost_test (struct active_device *ad,struct test_op_params *op_params) {int iter; -uint64_t enq_total_time =0 , deq_total_time =0 ;uint16_t burst_sz = op_params->burst_sz;const uint16_t num_to_process = op_params->num_to_process;const enum rte_bbdev_op_type op_type = test_vector.op_type;
@@ -1932,6 +2054,12 @@ offload_latency_test(struct active_device *ad,struct test_buffers *bufs =NULL ;struct rte_bbdev_info info;const char *op_type_str; +struct test_time_stats time_st; + +memset (&time_st,0 ,sizeof (struct test_time_stats )); + time_st.enq_sw_min_time =UINT64_MAX ; + time_st.enq_tur_min_time =UINT64_MAX ; + time_st.deq_min_time =UINT64_MAX ;TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ),"BURST_SIZE should be <= %u" ,MAX_BURST );
@@ -1949,26 +2077,51 @@ offload_latency_test(struct active_device *ad,if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) iter =offload_latency_test_dec (op_params->mp, bufs, op_params->ref_dec_op, ad->dev_id, queue_id, - num_to_process, burst_sz, &enq_total_time, - &deq_total_time); + 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, - num_to_process, burst_sz, &enq_total_time, - &deq_total_time); + num_to_process, burst_sz, &time_st);if (iter <=0 )return TEST_FAILED ; -printf ("\tenq offload avg. latency: %lg cycles, %lg us\n" , - (double )enq_total_time / (double )iter, - (double )(enq_total_time *1000000 ) / (double )iter / - (double )rte_get_tsc_hz ()); - -printf ("\tdeq offload avg. latency: %lg cycles, %lg us\n" , - (double )deq_total_time / (double )iter, - (double )(deq_total_time *1000000 ) / (double )iter / - (double )rte_get_tsc_hz ()); +printf ("\tenq offload cost latency:\n" +"\t\tsoftware avg %lg cycles, %lg us\n" +"\t\tsoftware min %lg cycles, %lg us\n" +"\t\tsoftware max %lg cycles, %lg us\n" +"\t\tturbo avg %lg cycles, %lg us\n" +"\t\tturbo min %lg cycles, %lg us\n" +"\t\tturbo max %lg cycles, %lg us\n" , + (double )time_st.enq_sw_tot_time / (double )iter, + (double )(time_st.enq_sw_tot_time *1000000 ) / + (double )iter / (double )rte_get_tsc_hz (), + (double )time_st.enq_sw_min_time, + (double )(time_st.enq_sw_min_time *1000000 ) / +rte_get_tsc_hz (), (double )time_st.enq_sw_max_time, + (double )(time_st.enq_sw_max_time *1000000 ) / +rte_get_tsc_hz (), (double )time_st.enq_tur_tot_time / + (double )iter, + (double )(time_st.enq_tur_tot_time *1000000 ) / + (double )iter / (double )rte_get_tsc_hz (), + (double )time_st.enq_tur_min_time, + (double )(time_st.enq_tur_min_time *1000000 ) / +rte_get_tsc_hz (), (double )time_st.enq_tur_max_time, + (double )(time_st.enq_tur_max_time *1000000 ) / +rte_get_tsc_hz ()); + +printf ("\tdeq offload cost latency - one op:\n" +"\t\tavg %lg cycles, %lg us\n" +"\t\tmin %lg cycles, %lg us\n" +"\t\tmax %lg cycles, %lg us\n" , + (double )time_st.deq_tot_time / (double )iter, + (double )(time_st.deq_tot_time *1000000 ) / + (double )iter / (double )rte_get_tsc_hz (), + (double )time_st.deq_min_time, + (double )(time_st.deq_min_time *1000000 ) / +rte_get_tsc_hz (), (double )time_st.deq_max_time, + (double )(time_st.deq_max_time *1000000 ) / +rte_get_tsc_hz ());return TEST_SUCCESS ; }
@@ -1976,21 +2129,28 @@ offload_latency_test(struct active_device *ad,static int offload_latency_empty_q_test_dec (uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process,uint16_t burst_sz, -uint64_t *deq_total_time) +uint64_t *deq_tot_time,uint64_t *deq_min_time, +uint64_t *deq_max_time) {int i, deq_total;struct rte_bbdev_dec_op *ops[MAX_BURST ]; -uint64_t deq_start_time; +uint64_t deq_start_time, deq_last_time;/* Test deq offload latency from an empty queue */ - deq_start_time =rte_rdtsc_precise (); +for (i =0 , deq_total =0 ; deq_total < num_to_process; ++i, deq_total += burst_sz) { + deq_start_time =rte_rdtsc_precise (); +if (unlikely (num_to_process - deq_total < burst_sz)) burst_sz = num_to_process - deq_total;rte_bbdev_dequeue_dec_ops (dev_id, queue_id, ops, burst_sz); + + deq_last_time =rte_rdtsc_precise () - deq_start_time; + *deq_max_time =RTE_MAX (*deq_max_time, deq_last_time); + *deq_min_time =RTE_MIN (*deq_min_time, deq_last_time); + *deq_tot_time += deq_last_time; } - *deq_total_time =rte_rdtsc_precise () - deq_start_time;return i; }
@@ -1998,21 +2158,27 @@ offload_latency_empty_q_test_dec(uint16_t dev_id, uint16_t queue_id,static int offload_latency_empty_q_test_enc (uint16_t dev_id,uint16_t queue_id,const uint16_t num_to_process,uint16_t burst_sz, -uint64_t *deq_total_time) +uint64_t *deq_tot_time,uint64_t *deq_min_time, +uint64_t *deq_max_time) {int i, deq_total;struct rte_bbdev_enc_op *ops[MAX_BURST ]; -uint64_t deq_start_time; +uint64_t deq_start_time, deq_last_time;/* Test deq offload latency from an empty queue */ - deq_start_time =rte_rdtsc_precise ();for (i =0 , deq_total =0 ; deq_total < num_to_process; ++i, deq_total += burst_sz) { + deq_start_time =rte_rdtsc_precise (); +if (unlikely (num_to_process - deq_total < burst_sz)) burst_sz = num_to_process - deq_total;rte_bbdev_dequeue_enc_ops (dev_id, queue_id, ops, burst_sz); + + deq_last_time =rte_rdtsc_precise () - deq_start_time; + *deq_max_time =RTE_MAX (*deq_max_time, deq_last_time); + *deq_min_time =RTE_MIN (*deq_min_time, deq_last_time); + *deq_tot_time += deq_last_time; } - *deq_total_time =rte_rdtsc_precise () - deq_start_time;return i; }
@@ -2022,7 +2188,7 @@ offload_latency_empty_q_test(struct active_device *ad, struct test_op_params *op_params) {int iter; -uint64_t deq_total_time =0 ; +uint64_t deq_tot_time, deq_min_time, deq_max_time;uint16_t burst_sz = op_params->burst_sz;const uint16_t num_to_process = op_params->num_to_process;const enum rte_bbdev_op_type op_type = test_vector.op_type;
@@ -2030,6 +2196,9 @@ offload_latency_empty_q_test(struct active_device *ad,struct rte_bbdev_info info;const char *op_type_str; + deq_tot_time = deq_max_time =0 ; + deq_min_time =UINT64_MAX ; +TEST_ASSERT_SUCCESS ((burst_sz >MAX_BURST ),"BURST_SIZE should be <= %u" ,MAX_BURST );
@@ -2044,18 +2213,26 @@ offload_latency_empty_q_test(struct active_device *ad,if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) iter =offload_latency_empty_q_test_dec (ad->dev_id, queue_id, - num_to_process, burst_sz, &deq_total_time); + num_to_process, burst_sz, &deq_tot_time, + &deq_min_time, &deq_max_time);else iter =offload_latency_empty_q_test_enc (ad->dev_id, queue_id, - num_to_process, burst_sz, &deq_total_time); + num_to_process, burst_sz, &deq_tot_time, + &deq_min_time, &deq_max_time);if (iter <=0 )return TEST_FAILED ; -printf ("\tempty deq offload avg. latency: %lg cycles, %lg us\n" , - (double )deq_total_time / (double )iter, - (double )(deq_total_time *1000000 ) / (double )iter / - (double )rte_get_tsc_hz ()); +printf ("\tempty deq offload\n" +"\t\tavg. latency: %lg cycles, %lg us\n" +"\t\tmin. latency: %lg cycles, %lg us\n" +"\t\tmax. latency: %lg cycles, %lg us\n" , + (double )deq_tot_time / (double )iter, + (double )(deq_tot_time *1000000 ) / (double )iter / + (double )rte_get_tsc_hz (), (double )deq_min_time, + (double )(deq_min_time *1000000 ) /rte_get_tsc_hz (), + (double )deq_max_time, (double )(deq_max_time *1000000 ) / +rte_get_tsc_hz ());return TEST_SUCCESS ; }
@@ -2067,9 +2244,9 @@ throughput_tc(void) }static int -offload_latency_tc (void ) +offload_cost_tc (void ) { -return run_test_case (offload_latency_test); +return run_test_case (offload_cost_test); } static int
@@ -2079,9 +2256,9 @@ offload_latency_empty_q_tc(void) }static int -operation_latency_tc (void ) +latency_tc (void ) { -return run_test_case (operation_latency_test); +return run_test_case (latency_test); } static int
@@ -2105,7 +2282,7 @@ static struct unit_test_suite bbdev_validation_testsuite = { .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, operation_latency_tc), +TEST_CASE_ST (ut_setup, ut_teardown, latency_tc), TEST_CASES_END() /**< NULL terminate unit test array */ } };
@@ -2115,9 +2292,18 @@ static struct unit_test_suite bbdev_latency_testsuite = { .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, offload_latency_tc), +TEST_CASE_ST (ut_setup, ut_teardown, latency_tc), + TEST_CASES_END() /**< NULL terminate unit test array */ + } +}; + +static struct unit_test_suite bbdev_offload_cost_testsuite = { + .suite_name ="BBdev Offload Cost Tests" , + .setup = testsuite_setup, + .teardown = testsuite_teardown, + .unit_test_cases = { +TEST_CASE_ST (ut_setup, ut_teardown, offload_cost_tc),TEST_CASE_ST (ut_setup, ut_teardown, offload_latency_empty_q_tc), -TEST_CASE_ST (ut_setup, ut_teardown, operation_latency_tc),TEST_CASES_END ()/**< NULL terminate unit test array */ } };
@@ -2135,4 +2321,5 @@ static struct unit_test_suite bbdev_interrupt_testsuite = {REGISTER_TEST_COMMAND (throughput, bbdev_throughput_testsuite);REGISTER_TEST_COMMAND (validation, bbdev_validation_testsuite);REGISTER_TEST_COMMAND (latency, bbdev_latency_testsuite); +REGISTER_TEST_COMMAND (offload, bbdev_offload_cost_testsuite);REGISTER_TEST_COMMAND (interrupt, bbdev_interrupt_testsuite);
drivers/baseband/turbo_sw/bbdev_turbo_software.c +65 -18
176 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev.h +4 -0
@@ -239,6 +239,10 @@ struct rte_bbdev_stats {uint64_t enqueue_err_count;/** Total error count on operations dequeued */ uint64_t dequeue_err_count; +#ifdef RTE_TEST_BBDEV +/** It stores turbo decoder/encoder working time. */ +uint64_t turbo_perf_time; +#endif };/**
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH v2] baseband/turbo_sw: offload cost measurement test
Quoted 9 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Tuesday 17 April 2018 15:27
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH v2] baseband/turbo_sw: offload cost measurement test
Quoted 5 lines
New test created to measure offload cost. Changes were introduced in API, turbo software driver and test application.
Signed-off-by KamilX Chalupnik <[email protected]>
There is a dependency between (baseband/turbo_sw) patches. Should be applied in this order:
1. baseband/turbo_sw: splitting Queue Groups
2. baseband/turbo_sw: offload cost measurement test
3. baseband/turbo_sw: optimization of turbo software driver
4. baseband/turbo_sw: update Turbo Software driver
Re: [PATCH v2] baseband/turbo_sw: offload cost measurement test
In reply to KamilX ChalupnikQuoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:27 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: offload cost measurement test
Quoted 3 lines
New test created to measure offload cost.
Changes were introduced in API, turbo software driver and test application.
Shouldn't this be generic to bbdev/baseband drivers in general and not just turbo?
Quoted 1 line
Signed-off-by KamilX Chalupnik <[email protected]>
...
lib/librte_bbdev/rte_bbdev.h struct rte_bbdev_stats { · line 245
Quoted 10 lines
lib/librte_bbdev/rte_bbdev.h +4
-0@@ -239,6 +239,10 @@ struct rte_bbdev_stats {uint64_t enqueue_err_count;/** Total error count on operations dequeued */ uint64_t dequeue_err_count; +#ifdef RTE_TEST_BBDEV +/** It stores turbo decoder/encoder working time. */ +uint64_t turbo_perf_time; +#endif
I don't think it is a good idea to use RTE_TEST_BBDEV here. This macro is used to enable/disable the compilation of the bbdev test app, so I think it should not be used in the API/PMDs.
Also, this looks too specific for the Turbo SW PMD to be exposed as a generic statistic.
Quoted 6 lines
lib/librte_bbdev/rte_bbdev.h +0
-1};/** -- 2.5.5
Re: [PATCH v2] baseband/turbo_sw: offload cost measurement test
Quoted 23 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday 24 April 2018 18:45
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] baseband/turbo_sw: offload cost measurement testQuoted 7 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:27 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: offload costmeasurement
Quoted 2 lines
test
Quoted 8 lines
Quoted 2 lines
New test created to measure offload cost.
Changes were introduced in API, turbo software driver and testapplication.
Quoted 1 line
Shouldn't this be generic to bbdev/baseband drivers in general and not just turbo?
Yes, it is generic.
But the only driver we have right now is the turbo_sw driver. Future drivers will have a similar support.
Quoted 19 lines
Quoted 1 line
Signed-off-by KamilX Chalupnik <[email protected]>...
lib/librte_bbdev/rte_bbdev.h struct rte_bbdev_stats { · line 245
Quoted 10 lines
lib/librte_bbdev/rte_bbdev.h +4
-0@@ -239,6 +239,10 @@ struct rte_bbdev_stats {uint64_t enqueue_err_count;/** Total error count on operations dequeued */ uint64_t dequeue_err_count; +#ifdef RTE_TEST_BBDEV +/** It stores turbo decoder/encoder working time. */ +uint64_t turbo_perf_time; +#endif I don't think it is a good idea to use
RTE_TEST_BBDEVhere. This macro is used to enable/disable the compilation of the bbdev test app, so I think it should not be used in the API/PMDs.
Quoted 2 lines
Also, this looks too specific for the Turbo SW PMD to be exposed as a generic statistic.
Well, it should be generic. Probably 'turbo' is a bad comment and name. It's intention is to feedback execution time/cycles back to test app in order to collect the offload cost of the bbdev driver.
What is meant by the offload cost is the cycles consumed from the moment of enqueue till the moment the request is put on the acceleration engine inbound sw ring (software) or MMIO operation (hardware).
Quoted 7 lines
Quoted 7 lines
lib/librte_bbdev/rte_bbdev.h +0
-1};/** -- 2.5.5
Re: [PATCH v2] baseband/turbo_sw: offload cost measurement test
Quoted 40 lines
-----Original Message-----
From: Mokhtar, Amr
Sent: Tuesday, April 24, 2018 8:09 PM
To: De Lara Guarch, Pablo <[email protected]>; Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] baseband/turbo_sw: offload cost measurement testQuoted 27 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday 24 April 2018 18:45
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] baseband/turbo_sw: offload cost measurement testQuoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:27 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: offload costmeasurement
Quoted 4 lines
test
New test created to measure offload cost.
Changes were introduced in API, turbo software driver and testapplication.
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Shouldn't this be generic to bbdev/baseband drivers in general and not just turbo?
Yes, it is generic.
But the only driver we have right now is theturbo_swdriver. Future drivers will have a similar support.
Right, then the title should be something like "bbdev: measure offload cost", since this is affecting multiple components in bbdev.
Quoted 23 lines
Quoted 20 lines
Quoted 2 lines
Signed-off-by KamilX Chalupnik <[email protected]>...
lib/librte_bbdev/rte_bbdev.h struct rte_bbdev_stats { · line 245
Quoted 10 lines
lib/librte_bbdev/rte_bbdev.h +4
-0@@ -239,6 +239,10 @@ struct rte_bbdev_stats {uint64_t enqueue_err_count;/** Total error count on operations dequeued */ uint64_t dequeue_err_count; +#ifdef RTE_TEST_BBDEV +/** It stores turbo decoder/encoder working time. */ +uint64_t turbo_perf_time; +#endif I don't think it is a good idea to use
RTE_TEST_BBDEVhere. This macro is used to enable/disable the compilation of the bbdev test app, so I think it should not be used in the API/PMDs.Quoted 2 lines
Also, this looks too specific for the Turbo SW PMD to be exposed as a generic statistic.
Quoted 6 lines
Well, it should be generic. Probably 'turbo' is a bad comment and name. It's intention is to feedback execution time/cycles back to test app in order to collect the offload cost of the bbdev driver.
What is meant by the offload cost is the cycles consumed from the moment of enqueue till the moment the request is put on the acceleration engine inbound sw ring (software) or MMIO operation (hardware).
I understand. Then yes, probably you should find a better name, maybe offload_time?
Thanks,
Pablo
PATCH 1/1 baseband/turbo_sw: optimization of turbo software driver
In reply to KamilX ChalupnikFrom: "Chalupnik, KamilX" <[email protected]>
Optimization of Turbo Software driver:
- resource-hungry piece of code removed or optimized
- validation of decoder/encoder parameters put under debug flag
--- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 264 +++++++++++++---------- lib/librte_bbdev/rte_bbdev_op.h | 18 +- 2 files changed, 172 insertions(+), 110 deletions(-)
drivers/baseband/turbo_sw/bbdev_turbo_software.c +155 -109
@@ -21,12 +21,6 @@#define DRIVER_NAME turbo_sw -/* Number of columns in sub-block interleaver (36.212, section 5.1.4.1.1) */ -#define C_SUBBLOCK (32) -#define MAX_TB_SIZE (391656) -#define MAX_CB_SIZE (6144) -#define MAX_KW (18528) -/* private data structure */ struct bbdev_private {unsigned int max_nb_queues;/**< Max number of queues */
@@ -47,6 +41,13 @@ static const char * const turbo_sw_valid_params[] = {TURBO_SW_SOCKET_ID_ARG }; +/* Turbo SW PMD logging ID */ +static int turbosw_pmd_logtype; + +/* Helper macro for logging */ +#define turbosw_pmd_log (level, fmt, ...) \ + rte_log(RTE_LOG_ ## level, turbosw_pmd_logtype, fmt "\n", ##__VA_ARGS__) +/* queue */ struct turbo_sw_queue {/* Ring for processed (encoded/decoded) operations which are ready to
@@ -79,7 +80,7 @@ compute_idx(uint16_t k) {int32_t result =0 ; -if (k <40 || k >MAX_CB_SIZE ) +if (k <RTE_BBDEV_MIN_CB_SIZE || k >RTE_BBDEV_MAX_CB_SIZE )return -1 ;if (k >2048 ) {
@@ -169,7 +170,7 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) dev_info->cpu_flag_reqs = &cpu_flag; dev_info->min_alignment =64 ; -rte_bbdev_log_debug ("got device info from %u\n" , dev->data->dev_id); +turbosw_pmd_log (DEBUG ,"got device info from %u\n" , dev->data->dev_id); }/* Release queue */
@@ -191,7 +192,7 @@ q_release(struct rte_bbdev *dev, uint16_t q_id) dev->data->queues[q_id].queue_private =NULL ; } -rte_bbdev_log_debug ("released device queue %u:%u" , +turbosw_pmd_log (DEBUG ,"released device queue %u:%u" , dev->data->dev_id, q_id);return 0 ; }
@@ -209,7 +210,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, q =rte_zmalloc_socket (RTE_STR (DRIVER_NAME ),sizeof (*q),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q ==NULL ) { -rte_bbdev_log (ERR ,"Failed to allocate queue memory" ); +turbosw_pmd_log (ERR ,"Failed to allocate queue memory" );return -ENOMEM ; }
@@ -217,16 +218,17 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, ret = snprintf(name, RTE_RING_NAMESIZE, RTE_STR(DRIVER_NAME)"_enc_out%u:%u", dev->data->dev_id, q_id);if ((ret <0 ) || (ret >= (int )RTE_RING_NAMESIZE )) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Creating queue name for device %u queue %u failed" , dev->data->dev_id, q_id);return -ENAMETOOLONG ; } q->enc_out =rte_zmalloc_socket (name, - ((MAX_TB_SIZE >>3 ) +3 ) *sizeof (*q->enc_out) *3 , + ((RTE_BBDEV_MAX_TB_SIZE >>3 ) +3 ) * +sizeof (*q->enc_out) *3 ,RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_out ==NULL ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Failed to allocate queue memory for %s" , name); goto free_q; }
@@ -236,16 +238,16 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, RTE_STR(DRIVER_NAME)"_enc_in%u:%u", dev->data->dev_id, q_id);if ((ret <0 ) || (ret >= (int )RTE_RING_NAMESIZE )) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Creating queue name for device %u queue %u failed" , dev->data->dev_id, q_id);return -ENAMETOOLONG ; } q->enc_in =rte_zmalloc_socket (name, - (MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in), + (RTE_BBDEV_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_in ==NULL ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Failed to allocate queue memory for %s" , name); goto free_q; }
@@ -254,16 +256,16 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, ret = snprintf(name, RTE_RING_NAMESIZE, RTE_STR(DRIVER_NAME)"_ag%u:%u", dev->data->dev_id, q_id);if ((ret <0 ) || (ret >= (int )RTE_RING_NAMESIZE )) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Creating queue name for device %u queue %u failed" , dev->data->dev_id, q_id);return -ENAMETOOLONG ; } q->ag =rte_zmalloc_socket (name, -MAX_CB_SIZE *10 *sizeof (*q->ag), +RTE_BBDEV_MAX_CB_SIZE *10 *sizeof (*q->ag),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->ag ==NULL ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Failed to allocate queue memory for %s" , name); goto free_q; }
@@ -272,7 +274,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, ret = snprintf(name, RTE_RING_NAMESIZE, RTE_STR(DRIVER_NAME)"_cb%u:%u", dev->data->dev_id, q_id);if ((ret <0 ) || (ret >= (int )RTE_RING_NAMESIZE )) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Creating queue name for device %u queue %u failed" , dev->data->dev_id, q_id);return -ENAMETOOLONG ;
@@ -281,7 +283,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, (6144 >>3 ) *sizeof (*q->code_block), RTE_CACHE_LINE_SIZE, queue_conf->socket);if (q->code_block ==NULL ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Failed to allocate queue memory for %s" , name); goto free_q; }
@@ -291,16 +293,16 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, RTE_STR(DRIVER_NAME)"_deint_input%u:%u", dev->data->dev_id, q_id);if ((ret <0 ) || (ret >= (int )RTE_RING_NAMESIZE )) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Creating queue name for device %u queue %u failed" , dev->data->dev_id, q_id);return -ENAMETOOLONG ; } q->deint_input =rte_zmalloc_socket (name, -MAX_KW *sizeof (*q->deint_input), +RTE_BBDEV_MAX_KW *sizeof (*q->deint_input),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->deint_input ==NULL ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Failed to allocate queue memory for %s" , name); goto free_q; }
@@ -310,16 +312,16 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, RTE_STR(DRIVER_NAME)"_deint_output%u:%u", dev->data->dev_id, q_id);if ((ret <0 ) || (ret >= (int )RTE_RING_NAMESIZE )) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Creating queue name for device %u queue %u failed" , dev->data->dev_id, q_id);return -ENAMETOOLONG ; } q->deint_output =rte_zmalloc_socket (NULL , -MAX_KW *sizeof (*q->deint_output), +RTE_BBDEV_MAX_KW *sizeof (*q->deint_output),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->deint_output ==NULL ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Failed to allocate queue memory for %s" , name); goto free_q; }
@@ -329,16 +331,16 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, RTE_STR(DRIVER_NAME)"_adapter_output%u:%u", dev->data->dev_id, q_id);if ((ret <0 ) || (ret >= (int )RTE_RING_NAMESIZE )) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Creating queue name for device %u queue %u failed" , dev->data->dev_id, q_id);return -ENAMETOOLONG ; } q->adapter_output =rte_zmalloc_socket (NULL , -MAX_CB_SIZE *6 *sizeof (*q->adapter_output), +RTE_BBDEV_MAX_CB_SIZE *6 *sizeof (*q->adapter_output),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->adapter_output ==NULL ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Failed to allocate queue memory for %s" , name); goto free_q; }
@@ -347,7 +349,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, ret = snprintf(name, RTE_RING_NAMESIZE, RTE_STR(DRIVER_NAME)"%u:%u", dev->data->dev_id, q_id);if ((ret <0 ) || (ret >= (int )RTE_RING_NAMESIZE )) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Creating queue name for device %u queue %u failed" , dev->data->dev_id, q_id);return -ENAMETOOLONG ;
@@ -355,14 +357,14 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, q->processed_pkts =rte_ring_create (name, queue_conf->queue_size, queue_conf->socket,RING_F_SP_ENQ |RING_F_SC_DEQ );if (q->processed_pkts ==NULL ) { -rte_bbdev_log (ERR ,"Failed to create ring for %s" , name); +turbosw_pmd_log (ERR ,"Failed to create ring for %s" , name); goto free_q; } q->type = queue_conf->op_type; dev->data->queues[q_id].queue_private = q; -rte_bbdev_log_debug ("setup device queue %s" , name); +turbosw_pmd_log (DEBUG ,"setup device queue %s" , name);return 0 ; free_q:
@@ -384,6 +386,7 @@ static const struct rte_bbdev_ops pmd_ops = { .queue_release = q_release }; +#ifdef RTE_LIBRTE_BBDEV_DEBUG /* Checks if the encoder input buffer is correct. * Returns 0 if it's valid, -1 otherwise. */
@@ -392,26 +395,28 @@ is_enc_input_valid(const uint16_t k, const int32_t k_idx, const uint16_t in_length) {if (k_idx <0 ) { -rte_bbdev_log (ERR ,"K Index is invalid" ); +turbosw_pmd_log (ERR ,"K Index is invalid" );return -1 ; }if (in_length - (k >>3 ) <0 ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Mismatch between input length (%u bytes) and K (%u bits)" , in_length, k);return -1 ; } -if (k >MAX_CB_SIZE ) { -rte_bbdev_log (ERR ,"CB size (%u) is too big, max: %d" , - k,MAX_CB_SIZE ); +if (k >RTE_BBDEV_MAX_CB_SIZE ) { +turbosw_pmd_log (ERR ,"CB size (%u) is too big, max: %d" , + k,RTE_BBDEV_MAX_CB_SIZE );return -1 ; }return 0 ; } +#endif +#ifdef RTE_LIBRTE_BBDEV_DEBUG /* Checks if the decoder input buffer is correct. * Returns 0 if it's valid, -1 otherwise. */
@@ -419,37 +424,43 @@ static inline int is_dec_input_valid(int32_t k_idx, int16_t kw, int16_t in_length) { if (k_idx < 0) { - rte_bbdev_log(ERR, "K index is invalid"); + turbosw_pmd_log(ERR, "K index is invalid");return -1 ; }if (in_length - kw <0 ) { -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Mismatch between input length (%u) and kw (%u)" , in_length, kw);return -1 ; } -if (kw >MAX_KW ) { -rte_bbdev_log (ERR ,"Input length (%u) is too big, max: %d" , - kw,MAX_KW ); +if (kw >RTE_BBDEV_MAX_KW ) { +turbosw_pmd_log (ERR ,"Input length (%u) is too big, max: %d" , + kw,RTE_BBDEV_MAX_KW );return -1 ; }return 0 ; } +#endif static inline void process_enc_cb (struct turbo_sw_queue *q,struct rte_bbdev_enc_op *op, -uint8_t cb_idx,uint8_t c,uint16_t k,uint16_t ncb, +uint8_t r,uint8_t c,uint16_t k,uint16_t ncb,uint32_t e,struct rte_mbuf *m_in,struct rte_mbuf *m_out,uint16_t in_offset,uint16_t out_offset,uint16_t total_left,struct rte_bbdev_stats *q_stats) { +#ifdef RTE_LIBRTE_BBDEV_DEBUG int ret; +#else +RTE_SET_USED (total_left); +#endif int16_t k_idx;uint16_t m;uint8_t *in, *out0, *out1, *out2, *tmp_out, *rm_out; +uint64_t first_3_bytes =0 ;struct rte_bbdev_op_turbo_enc *enc = &op->turbo_enc;struct bblib_crc_request crc_req;struct bblib_crc_response crc_resp;
@@ -469,73 +480,116 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,/* CRC24A (for TB) */ if ((enc->op_flags &RTE_BBDEV_TURBO_CRC_24A_ATTACH ) && (enc->code_block_mode ==1 )) { +#ifdef RTE_LIBRTE_BBDEV_DEBUG ret =is_enc_input_valid (k -24 , k_idx, total_left);if (ret !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ;return ; } -/* copy the input to the temporary buffer to be able to extend -* it by 3 CRC bytes -*/ -rte_memcpy (q->enc_in, in, (k -24 ) >>3 ); +#endif + crc_req.data = in; crc_req.len = (k -24 ) >>3 ; - crc_resp.data = q->enc_in; +/* Check if there is a room for CRC bits if not use +* the temporary buffer. +*/ +if (rte_pktmbuf_append (m_in,3 ) ==NULL ) { +rte_memcpy (q->enc_in, in, (k -24 ) >>3 ); + in = q->enc_in; + }else { +/* Store 3 first bytes of next CB as they will be +* overwritten by CRC bytes. If it is the last CB then +* there is no point to store 3 next bytes and this +* if..else branch will be omitted. +*/ + first_3_bytes = *((uint64_t *)&in[(k -32 ) >>3 ]); + } + crc_resp.data = in;#ifdef RTE_TEST_BBDEV start_time =rte_rdtsc_precise ();#endif -bblib_lte_crc24a_gen (&crc_req, &crc_resp); -#ifdef RTE_TEST_BBDEV q_stats->turbo_perf_time +=rte_rdtsc_precise () - start_time;#endif - - in = q->enc_in; }else if (enc->op_flags &RTE_BBDEV_TURBO_CRC_24B_ATTACH ) {/* CRC24B */ +#ifdef RTE_LIBRTE_BBDEV_DEBUG ret =is_enc_input_valid (k -24 , k_idx, total_left);if (ret !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ;return ; } -/* copy the input to the temporary buffer to be able to extend -* it by 3 CRC bytes -*/ -rte_memcpy (q->enc_in, in, (k -24 ) >>3 ); +#endif + crc_req.data = in; crc_req.len = (k -24 ) >>3 ; - crc_resp.data = q->enc_in; +/* Check if there is a room for CRC bits if this is the last +* CB in TB. If not use temporary buffer. +*/ +if ((c - r ==1 ) && (rte_pktmbuf_append (m_in,3 ) ==NULL )) { +rte_memcpy (q->enc_in, in, (k -24 ) >>3 ); + in = q->enc_in; + }else if (c - r >1 ) { +/* Store 3 first bytes of next CB as they will be +* overwritten by CRC bytes. If it is the last CB then +* there is no point to store 3 next bytes and this +* if..else branch will be omitted. +*/ + first_3_bytes = *((uint64_t *)&in[(k -32 ) >>3 ]); + } + crc_resp.data = in;#ifdef RTE_TEST_BBDEV start_time =rte_rdtsc_precise ();#endif -bblib_lte_crc24b_gen (&crc_req, &crc_resp); -#ifdef RTE_TEST_BBDEV q_stats->turbo_perf_time +=rte_rdtsc_precise () - start_time;#endif - - in = q->enc_in; - }else { + } +#ifdef RTE_LIBRTE_BBDEV_DEBUG + else { ret =is_enc_input_valid (k, k_idx, total_left);if (ret !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ;return ; } } +#endif /* Turbo encoder */ /* Each bit layer output from turbo encoder is (k+4) bits long, i.e. * input length + 4 tail bits. That's (k/8) + 1 bytes after rounding up. * So dst_data's length should be 3*(k/8) + 3 bytes. +* In Rate-matching bypass case outputs pointers passed to encoder +* (out0, out1 and out2) can directly point to addresses of output from +* turbo_enc entity. */ - out0 = q->enc_out; - out1 =RTE_PTR_ADD (out0, (k >>3 ) +1 ); - out2 =RTE_PTR_ADD (out1, (k >>3 ) +1 ); +if (enc->op_flags &RTE_BBDEV_TURBO_RATE_MATCH ) { + out0 = q->enc_out; + out1 =RTE_PTR_ADD (out0, (k >>3 ) +1 ); + out2 =RTE_PTR_ADD (out1, (k >>3 ) +1 ); + }else { + out0 = (uint8_t *)rte_pktmbuf_append (m_out, (k >>3 ) *3 +2 ); +if (out0 ==NULL ) { + op->status |=1 <<RTE_BBDEV_DATA_ERROR ; +turbosw_pmd_log (ERR , +"Too little space in output mbuf" ); +return ; + } + enc->output.length += (k >>3 ) *3 +2 ; +/* rte_bbdev_op_data.offset can be different than the +* offset of the appended bytes +*/ + out0 = rte_pktmbuf_mtod_offset(m_out, uint8_t *, out_offset); + out1 = rte_pktmbuf_mtod_offset(m_out, uint8_t *, + out_offset + (k >>3 ) +1 ); + out2 = rte_pktmbuf_mtod_offset(m_out, uint8_t *, + out_offset +2 * ((k >>3 ) +1 )); + } turbo_req.case_id = k_idx; turbo_req.input_win = in;
@@ -550,7 +604,7 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,if (bblib_turbo_encoder (&turbo_req, &turbo_resp) !=0 ) { op->status |=1 <<RTE_BBDEV_DRV_ERROR ; -rte_bbdev_log (ERR ,"Turbo Encoder failed" ); +turbosw_pmd_log (ERR ,"Turbo Encoder failed" );return ; }
@@ -558,13 +612,17 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op, q_stats->turbo_perf_time +=rte_rdtsc_precise () - start_time;#endif +/* Restore 3 first bytes of next CB if they were overwritten by CRC*/ +if (first_3_bytes !=0 ) + *((uint64_t *)&in[(k -32 ) >>3 ]) = first_3_bytes; +/* Rate-matching */ if (enc->op_flags &RTE_BBDEV_TURBO_RATE_MATCH ) {/* get output data starting address */ rm_out = (uint8_t *)rte_pktmbuf_append (m_out, (e >>3 ));if (rm_out ==NULL ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ; -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Too little space in output mbuf" );return ; }
@@ -574,7 +632,7 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op, rm_out = rte_pktmbuf_mtod_offset(m_out, uint8_t *, out_offset);/* index of current code block */ - rm_req.r = cb_idx; + rm_req.r = r;/* total number of code block */ rm_req.C = c;/* For DL - 1, UL - 0 */
@@ -613,7 +671,7 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,if (bblib_rate_match_dl (&rm_req, &rm_resp) !=0 ) { op->status |=1 <<RTE_BBDEV_DRV_ERROR ; -rte_bbdev_log (ERR ,"Rate matching failed" ); +turbosw_pmd_log (ERR ,"Rate matching failed" );return ; }
@@ -644,23 +702,6 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op, tmp_out++; } *tmp_out =0 ; - -/* copy shifted output to turbo_enc entity */ - out0 = (uint8_t *)rte_pktmbuf_append (m_out, - (k >>3 ) *3 +2 ); -if (out0 ==NULL ) { - op->status |=1 <<RTE_BBDEV_DATA_ERROR ; -rte_bbdev_log (ERR , -"Too little space in output mbuf" ); -return ; - } - enc->output.length += (k >>3 ) *3 +2 ; -/* rte_bbdev_op_data.offset can be different than the -* offset of the appended bytes -*/ - out0 = rte_pktmbuf_mtod_offset(m_out, uint8_t *, - out_offset); -rte_memcpy (out0, q->enc_out, (k >>3 ) *3 +2 ); } }
@@ -681,15 +722,15 @@ enqueue_enc_one_op(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,/* Clear op status */ op->status =0 ; -if (total_left >MAX_TB_SIZE >>3 ) { -rte_bbdev_log (ERR ,"TB size (%u) is too big, max: %d" , - total_left,MAX_TB_SIZE ); +if (total_left >RTE_BBDEV_MAX_TB_SIZE >>3 ) { +turbosw_pmd_log (ERR ,"TB size (%u) is too big, max: %d" , + total_left,RTE_BBDEV_MAX_TB_SIZE ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }if (m_in ==NULL || m_out ==NULL ) { -rte_bbdev_log (ERR ,"Invalid mbuf pointer" ); +turbosw_pmd_log (ERR ,"Invalid mbuf pointer" ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -737,7 +778,7 @@ enqueue_enc_one_op(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,/* check if all input data was processed */ if (total_left !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ; -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Mismatch between mbuf length and included CBs sizes" ); } }
@@ -772,11 +813,11 @@ remove_nulls_from_circular_buf(const uint8_t *in, uint8_t *out, uint16_t k,const uint32_t d = k +4 ;const uint32_t kw = (ncb /3 );const uint32_t nd = kw - d; -const uint32_t r_subblock = kw /C_SUBBLOCK ; +const uint32_t r_subblock = kw /RTE_BBDEV_C_SUBBLOCK ;/* Inter-column permutation pattern */ -const uint32_t P [C_SUBBLOCK ] = {0 ,16 ,8 ,24 ,4 ,20 ,12 ,28 ,2 ,18 ,10 , -26 ,6 ,22 ,14 ,30 ,1 ,17 ,9 ,25 ,5 ,21 ,13 ,29 ,3 ,19 , -11 ,27 ,7 ,23 ,15 ,31 }; +const uint32_t P [RTE_BBDEV_C_SUBBLOCK ] = {0 ,16 ,8 ,24 ,4 ,20 ,12 ,28 , +2 ,18 ,10 ,26 ,6 ,22 ,14 ,30 ,1 ,17 ,9 ,25 ,5 ,21 ,13 , +29 ,3 ,19 ,11 ,27 ,7 ,23 ,15 ,31 }; in_idx =0 ; out_idx =0 ;
@@ -857,7 +898,11 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op, struct rte_mbuf *m_out, uint16_t in_offset, uint16_t out_offset, bool check_crc_24b, uint16_t total_left) { +#ifdef RTE_LIBRTE_BBDEV_DEBUG int ret; +#else +RTE_SET_USED (total_left); +#endif int32_t k_idx;int32_t iter_cnt;uint8_t *in, *out, *adapter_input;
@@ -870,11 +915,13 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op, k_idx =compute_idx (k); +#ifdef RTE_LIBRTE_BBDEV_DEBUG ret =is_dec_input_valid (k_idx, kw, total_left);if (ret !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ;return ; } +#endif in = rte_pktmbuf_mtod_offset(m_in, uint8_t *, in_offset); ncb = kw;
@@ -904,7 +951,7 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op, adapter_req.isinverted =0 ; else { op->status |=1 <<RTE_BBDEV_DRV_ERROR ; -rte_bbdev_log (ERR ,"LLR format wasn't specified" ); +turbosw_pmd_log (ERR ,"LLR format wasn't specified" );return ; }
@@ -916,7 +963,7 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op, out = (uint8_t *)rte_pktmbuf_append (m_out, (k >>3 ));if (out ==NULL ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ; -rte_bbdev_log (ERR ,"Too little space in output mbuf" ); +turbosw_pmd_log (ERR ,"Too little space in output mbuf" );return ; }/* rte_bbdev_op_data.offset can be different than the offset of the
@@ -945,7 +992,7 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op, dec->iter_count =RTE_MAX (iter_cnt, dec->iter_count); }else { op->status |=1 <<RTE_BBDEV_DATA_ERROR ; -rte_bbdev_log (ERR ,"Turbo Decoder failed" ); +turbosw_pmd_log (ERR ,"Turbo Decoder failed" );return ; } }
@@ -966,7 +1013,7 @@ enqueue_dec_one_op(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op) op->status =0 ;if (m_in ==NULL || m_out ==NULL ) { -rte_bbdev_log (ERR ,"Invalid mbuf pointer" ); +turbosw_pmd_log (ERR ,"Invalid mbuf pointer" ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -993,7 +1040,7 @@ enqueue_dec_one_op(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op)* where D is the size of each output from turbo encoder block * (k + 4). */ - kw =RTE_ALIGN_CEIL (k +4 ,C_SUBBLOCK ) *3 ; + kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_C_SUBBLOCK ) *3 ; process_dec_cb(q, op, c, k, kw, m_in, m_out, in_offset, out_offset, check_bit(dec->op_flags,
@@ -1012,7 +1059,7 @@ enqueue_dec_one_op(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op) }if (total_left !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ; -rte_bbdev_log (ERR , +turbosw_pmd_log (ERR ,"Mismatch between mbuf length and included Circular buffer sizes" ); } }
@@ -1102,7 +1149,7 @@ parse_u16_arg(const char *key, const char *value, void *extra_args) errno =0 ; result =strtoul (value,NULL ,0 );if ((result >= (1 <<16 )) || (errno !=0 )) { -rte_bbdev_log (ERR ,"Invalid value %lu for %s" , result, key); +turbosw_pmd_log (ERR ,"Invalid value %lu for %s" , result, key);return -ERANGE ; } *u16 = (uint16_t )result;
@@ -1134,7 +1181,7 @@ parse_turbo_sw_params(struct turbo_sw_params *params, const char *input_args) goto exit;if (params->socket_id >=RTE_MAX_NUMA_NODES ) { -rte_bbdev_log (ERR ,"Invalid socket, must be < %u" , +turbosw_pmd_log (ERR ,"Invalid socket, must be < %u" ,RTE_MAX_NUMA_NODES ); goto exit; }
@@ -1202,7 +1249,7 @@ turbo_sw_bbdev_probe(struct rte_vdev_device *vdev) input_args =rte_vdev_device_args (vdev);parse_turbo_sw_params (&init_params, input_args); -rte_bbdev_log_debug ( +turbosw_pmd_log (DEBUG ,"Initialising %s on NUMA node %d with max queues: %d\n" , name, init_params.socket_id, init_params.queues_num);
@@ -1242,12 +1289,11 @@ RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME,TURBO_SW_MAX_NB_QUEUES_ARG "=<int> " TURBO_SW_SOCKET_ID_ARG"=<int>"); -int bbdev_logtype;RTE_INIT (null_bbdev_init_log);static void null_bbdev_init_log (void ) { - bbdev_logtype =rte_log_register ("pmd.bbdev.turbo_sw" ); -if (bbdev_logtype >=0 ) -rte_log_set_level (bbdev_logtype,RTE_LOG_NOTICE ); + turbosw_pmd_logtype =rte_log_register ("pmd.bbdev.turbo_sw" ); +if (turbosw_pmd_logtype >=0 ) +rte_log_set_level (turbosw_pmd_logtype,RTE_LOG_NOTICE ); }
lib/librte_bbdev/rte_bbdev_op.h +17 -1
@@ -25,7 +25,23 @@ extern "C" {#include <rte_memory.h> #include <rte_mempool.h> -#define RTE_BBDEV_MAX_CODE_BLOCKS 64 +/* Number of columns in sub-block interleaver (36.212, section 5.1.4.1.1) */ +#define RTE_BBDEV_C_SUBBLOCK (32) +/* Maximum size of Transport Block (36.213, Table, Table 7.1.7.2.5-1) */ +#define RTE_BBDEV_MAX_TB_SIZE (391656) +/* Maximum size of Code Block (36.212, Table 5.1.3-3) */ +#define RTE_BBDEV_MAX_CB_SIZE (6144) +/* Minimum size of Code Block (36.212, Table 5.1.3-3) */ +#define RTE_BBDEV_MIN_CB_SIZE (40) +/* Maximum size of circular buffer */ +#define RTE_BBDEV_MAX_KW (18528) +/* +* Maximum number of Code Blocks in Transport Block. It is calculated based on +* maximum size of one Code Block and one Transport Block (considering CRC24A +* and CRC24B): +* (391656 + 24) / (6144 - 24) = 64 +*/ +#define RTE_BBDEV_MAX_CODE_BLOCKS (64)/** Flags for turbo decoder operation and capability structure */ enum rte_bbdev_op_td_flag_bitmasks {
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH] baseband/turbo_sw: optimization of turbo software driver
Quoted 10 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] baseband/turbo_sw: optimization of turbo software driver
Quoted 7 lines
From: "Chalupnik, KamilX" <[email protected]>
Optimization of Turbo Software driver:
- resource-hungry piece of code removed or optimized
- validation of decoder/encoder parameters put under debug flagSigned-off-by KamilX Chalupnik <[email protected]>
Hi Kamil,
Patch fails to apply. A conflict at line 21 in bbdev_turbo_software.c. Probably it's outdated. An updated patch may solve the problem.
Thanks,
Amr
PATCH v2 1/1 baseband/turbo_sw: optimization of turbo software driver
In reply to KamilX ChalupnikOptimization of Turbo Software driver:
- resource-hungry piece of code removed or optimized
- validation of decoder/encoder parameters put under debug flug
v2:
- logging macros fixed
--- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 170 ++++++++++++++--------- lib/librte_bbdev/rte_bbdev_op.h | 18 ++- 2 files changed, 122 insertions(+), 66 deletions(-)
drivers/baseband/turbo_sw/bbdev_turbo_software.c +105 -65
@@ -33,12 +33,6 @@ static int bbdev_turbo_sw_logtype; rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ ##__VA_ARGS__) -/* Number of columns in sub-block interleaver (36.212, section 5.1.4.1.1) */ -#define C_SUBBLOCK (32) -#define MAX_TB_SIZE (391656) -#define MAX_CB_SIZE (6144) -#define MAX_KW (18528) - /* private data structure */struct bbdev_private {unsigned int max_nb_queues;/**< Max number of queues */
@@ -91,7 +85,7 @@ compute_idx(uint16_t k) {int32_t result =0 ; -if (k <40 || k >MAX_CB_SIZE ) +if (k <RTE_BBDEV_MIN_CB_SIZE || k >RTE_BBDEV_MAX_CB_SIZE )return -1 ;if (k >2048 ) {
@@ -235,7 +229,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,return -ENAMETOOLONG ; } q->enc_out =rte_zmalloc_socket (name, - ((MAX_TB_SIZE >>3 ) +3 ) *sizeof (*q->enc_out) *3 , + ((RTE_BBDEV_MAX_TB_SIZE >>3 ) +3 ) * +sizeof (*q->enc_out) *3 ,RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_out ==NULL ) { rte_bbdev_log(ERR,
@@ -254,7 +249,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,return -ENAMETOOLONG ; } q->enc_in =rte_zmalloc_socket (name, - (MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in), + (RTE_BBDEV_MAX_CB_SIZE >>3 ) *sizeof (*q->enc_in),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->enc_in ==NULL ) { rte_bbdev_log(ERR,
@@ -272,7 +267,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,return -ENAMETOOLONG ; } q->ag =rte_zmalloc_socket (name, -MAX_CB_SIZE *10 *sizeof (*q->ag), +RTE_BBDEV_MAX_CB_SIZE *10 *sizeof (*q->ag),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->ag ==NULL ) { rte_bbdev_log(ERR,
@@ -309,7 +304,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,return -ENAMETOOLONG ; } q->deint_input =rte_zmalloc_socket (name, -MAX_KW *sizeof (*q->deint_input), +RTE_BBDEV_MAX_KW *sizeof (*q->deint_input),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->deint_input ==NULL ) { rte_bbdev_log(ERR,
@@ -328,7 +323,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,return -ENAMETOOLONG ; } q->deint_output =rte_zmalloc_socket (NULL , -MAX_KW *sizeof (*q->deint_output), +RTE_BBDEV_MAX_KW *sizeof (*q->deint_output),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->deint_output ==NULL ) { rte_bbdev_log(ERR,
@@ -347,7 +342,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,return -ENAMETOOLONG ; } q->adapter_output =rte_zmalloc_socket (NULL , -MAX_CB_SIZE *6 *sizeof (*q->adapter_output), +RTE_BBDEV_MAX_CB_SIZE *6 *sizeof (*q->adapter_output),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q->adapter_output ==NULL ) { rte_bbdev_log(ERR,
@@ -396,6 +391,7 @@ static const struct rte_bbdev_ops pmd_ops = { .queue_release = q_release }; +#ifdef RTE_LIBRTE_BBDEV_DEBUG /* Checks if the encoder input buffer is correct. * Returns 0 if it's valid, -1 otherwise. */
@@ -415,15 +411,17 @@ is_enc_input_valid(const uint16_t k, const int32_t k_idx, return -1; } -if (k >MAX_CB_SIZE ) { +if (k >RTE_BBDEV_MAX_CB_SIZE ) {rte_bbdev_log (ERR ,"CB size (%u) is too big, max: %d" , - k,MAX_CB_SIZE ); + k,RTE_BBDEV_MAX_CB_SIZE );return -1 ; }return 0 ; } +#endif +#ifdef RTE_LIBRTE_BBDEV_DEBUG /* Checks if the decoder input buffer is correct. * Returns 0 if it's valid, -1 otherwise. */
@@ -442,26 +440,32 @@ is_dec_input_valid(int32_t k_idx, int16_t kw, int16_t in_length) return -1; } -if (kw >MAX_KW ) { +if (kw >RTE_BBDEV_MAX_KW ) {rte_bbdev_log (ERR ,"Input length (%u) is too big, max: %d" , - kw,MAX_KW ); + kw,RTE_BBDEV_MAX_KW );return -1 ; }return 0 ; } +#endif static inline void process_enc_cb (struct turbo_sw_queue *q,struct rte_bbdev_enc_op *op, -uint8_t cb_idx,uint8_t c,uint16_t k,uint16_t ncb, +uint8_t r,uint8_t c,uint16_t k,uint16_t ncb,uint32_t e,struct rte_mbuf *m_in,struct rte_mbuf *m_out,uint16_t in_offset,uint16_t out_offset,uint16_t total_left,struct rte_bbdev_stats *q_stats) { +#ifdef RTE_LIBRTE_BBDEV_DEBUG int ret; +#else +RTE_SET_USED (total_left); +#endif int16_t k_idx;uint16_t m;uint8_t *in, *out0, *out1, *out2, *tmp_out, *rm_out; +uint64_t first_3_bytes =0 ;struct rte_bbdev_op_turbo_enc *enc = &op->turbo_enc;struct bblib_crc_request crc_req;struct bblib_crc_response crc_resp;
@@ -481,73 +485,116 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,/* CRC24A (for TB) */ if ((enc->op_flags &RTE_BBDEV_TURBO_CRC_24A_ATTACH ) && (enc->code_block_mode ==1 )) { +#ifdef RTE_LIBRTE_BBDEV_DEBUG ret =is_enc_input_valid (k -24 , k_idx, total_left);if (ret !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ;return ; } -/* copy the input to the temporary buffer to be able to extend -* it by 3 CRC bytes -*/ -rte_memcpy (q->enc_in, in, (k -24 ) >>3 ); +#endif + crc_req.data = in; crc_req.len = (k -24 ) >>3 ; - crc_resp.data = q->enc_in; +/* Check if there is a room for CRC bits if not use +* the temporary buffer. +*/ +if (rte_pktmbuf_append (m_in,3 ) ==NULL ) { +rte_memcpy (q->enc_in, in, (k -24 ) >>3 ); + in = q->enc_in; + }else { +/* Store 3 first bytes of next CB as they will be +* overwritten by CRC bytes. If it is the last CB then +* there is no point to store 3 next bytes and this +* if..else branch will be omitted. +*/ + first_3_bytes = *((uint64_t *)&in[(k -32 ) >>3 ]); + } + crc_resp.data = in;#ifdef RTE_TEST_BBDEV start_time =rte_rdtsc_precise ();#endif -bblib_lte_crc24a_gen (&crc_req, &crc_resp); -#ifdef RTE_TEST_BBDEV q_stats->turbo_perf_time +=rte_rdtsc_precise () - start_time;#endif - - in = q->enc_in; }else if (enc->op_flags &RTE_BBDEV_TURBO_CRC_24B_ATTACH ) {/* CRC24B */ +#ifdef RTE_LIBRTE_BBDEV_DEBUG ret =is_enc_input_valid (k -24 , k_idx, total_left);if (ret !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ;return ; } -/* copy the input to the temporary buffer to be able to extend -* it by 3 CRC bytes -*/ -rte_memcpy (q->enc_in, in, (k -24 ) >>3 ); +#endif + crc_req.data = in; crc_req.len = (k -24 ) >>3 ; - crc_resp.data = q->enc_in; +/* Check if there is a room for CRC bits if this is the last +* CB in TB. If not use temporary buffer. +*/ +if ((c - r ==1 ) && (rte_pktmbuf_append (m_in,3 ) ==NULL )) { +rte_memcpy (q->enc_in, in, (k -24 ) >>3 ); + in = q->enc_in; + }else if (c - r >1 ) { +/* Store 3 first bytes of next CB as they will be +* overwritten by CRC bytes. If it is the last CB then +* there is no point to store 3 next bytes and this +* if..else branch will be omitted. +*/ + first_3_bytes = *((uint64_t *)&in[(k -32 ) >>3 ]); + } + crc_resp.data = in;#ifdef RTE_TEST_BBDEV start_time =rte_rdtsc_precise ();#endif -bblib_lte_crc24b_gen (&crc_req, &crc_resp); -#ifdef RTE_TEST_BBDEV q_stats->turbo_perf_time +=rte_rdtsc_precise () - start_time;#endif - - in = q->enc_in; - }else { + } +#ifdef RTE_LIBRTE_BBDEV_DEBUG + else { ret =is_enc_input_valid (k, k_idx, total_left);if (ret !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ;return ; } } +#endif /* Turbo encoder */ /* Each bit layer output from turbo encoder is (k+4) bits long, i.e. * input length + 4 tail bits. That's (k/8) + 1 bytes after rounding up. * So dst_data's length should be 3*(k/8) + 3 bytes. +* In Rate-matching bypass case outputs pointers passed to encoder +* (out0, out1 and out2) can directly point to addresses of output from +* turbo_enc entity. */ - out0 = q->enc_out; - out1 =RTE_PTR_ADD (out0, (k >>3 ) +1 ); - out2 =RTE_PTR_ADD (out1, (k >>3 ) +1 ); +if (enc->op_flags &RTE_BBDEV_TURBO_RATE_MATCH ) { + out0 = q->enc_out; + out1 =RTE_PTR_ADD (out0, (k >>3 ) +1 ); + out2 =RTE_PTR_ADD (out1, (k >>3 ) +1 ); + }else { + out0 = (uint8_t *)rte_pktmbuf_append (m_out, (k >>3 ) *3 +2 ); +if (out0 ==NULL ) { + op->status |=1 <<RTE_BBDEV_DATA_ERROR ; +rte_bbdev_log (ERR , +"Too little space in output mbuf" ); +return ; + } + enc->output.length += (k >>3 ) *3 +2 ; +/* rte_bbdev_op_data.offset can be different than the +* offset of the appended bytes +*/ + out0 = rte_pktmbuf_mtod_offset(m_out, uint8_t *, out_offset); + out1 = rte_pktmbuf_mtod_offset(m_out, uint8_t *, + out_offset + (k >>3 ) +1 ); + out2 = rte_pktmbuf_mtod_offset(m_out, uint8_t *, + out_offset +2 * ((k >>3 ) +1 )); + } turbo_req.case_id = k_idx; turbo_req.input_win = in;
@@ -570,6 +617,10 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op, q_stats->turbo_perf_time +=rte_rdtsc_precise () - start_time;#endif +/* Restore 3 first bytes of next CB if they were overwritten by CRC*/ +if (first_3_bytes !=0 ) + *((uint64_t *)&in[(k -32 ) >>3 ]) = first_3_bytes; +/* Rate-matching */ if (enc->op_flags &RTE_BBDEV_TURBO_RATE_MATCH ) {/* get output data starting address */
@@ -586,7 +637,7 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op, rm_out = rte_pktmbuf_mtod_offset(m_out, uint8_t *, out_offset);/* index of current code block */ - rm_req.r = cb_idx; + rm_req.r = r;/* total number of code block */ rm_req.C = c;/* For DL - 1, UL - 0 */
@@ -656,23 +707,6 @@ process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op, tmp_out++; } *tmp_out =0 ; - -/* copy shifted output to turbo_enc entity */ - out0 = (uint8_t *)rte_pktmbuf_append (m_out, - (k >>3 ) *3 +2 ); -if (out0 ==NULL ) { - op->status |=1 <<RTE_BBDEV_DATA_ERROR ; -rte_bbdev_log (ERR , -"Too little space in output mbuf" ); -return ; - } - enc->output.length += (k >>3 ) *3 +2 ; -/* rte_bbdev_op_data.offset can be different than the -* offset of the appended bytes -*/ - out0 = rte_pktmbuf_mtod_offset(m_out, uint8_t *, - out_offset); -rte_memcpy (out0, q->enc_out, (k >>3 ) *3 +2 ); } }
@@ -693,9 +727,9 @@ enqueue_enc_one_op(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op,/* Clear op status */ op->status =0 ; -if (total_left >MAX_TB_SIZE >>3 ) { +if (total_left >RTE_BBDEV_MAX_TB_SIZE >>3 ) {rte_bbdev_log (ERR ,"TB size (%u) is too big, max: %d" , - total_left,MAX_TB_SIZE ); + total_left,RTE_BBDEV_MAX_TB_SIZE ); op->status =1 <<RTE_BBDEV_DATA_ERROR ;return ; }
@@ -784,11 +818,11 @@ remove_nulls_from_circular_buf(const uint8_t *in, uint8_t *out, uint16_t k,const uint32_t d = k +4 ;const uint32_t kw = (ncb /3 );const uint32_t nd = kw - d; -const uint32_t r_subblock = kw /C_SUBBLOCK ; +const uint32_t r_subblock = kw /RTE_BBDEV_C_SUBBLOCK ;/* Inter-column permutation pattern */ -const uint32_t P [C_SUBBLOCK ] = {0 ,16 ,8 ,24 ,4 ,20 ,12 ,28 ,2 ,18 ,10 , -26 ,6 ,22 ,14 ,30 ,1 ,17 ,9 ,25 ,5 ,21 ,13 ,29 ,3 ,19 , -11 ,27 ,7 ,23 ,15 ,31 }; +const uint32_t P [RTE_BBDEV_C_SUBBLOCK ] = {0 ,16 ,8 ,24 ,4 ,20 ,12 ,28 , +2 ,18 ,10 ,26 ,6 ,22 ,14 ,30 ,1 ,17 ,9 ,25 ,5 ,21 ,13 , +29 ,3 ,19 ,11 ,27 ,7 ,23 ,15 ,31 }; in_idx =0 ; out_idx =0 ;
@@ -869,7 +903,11 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op, struct rte_mbuf *m_out, uint16_t in_offset, uint16_t out_offset, bool check_crc_24b, uint16_t total_left) { +#ifdef RTE_LIBRTE_BBDEV_DEBUG int ret; +#else +RTE_SET_USED (total_left); +#endif int32_t k_idx;int32_t iter_cnt;uint8_t *in, *out, *adapter_input;
@@ -882,11 +920,13 @@ process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op, k_idx =compute_idx (k); +#ifdef RTE_LIBRTE_BBDEV_DEBUG ret =is_dec_input_valid (k_idx, kw, total_left);if (ret !=0 ) { op->status |=1 <<RTE_BBDEV_DATA_ERROR ;return ; } +#endif in = rte_pktmbuf_mtod_offset(m_in, uint8_t *, in_offset); ncb = kw;
@@ -1005,7 +1045,7 @@ enqueue_dec_one_op(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op)* where D is the size of each output from turbo encoder block * (k + 4). */ - kw =RTE_ALIGN_CEIL (k +4 ,C_SUBBLOCK ) *3 ; + kw =RTE_ALIGN_CEIL (k +4 ,RTE_BBDEV_C_SUBBLOCK ) *3 ; process_dec_cb(q, op, c, k, kw, m_in, m_out, in_offset, out_offset, check_bit(dec->op_flags,
lib/librte_bbdev/rte_bbdev_op.h +17 -1
@@ -25,7 +25,23 @@ extern "C" {#include <rte_memory.h> #include <rte_mempool.h> -#define RTE_BBDEV_MAX_CODE_BLOCKS 64 +/* Number of columns in sub-block interleaver (36.212, section 5.1.4.1.1) */ +#define RTE_BBDEV_C_SUBBLOCK (32) +/* Maximum size of Transport Block (36.213, Table, Table 7.1.7.2.5-1) */ +#define RTE_BBDEV_MAX_TB_SIZE (391656) +/* Maximum size of Code Block (36.212, Table 5.1.3-3) */ +#define RTE_BBDEV_MAX_CB_SIZE (6144) +/* Minimum size of Code Block (36.212, Table 5.1.3-3) */ +#define RTE_BBDEV_MIN_CB_SIZE (40) +/* Maximum size of circular buffer */ +#define RTE_BBDEV_MAX_KW (18528) +/* +* Maximum number of Code Blocks in Transport Block. It is calculated based on +* maximum size of one Code Block and one Transport Block (considering CRC24A +* and CRC24B): +* (391656 + 24) / (6144 - 24) = 64 +*/ +#define RTE_BBDEV_MAX_CODE_BLOCKS (64)/** Flags for turbo decoder operation and capability structure */ enum rte_bbdev_op_td_flag_bitmasks {
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH v2] baseband/turbo_sw: optimization of turbo software driver
Quoted 10 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Tuesday 17 April 2018 15:34
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH v2] baseband/turbo_sw: optimization of turbo software driver
Quoted 5 lines
Optimization of Turbo Software driver:
- resource-hungry piece of code removed or optimized
- validation of decoder/encoder parameters put under debug flugSigned-off-by KamilX Chalupnik <[email protected]>
There is a dependency between (baseband/turbo_sw) patches. Should be applied in this order:
1. baseband/turbo_sw: splitting Queue Groups
2. baseband/turbo_sw: offload cost measurement test
3. baseband/turbo_sw: optimization of turbo software driver
4. baseband/turbo_sw: update Turbo Software driver
Re: [PATCH v2] baseband/turbo_sw: optimization of turbo software driver
In reply to KamilX ChalupnikQuoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:34 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: optimization of turbo software driver
Optimization of the driver is not a good title, in my opinion.
Instead, call out what you are actually changing.
You should separate this patch into two patches, based on the two bullet points below.
Quoted 5 lines
Optimization of Turbo Software driver:
- resource-hungry piece of code removed or optimized
- validation of decoder/encoder parameters put under debug flug
...
Quoted 2 lines
+#ifdef
RTE_LIBRTE_BBDEV_DEBUG
Where is this macro defined?
In DPDK we are avoiding the use of compile time options when possible,
so it is a better idea to use a runtime option to avoid the execution of part of the code (passed through device configuration maybe?). Otherwise, compilation checking gets more difficult.
A message that is not in the archive (sent off-list or not yet received): EEA9FF629BF25B47BD67ADE995041EE23CF5C650@IRSMSX103.ger.corp.intel.com
Re: [PATCH v2] baseband/turbo_sw: optimization of turbo software driver
Hi,
Quoted 57 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday, April 25, 2018 10:41 AM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] baseband/turbo_sw: optimization of turbo software driverQuoted 21 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday, April 24, 2018 7:54 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] baseband/turbo_sw: optimization of turbo software driverQuoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:34 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: optimization of turbo software driverQuoted 5 lines
Optimization of the driver is not a good title, in my opinion. Instead, call out what you are actually changing.
You should separate this patch into two patches, based on the two bullet points below.Ok, I will separate it and change the title.
Quoted 9 lines
Quoted 5 lines
Optimization of Turbo Software driver:
- resource-hungry piece of code removed or optimized
- validation of decoder/encoder parameters put under debug flug...
Quoted 1 line
Quoted 8 lines
Quoted 1 line
+#ifdef
RTE_LIBRTE_BBDEV_DEBUGWhere is this macro defined?
In DPDK we are avoiding the use of compile time options when possible, so it is a better idea to use a runtime option to avoid the execution of part of the code (passed through device configuration maybe?). Otherwise, compilation checking gets more difficult.
Quoted 3 lines
It seems that I missed one change. I thought it was added in previous release
RTE_LIBRTE_BBDEV_DEBUGwill be defined in config/common_base.
Are you ok with that?
These kind of compilation flags are not accepted in DPDK anymore, as they hide compilation issues.
If you want to have a different path for debugging, you should use run-time flags, passed to the device configuration (I'd say through devargs).
Thanks,
Pablo
PATCH 1/1 baseband/turbo_sw: splitting Queue Groups
In reply to KamilX ChalupnikFrom: "Chalupnik, KamilX" <[email protected]>
Splitting Queue Groups into UL/DL Groups in Turbo Software Driver. The are independent for Decode/Encode
--- app/test-bbdev/test_bbdev.c | 29 ++++++++------------ drivers/baseband/null/bbdev_null.c | 35 +++++++++++------------- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 3 +- lib/librte_bbdev/rte_bbdev.c | 13 +++++++-- lib/librte_bbdev/rte_bbdev.h | 6 ++-- 5 files changed, 44 insertions(+), 42 deletions(-)
app/test-bbdev/test_bbdev.c +11 -18
@@ -273,7 +273,7 @@ test_bbdev_configure_stop_queue(void)/* Valid queue configuration */ ts_params->qconf.queue_size = info.drv.queue_size_lim; - ts_params->qconf.priority = info.drv.max_queue_priority; + ts_params->qconf.priority = info.drv.max_ul_queue_priority;/* Device - started; queue - started */ rte_bbdev_start (dev_id);
@@ -413,14 +413,7 @@ test_bbdev_configure_invalid_queue_configure(void) ts_params->qconf.queue_size); ts_params->qconf.queue_size = info.drv.queue_size_lim; - ts_params->qconf.priority = info.drv.max_queue_priority +1 ; -TEST_ASSERT_FAIL (rte_bbdev_queue_configure (dev_id, queue_id, - &ts_params->qconf), -"Failed test for rte_bbdev_queue_configure: " -"invalid value qconf.queue_size: %u" , - ts_params->qconf.queue_size); - - ts_params->qconf.priority = info.drv.max_queue_priority; + ts_params->qconf.priority = info.drv.max_ul_queue_priority; queue_id = info.num_queues; TEST_ASSERT_FAIL(rte_bbdev_queue_configure(dev_id, queue_id, &ts_params->qconf),
@@ -902,12 +895,12 @@ test_bbdev_callback(void) "Failed to callback rgstr for RTE_BBDEV_EVENT_UNKNOWN");rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_UNKNOWN " );rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_ERROR ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process: " "event RTE_BBDEV_EVENT_ERROR was not registered " );
@@ -926,12 +919,12 @@ test_bbdev_callback(void) event_status =-1 ;rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_UNKNOWN " );rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_ERROR ,NULL ); -TEST_ASSERT (event_status ==1 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_ERROR ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_ERROR " );
@@ -945,12 +938,12 @@ test_bbdev_callback(void) event_status =-1 ;rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_UNKNOWN " );rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_ERROR ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process: " "event RTE_BBDEV_EVENT_ERROR was unregistered " );
@@ -999,7 +992,7 @@ test_bbdev_callback(void) "for RTE_BBDEV_EVENT_ERROR ");rte_bbdev_pmd_callback_process (dev2,RTE_BBDEV_EVENT_ERROR ,NULL ); -TEST_ASSERT (event_status ==1 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_ERROR ,"Failed test for rte_bbdev_pmd_callback_process in dev2 " "for RTE_BBDEV_EVENT_ERROR " );
@@ -1013,7 +1006,7 @@ test_bbdev_callback(void) "in dev 2 ");rte_bbdev_pmd_callback_process (dev2,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process in dev2" " for RTE_BBDEV_EVENT_UNKNOWN " );
@@ -1033,7 +1026,7 @@ test_bbdev_callback(void) " for RTE_BBDEV_EVENT_UNKNOWN ");rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process in dev2 " "for RTE_BBDEV_EVENT_UNKNOWN " );
drivers/baseband/null/bbdev_null.c +16 -19
@@ -16,15 +16,11 @@#define DRIVER_NAME bbdev_null/* NULL BBDev logging ID */ -static int bbdev_null_logtype; +static int null_pmd_logtype;/* Helper macro for logging */ -#define rte_bbdev_log (level, fmt, ...) \ - rte_log(RTE_LOG_ ## level, bbdev_null_logtype, fmt "\n", ##__VA_ARGS__) - -#define rte_bbdev_log_debug (fmt, ...) \ - rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ - ##__VA_ARGS__) +#define null_pmd_log (level, fmt, ...) \ + rte_log(RTE_LOG_ ## level, null_pmd_logtype, fmt "\n", ##__VA_ARGS__)/* Initialisation params structure that can be used by null BBDEV driver */ struct bbdev_null_params {
@@ -71,13 +67,14 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) dev_info->max_num_queues = internals->max_nb_queues; dev_info->queue_size_lim =RTE_BBDEV_QUEUE_SIZE_LIMIT ; dev_info->hardware_accelerated = false; - dev_info->max_queue_priority =0 ; + dev_info->max_dl_queue_priority =0 ; + dev_info->max_ul_queue_priority =0 ; dev_info->default_queue_conf = default_queue_conf; dev_info->capabilities = bbdev_capabilities; dev_info->cpu_flag_reqs =NULL ; dev_info->min_alignment =0 ; -rte_bbdev_log_debug ("got device info from %u" , dev->data->dev_id); +null_pmd_log (DEBUG ,"got device info from %u" , dev->data->dev_id); }/* Release queue */
@@ -92,7 +89,7 @@ q_release(struct rte_bbdev *dev, uint16_t q_id) dev->data->queues[q_id].queue_private =NULL ; } -rte_bbdev_log_debug ("released device queue %u:%u" , +null_pmd_log (DEBUG ,"released device queue %u:%u" , dev->data->dev_id, q_id);return 0 ; }
@@ -111,19 +108,19 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, q =rte_zmalloc_socket (RTE_STR (DRIVER_NAME ),sizeof (*q),RTE_CACHE_LINE_SIZE , queue_conf->socket);if (q ==NULL ) { -rte_bbdev_log (ERR ,"Failed to allocate queue memory" ); +null_pmd_log (ERR ,"Failed to allocate queue memory" );return -ENOMEM ; } q->processed_pkts =rte_ring_create (ring_name, queue_conf->queue_size, queue_conf->socket,RING_F_SP_ENQ |RING_F_SC_DEQ );if (q->processed_pkts ==NULL ) { -rte_bbdev_log (ERR ,"Failed to create ring" ); +null_pmd_log (ERR ,"Failed to create ring" ); goto free_q; } dev->data->queues[q_id].queue_private = q; -rte_bbdev_log_debug ("setup device queue %s" , ring_name); +null_pmd_log (DEBUG ,"setup device queue %s" , ring_name);return 0 ; free_q:
@@ -205,7 +202,7 @@ parse_u16_arg(const char *key, const char *value, void *extra_args) errno =0 ; result =strtoul (value,NULL ,0 );if ((result >= (1 <<16 )) || (errno !=0 )) { -rte_bbdev_log (ERR ,"Invalid value %lu for %s" , result, key); +null_pmd_log (ERR ,"Invalid value %lu for %s" , result, key);return -ERANGE ; } *u16 = (uint16_t )result;
@@ -238,7 +235,7 @@ parse_bbdev_null_params(struct bbdev_null_params *params, goto exit;if (params->socket_id >=RTE_MAX_NUMA_NODES ) { -rte_bbdev_log (ERR ,"Invalid socket, must be < %u" , +null_pmd_log (ERR ,"Invalid socket, must be < %u" ,RTE_MAX_NUMA_NODES ); goto exit; }
@@ -307,7 +304,7 @@ null_bbdev_probe(struct rte_vdev_device *vdev) input_args =rte_vdev_device_args (vdev);parse_bbdev_null_params (&init_params, input_args); -rte_bbdev_log_debug ("Init %s on NUMA node %d with max queues: %d" , +null_pmd_log (DEBUG ,"Init %s on NUMA node %d with max queues: %d" , name, init_params.socket_id, init_params.queues_num);return null_bbdev_create (vdev, &init_params);
@@ -350,7 +347,7 @@ RTE_INIT(null_bbdev_init_log);static void null_bbdev_init_log (void ) { - bbdev_null_logtype =rte_log_register ("pmd.bb.null" ); -if (bbdev_null_logtype >=0 ) -rte_log_set_level (bbdev_null_logtype,RTE_LOG_NOTICE ); + null_pmd_logtype =rte_log_register ("pmd.bbdev.null" ); +if (null_pmd_logtype >=0 ) +rte_log_set_level (null_pmd_logtype,RTE_LOG_NOTICE ); }
drivers/baseband/turbo_sw/bbdev_turbo_software.c +2 -1
@@ -164,7 +164,8 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) dev_info->max_num_queues = internals->max_nb_queues; dev_info->queue_size_lim =RTE_BBDEV_QUEUE_SIZE_LIMIT ; dev_info->hardware_accelerated = false; - dev_info->max_queue_priority =0 ; + dev_info->max_dl_queue_priority =0 ; + dev_info->max_ul_queue_priority =0 ; dev_info->default_queue_conf = default_queue_conf; dev_info->capabilities = bbdev_capabilities; dev_info->cpu_flag_reqs = &cpu_flag;
lib/librte_bbdev/rte_bbdev.c +11 -2
@@ -495,11 +495,20 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, conf->queue_size, queue_id, dev_id);return -EINVAL ; } -if (conf->priority > dev_info.max_queue_priority) { +if (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC && + conf->priority > dev_info.max_ul_queue_priority) {rte_bbdev_log (ERR ,"Priority (%u) of queue %u of bdev %u must be <= %u" , conf->priority, queue_id, dev_id, - dev_info.max_queue_priority); + dev_info.max_ul_queue_priority); +return -EINVAL ; + } +if (conf->op_type ==RTE_BBDEV_OP_TURBO_ENC && + conf->priority > dev_info.max_dl_queue_priority) { +rte_bbdev_log (ERR , +"Priority (%u) of queue %u of bdev %u must be <= %u" , + conf->priority, queue_id, dev_id, + dev_info.max_dl_queue_priority);return -EINVAL ; } }
lib/librte_bbdev/rte_bbdev.h +4 -2
@@ -283,8 +283,10 @@ struct rte_bbdev_driver_info {uint32_t queue_size_lim;/** Set if device off-loads operation to hardware */ bool hardware_accelerated; -/** Max value supported by queue priority */ -uint8_t max_queue_priority; +/** Max value supported by queue priority for DL */ +uint8_t max_dl_queue_priority; +/** Max value supported by queue priority for UL */ +uint8_t max_ul_queue_priority;/** Set if device supports per-queue interrupts */ bool queue_intr_supported;/** Minimum alignment of buffers, in bytes */
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH] baseband/turbo_sw: splitting Queue Groups
Quoted 9 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] baseband/turbo_sw: splitting Queue Groups
Quoted 6 lines
From: "Chalupnik, KamilX" <[email protected]>
Splitting Queue Groups into UL/DL Groups in Turbo Software Driver. The are independent for Decode/Encode
Signed-off-by KamilX Chalupnik <[email protected]>
PATCH v2 1/1 baseband/turbo_sw: splitting Queue Groups
In reply to KamilX ChalupnikSplitting Queue Groups into UL/DL Groups in Turbo Software Driver. The are independent for Decode/Encode
v2:
- logging macros fixed
--- app/test-bbdev/test_bbdev.c | 29 +++++++++--------------- drivers/baseband/null/bbdev_null.c | 3 ++- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 3 ++- lib/librte_bbdev/rte_bbdev.c | 13 +++++++++-- lib/librte_bbdev/rte_bbdev.h | 6 +++-- 5 files changed, 30 insertions(+), 24 deletions(-)
app/test-bbdev/test_bbdev.c +11 -18
@@ -273,7 +273,7 @@ test_bbdev_configure_stop_queue(void)/* Valid queue configuration */ ts_params->qconf.queue_size = info.drv.queue_size_lim; - ts_params->qconf.priority = info.drv.max_queue_priority; + ts_params->qconf.priority = info.drv.max_ul_queue_priority;/* Device - started; queue - started */ rte_bbdev_start (dev_id);
@@ -413,14 +413,7 @@ test_bbdev_configure_invalid_queue_configure(void) ts_params->qconf.queue_size); ts_params->qconf.queue_size = info.drv.queue_size_lim; - ts_params->qconf.priority = info.drv.max_queue_priority +1 ; -TEST_ASSERT_FAIL (rte_bbdev_queue_configure (dev_id, queue_id, - &ts_params->qconf), -"Failed test for rte_bbdev_queue_configure: " -"invalid value qconf.queue_size: %u" , - ts_params->qconf.queue_size); - - ts_params->qconf.priority = info.drv.max_queue_priority; + ts_params->qconf.priority = info.drv.max_ul_queue_priority; queue_id = info.num_queues; TEST_ASSERT_FAIL(rte_bbdev_queue_configure(dev_id, queue_id, &ts_params->qconf),
@@ -902,12 +895,12 @@ test_bbdev_callback(void) "Failed to callback rgstr for RTE_BBDEV_EVENT_UNKNOWN");rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_UNKNOWN " );rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_ERROR ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process: " "event RTE_BBDEV_EVENT_ERROR was not registered " );
@@ -926,12 +919,12 @@ test_bbdev_callback(void) event_status =-1 ;rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_UNKNOWN " );rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_ERROR ,NULL ); -TEST_ASSERT (event_status ==1 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_ERROR ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_ERROR " );
@@ -945,12 +938,12 @@ test_bbdev_callback(void) event_status =-1 ;rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_UNKNOWN " );rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_ERROR ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process: " "event RTE_BBDEV_EVENT_ERROR was unregistered " );
@@ -999,7 +992,7 @@ test_bbdev_callback(void) "for RTE_BBDEV_EVENT_ERROR ");rte_bbdev_pmd_callback_process (dev2,RTE_BBDEV_EVENT_ERROR ,NULL ); -TEST_ASSERT (event_status ==1 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_ERROR ,"Failed test for rte_bbdev_pmd_callback_process in dev2 " "for RTE_BBDEV_EVENT_ERROR " );
@@ -1013,7 +1006,7 @@ test_bbdev_callback(void) "in dev 2 ");rte_bbdev_pmd_callback_process (dev2,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process in dev2" " for RTE_BBDEV_EVENT_UNKNOWN " );
@@ -1033,7 +1026,7 @@ test_bbdev_callback(void) " for RTE_BBDEV_EVENT_UNKNOWN ");rte_bbdev_pmd_callback_process (dev1,RTE_BBDEV_EVENT_UNKNOWN ,NULL ); -TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process in dev2 " "for RTE_BBDEV_EVENT_UNKNOWN " );
drivers/baseband/null/bbdev_null.c +2 -1
@@ -71,7 +71,8 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) dev_info->max_num_queues = internals->max_nb_queues; dev_info->queue_size_lim =RTE_BBDEV_QUEUE_SIZE_LIMIT ; dev_info->hardware_accelerated = false; - dev_info->max_queue_priority =0 ; + dev_info->max_dl_queue_priority =0 ; + dev_info->max_ul_queue_priority =0 ; dev_info->default_queue_conf = default_queue_conf; dev_info->capabilities = bbdev_capabilities; dev_info->cpu_flag_reqs =NULL ;
drivers/baseband/turbo_sw/bbdev_turbo_software.c +2 -1
@@ -169,7 +169,8 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info) dev_info->max_num_queues = internals->max_nb_queues; dev_info->queue_size_lim =RTE_BBDEV_QUEUE_SIZE_LIMIT ; dev_info->hardware_accelerated = false; - dev_info->max_queue_priority =0 ; + dev_info->max_dl_queue_priority =0 ; + dev_info->max_ul_queue_priority =0 ; dev_info->default_queue_conf = default_queue_conf; dev_info->capabilities = bbdev_capabilities; dev_info->cpu_flag_reqs = &cpu_flag;
lib/librte_bbdev/rte_bbdev.c +11 -2
@@ -495,11 +495,20 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, conf->queue_size, queue_id, dev_id);return -EINVAL ; } -if (conf->priority > dev_info.max_queue_priority) { +if (conf->op_type ==RTE_BBDEV_OP_TURBO_DEC && + conf->priority > dev_info.max_ul_queue_priority) {rte_bbdev_log (ERR ,"Priority (%u) of queue %u of bdev %u must be <= %u" , conf->priority, queue_id, dev_id, - dev_info.max_queue_priority); + dev_info.max_ul_queue_priority); +return -EINVAL ; + } +if (conf->op_type ==RTE_BBDEV_OP_TURBO_ENC && + conf->priority > dev_info.max_dl_queue_priority) { +rte_bbdev_log (ERR , +"Priority (%u) of queue %u of bdev %u must be <= %u" , + conf->priority, queue_id, dev_id, + dev_info.max_dl_queue_priority);return -EINVAL ; } }
lib/librte_bbdev/rte_bbdev.h +4 -2
@@ -283,8 +283,10 @@ struct rte_bbdev_driver_info {uint32_t queue_size_lim;/** Set if device off-loads operation to hardware */ bool hardware_accelerated; -/** Max value supported by queue priority */ -uint8_t max_queue_priority; +/** Max value supported by queue priority for DL */ +uint8_t max_dl_queue_priority; +/** Max value supported by queue priority for UL */ +uint8_t max_ul_queue_priority;/** Set if device supports per-queue interrupts */ bool queue_intr_supported;/** Minimum alignment of buffers, in bytes */
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH v2] baseband/turbo_sw: splitting Queue Groups
Quoted 12 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Tuesday 17 April 2018 15:40
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH v2] baseband/turbo_sw: splitting Queue GroupsSplitting Queue Groups into UL/DL Groups in Turbo Software Driver. The are independent for Decode/Encode
Quoted 6 lines
Signed-off-by KamilX Chalupnik <[email protected]>v2:
- logging macros fixed---
There is a dependency between (baseband/turbo_sw) patches. Should be applied in this order:
1. baseband/turbo_sw: splitting Queue Groups
2. baseband/turbo_sw: offload cost measurement test
3. baseband/turbo_sw: optimization of turbo software driver
4. baseband/turbo_sw: update Turbo Software driver
Re: [PATCH v2] baseband/turbo_sw: splitting Queue Groups
In reply to KamilX ChalupnikHi,
Quoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:40 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: splitting Queue Groups
This patch is mainly an API change, so title should be: "bbdev: split queue groups", Since it mainly targets the library (which therefore, requires changes in the PMDs and the test app). Also the commit message should be updated, not focusing on the Turbo SW driver.
Quoted 5 lines
Splitting Queue Groups into UL/DL Groups in Turbo Software Driver. The are independent for Decode/Encode
Signed-off-by KamilX Chalupnik <[email protected]>
...
app/test-bbdev/test_bbdev.c test_bbdev_callback(void) · line 900
Quoted 4 lines
app/test-bbdev/test_bbdev.c +1
-1-TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_UNKNOWN " );
These changes making use of the EVENT macros should be in a separate patch, as it doesn't look like they belong to this one.
Re: [PATCH v2] baseband/turbo_sw: splitting Queue Groups
Quoted 22 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of De Lara Guarch, Pablo
Sent: Tuesday, April 24, 2018 4:30 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] baseband/turbo_sw: splitting Queue GroupsHi,
Quoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:40 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: splitting Queue Groups
Quoted 6 lines
This patch is mainly an API change, so title should be: "bbdev: split queue groups", Since it mainly targets the library (which therefore, requires changes in the PMDs and the test app).
Also the commit message should be updated, not focusing on the Turbo SW driver.
Could you also document this API change in release notes?
Thanks,
Pablo
Quoted 17 lines
Quoted 6 lines
Splitting Queue Groups into UL/DL Groups in Turbo Software Driver. The are independent for Decode/Encode
Signed-off-by KamilX Chalupnik <[email protected]>...
app/test-bbdev/test_bbdev.c test_bbdev_callback(void) · line 900
Quoted 4 lines
app/test-bbdev/test_bbdev.c +1
-1-TEST_ASSERT (event_status ==0 , +TEST_ASSERT (event_status == (int )RTE_BBDEV_EVENT_UNKNOWN ,"Failed test for rte_bbdev_pmd_callback_process " "for RTE_BBDEV_EVENT_UNKNOWN " );These changes making use of the EVENT macros should be in a separate patch, as it doesn't look like they belong to this one.
PATCH 1/1 baseband/turbo_sw: update Turbo Software driver
In reply to KamilX ChalupnikFrom: "Chalupnik, KamilX" <[email protected]>
Update Turbo Software driver for Wireless Baseband Device:
- support for optional CRC overlap in decode processing implemented
- function scaling input LLR values to specific range [-16, 16] added
- sizes of the internal buffers used by decoding were increased due to problem with memory for large test vectors
- new test vectors to check device capabilities added
--- app/test-bbdev/Makefile | 2 + app/test-bbdev/test_bbdev_perf.c | 44 +++++- app/test-bbdev/test_bbdev_vector.c | 2 + .../test_vectors/turbo_enc_c1_k40_r0_e1190_rm.data | 36 +++++ .../test_vectors/turbo_enc_c1_k40_r0_e1194_rm.data | 36 +++++ .../test_vectors/turbo_enc_c1_k40_r0_e1196_rm.data | 36 +++++ .../test_vectors/turbo_enc_c1_k40_r0_e272_rm.data | 33 ++++ drivers/baseband/turbo_sw/bbdev_turbo_software.c | 171 ++++++++++++--------- lib/librte_bbdev/rte_bbdev_op.h | 10 +- 9 files changed, 297 insertions(+), 73 deletions(-) create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1190_rm.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1194_rm.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1196_rm.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e272_rm.data
app/test-bbdev/Makefile +2 -0
@@ -20,4 +20,6 @@ SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev.c SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev_perf.c SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev_vector.c +LDLIBS += -lm + include $(RTE_SDK)/mk/rte.app.mk
app/test-bbdev/test_bbdev_perf.c +42 -2
85 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.c +2 -0
@@ -144,6 +144,8 @@ op_decoder_flag_strtoul(char *token, uint32_t *op_flag_value) *op_flag_value =RTE_BBDEV_TURBO_MAP_DEC ; else if (!strcmp(token, "RTE_BBDEV_TURBO_DEC_SCATTER_GATHER")) *op_flag_value =RTE_BBDEV_TURBO_DEC_SCATTER_GATHER ; + else if (!strcmp(token, "RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP")) + *op_flag_value =RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP ; else {printf ("The given value is not a turbo decoder flag\n" );return -1 ;
app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1190_rm.data new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_TURBO_ENC + +input0 = +0x11D2BCAC, 0x4D + +output0 = +0xD2399179, 0x640EB999, 0x2CBAF577, 0xAF224AE2, 0x9D139927, 0xE6909B29, 0xA25B7F47, 0x2AA224CE, +0x399179F2, 0x0EB999D2, 0xBAF57764, 0x224AE22C, 0x139927AF, 0x909B299D, 0x5B7F47E6, 0xA224CEA2, +0x9179F22A, 0xB999D239, 0xF577640E, 0x4AE22CBA, 0x9927AF22, 0x9B299D13, 0x7F47E690, 0x24CEA25B, +0x79F22AA2, 0x99D23991, 0x77640EB9, 0xE22CBAF5, 0x27AF224A, 0x299D1399, 0x47E6909B, 0xCEA25B7F, +0xF22AA224, 0xD2399179, 0x640EB999, 0x2CBAF577, 0xAF224AE2, 0x24 + +e = +1190 + +k = +40 + +ncb = +192 + +rv_index = +0 + +code_block_mode = +1 + +op_flags = +RTE_BBDEV_TURBO_RATE_MATCH + +expected_status = +OK
app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1194_rm.data new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_TURBO_ENC + +input0 = +0x11D2BCAC, 0x4D + +output0 = +0xB3E8D6DF, 0xBC8A2889, 0x744E649E, 0x99436EA6, 0x8B6EFD1D, 0xAB889238, 0xE744E6C9, 0x39E4664A, +0xE8D6DF91, 0x8A2889B3, 0x4E649EBC, 0x436EA674, 0x6EFD1D99, 0x8892388B, 0x44E6C9AB, 0xE4664AE7, +0xD6DF9139, 0x2889B3E8, 0x649EBC8A, 0x6EA6744E, 0xFD1D9943, 0x92388B6E, 0xE6C9AB88, 0x664AE744, +0xDF9139E4, 0x89B3E8D6, 0x9EBC8A28, 0xA6744E64, 0x1D99436E, 0x388B6EFD, 0xC9AB8892, 0x4AE744E6, +0x9139E466, 0xB3E8D6DF, 0xBC8A2889, 0x744E649E, 0x99436EA6, 0xC01D + +e = +1194 + +k = +40 + +ncb = +192 + +rv_index = +2 + +code_block_mode = +1 + +op_flags = +RTE_BBDEV_TURBO_RATE_MATCH + +expected_status = +OK
app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1196_rm.data new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_TURBO_ENC + +input0 = +0x11D2BCAC, 0x4D + +output0 = +0xBC8A2889, 0x744E649E, 0x99436EA6, 0x8B6EFD1D, 0xAB889238, 0xE744E6C9, 0x39E4664A, 0xE8D6DF91, +0x8A2889B3, 0x4E649EBC, 0x436EA674, 0x6EFD1D99, 0x8892388B, 0x44E6C9AB, 0xE4664AE7, 0xD6DF9139, +0x2889B3E8, 0x649EBC8A, 0x6EA6744E, 0xFD1D9943, 0x92388B6E, 0xE6C9AB88, 0x664AE744, 0xDF9139E4, +0x89B3E8D6, 0x9EBC8A28, 0xA6744E64, 0x1D99436E, 0x388B6EFD, 0xC9AB8892, 0x4AE744E6, 0x9139E466, +0xB3E8D6DF, 0xBC8A2889, 0x744E649E, 0x99436EA6, 0x8B6EFD1D, 0x9038 + +e = +1196 + +k = +40 + +ncb = +192 + +rv_index = +3 + +code_block_mode = +1 + +op_flags = +RTE_BBDEV_TURBO_RATE_MATCH + +expected_status = +OK
app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e272_rm.data new file +33 -0
@@ -0,0 +1,33 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_TURBO_ENC + +input0 = +0x11d2bcac, 0x4d + +output0 = +0xd2399179, 0x640eb999, 0x2cbaf577, 0xaf224ae2, 0x9d139927, 0xe6909b29, 0xa25b7f47, 0x2aa224ce, +0x79f2 + +e = +272 + +k = +40 + +ncb = +192 + +rv_index = +0 + +code_block_mode = +1 + +op_flags = +RTE_BBDEV_TURBO_RATE_MATCH + +expected_status = +OK
drivers/baseband/turbo_sw/bbdev_turbo_software.c +101 -70
500 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev_op.h +9 -1
@@ -102,7 +102,11 @@ enum rte_bbdev_op_td_flag_bitmasks {*/ RTE_BBDEV_TURBO_MAP_DEC = (1ULL <<14 ),/**< Set if a device supports scatter-gather functionality */ - RTE_BBDEV_TURBO_DEC_SCATTER_GATHER = (1ULL << 15) +RTE_BBDEV_TURBO_DEC_SCATTER_GATHER = (1ULL <<15 ), +/**< Set to keep CRC24B bits appended while decoding. Only usable when +* decoding Transport Blocks (code_block_mode = 0). +*/ + RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP = (1ULL << 16) };/** Flags for turbo encoder operation and capability structure */
@@ -379,6 +383,10 @@ struct rte_bbdev_op_turbo_enc {struct rte_bbdev_op_cap_turbo_dec {/**< Flags from rte_bbdev_op_td_flag_bitmasks */ uint32_t capability_flags; +/** Maximal LLR absolute value. Acceptable LLR values lie in range +* [-max_llr_modulus, max_llr_modulus]. +*/ +int8_t max_llr_modulus;uint8_t num_buffers_src;/**< Num input code block buffers */ /**< Num hard output code block buffers */ uint8_t num_buffers_hard_out;
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH] baseband/turbo_sw: update Turbo Software driver
Quoted 20 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] baseband/turbo_sw: update Turbo Software driverFrom: "Chalupnik, KamilX" <[email protected]>
Update Turbo Software driver for Wireless Baseband Device:
- support for optional CRC overlap in decode processing implemented
- function scaling input LLR values to specific range [-16, 16] added
- sizes of the internal buffers used by decoding were increased due to problem with memory for large test vectors
- new test vectors to check device capabilities addedSigned-off-by KamilX Chalupnik <[email protected]>
Quoted 9 lines
--- app/test-bbdev/Makefile | 2 + app/test-bbdev/test_bbdev_perf.c | 44 +++++- app/test-bbdev/test_bbdev_vector.c | 2 + .../test_vectors/turbo_enc_c1_k40_r0_e1190_rm.data | 36 +++++ .../test_vectors/turbo_enc_c1_k40_r0_e1194_rm.data | 36 +++++ .../test_vectors/turbo_enc_c1_k40_r0_e1196_rm.data | 36 +++++ .../test_vectors/turbo_enc_c1_k40_r0_e272_rm.data | 33 ++++ drivers/baseband/turbo_sw/bbdev_turbo_software.c | 171
Hi Kamil,
Patch fails to apply. Same conflict at line 21.
An updated patch can fix it.
Thanks,
Amr
PATCH v2 1/1 baseband/turbo_sw: update Turbo Software driver
In reply to KamilX ChalupnikUpdate Turbo Software driver for Wireless Baseband Device:
- support for optional CRC overlap in decode processing implemented
- function scaling input LLR values to specific range [-16, 16] added
- sizes of the internal buffers used by decoding were increased due to problem with memory for large test vectors
- new test vectors to check device capabilities added
v2:
- logging macros fixed
--- app/test-bbdev/Makefile | 2 + app/test-bbdev/test_bbdev_perf.c | 44 ++++++++++++++- app/test-bbdev/test_bbdev_vector.c | 2 + .../test_vectors/turbo_enc_c1_k40_r0_e1190_rm.data | 36 ++++++++++++ .../test_vectors/turbo_enc_c1_k40_r0_e1194_rm.data | 36 ++++++++++++ .../test_vectors/turbo_enc_c1_k40_r0_e1196_rm.data | 36 ++++++++++++ .../test_vectors/turbo_enc_c1_k40_r0_e272_rm.data | 33 +++++++++++ drivers/baseband/turbo_sw/bbdev_turbo_software.c | 64 +++++++++++++++------- lib/librte_bbdev/rte_bbdev_op.h | 10 +++- 9 files changed, 241 insertions(+), 22 deletions(-) create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1190_rm.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1194_rm.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1196_rm.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e272_rm.data
app/test-bbdev/Makefile +2 -0
@@ -20,4 +20,6 @@ SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev.c SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev_perf.c SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev_vector.c +LDLIBS += -lm + include $(RTE_SDK)/mk/rte.app.mk
app/test-bbdev/test_bbdev_perf.c +42 -2
85 lines not on this page · raw message
app/test-bbdev/test_bbdev_vector.c +2 -0
@@ -144,6 +144,8 @@ op_decoder_flag_strtoul(char *token, uint32_t *op_flag_value) *op_flag_value =RTE_BBDEV_TURBO_MAP_DEC ; else if (!strcmp(token, "RTE_BBDEV_TURBO_DEC_SCATTER_GATHER")) *op_flag_value =RTE_BBDEV_TURBO_DEC_SCATTER_GATHER ; + else if (!strcmp(token, "RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP")) + *op_flag_value =RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP ; else {printf ("The given value is not a turbo decoder flag\n" );return -1 ;
app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1190_rm.data new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_TURBO_ENC + +input0 = +0x11D2BCAC, 0x4D + +output0 = +0xD2399179, 0x640EB999, 0x2CBAF577, 0xAF224AE2, 0x9D139927, 0xE6909B29, 0xA25B7F47, 0x2AA224CE, +0x399179F2, 0x0EB999D2, 0xBAF57764, 0x224AE22C, 0x139927AF, 0x909B299D, 0x5B7F47E6, 0xA224CEA2, +0x9179F22A, 0xB999D239, 0xF577640E, 0x4AE22CBA, 0x9927AF22, 0x9B299D13, 0x7F47E690, 0x24CEA25B, +0x79F22AA2, 0x99D23991, 0x77640EB9, 0xE22CBAF5, 0x27AF224A, 0x299D1399, 0x47E6909B, 0xCEA25B7F, +0xF22AA224, 0xD2399179, 0x640EB999, 0x2CBAF577, 0xAF224AE2, 0x24 + +e = +1190 + +k = +40 + +ncb = +192 + +rv_index = +0 + +code_block_mode = +1 + +op_flags = +RTE_BBDEV_TURBO_RATE_MATCH + +expected_status = +OK
app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1194_rm.data new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_TURBO_ENC + +input0 = +0x11D2BCAC, 0x4D + +output0 = +0xB3E8D6DF, 0xBC8A2889, 0x744E649E, 0x99436EA6, 0x8B6EFD1D, 0xAB889238, 0xE744E6C9, 0x39E4664A, +0xE8D6DF91, 0x8A2889B3, 0x4E649EBC, 0x436EA674, 0x6EFD1D99, 0x8892388B, 0x44E6C9AB, 0xE4664AE7, +0xD6DF9139, 0x2889B3E8, 0x649EBC8A, 0x6EA6744E, 0xFD1D9943, 0x92388B6E, 0xE6C9AB88, 0x664AE744, +0xDF9139E4, 0x89B3E8D6, 0x9EBC8A28, 0xA6744E64, 0x1D99436E, 0x388B6EFD, 0xC9AB8892, 0x4AE744E6, +0x9139E466, 0xB3E8D6DF, 0xBC8A2889, 0x744E649E, 0x99436EA6, 0xC01D + +e = +1194 + +k = +40 + +ncb = +192 + +rv_index = +2 + +code_block_mode = +1 + +op_flags = +RTE_BBDEV_TURBO_RATE_MATCH + +expected_status = +OK
app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e1196_rm.data new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_TURBO_ENC + +input0 = +0x11D2BCAC, 0x4D + +output0 = +0xBC8A2889, 0x744E649E, 0x99436EA6, 0x8B6EFD1D, 0xAB889238, 0xE744E6C9, 0x39E4664A, 0xE8D6DF91, +0x8A2889B3, 0x4E649EBC, 0x436EA674, 0x6EFD1D99, 0x8892388B, 0x44E6C9AB, 0xE4664AE7, 0xD6DF9139, +0x2889B3E8, 0x649EBC8A, 0x6EA6744E, 0xFD1D9943, 0x92388B6E, 0xE6C9AB88, 0x664AE744, 0xDF9139E4, +0x89B3E8D6, 0x9EBC8A28, 0xA6744E64, 0x1D99436E, 0x388B6EFD, 0xC9AB8892, 0x4AE744E6, 0x9139E466, +0xB3E8D6DF, 0xBC8A2889, 0x744E649E, 0x99436EA6, 0x8B6EFD1D, 0x9038 + +e = +1196 + +k = +40 + +ncb = +192 + +rv_index = +3 + +code_block_mode = +1 + +op_flags = +RTE_BBDEV_TURBO_RATE_MATCH + +expected_status = +OK
app/test-bbdev/test_vectors/turbo_enc_c1_k40_r0_e272_rm.data new file +33 -0
@@ -0,0 +1,33 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_TURBO_ENC + +input0 = +0x11d2bcac, 0x4d + +output0 = +0xd2399179, 0x640eb999, 0x2cbaf577, 0xaf224ae2, 0x9d139927, 0xe6909b29, 0xa25b7f47, 0x2aa224ce, +0x79f2 + +e = +272 + +k = +40 + +ncb = +192 + +rv_index = +0 + +code_block_mode = +1 + +op_flags = +RTE_BBDEV_TURBO_RATE_MATCH + +expected_status = +OK
drivers/baseband/turbo_sw/bbdev_turbo_software.c +45 -19
174 lines not on this page · raw message
lib/librte_bbdev/rte_bbdev_op.h +9 -1
@@ -102,7 +102,11 @@ enum rte_bbdev_op_td_flag_bitmasks {*/ RTE_BBDEV_TURBO_MAP_DEC = (1ULL <<14 ),/**< Set if a device supports scatter-gather functionality */ - RTE_BBDEV_TURBO_DEC_SCATTER_GATHER = (1ULL << 15) +RTE_BBDEV_TURBO_DEC_SCATTER_GATHER = (1ULL <<15 ), +/**< Set to keep CRC24B bits appended while decoding. Only usable when +* decoding Transport Blocks (code_block_mode = 0). +*/ + RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP = (1ULL << 16) };/** Flags for turbo encoder operation and capability structure */
@@ -379,6 +383,10 @@ struct rte_bbdev_op_turbo_enc {struct rte_bbdev_op_cap_turbo_dec {/**< Flags from rte_bbdev_op_td_flag_bitmasks */ uint32_t capability_flags; +/** Maximal LLR absolute value. Acceptable LLR values lie in range +* [-max_llr_modulus, max_llr_modulus]. +*/ +int8_t max_llr_modulus;uint8_t num_buffers_src;/**< Num input code block buffers */ /**< Num hard output code block buffers */ uint8_t num_buffers_hard_out;
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH v2] baseband/turbo_sw: update Turbo Software driver
Quoted 16 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Tuesday 17 April 2018 15:44
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH v2] baseband/turbo_sw: update Turbo Software driverUpdate Turbo Software driver for Wireless Baseband Device:
- support for optional CRC overlap in decode processing implemented
- function scaling input LLR values to specific range [-16, 16] added
- sizes of the internal buffers used by decoding were increased due to problem with memory for large test vectors
- new test vectors to check device capabilities added
Quoted 6 lines
Signed-off-by KamilX Chalupnik <[email protected]>v2:
- logging macros fixed---
There is a dependency between (baseband/turbo_sw) patches. Should be applied in this order:
1. baseband/turbo_sw: splitting Queue Groups
2. baseband/turbo_sw: offload cost measurement test
3. baseband/turbo_sw: optimization of turbo software driver
4. baseband/turbo_sw: update Turbo Software driver
Re: [PATCH v2] baseband/turbo_sw: update Turbo Software driver
Hi,
Quoted 30 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Mokhtar, Amr
Sent: Tuesday, April 17, 2018 5:56 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2] baseband/turbo_sw: update Turbo Software driverQuoted 15 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Tuesday 17 April 2018 15:44
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH v2] baseband/turbo_sw: update Turbo Software driverUpdate Turbo Software driver for Wireless Baseband Device:
- support for optional CRC overlap in decode processing implemented
- function scaling input LLR values to specific range [-16, 16] added
- sizes of the internal buffers used by decoding were increased due to problem with memory for large test vectors
- new test vectors to check device capabilities addedQuoted 6 lines
Signed-off-by KamilX Chalupnik <[email protected]>v2:
- logging macros fixed---
Quoted 8 lines
There is a dependency between (baseband/turbo_sw) patches. Should be applied in this order:
1. baseband/turbo_sw: splitting Queue Groups 2. baseband/turbo_sw: offload cost measurement test 3. baseband/turbo_sw: optimization of turbo software driver 4. baseband/turbo_sw: update Turbo Software driver
Acked-by Amr Mokhtar <[email protected]>
For next time, send a patchset, so the order is clear.
Thanks,
Pablo
Re: [PATCH v2] baseband/turbo_sw: update Turbo Software driver
In reply to KamilX ChalupnikQuoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:44 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: update Turbo Software driver
Quoted 7 lines
Update Turbo Software driver for Wireless Baseband Device:
- support for optional CRC overlap in decode processing implemented
- function scaling input LLR values to specific range [-16, 16] added
- sizes of the internal buffers used by decoding were increased due to problem with memory for large test vectors
- new test vectors to check device capabilities added
Split this patch into multiple patches, each one doing a single item of your above list. Again, make sure that it can be compiled and that is functional along the patches.
Thanks,
Pablo
Re: [PATCH v2] baseband/turbo_sw: update Turbo Software driver
Quoted 30 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday 24 April 2018 18:56
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] baseband/turbo_sw: update Turbo Software driverQuoted 7 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:44 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: update TurboSoftware
Quoted 9 lines
driver
Update Turbo Software driver for Wireless Baseband Device:
- support for optional CRC overlap in decode processing implemented
- function scaling input LLR values to specific range [-16, 16] added
- sizes of the internal buffers used by decoding were increased due to problem with memory for large test vectors
- new test vectors to check device capabilities added
Quoted 5 lines
Split this patch into multiple patches, each one doing a single item of your above list.
Again, make sure that it can be compiled and that is functional along the patches.
Too much splits is a bit an overkill.
All the above changes are enhancements of Turbo coding operations. They all fall under one common topic and appears like they are good to stay combined in one patch.
The new test vectors are related to the added enhancements.
Quoted 2 lines
Thanks,
Pablo
Re: [PATCH v2] baseband/turbo_sw: update Turbo Software driver
Hi Amr,
Quoted 47 lines
-----Original Message-----
From: Mokhtar, Amr
Sent: Tuesday, April 24, 2018 7:53 PM
To: De Lara Guarch, Pablo <[email protected]>; Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] baseband/turbo_sw: update Turbo Software driverQuoted 31 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday 24 April 2018 18:56
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v2] baseband/turbo_sw: update Turbo Software driverQuoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Tuesday, April 17, 2018 3:44 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: update TurboSoftware
Quoted 10 lines
driver
Update Turbo Software driver for Wireless Baseband Device:
- support for optional CRC overlap in decode processing implemented
- function scaling input LLR values to specific range [-16, 16] added
- sizes of the internal buffers used by decoding were increased due to problem with memory for large test vectors
- new test vectors to check device capabilities addedQuoted 5 lines
Split this patch into multiple patches, each one doing a single item of your above list.
Again, make sure that it can be compiled and that is functional along the patches.
Quoted 5 lines
Too much splits is a bit an overkill.
All the above changes are enhancements of Turbo coding operations. They all fall under one common topic and appears like they are good to stay combined in one patch.
The new test vectors are related to the added enhancements.
I understand that they fall under the same top, that's why you should send them in the same patchset. In DPDK, we aim at shorter patches (when possible), with are easier to review. We tend to avoid patches making multiple changes, when they can be breakable (generally, when you have a list of changes in your commit message, that means they should go into separate patches).
Thanks,
Pablo
PATCH 1/1 app/bbdev: remove improper WARNING printouts
In reply to KamilX ChalupnikFrom: "Chalupnik, KamilX" <[email protected]>
Improper WARNING printouts in BBDev Test Application removed
--- app/test-bbdev/test_bbdev_perf.c | 3 ++- app/test-bbdev/test_bbdev_vector.c | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-)
app/test-bbdev/test_bbdev_perf.c +2 -1
@@ -161,7 +161,7 @@ check_dev_cap(const struct rte_bbdev_info *dev_info) !(cap->capability_flags & RTE_BBDEV_TURBO_SOFT_OUTPUT)) {printf ( -"WARNING: Device \"%s\" does not support soft output - soft output flags will be ignored.\n" , +"INFO: Device \"%s\" does not support soft output - soft output flags will be ignored.\n" , dev_info->dev_name);clear_soft_out_cap ( &test_vector.turbo_dec.op_flags);
@@ -1166,6 +1166,7 @@ dequeue_event_callback(uint16_t dev_id,double in_len;struct thread_params *tp = cb_arg; +RTE_SET_USED (ret_param); queue_id = tp->queue_id;
app/test-bbdev/test_bbdev_vector.c +6 -6
@@ -644,7 +644,7 @@ check_decoder_llr_spec(struct test_bbdev_vector *vector) !(turbo_dec->op_flags & RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN)) {printf ( -"WARNING: input LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n" ); +"INFO: input LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n" ); turbo_dec->op_flags |=RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN ; }
@@ -663,7 +663,7 @@ check_decoder_llr_spec(struct test_bbdev_vector *vector) !(turbo_dec->op_flags & RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT)) {printf ( -"WARNING: soft output LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n" ); +"INFO: soft output LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n" ); turbo_dec->op_flags |=RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT ; }
@@ -724,7 +724,7 @@ check_decoder(struct test_bbdev_vector *vector) }if (!(mask &TEST_BBDEV_VF_RV_INDEX ))printf ( -"WARNING: rv_index was not specified in vector file and will be set to 0\n" ); +"INFO: rv_index was not specified in vector file and will be set to 0\n" );if (!(mask &TEST_BBDEV_VF_ITER_MIN ))printf ("WARNING: iter_min was not specified in vector file and will be set to 0\n" );
@@ -744,7 +744,7 @@ check_decoder(struct test_bbdev_vector *vector) }else if (!(turbo_dec->op_flags &RTE_BBDEV_TURBO_MAP_DEC ) && mask &TEST_BBDEV_VF_NUM_MAPS ) {printf ( -"WARNING: RTE_BBDEV_TURBO_MAP_DEC was not set in vector file and num_maps will be set to 0\n" ); +"INFO: RTE_BBDEV_TURBO_MAP_DEC was not set in vector file and num_maps will be set to 0\n" ); turbo_dec->num_maps =0 ; }if (!(mask &TEST_BBDEV_VF_EXPECTED_STATUS ))
@@ -829,10 +829,10 @@ check_encoder(struct test_bbdev_vector *vector) }if (!(mask &TEST_BBDEV_VF_RV_INDEX ))printf ( -"WARNING: rv_index was not specified in vector file and will be set to 0\n" ); +"INFO: rv_index was not specified in vector file and will be set to 0\n" );if (!(mask &TEST_BBDEV_VF_OP_FLAGS ))printf ( -"WARNING: op_flags was not specified in vector file and capabilities will not be validated\n" ); +"INFO: 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" );
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH] app/bbdev: remove improper WARNING printouts
Quoted 9 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] app/bbdev: remove improper WARNING printouts
Quoted 5 lines
From: "Chalupnik, KamilX" <[email protected]>
Improper WARNING printouts in BBDev Test Application removed
Signed-off-by KamilX Chalupnik <[email protected]>
PATCH v2 1/1 app/bbdev: remove improper WARNING printouts
In reply to KamilX ChalupnikImproper WARNING printouts in BBDev Test Application removed
v2:
- apply patch failure fixed
--- app/test-bbdev/test_bbdev_perf.c | 2 +- app/test-bbdev/test_bbdev_vector.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
app/test-bbdev/test_bbdev_perf.c +1 -1
@@ -138,7 +138,7 @@ check_dev_cap(const struct rte_bbdev_info *dev_info) !(cap->capability_flags & RTE_BBDEV_TURBO_SOFT_OUTPUT)) {printf ( -"WARNING: Device \"%s\" does not support soft output - soft output flags will be ignored.\n" , +"INFO: Device \"%s\" does not support soft output - soft output flags will be ignored.\n" , dev_info->dev_name);clear_soft_out_cap ( &test_vector.turbo_dec.op_flags);
app/test-bbdev/test_bbdev_vector.c +6 -6
@@ -642,7 +642,7 @@ check_decoder_llr_spec(struct test_bbdev_vector *vector) !(turbo_dec->op_flags & RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN)) {printf ( -"WARNING: input LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n" ); +"INFO: input LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n" ); turbo_dec->op_flags |=RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN ; }
@@ -661,7 +661,7 @@ check_decoder_llr_spec(struct test_bbdev_vector *vector) !(turbo_dec->op_flags & RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT)) {printf ( -"WARNING: soft output LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n" ); +"INFO: soft output LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n" ); turbo_dec->op_flags |=RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT ; }
@@ -722,7 +722,7 @@ check_decoder(struct test_bbdev_vector *vector) }if (!(mask &TEST_BBDEV_VF_RV_INDEX ))printf ( -"WARNING: rv_index was not specified in vector file and will be set to 0\n" ); +"INFO: rv_index was not specified in vector file and will be set to 0\n" );if (!(mask &TEST_BBDEV_VF_ITER_MIN ))printf ("WARNING: iter_min was not specified in vector file and will be set to 0\n" );
@@ -742,7 +742,7 @@ check_decoder(struct test_bbdev_vector *vector) }else if (!(turbo_dec->op_flags &RTE_BBDEV_TURBO_MAP_DEC ) && mask &TEST_BBDEV_VF_NUM_MAPS ) {printf ( -"WARNING: RTE_BBDEV_TURBO_MAP_DEC was not set in vector file and num_maps will be set to 0\n" ); +"INFO: RTE_BBDEV_TURBO_MAP_DEC was not set in vector file and num_maps will be set to 0\n" ); turbo_dec->num_maps =0 ; }if (!(mask &TEST_BBDEV_VF_EXPECTED_STATUS ))
@@ -827,10 +827,10 @@ check_encoder(struct test_bbdev_vector *vector) }if (!(mask &TEST_BBDEV_VF_RV_INDEX ))printf ( -"WARNING: rv_index was not specified in vector file and will be set to 0\n" ); +"INFO: rv_index was not specified in vector file and will be set to 0\n" );if (!(mask &TEST_BBDEV_VF_OP_FLAGS ))printf ( -"WARNING: op_flags was not specified in vector file and capabilities will not be validated\n" ); +"INFO: 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" );
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH v2] app/bbdev: remove improper WARNING printouts
Quoted 9 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 18 April 2018 10:26
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH v2] app/bbdev: remove improper WARNING printouts
Quoted 7 lines
Improper WARNING printouts in BBDev Test Application removed
Signed-off-by KamilX Chalupnik <[email protected]>v2:
- apply patch failure fixed
Re: [PATCH v2] app/bbdev: remove improper WARNING printouts
In reply to KamilX ChalupnikHi Kamil,
Quoted 33 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Wednesday, April 18, 2018 10:26 AM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH v2] app/bbdev: remove improper WARNING printoutsImproper WARNING printouts in BBDev Test Application removed
Signed-off-by KamilX Chalupnik <[email protected]>v2:
- apply patch failure fixed--- app/test-bbdev/test_bbdev_perf.c | 2 +- app/test-bbdev/test_bbdev_vector.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)app/test- renamed from app/test-bbdev/test_bbdev_perf.c +0
-0
bbdev/test_bbdev_perf.c
index 00f3b08..84a5393 100644app/test-bbdev/test_bbdev_perf.c +1
-1@@ -138,7 +138,7 @@ check_dev_cap(const struct rte_bbdev_info *dev_info) !(cap->capability_flags & RTE_BBDEV_TURBO_SOFT_OUTPUT)) { printf( - "WARNING: Device \"%s\" does not support soft output - soft output flags will be ignored.\n", + "INFO: Device \"%s\" does not support
Quoted 2 lines
soft output - soft output
+flags will be ignored.\n",
I think, instead of using "printf", you should use RTE_LOG, ideally with a dynamic log type, so a user can change the level and decide which messages to show (like what was done in TestPMD, with TESTPMD_LOG).
Thanks,
Pablo
PATCH 1/1 app/bbdev: update test vectors
In reply to KamilX ChalupnikFrom: "Chalupnik, KamilX" <[email protected]>
Update test vectors directory for Wireless Baseband Device:
- creation of new vectors to test and validate BBDevice capabilities
- python script used for tests execution updated
Update the test app documentation:
- vector test names updated
- description of tests added
- usage of test app updated
--- app/test-bbdev/test-bbdev.py | 2 +- app/test-bbdev/test_vectors/bbdev_null.data | 5 + app/test-bbdev/test_vectors/bbdev_vector_null.data | 5 - .../test_vectors/bbdev_vector_td_default.data | 54 - .../test_vectors/bbdev_vector_te_default.data | 33 - .../turbo_dec_c1_k40_r0_e17280_sbd_negllr.data | 57 + ...k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data | 643 ++++++++++ ..._k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data | 643 ++++++++++ .../turbo_dec_c1_k6144_r0_e34560_negllr.data | 645 +++++++++++ .../turbo_dec_c1_k6144_r0_e34560_posllr.data | 645 +++++++++++ .../turbo_dec_c1_k6144_r0_e34560_sbd_negllr.data | 1224 +++++++++++++++++++ .../turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data | 1225 ++++++++++++++++++++ .../turbo_dec_c2_k3136_r0_e4920_sbd_negllr.data | 676 +++++++++++ ...bo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data | 677 +++++++++++ .../turbo_enc_c1_k6144_r0_e120_rm_rvidx.data | 63 + .../test_vectors/turbo_enc_c1_k6144_r0_e18444.data | 156 +++ .../turbo_enc_c1_k6144_r0_e18448_crc24a.data | 159 +++ .../turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data | 180 +++ .../turbo_enc_c2_k5952_r0_e17868_crc24b.data | 300 +++++ .../turbo_enc_c3_k4800_r2_e14412_crc24b.data | 153 +++ .../turbo_enc_c4_k4800_r2_e14412_crc24b.data | 252 ++++ app/test-bbdev/turbo_dec_default.data | 1 + app/test-bbdev/turbo_enc_default.data | 1 + doc/guides/tools/testbbdev.rst | 178 ++- 24 files changed, 7835 insertions(+), 142 deletions(-) create mode 100644 app/test-bbdev/test_vectors/bbdev_null.data delete mode 100644 app/test-bbdev/test_vectors/bbdev_vector_null.data delete mode 100644 app/test-bbdev/test_vectors/bbdev_vector_td_default.data delete mode 100644 app/test-bbdev/test_vectors/bbdev_vector_te_default.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k40_r0_e17280_sbd_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_posllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_sbd_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_negllr.data create mode 100644 app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e120_rm_rvidx.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e18444.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e18448_crc24a.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c2_k5952_r0_e17868_crc24b.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c3_k4800_r2_e14412_crc24b.data create mode 100644 app/test-bbdev/test_vectors/turbo_enc_c4_k4800_r2_e14412_crc24b.data create mode 120000 app/test-bbdev/turbo_dec_default.data create mode 120000 app/test-bbdev/turbo_enc_default.data
app/test-bbdev/test-bbdev.py +1 -1
@@ -45,7 +45,7 @@ def kill(process): nargs="+", help="Specifies paths to the test vector files.", default=[dpdk_path + - "/app/test-bbdev/test_vectors/bbdev_vector_null.data"]) + "/app/test-bbdev/test_vectors/bbdev_null.data"]) parser.add_argument("-n", "--num-ops", type=int, help="Number of operations to process on device.",
app/test-bbdev/test_vectors/bbdev_null.data new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +op_type = +RTE_BBDEV_OP_NONE
app/test-bbdev/test_vectors/bbdev_vector_null.data deleted +0 -5
@@ -1,5 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation - -op_type = -RTE_BBDEV_OP_NONE
app/test-bbdev/test_vectors/bbdev_vector_td_default.data deleted +0 -54
54 lines not on this page · raw message
app/test-bbdev/test_vectors/bbdev_vector_te_default.data deleted +0 -33
@@ -1,33 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation - -op_type = -RTE_BBDEV_OP_TURBO_ENC - -input0 = -0x11d2bcac, 0x4d - -output0 = -0xd2399179, 0x640eb999, 0x2cbaf577, 0xaf224ae2, 0x9d139927, 0xe6909b29, 0xa25b7f47, 0x2aa224ce, -0x79f2 - -e = -272 - -k = -40 - -ncb = -192 - -rv_index = -0 - -code_block_mode = -1 - -op_flags = -RTE_BBDEV_TURBO_RATE_MATCH - -expected_status = -OK
app/test-bbdev/test_vectors/turbo_dec_c1_k40_r0_e17280_sbd_negllr.data new file +57 -0
57 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data new file +643 -0
644 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data new file +643 -0
644 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_negllr.data new file +645 -0
645 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_posllr.data new file +645 -0
645 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_sbd_negllr.data new file +1224 -0
258 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data new file +1225 -0
1,225 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_negllr.data new file +676 -0
676 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data new file +677 -0
677 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e120_rm_rvidx.data new file +63 -0
63 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e18444.data new file +156 -0
156 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e18448_crc24a.data new file +159 -0
159 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data new file +180 -0
180 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_enc_c2_k5952_r0_e17868_crc24b.data new file +300 -0
300 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_enc_c3_k4800_r2_e14412_crc24b.data new file +153 -0
153 lines not on this page · raw message
app/test-bbdev/test_vectors/turbo_enc_c4_k4800_r2_e14412_crc24b.data new file +252 -0
252 lines not on this page · raw message
app/test-bbdev/turbo_dec_default.data new file +1 -0
Lines of this file are not shown. View the raw message.
app/test-bbdev/turbo_enc_default.data new file +1 -0
Lines of this file are not shown. View the raw message.
doc/guides/tools/testbbdev.rst +129 -49
178 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Part of the diff is not shown here. View the raw message.
Re: [PATCH] app/bbdev: update test vectors
Quoted 15 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] app/bbdev: update test vectorsFrom: "Chalupnik, KamilX" <[email protected]>
Update test vectors directory for Wireless Baseband Device:
- creation of new vectors to test and validate BBDevice capabilities
- python script used for tests execution updated
Quoted 6 lines
Update the test app documentation:
- vector test names updated
- description of tests added
- usage of test app updatedSigned-off-by KamilX Chalupnik <[email protected]>
Re: [PATCH] app/bbdev: update test vectors
In reply to KamilX ChalupnikQuoted 16 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Wednesday, April 4, 2018 3:06 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH] app/bbdev: update test vectorsFrom: "Chalupnik, KamilX" <[email protected]>
Update test vectors directory for Wireless Baseband Device:
- creation of new vectors to test and validate BBDevice capabilities
- python script used for tests execution updated
Quoted 6 lines
Update the test app documentation:
- vector test names updated
- description of tests added
- usage of test app updatedSigned-off-by KamilX Chalupnik <[email protected]>
Could you split this patch into multiple patches? You are doing several things here, so it is better to split each thing into a different patch. Make sure that the functionality and compilation is not broken for each patch.
I think you can have a patch updating the names of current tests (updating the documentation in the same patch),
another patch adding the new tests (also updating the documentation) and a last patch with the rest of the
documentation changes.
This way, it will be easier to review.
Also, another comment below.
Quoted 2 lines
doc/guides/tools/testbbdev.rst +0
-0
...
doc/guides/tools/testbbdev.rst All bbdev devices · line 271
Quoted 4 lines
./test-bbdev.py -p ../../x86_64-native-linuxapp-icc/app/testbbdevdoc/guides/tools/testbbdev.rst +1
-1- -v ./test_vectors/bbdev_vector_td_default.data + -v turbo_dec_default.data
Shouldn't this be still under test_vectors?
Re: [PATCH] app/bbdev: update test vectors
Quoted 33 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday 24 April 2018 15:57
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: update test vectorsQuoted 20 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Wednesday, April 4, 2018 3:06 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH] app/bbdev: update test vectorsFrom: "Chalupnik, KamilX" <[email protected]>
Update test vectors directory for Wireless Baseband Device:
- creation of new vectors to test and validate BBDevice capabilities
- python script used for tests execution updatedUpdate the test app documentation:
- vector test names updated
- description of tests added
- usage of test app updatedSigned-off-by KamilX Chalupnik <[email protected]>
<...>
Quoted 7 lines
doc/guides/tools/testbbdev.rst All bbdev devices · line 271
Quoted 5 lines
./test-bbdev.py -p ../../x86_64-native-linuxapp-icc/app/testbbdevdoc/guides/tools/testbbdev.rst +1
-1- -v ./test_vectors/bbdev_vector_td_default.data + -v turbo_dec_default.dataShouldn't this be still under
test_vectors?
This is only a soft link to the test vector (that is located inside ./test_vectors) that will be used as a default one. This is for the user's convenience to keep running the test using one command.
This approach also prevents replicating the test vector or changing the TV filename. The filename by its own should be quite descriptive of all various parameters used in the test like C, K, E, ...
PATCH 1/1 app/bbdev: dynamic lib support
In reply to KamilX ChalupnikFrom: "Chalupnik, KamilX" <[email protected]>
Support for linking with dynamic library added in
Baseband Device test application
--- app/test-bbdev/Makefile | 4 ++++ doc/guides/tools/testbbdev.rst | 7 +++++++ 2 files changed, 11 insertions(+)
app/test-bbdev/Makefile +4 -0
@@ -22,4 +22,8 @@ SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev_vector.c LDLIBS += -lm +ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW),y) +LDLIBS += -lrte_pmd_bbdev_turbo_sw +endif + include $(RTE_SDK)/mk/rte.app.mk
doc/guides/tools/testbbdev.rst +7 -0
@@ -36,6 +36,13 @@ The user must have all libraries, modules, updates and compilers installed in the system prior to this, as described in the earlier chapters in this Getting Started Guide. +Compiling the Application with DPDK built as shared library +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Setting flag in config/common_base file: + + ``CONFIG_RTE_BUILD_SHARED_LIB=y`` + Running the Application -----------------------
Signature · 13 lines
2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH] app/bbdev: dynamic lib support
Quoted 9 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] app/bbdev: dynamic lib support
Quoted 7 lines
From: "Chalupnik, KamilX" <[email protected]>
Support for linking with dynamic library added in
Baseband Device test applicationSigned-off-by KamilX Chalupnik <[email protected]>---
Re: [PATCH] app/bbdev: dynamic lib support
In reply to KamilX ChalupnikHi Kamil,
Quoted 28 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Wednesday, April 4, 2018 3:06 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportFrom: "Chalupnik, KamilX" <[email protected]>
Support for linking with dynamic library added in Baseband Device test application
Signed-off-by KamilX Chalupnik <[email protected]>--- app/test-bbdev/Makefile | 4 ++++ doc/guides/tools/testbbdev.rst | 7 +++++++ 2 files changed, 11 insertions(+)app/test-bbdev/Makefile index renamed from app/test-bbdev/Makefile +0
-06da0c8e..26c9a4b 100644
app/test-bbdev/Makefile +0
-0@@ -22,4 +22,8 @@ SRCS-$(CONFIG_RTE_TEST_BBDEV) +=
test_bbdev_vector.cLDLIBS += -lm
app/test-bbdev/Makefile SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev_vector.c · line 27
Quoted 3 lines
app/test-bbdev/Makefile +3
-0+ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW),y) +LDLIBS += -lrte_pmd_bbdev_turbo_sw +endif
This is already done in mk/rte.app.mk, so it should not be needed.
Quoted 10 lines
app/test-bbdev/Makefile +1
-0+ include $(RTE_SDK)/mk/rte.app.mkdoc/guides/tools/testbbdev.rst +0
-0@@ -36,6 +36,13 @@ The user must have all libraries, modules, updates andcompilers installed in the system prior to this, as described in the earlier chapters in this Getting Started Guide.
doc/guides/tools/testbbdev.rst The user must have all libraries, modules, updates and compilers installed · line 44
Quoted 6 lines
doc/guides/tools/testbbdev.rst +6
-0+Compiling the Application with DPDK built as shared library +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Setting flag in config/common_base file: + + ``CONFIG_RTE_BUILD_SHARED_LIB=y``
I don't think this is necessary to document.
This is global for all applications and libraries in DPDK, and none of them document individually this.
In a nutshell, I think this patch is not necessary.
Thanks,
Pablo
A message that is not in the archive (sent off-list or not yet received): EEA9FF629BF25B47BD67ADE995041EE23CF5B5C4@IRSMSX103.ger.corp.intel.com
Re: [PATCH] app/bbdev: dynamic lib support
Hi Kamil,
Quoted 55 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday, April 25, 2018 9:43 AM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Pablo
Quoted 37 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday, April 24, 2018 4:18 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Kamil,
app/test-bbdev/Makefile SRCS-$(CONFIG_RTE_TEST_BBDEV) +=
Quoted 25 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Wednesday, April 4, 2018 3:06 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportFrom: "Chalupnik, KamilX" <[email protected]>
Support for linking with dynamic library added in Baseband Device test application
Signed-off-by KamilX Chalupnik <[email protected]>--- app/test-bbdev/Makefile | 4 ++++ doc/guides/tools/testbbdev.rst | 7 +++++++ 2 files changed, 11 insertions(+)app/test-bbdev/Makefile index renamed from app/test-bbdev/Makefile +0
-06da0c8e..26c9a4b 100644
app/test-bbdev/Makefile +0
-0@@ -22,4 +22,8 @@ SRCS-$(CONFIG_RTE_TEST_BBDEV) +=
test_bbdev_vector.cQuoted 1 line
Quoted 8 lines
app/test-bbdev/Makefile SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev_vector.c · line 27
Quoted 5 lines
LDLIBS += -lm
app/test-bbdev/Makefile +3
-0+ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW),y) +LDLIBS += -lrte_pmd_bbdev_turbo_sw +endifThis is already done in
mk/rte.app.mk, so it should not be needed.
Quoted 3 lines
We need this here when DPDK is built as dynamic library. In rte.app.mk
lrte_pmd_bbdev_turbo_swis added to LDLIBS whenCONFIG_RTE_BUILD_SHARED_LIBis not set.
In that case, you need to use the EAL option "-d" with the .so library.
./testbbdev -d build/lib/librte_pmd_bbdev_turbo_sw.so --vdev="turbo_sw"
Btw, now that I have seen the name of the vdev, I think you should rename to "baseband_turbo_sw". Also, NULL PMD should be renamed to "baseband_null".
Thanks,
Pablo
A message that is not in the archive (sent off-list or not yet received): EEA9FF629BF25B47BD67ADE995041EE23CF5DBFE@IRSMSX103.ger.corp.intel.com
Re: [PATCH] app/bbdev: dynamic lib support
Hi Kamil,
Quoted 77 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Thursday, April 26, 2018 10:42 AM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Pablo,
Quoted 68 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Wednesday, April 25, 2018 6:11 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Kamil,
Quoted 58 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday, April 25, 2018 9:43 AM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Pablo
Quoted 37 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday, April 24, 2018 4:18 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Kamil,
app/test-bbdev/Makefile SRCS-$(CONFIG_RTE_TEST_BBDEV) +=
Quoted 25 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Wednesday, April 4, 2018 3:06 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportFrom: "Chalupnik, KamilX" <[email protected]>
Support for linking with dynamic library added in Baseband Device test application
Signed-off-by KamilX Chalupnik <[email protected]>--- app/test-bbdev/Makefile | 4 ++++ doc/guides/tools/testbbdev.rst | 7 +++++++ 2 files changed, 11 insertions(+)app/test-bbdev/Makefile +0
-0@@ -22,4 +22,8 @@ SRCS-$(CONFIG_RTE_TEST_BBDEV) +=
test_bbdev_vector.cQuoted 1 line
Quoted 7 lines
app/test-bbdev/Makefile
Quoted 4 lines
LDLIBS += -lm
app/test-bbdev/Makefile +2
-0+ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW),y) +LDLIBS += -lrte_pmd_bbdev_turbo_sw endifThis is already done in
mk/rte.app.mk, so it should not be needed.We need this here when DPDK is built as dynamic library. In rte.app.mk
lrte_pmd_bbdev_turbo_swis added to LDLIBS whenCONFIG_RTE_BUILD_SHARED_LIBis not set.
Quoted 6 lines
Quoted 3 lines
In that case, you need to use the EAL option "-d" with the .so library.
./testbbdev -d build/lib/librte_pmd_bbdev_turbo_sw.so --vdev="turbo_sw"
I thought it is fine as long as other test applications works in that way, e.g. test- crypto-perf, test-pmd
I think some of them are including the PMDs like what you are doing because these have additional API. In case of Turbo, it does not have it, and therefore, it is just another driver that can be plugged it in through "-d" option (notice that most of the PMDs are not doing what you are trying to do, which means that it is not required).
Thanks!
Pablo
Re: [PATCH] app/bbdev: dynamic lib support
In reply to a message not in the archiveQuoted 86 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Thursday, April 26, 2018 10:42 AM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Pablo,
Quoted 64 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Wednesday, April 25, 2018 6:11 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Kamil,
Quoted 55 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday, April 25, 2018 9:43 AM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Pablo
Quoted 44 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Tuesday, April 24, 2018 4:18 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Kamil,
app/test-bbdev/Makefile SRCS-$(CONFIG_RTE_TEST_BBDEV) +=
Quoted 25 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of KamilX Chalupnik
Sent: Wednesday, April 4, 2018 3:06 PM
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportFrom: "Chalupnik, KamilX" <[email protected]>
Support for linking with dynamic library added in Baseband Device test application
Signed-off-by KamilX Chalupnik <[email protected]>--- app/test-bbdev/Makefile | 4 ++++ doc/guides/tools/testbbdev.rst | 7 +++++++ 2 files changed, 11 insertions(+)app/test-bbdev/Makefile +0
-0@@ -22,4 +22,8 @@ SRCS-$(CONFIG_RTE_TEST_BBDEV) +=
test_bbdev_vector.capp/test-bbdev/Makefile SRCS-$(CONFIG_RTE_TEST_BBDEV) += test_bbdev_vector.c
Quoted 5 lines
app/test-bbdev/Makefile +2
-0LDLIBS += -lm +ifeq ($(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW),y) +LDLIBS += -lrte_pmd_bbdev_turbo_sw endifThis is already done in
mk/rte.app.mk, so it should not be needed.Quoted 7 lines
Quoted 3 lines
We need this here when DPDK is built as dynamic library. In rte.app.mk
lrte_pmd_bbdev_turbo_swis added to LDLIBS whenCONFIG_RTE_BUILD_SHARED_LIBis not set.In that case, you need to use the EAL option "-d" with the .so library.
./testbbdev -d build/lib/librte_pmd_bbdev_turbo_sw.so --vdev="turbo_sw"
I thought it is fine as long as other test applications works in that way, e.g. test- crypto-perf, test-pmd
Quoted 6 lines
Quoted 3 lines
Btw, now that I have seen the name of the vdev, I think you should rename to "
baseband_turbo_sw".
Also, NULL PMD should be renamed to "baseband_null".Ok, we will deliver such changes in patches for next release. Are you ok with that?
I think this change should not take a long time. The sooner we do it, the better,
as there might be more people using this in the future.
I can send the patch for you, so you can focus on other changes, and then you can see if it is fine for you.
Thanks,
Pablo
Quoted 4 lines
Best regards,
Kamil
A message that is not in the archive (sent off-list or not yet received): EEA9FF629BF25B47BD67ADE995041EE23CF5DD78@IRSMSX103.ger.corp.intel.com
Re: [PATCH] app/bbdev: dynamic lib support
Quoted 11 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Thursday, April 26, 2018 1:48 PM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Pablo
...
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Ok, we will deliver such changes in patches for next release. Are you ok with that?
I think this change should not take a long time. The sooner we do it, the better, as there might be more people using this in the future. I can send the patch for you, so you can focus on other changes, and then you can see if it is fine for you.
Quoted 4 lines
Quoted 2 lines
Thanks,
PabloOk. I will add this change to our patchset as well.
In order to make sure that users can still use the previous name, to avoid breaking Backwards compatibility, you modify DRIVER_NAME with the new name and then use RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, turbo_sw);
This way, both names can be used, but you should update the docs to use the new name.
Thanks,
Pablo
A message that is not in the archive (sent off-list or not yet received): EEA9FF629BF25B47BD67ADE995041EE23CF5DE21@IRSMSX103.ger.corp.intel.com
Re: [PATCH] app/bbdev: dynamic lib support
Quoted 52 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Thursday, April 26, 2018 3:24 PM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Pablo
Quoted 41 lines
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Thursday, April 26, 2018 3:22 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportQuoted 10 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Thursday, April 26, 2018 1:48 PM
To: De Lara Guarch, Pablo <[email protected]>; [email protected]
Cc: Mokhtar, Amr <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/bbdev: dynamic lib supportHi Pablo
...
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Ok, we will deliver such changes in patches for next release. Are you ok with that?
I think this change should not take a long time. The sooner we do it, the better, as there might be more people using this in the future. I can send the patch for you, so you can focus on other changes, and then you can see if it is fine for you.
Quoted 4 lines
Quoted 2 lines
Thanks,
PabloOk. I will add this change to our patchset as well.
In order to make sure that users can still use the previous name, to avoid breaking Backwards compatibility, you modify
DRIVER_NAMEwith the new name and then useRTE_PMD_REGISTER_ALIAS(DRIVER_NAME, turbo_sw); This way, both names can be used, but you should update the docs to use the new name.
Quoted 8 lines
Quoted 2 lines
Thanks,
PabloThanks for suggestions :)
I've already prepared a changes. Just one question. Can I prepare separate patch based on the 13 patchset? Is that ok? Such solution will be cleaner in my opinion.
Sure, this change should be independent from the other ones. You don't have to add all patches in the same patchset (when they are not logically related).
Thanks,
Pablo
Quoted 3 lines
Best regards,
Kamil
Quoted 19 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] doc: update bbdev library documentationFrom: "Chalupnik, KamilX" <[email protected]>
Update the documentation describing Wireless Basband Device:
- device capabilities updated
- input/output data buffers description added
- details about implementation of turbo encode/decode operation added
- images presenting CB/TB processing by turbo encoder/decoder added
Quoted 1 line
Signed-off-by KamilX Chalupnik <[email protected]>
De Lara Guarch, Pablo
AppliedQuoted 27 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Mokhtar, Amr
Sent: Friday, April 13, 2018 8:31 PM
To: Chalupnik, KamilX <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] doc: update bbdev library documentationQuoted 18 lines
-----Original Message-----
From: Chalupnik, KamilX
Sent: Wednesday 4 April 2018 15:06
To: [email protected]
Cc: Mokhtar, Amr <[email protected]>; Chalupnik, KamilX <[email protected]>
Subject: [PATCH] doc: update bbdev library documentationFrom: "Chalupnik, KamilX" <[email protected]>
Update the documentation describing Wireless Basband Device:
- device capabilities updated
- input/output data buffers description added
- details about implementation of turbo encode/decode operation added
- images presenting CB/TB processing by turbo encoder/decoder added
Quoted 3 lines
Quoted 1 line
Signed-off-by KamilX Chalupnik <[email protected]>Acked-by Amr Mokhtar <[email protected]>
Applied to dpdk-next-crypto.
Thanks,
Pablo
Hi,
04/04/2018 16:05, KamilX Chalupnik:
Quoted 1 line
From: "Chalupnik, KamilX" <[email protected]>
The above line will appear as the author name in Git. Please make sure it is the same as the Signed-off-by line. Usually, we use FirstName LastName, without any comma.
Quoted 9 lines
Update the documentation describing Wireless Basband Device:
- device capabilities updated
- input/output data buffers description added
- details about implementation of turbo encode/decode operation added
- images presenting CB/TB processing by turbo encoder/decoder addedSigned-off-by KamilX Chalupnik <[email protected]>
Is KamilX your name? Or just Kamil?
Quoted 6 lines
doc/guides/prog_guide/bbdev.rst | 247 +++++++++++++++++++++++--- doc/guides/prog_guide/img/turbo_tb_decode.png | Bin 0 -> 43552 bytes doc/guides/prog_guide/img/turbo_tb_encode.png | Bin 0 -> 46944 bytes 3 files changed, 222 insertions(+), 25 deletions(-) create mode 100644 doc/guides/prog_guide/img/turbo_tb_decode.png create mode 100644 doc/guides/prog_guide/img/turbo_tb_encode.png
No, sorry, you cannot add binary file in this repository. It is an Open Source project, we provide sources. For figures, the SVG format is preferred.
I'm sorry that your Intel colleagues did not warn you.
Quoted 40 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Thomas Monjalon
Sent: Sunday, April 22, 2018 9:17 PM
To: Chalupnik, KamilX <[email protected]>
Cc: [email protected]; Mokhtar, Amr <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] doc: update bbdev library documentationHi,
04/04/2018 16:05, KamilX Chalupnik:
Quoted 1 line
From: "Chalupnik, KamilX" <[email protected]>
The above line will appear as the author name in Git. Please make sure it is the same as the Signed-off-by line. Usually, we use FirstName LastName, without any comma.
Quoted 9 lines
Update the documentation describing Wireless Basband Device:
- device capabilities updated
- input/output data buffers description added
- details about implementation of turbo encode/decode operation added
- images presenting CB/TB processing by turbo encoder/decoder addedSigned-off-by KamilX Chalupnik <[email protected]>Is KamilX your name? Or just Kamil?
Quoted 1 line
doc/guides/prog_guide/bbdev.rst | 247 +++++++++++++++++++++++---
Quoted 5 lines
doc/guides/prog_guide/img/turbo_tb_decode.png | Bin 0 -> 43552 bytes doc/guides/prog_guide/img/turbo_tb_encode.png | Bin 0 -> 46944 bytes 3 files changed, 222 insertions(+), 25 deletions(-) create mode 100644 doc/guides/prog_guide/img/turbo_tb_decode.png create mode 100644 doc/guides/prog_guide/img/turbo_tb_encode.png
Quoted 6 lines
No, sorry, you cannot add binary file in this repository. It is an Open Source project, we provide sources. For figures, the SVG format is preferred.
I'm sorry that your Intel colleagues did not warn you.
Thomas is right. I should have spotted this, sorry about it. Will drop this from next-crypto subtree, so this patch requires a v2. Once it is sent, addressing Thomas' comments, it may be applied.
Apologies for the confusion,
Pablo
Quoted 24 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Sunday 22 April 2018 21:17
To: Chalupnik, KamilX <[email protected]>
Cc: [email protected]; Mokhtar, Amr <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] doc: update bbdev library documentationHi,
04/04/2018 16:05, KamilX Chalupnik:
Quoted 4 lines
From: "Chalupnik, KamilX" <[email protected]>
doc/guides/prog_guide/bbdev.rst | 247+++++++++++++++++++++++---
Quoted 1 line
doc/guides/prog_guide/img/turbo_tb_decode.png | Bin 0 -> 43552bytes
Quoted 1 line
doc/guides/prog_guide/img/turbo_tb_encode.png | Bin 0 -> 46944bytes
Quoted 3 lines
3 files changed, 222 insertions(+), 25 deletions(-) create mode 100644 doc/guides/prog_guide/img/turbo_tb_decode.png create mode 100644 doc/guides/prog_guide/img/turbo_tb_encode.png
Quoted 6 lines
No, sorry, you cannot add binary file in this repository. It is an Open Source project, we provide sources. For figures, the SVG format is preferred.
I'm sorry that your Intel colleagues did not warn you.
I wasn't aware there is specific preference for figures, this can be fixed. There is no specific reason for choosing .png except that there are files already in prog_guide/img/* of type .png. So it was assumed that its ok.
And BTW, did I miss it somewhere in DPDK documentation what particular image types should be submitted.
Will get this fixed. Thanks.
23/04/2018 12:56, Mokhtar, Amr:
Quoted 18 lines
From: Thomas Monjalon [mailto:[email protected]]
Quoted 17 lines
04/04/2018 16:05, KamilX Chalupnik:
Quoted 3 lines
From: "Chalupnik, KamilX" <[email protected]>
doc/guides/prog_guide/bbdev.rst | 247+++++++++++++++++++++++---
Quoted 1 line
doc/guides/prog_guide/img/turbo_tb_decode.png | Bin 0 -> 43552bytes
Quoted 1 line
doc/guides/prog_guide/img/turbo_tb_encode.png | Bin 0 -> 46944bytes
Quoted 3 lines
3 files changed, 222 insertions(+), 25 deletions(-) create mode 100644 doc/guides/prog_guide/img/turbo_tb_decode.png create mode 100644 doc/guides/prog_guide/img/turbo_tb_encode.pngNo, sorry, you cannot add binary file in this repository. It is an Open Source project, we provide sources. For figures, the SVG format is preferred.
Quoted 8 lines
Quoted 2 lines
I'm sorry that your Intel colleagues did not warn you.
I wasn't aware there is specific preference for figures, this can be fixed. There is no specific reason for choosing .png except that there are files already in prog_guide/img/* of type .png. So it was assumed that its ok.
And BTW, did I miss it somewhere in DPDK documentation what particular image types should be submitted.
Yes, it is in this doc:
http://dpdk.org/doc/guides/contributing/documentation.html#images
Quoted 1 line
Will get this fixed. Thanks.
Thanks
Quoted 36 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday 23 April 2018 12:12
To: Mokhtar, Amr <[email protected]>
Cc: Chalupnik, KamilX <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] doc: update bbdev library documentation23/04/2018 12:56, Mokhtar, Amr:
Quoted 12 lines
From: Thomas Monjalon [mailto:[email protected]]
Quoted 11 lines
04/04/2018 16:05, KamilX Chalupnik:
Quoted 3 lines
From: "Chalupnik, KamilX" <[email protected]>
doc/guides/prog_guide/bbdev.rst | 247+++++++++++++++++++++++---
Quoted 1 line
doc/guides/prog_guide/img/turbo_tb_decode.png | Bin 0 -> 43552bytes
Quoted 1 line
doc/guides/prog_guide/img/turbo_tb_encode.png | Bin 0 -> 46944bytes
Quoted 2 lines
3 files changed, 222 insertions(+), 25 deletions(-) create mode 100644doc/guides/prog_guide/img/turbo_tb_decode.png
Quoted 1 line
Quoted 1 line
Quoted 1 line
create mode 100644doc/guides/prog_guide/img/turbo_tb_encode.png
Quoted 10 lines
Quoted 7 lines
No, sorry, you cannot add binary file in this repository. It is an Open Source project, we provide sources. For figures, the SVG format is preferred.
I'm sorry that your Intel colleagues did not warn you.
I wasn't aware there is specific preference for figures, this can be fixed. There is no specific reason for choosing .png except that there are files
already
Quoted 9 lines
Quoted 2 lines
in prog_guide/img/* of type .png. So it was assumed that its ok. And BTW, did I miss it somewhere in DPDK documentation what
particular image
Quoted 1 line
types should be submitted.
Yes, it is in this doc:
http://dpdk.org/doc/guides/contributing/documentation.html#ima
ges
Ok, perfect. Will get it sorted accordingly..
Thanks!!
Quoted 4 lines
Quoted 1 line
Will get this fixed. Thanks.
Thanks