Commit Graph

167 Commits

Author SHA1 Message Date
David Marchand
1094dd940e cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated
a lot of discrepancies about inclusion of the rte_compat.h header.

Some headers are including it where unneeded, while others rely on
implicit inclusion.

Fix unneeded inclusions:
$ git grep -l include..rte_compat.h |
  xargs grep -LE '__rte_(internal|experimental)' |
  xargs sed -i -e '/#include..rte_compat.h/d'

Fix missing inclusion, by inserting rte_compat.h before the first
inclusion of a DPDK header:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#include..\(rte_\|.*pmd.h.$\)/{
      s/\(#include..\(rte_\|.*pmd.h.$\)\)/#include <rte_compat.h>\n\1/
    }'

Fix missing inclusion, by inserting rte_compat.h after the last
inclusion of a non DPDK header:
$ for file in $(git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h); do
    tac $file > $file.$$
    sed -i -e \
      '0,/#include../{
        s/\(#include..*$\)/#include <rte_compat.h>\n\n\1/
      }' $file.$$
    tac $file.$$ > $file
    rm $file.$$
  done

Fix missing inclusion, by inserting rte_compat.h after the header guard:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#define/{
      s/\(#define .*$\)/\1\n\n#include <rte_compat.h>/
    }'

And finally, exclude rte_compat.h itself.
$ git checkout lib/eal/include/rte_compat.h

At the end of all this, we have a clean tree:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h
buildtools/check-symbols.sh
devtools/checkpatches.sh
doc/guides/contributing/abi_policy.rst
doc/guides/rel_notes/release_20_11.rst
lib/eal/include/rte_compat.h

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-11-15 08:39:14 +01:00
Nicolas Chautru
e77d682aad baseband/acc100: fix input error related to padding
Previous commit includes some padding for some cases,
which may cause input warning from the HW
which should be safely ignored to avoid false alarm.

Fixes: 6f3325bbfa ("baseband/acc100: add LDPC encoder padding function")
Cc: stable@dpdk.org

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-08 14:42:25 +01:00
Hernan Vargas
f044948d45 baseband/acc100: detect deRM corner cases
Add function to detect if de-ratematch pre-processing is recommended for
SW corner cases.
Some specific 5GUL FEC corner cases may cause unintended back pressure
and in some cases a potential stability issue on the ACC100.
The PMD can detect such code block configuration and issue an info
message to the user.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-07 05:38:34 +01:00
Nicolas Chautru
f8a7430691 baseband/acc200: fix possible negative shift
Potential occurrence of negative shift when using invalid
configuration on ACC200. Enforcing that depth > 0.

Coverity issue: 381636
Fixes: 40e3adbdd3 ("baseband/acc200: add queue configuration")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
2022-11-03 12:26:17 +01:00
Hernan Vargas
48024cf1f1 baseband/acc100: remove redundant function
Remove acc100_dma_fill_blk_type_in which already exists in acc_common.h

Fixes: 32e8b7ea35 ("baseband/acc100: refactor to segregate common code")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:24:22 +01:00
Hernan Vargas
beaf1f876c baseband/acc: fix double MSI interrupt in TB mode
Fixed logical bug in SW causing MSI to be issued twice
when running in transport block mode.

Fixes: f404dfe35c ("baseband/acc100: support 4G processing")
Fixes: bec597b78a ("baseband/acc200: add LTE processing")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:22:36 +01:00
Hernan Vargas
31f79cb518 baseband/acc100: fix PMon register values
Enabled the PMon for ACC100 properly.
Previous commit was missing actual implementation
and using incorrect register values.

Fixes: b4bd57b74c ("baseband/acc100: configure PMON control registers")

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:21:28 +01:00
Nicolas Chautru
0cdecf4774 baseband/acc200: fix access corner case
To enforce safe access to the ACC200 device, the PMD requires
to explicitly check that the device is in configured and
enabled state prior to accessing queue resources.
This is done by checking the Qmgr ingress queue status.

Fixes: 40e3adbdd3 ("baseband/acc200: add queue configuration")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:16:15 +01:00
Nicolas Chautru
4e63e38c62 baseband/acc: fix possible overflow in queue release
Potential overflow issue when casting to 64bits,
notably relevant when extending number of queues.

