LCOV - code coverage report
Current view: top level - drivers/common/cnxk - roc_nix_inl_dp.h (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 6 0.0 %
Date: 2024-02-14 00:53:57 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 30 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(C) 2022 Marvell.
       3                 :            :  */
       4                 :            : #ifndef _ROC_NIX_INL_DP_H_
       5                 :            : #define _ROC_NIX_INL_DP_H_
       6                 :            : 
       7                 :            : /* OT INB HW area */
       8                 :            : #define ROC_NIX_INL_OT_IPSEC_INB_HW_SZ                                         \
       9                 :            :         PLT_ALIGN(sizeof(struct roc_ot_ipsec_inb_sa), ROC_ALIGN)
      10                 :            : /* OT INB SW reserved area */
      11                 :            : #define ROC_NIX_INL_OT_IPSEC_INB_SW_RSVD 128
      12                 :            : #define ROC_NIX_INL_OT_IPSEC_INB_SA_SZ                                         \
      13                 :            :         (ROC_NIX_INL_OT_IPSEC_INB_HW_SZ + ROC_NIX_INL_OT_IPSEC_INB_SW_RSVD)
      14                 :            : #define ROC_NIX_INL_OT_IPSEC_INB_SA_SZ_LOG2 10
      15                 :            : 
      16                 :            : /* OT OUTB HW area */
      17                 :            : #define ROC_NIX_INL_OT_IPSEC_OUTB_HW_SZ                                        \
      18                 :            :         PLT_ALIGN(sizeof(struct roc_ot_ipsec_outb_sa), ROC_ALIGN)
      19                 :            : 
      20                 :            : /* OT OUTB SW reserved area */
      21                 :            : #define ROC_NIX_INL_OT_IPSEC_OUTB_SW_RSVD 128
      22                 :            : #define ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ                                        \
      23                 :            :         (ROC_NIX_INL_OT_IPSEC_OUTB_HW_SZ + ROC_NIX_INL_OT_IPSEC_OUTB_SW_RSVD)
      24                 :            : #define ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ_LOG2 9
      25                 :            : 
      26                 :            : /* Alignment of SA Base */
      27                 :            : #define ROC_NIX_INL_SA_BASE_ALIGN BIT_ULL(16)
      28                 :            : 
      29                 :            : static inline struct roc_ot_ipsec_inb_sa *
      30                 :            : roc_nix_inl_ot_ipsec_inb_sa(uintptr_t base, uint64_t idx)
      31                 :            : {
      32                 :          0 :         uint64_t off = idx << ROC_NIX_INL_OT_IPSEC_INB_SA_SZ_LOG2;
      33                 :            : 
      34                 :          0 :         return PLT_PTR_ADD(base, off);
      35                 :            : }
      36                 :            : 
      37                 :            : static inline struct roc_ot_ipsec_outb_sa *
      38                 :            : roc_nix_inl_ot_ipsec_outb_sa(uintptr_t base, uint64_t idx)
      39                 :            : {
      40                 :          0 :         uint64_t off = idx << ROC_NIX_INL_OT_IPSEC_OUTB_SA_SZ_LOG2;
      41                 :            : 
      42                 :          0 :         return PLT_PTR_ADD(base, off);
      43                 :            : }
      44                 :            : 
      45                 :            : static inline void *
      46                 :            : roc_nix_inl_ot_ipsec_inb_sa_sw_rsvd(void *sa)
      47                 :            : {
      48   [ #  #  #  #  :          0 :         return PLT_PTR_ADD(sa, ROC_NIX_INL_OT_IPSEC_INB_HW_SZ);
          #  #  #  #  #  
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  #  
                      # ]
      49                 :            : }
      50                 :            : 
      51                 :            : static inline void *
      52                 :            : roc_nix_inl_ot_ipsec_outb_sa_sw_rsvd(void *sa)
      53                 :            : {
      54   [ #  #  #  #  :          0 :         return PLT_PTR_ADD(sa, ROC_NIX_INL_OT_IPSEC_OUTB_HW_SZ);
                   #  # ]
      55                 :            : }
      56                 :            : 
      57                 :            : #endif /* _ROC_NIX_INL_DP_H_ */

Generated by: LCOV version 1.14