aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/qat/qat_api
Commit message (Collapse)AuthorAgeFilesLines
* qat: enable qat driver for 402xx deviceHareshx Sankar Raj2025-09-151-1/+1
| | | | | | | | | | | | | | Enabled qat driver support for 402xx device with ID 0x4944/0x4945. This is an additional device supported under the existing qat_4xxx driver. Firmwares specific to the 402xx device are added. Signed-off-by: Hareshx Sankar Raj <hareshx.sankar.raj@intel.com> Relnotes: yes Sponsored by: Intel Corporation MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D52488
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-111-1/+1
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* qat: update API files to use SPDX identifierHareshx Sankar Raj2025-06-0622-770/+44
| | | | | | | | | | | API files are updated to have SPDX identifier and remove longer form of license to ensure consistency with the license format across all files. Reviewed by: markj, ziaee MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D50379
* qat: driver updates to improve code and fix bugsHareshx Sankar Raj2025-06-068-26/+59
| | | | | | | | | | Bug fixes and improvements are done for the qat code base to improve code quality. Reviewed by: markj, ziaee MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D50379
* qat: reimplement cpaCyGetXXXInstances as a wrapperHareshx Sankar Raj2025-06-063-223/+182
| | | | | | | | | | | | | Currently code from sal_instances.c and sal_crypto.c for getting cy instances or number of instances is duplicated. This commit replaces cpaCyGetXXXInstances implementation with Lac_GetCyXXXInstancesByType invocation. Reviewed by: markj, ziaee MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D50379
* qat: fix typos and formatting issuesHareshx Sankar Raj2025-06-0676-461/+381
| | | | | | | | | | | | Multiple typos are corrected across the source code. Formatting corrections are done to improve code quality and maintainability. Some files which did not have proper Copyright license are updated. Reviewed by: markj, ziaee MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D50379
* Fix enum warnings in qatDimitry Andric2024-07-311-2/+4
| | | | | | | | | | | | | | | | | | | This fixes a number of clang 19 warnings: sys/dev/qat/qat_api/common/compression/dc_session.c:154:15: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare] 154 | if (CPA_TRUE == pService->comp_device_data.enableDmm) { | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/dev/qat/qat_api/common/compression/dc_session.c:285:17: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare] 285 | (CPA_TRUE == pService->comp_device_data.enableDmm) ? | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `enableDmm` field of variable `comp_device_data` is of type `icp_qat_hw_compression_delayed_match_t`, not `CpaBoolean`. In this case, we can seamlessly replace the value with `ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED`, which is numerically equal to `CPA_TRUE`. MFC after: 3 days
* Deprecate contigfree(9) in favour of free(9)Bjoern A. Zeeb2024-07-261-1/+1
| | | | | | | | | | | | | | | As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer needed and should not be used anymore. We leave a wrapper for 3rd party code in at least 15.x but remove (almost) all other cases from the tree. This leaves one use of contigfree(9) untouched; that was the original trigger for 9e6544dd6e02 and is handled in D45813 (to be committed seperately later). Sponsored by: The FreeBSD Foundation Reviewed by: markj, kib Tested by: pho (10h stress test run) Differential Revision: https://reviews.freebsd.org/D46099
* qat: Fix typo (triple S)Jose Luis Duran2023-12-281-1/+1
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/955
* qat: Fix two typos in source code commentsGordon Bergling2023-12-172-2/+2
| | | | | | - s/parmeters/parameters/ MFC after: 3 days
* qat: Intel 4xxx Series driver API extensionPiotr Kasierski2023-09-0610-314/+1175
| | | | | | | | | | | | | | | | | This commit introduces: - Quick Assist API update for partial decompress and zero padding. - Refactor of UIO locking. - VF driver hotplug fix. - Minor code style fixes for firmware API. Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com> Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com> Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com> Patch co-authored by: Karol Grzadziel <karolx.grzadziel@intel.com> Sponsored by: Intel Corporation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41613
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-16122-122/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* qat: Add Intel® 4xxx Series VF driver supportKrzysztof Zdziarski2023-06-1241-3513/+10467
| | | | | | | | | | | | | | | | | | | | | | | Overview: Intel(R) QuickAssist Technology (Intel(R) QAT) provides hardware acceleration for offloading security, authentication and compression services from the CPU, thus significantly increasing the performance and efficiency of standard platform solutions. This commit introduces: - Intel® 4xxx Series VF driver support. - Device configurability via sysctls. - UIO support for Intel® 4xxx Series devices. Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com> Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com> Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com> Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com> Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com> Patch co-authored by: Karol Grzadziel <karolx.grzadziel@intel.com> Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D39850
* qat: Fixed Coverity reported issueKrzysztof Zdziarski2023-02-011-8/+6
| | | | | | | | | | | | | | | | | | | | This patch provides fixes for following Coverity issues: CID 1504073 CID 1504075 CID 1504076 CID 1504077 Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com> Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com> Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com> Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com> Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com> Patch co-authored by: Karol Grzadziel <karolx.grzadziel@intel.com> Fixes: a977168c48d4 ("qat: Add Intel® 4xxx Series platform support") Reviewed by: markj Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D38339
* qat: Add Intel® 4xxx Series platform supportMichal Gulbicki2023-01-2450-2075/+6011
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overview: Intel(R) QuickAssist Technology (Intel(R) QAT) provides hardware acceleration for offloading security, authentication and compression services from the CPU, thus significantly increasing the performance and efficiency of standard platform solutions. This commit introduces: - Intel® 4xxx Series platform support. - QuickAssist kernel API implementation update for Generation 4 device. Enabled services: symmetric cryptography and data compression. - Increased default number of crypto instances in static configuration for performance purposes. OCF backend changes: - changed GCM/CCM MAC validation policy to generate MAC by HW and validate by SW due to the QAT HW limitations. Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com> Patch co-authored by: Michal Jaraczewski <michalx.jaraczewski@intel.com> Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com> Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com> Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com> Patch co-authored by: Adam Czupryna <adamx.czupryna@intel.com> Patch co-authored by: Konrad Zelazny <konradx.zelazny@intel.com> Patch co-authored by: Katarzyna Rucinska <katarzynax.kargol@intel.com> Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com> Patch co-authored by: Zbigniew Jedlinski <zbigniewx.jedlinski@intel.com> Sponsored by: Intel Corporation Reviewed by: markj, jhb Differential Revision: https://reviews.freebsd.org/D36254
* qat(4): Fix common typos in source code commentsGordon Bergling2023-01-112-3/+3
| | | | | | - s/desciptor/descriptor/ MFC after: 3 days
* qat: make function definition match prototypeEd Maste2022-09-061-1/+1
| | | | | | | | LacSymCb_CallbacksRegister declared with a (void) argument list but was defined with (). With Clang 15 this produced a warning. MFC after: 3 days Sponsored by: The FreeBSD Foundation
* qat(4): Correct some typos in source code commentsGordon Bergling2022-09-044-6/+6
| | | | | | | - s/occured/occurred/ - s/the the/the/ MFC after: 3 days
* qat: Add #includes for missing prototypes.John Baldwin2022-09-022-0/+5
| | | | | | | | | | This fixes numerous -Wmissing-prototypes warnings when that warning is enabled. Reviewed by: MichalX.Gulbicki_intel.com, markj Sponsored by: DARPA Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D36331
* qat: Add a prototype for icp_adf_is_dev_in_error.John Baldwin2022-09-021-1/+11
| | | | | | | Reviewed by: MichalX.Gulbicki_intel.com, markj Sponsored by: DARPA Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D36330
* qat: Drop extraneous parentheses from some macro values.John Baldwin2022-09-021-4/+4
| | | | | | | | | | | | This header duplicates a few #defines in "adf_cfg_strings.h". The latter header does not use the unneeded parentheses, but if a C file includes both of these headers, clang raises an error because the macro is redefined with a different value. Reviewed by: markj Sponsored by: DARPA Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D36329
* qat: Import a new Intel (R) QAT driverJulian Grajkowski2022-07-27138-0/+68272
QAT in-tree driver ported from out-of-tree release available from 01.org. The driver exposes complete cryptography and data compression API in the kernel and integrates with Open Crypto Framework. Details of supported operations, devices and usage can be found in man and on 01.org. Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com> Patch co-authored by: Michal Jaraczewski <michalx.jaraczewski@intel.com> Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com> Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com> Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com> Patch co-authored by: Adam Czupryna <adamx.czupryna@intel.com> Patch co-authored by: Konrad Zelazny <konradx.zelazny@intel.com> Patch co-authored by: Katarzyna Rucinska <katarzynax.kargol@intel.com> Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com> Patch co-authored by: Zbigniew Jedlinski <zbigniewx.jedlinski@intel.com> Reviewed by: markj, jhb (OCF integration) Reviewed by: debdrup, pauamma (docs) Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D34632