LCOV - code coverage report
Current view: top level - drivers/vdpa/sfc - sfc_vdpa_mcdi.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 17 0.0 %
Date: 2024-12-01 18:57:19 Functions: 0 6 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(c) 2020-2021 Xilinx, Inc.
       3                 :            :  */
       4                 :            : 
       5                 :            : #include "sfc_efx_mcdi.h"
       6                 :            : 
       7                 :            : #include "sfc_vdpa.h"
       8                 :            : #include "sfc_vdpa_debug.h"
       9                 :            : #include "sfc_vdpa_log.h"
      10                 :            : 
      11                 :            : static sfc_efx_mcdi_dma_alloc_cb sfc_vdpa_mcdi_dma_alloc;
      12                 :            : static int
      13                 :          0 : sfc_vdpa_mcdi_dma_alloc(void *cookie, const char *name, size_t len,
      14                 :            :                         efsys_mem_t *esmp)
      15                 :            : {
      16                 :            :         struct sfc_vdpa_adapter *sva = cookie;
      17                 :            : 
      18                 :          0 :         return sfc_vdpa_dma_alloc(sva, name, len, esmp);
      19                 :            : }
      20                 :            : 
      21                 :            : static sfc_efx_mcdi_dma_free_cb sfc_vdpa_mcdi_dma_free;
      22                 :            : static void
      23                 :          0 : sfc_vdpa_mcdi_dma_free(void *cookie, efsys_mem_t *esmp)
      24                 :            : {
      25                 :            :         struct sfc_vdpa_adapter *sva = cookie;
      26                 :            : 
      27                 :          0 :         sfc_vdpa_dma_free(sva, esmp);
      28                 :          0 : }
      29                 :            : 
      30                 :            : static sfc_efx_mcdi_sched_restart_cb sfc_vdpa_mcdi_sched_restart;
      31                 :            : static void
      32                 :          0 : sfc_vdpa_mcdi_sched_restart(void *cookie)
      33                 :            : {
      34                 :            :         RTE_SET_USED(cookie);
      35                 :          0 : }
      36                 :            : 
      37                 :            : static sfc_efx_mcdi_mgmt_evq_poll_cb sfc_vdpa_mcdi_mgmt_evq_poll;
      38                 :            : static void
      39                 :          0 : sfc_vdpa_mcdi_mgmt_evq_poll(void *cookie)
      40                 :            : {
      41                 :            :         RTE_SET_USED(cookie);
      42                 :          0 : }
      43                 :            : 
      44                 :            : static const struct sfc_efx_mcdi_ops sfc_vdpa_mcdi_ops = {
      45                 :            :         .dma_alloc      = sfc_vdpa_mcdi_dma_alloc,
      46                 :            :         .dma_free       = sfc_vdpa_mcdi_dma_free,
      47                 :            :         .sched_restart  = sfc_vdpa_mcdi_sched_restart,
      48                 :            :         .mgmt_evq_poll  = sfc_vdpa_mcdi_mgmt_evq_poll,
      49                 :            : 
      50                 :            : };
      51                 :            : 
      52                 :            : int
      53                 :          0 : sfc_vdpa_mcdi_init(struct sfc_vdpa_adapter *sva)
      54                 :            : {
      55                 :            :         uint32_t logtype;
      56                 :            : 
      57                 :          0 :         sfc_vdpa_log_init(sva, "entry");
      58                 :            : 
      59                 :          0 :         logtype = sfc_vdpa_register_logtype(&(sva->pdev->addr),
      60                 :            :                                             SFC_VDPA_LOGTYPE_MCDI_STR,
      61                 :            :                                             RTE_LOG_NOTICE);
      62                 :            : 
      63                 :          0 :         return sfc_efx_mcdi_init(&sva->mcdi, logtype,
      64                 :            :                                  sva->log_prefix, sva->nic,
      65                 :            :                                  &sfc_vdpa_mcdi_ops, sva);
      66                 :            : }
      67                 :            : 
      68                 :            : void
      69                 :          0 : sfc_vdpa_mcdi_fini(struct sfc_vdpa_adapter *sva)
      70                 :            : {
      71                 :          0 :         sfc_vdpa_log_init(sva, "entry");
      72                 :          0 :         sfc_efx_mcdi_fini(&sva->mcdi);
      73                 :          0 : }

Generated by: LCOV version 1.14