The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/qat/qat_api/common/include/sal_hw_gen.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* SPDX-License-Identifier: BSD-3-Clause */
    2 /* Copyright(c) 2007-2022 Intel Corporation */
    3 /* $FreeBSD$ */
    4 /**
    5  ***************************************************************************
    6  * @file sal_hw_gen.h
    7  *
    8  * @ingroup SalHwGen
    9  *
   10  * @description
   11  *     Functions which return a value corresponding to qat device generation
   12  *
   13  ***************************************************************************/
   14 
   15 #ifndef SAL_HW_GEN_H
   16 #define SAL_HW_GEN_H
   17 
   18 #include "cpa.h"
   19 #include "sal_types_compression.h"
   20 #include "lac_sal_types_crypto.h"
   21 
   22 /**
   23  ***************************************************************************
   24  * @ingroup SalHwGen
   25  *
   26  * @description This function returns whether qat device is gen 4 or not
   27  *
   28  * @param[in] pService     pointer to compression service
   29  *
   30  ***************************************************************************/
   31 
   32 static inline CpaBoolean
   33 isDcGen4x(const sal_compression_service_t *pService)
   34 {
   35         return (pService->generic_service_info.gen == GEN4);
   36 }
   37 
   38 /**
   39  ***************************************************************************
   40  * @ingroup SalHwGen
   41  *
   42  * @description This function returns whether qat device is gen 2/3 or not
   43  *
   44  * @param[in] pService     pointer to compression service
   45  *
   46  ***************************************************************************/
   47 
   48 static inline CpaBoolean
   49 isDcGen2x(const sal_compression_service_t *pService)
   50 {
   51         return ((pService->generic_service_info.gen == GEN2) ||
   52                 (pService->generic_service_info.gen == GEN3));
   53 }
   54 
   55 /**
   56  ***************************************************************************
   57  * @ingroup SalHwGen
   58  *
   59  * @description This function returns whether qat device is gen 4 or not
   60  *
   61  * @param[in] pService     pointer to crypto service
   62  *
   63  ***************************************************************************/
   64 
   65 static inline CpaBoolean
   66 isCyGen4x(const sal_crypto_service_t *pService)
   67 {
   68         return (pService->generic_service_info.gen == GEN4);
   69 }
   70 
   71 /**
   72  ***************************************************************************
   73  * @ingroup SalHwGen
   74  *
   75  * @description This function returns whether qat device is gen 2/3 or not
   76  *
   77  * @param[in] pService     pointer to crypto service
   78  *
   79  ***************************************************************************/
   80 
   81 static inline CpaBoolean
   82 isCyGen2x(const sal_crypto_service_t *pService)
   83 {
   84         return ((pService->generic_service_info.gen == GEN2) ||
   85                 (pService->generic_service_info.gen == GEN3));
   86 }
   87 
   88 #endif /* SAL_HW_GEN_H */

Cache object: 7809ed068db00ec0eadb0620c976ffef


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.