Coverity issue: 381665
Fixes: 32e8b7ea35 ("baseband/acc100: refactor to segregate common code")
Fixes: 40e3adbdd3 ("baseband/acc200: add queue configuration")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:15:20 +01:00
Nicolas Chautru
e3e16275da baseband/acc200: fix LTE half iteration flag
The logic for the flag was inverted.
When starting with even iteration it actually runs
for an additional half iteration.
The change is specific to ACC200.

Fixes: bec597b78a ("baseband/acc200: add LTE processing")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-11-03 09:13:15 +01:00
Abdullah Ömer Yamaç
7dde9c844a drivers: omit symbol map when unneeded
In this patch, we removed the necessity of the version files and
you don't need to update these files for each release, you can just
remove them.

Suggested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
2022-11-14 15:22:46 +01:00
Hernan Vargas
b4bd57b74c baseband/acc100: configure PMON control registers
Enable performance monitor control registers.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
989dec301a baseband/acc100: add ring companion address
Store the virtual address of companion ring as part of queue
information. Use this address to calculate the op address.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
8e71bfcebb baseband/acc100: update device info
Remove unused capabilities, use dummy operation as start count for
number of queues.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
3a77593b1e baseband/acc100: store FCW from first CB descriptor
Store the descriptor from the first code block from a transport block.
Copy the LDPC FCW from the first descriptor into the rest of the CBs in
that TB.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
69fbbc3f77 baseband/acc100: update log messages
Add extra values for some log messages. No functional impact.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
53352f6b69 baseband/acc100: update uplink CB input length
Use the FCW E parameter for rate matching
as the code block input length.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
ae555d42ec baseband/acc100: add queue stop operation
Implement new feature to stop queue operation.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
f3f66e827b baseband/acc100: implement configurable queue depth
Implement new feature to make queue depth configurable
based on decode or encode mode.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
39fe62d0ea baseband/acc100: update LDPC enc/dec validation
Update validate functions to check for valid LDPC parameters to avoid
any HW issues.
Adding protection for null corner case and for HARQ inbound size out
of range.
HARQ input size from application may be invalid and causing HW issue.
Add checks to ensure that if HARQ is invalid, set to some valid size to
ensure HW issues do not occur.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
c7847be75c baseband/acc100: support LDPC transport block
Added LDPC enqueue functions to handle transport blocks.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
4afc627f32 baseband/acc100: enable input validation by default
Enable validation functions by default and provide a new flag
RTE_LIBRTE_SKIP_VALIDATE if the user wants to run without
validating input to save cycles.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
7104c6b8d4 baseband/acc100: add HARQ index helper function
Refactor code to use the HARQ index helper function and make harq_idx
uint32.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
f7613291d5 baseband/acc100: support scatter-gather
Add flag to support scatter-gather for the mbuf

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
103161cc93 baseband/acc100: add enqueue status
Add enqueue status as part of rte_bbdev_queue_data.
This is a new feature to update queue status and indicate the reason why
a previous enqueue may or may not have consumed all requested operations.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
1884ff4f50 baseband/acc100: update debug print for LDPC FCW
Print full size of FCW LDPC structure on debug messages.
This is just a cosmetic fix, no need to fix on previous code base.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
ba2262fe16 baseband/acc100: fix close cleanup
Set local pointer to NULL after rte_free.
This needs to be set explicitly since logic may check for null pointers.

Fixes: 060e767293 ("baseband/acc100: add queue configuration")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
75114f78cf baseband/acc100: fix null HARQ input case
An invalid HW operation may be caused in case the user provide
the BBDEV API and HARQ operation with input enabled and zero input.
Added protection for that case.

Fixes: 5ad5060f8f ("baseband/acc100: add LDPC processing functions")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
badb3b79b9 baseband/acc100: fix device minimum alignment
Historical mistakes, there should be no 64B alignment requirement for
the buffer being processed. Any 1B alignment is sufficient.

Fixes: 9200ffa5cd ("baseband/acc100: add info get function")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
935745f56b baseband/acc100: fix clearing PF IR outside handler
Clearing of PF info ring outside of handler may cause interrupt to be
missed.
A condition in the ACC100 PMD implementation may cause an interrupt
functional handler call to be missed due to related bit being cleared
when checking PF info ring status.

Fixes: 0653146415 ("baseband/acc100: support interrupt")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
ec1424fffa baseband/acc100: fix input length for CRC24B
Input length should be reduced only for CRC24B.

Fixes: 5ad5060f8f ("baseband/acc100: add LDPC processing functions")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
e23491fc2e baseband/acc100: fix ring/queue allocation
Allocate info ring, tail pointers and HARQ layout memory
for a device only if it hasn't already been allocated.

Fixes: 0653146415 ("baseband/acc100: support interrupt")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
5802f36dd4 baseband/acc100: enforce additional check on FCW
Enforce additional check on Frame Control Word validity and
add stronger alignment for decompression mode.

Fixes: 5ad5060f8f ("baseband/acc100: add LDPC processing functions")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
4a2f231ee1 baseband/acc100: add null checks
Add unlikely checks for NULL operation values.

Fixes: f404dfe35c ("baseband/acc100: support 4G processing")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
1d43b46139 baseband/acc100: check turbo dec/enc input
Add NULL check for the turbo decoder and encoder input length.

Fixes: 3bfc5f6040 ("baseband/acc100: add debug function to validate input")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
6f3325bbfa baseband/acc100: add LDPC encoder padding function
LDPC Encoder input may need to be padded to avoid small beat for ACC100.
Padding 5GDL input buffer length (BLEN) to avoid case (BLEN % 64) <= 8.
Adding protection for corner case to avoid for 5GDL occurrence of last
beat within the ACC100 fabric with <= 8B which might trigger a fabric
corner case hang issue.

Fixes: 5ad5060f8f ("baseband/acc100: add LDPC processing functions")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
36341139e4 baseband/acc100: fix memory leak
Moved check for undefined device before allocating queue data structure.

Coverity issue: 375803, 375813, 375819, 375827, 375831
Fixes: 060e767293 ("baseband/acc100: add queue configuration")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
2df5fe2023 baseband/acc100: check AQ availability
In some corner case to run more batch enqueue than
supported. A protection is required to avoid that corner case.
Enhance all ACC100 enqueue operations with check to see if there is room
in the atomic queue(AQ) for enqueueing batches into the queue manager.

Fixes: 5ad5060f8f ("baseband/acc100: add LDPC processing functions")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
c24d53b4cc baseband/acc100: fix ring availability calculation
Refactored queue availability computation to prevent the
application to dequeue more than what may have been enqueued.

Fixes: 5ad5060f8f ("baseband/acc100: add LDPC processing functions")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Nicolas Chautru
9dcebacb0c baseband/acc: add descriptor index helpers
Added set of helper functions used through the code to
track descriptor indexes in a queue ring.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
2022-10-29 13:01:39 +02:00
Nicolas Chautru
18e56beeb8 baseband/acc: remove dependencies not required
Removed some of libraries from the external dependency captured in
meson build file which are not required.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Nicolas Chautru
c1407bfa05 baseband/acc200: add PF configuration
Added configure function notably to configure the device from
the PF within DPDK and bbdev-test (without external dependency).
That function is kept common to all ACC devices.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Hernan Vargas <hernan.vargas@intel.com>
2022-10-29 13:01:39 +02:00
Nicolas Chautru
a2ee515fdb baseband/acc200: add device status and VF2PF communication
Added support to expose the device status seen from the
host through v2pf mailbox communication.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:38 +02:00
Nicolas Chautru
3cabc8eaf5 baseband/acc200: support interrupt
Added support for capability and functions for
MSI/MSI-X interrupt and underlying information ring.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:38 +02:00
Nicolas Chautru
437e396414 baseband/acc200: support FFT
Added functions and capability for FFT processing

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:38 +02:00
Nicolas Chautru
bec597b78a baseband/acc200: add LTE processing
Added functions and capability for 4G FEC

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:38 +02:00
Nicolas Chautru
e640f6cdfa baseband/acc200: add LDPC processing
Added LDPC encode and decode processing functions.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:38 +02:00
Nicolas Chautru
40e3adbdd3 baseband/acc200: add queue configuration
Added function to create and configure queues for the
ACC200 device.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:38 +02:00
Nicolas Chautru
fb43071542 baseband/acc200: add info query
Added support for info_get to allow to query the device.
Null capability exposed.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:38 +02:00
Nicolas Chautru
b8f8d1aeb2 baseband/acc200: add HW register definitions
Added registers list and structure to access the ACC200 device.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:38 +02:00