LCOV - code coverage report
Current view: top level - drivers/net/ntnic - ntnic_mod_reg.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 112 0.0 %
Date: 2025-02-01 18:54:23 Functions: 0 32 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 32 0.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * SPDX-License-Identifier: BSD-3-Clause
       3                 :            :  * Copyright(c) 2023 Napatech A/S
       4                 :            :  */
       5                 :            : 
       6                 :            : #include "ntnic_mod_reg.h"
       7                 :            : 
       8                 :            : static struct sg_ops_s *sg_ops;
       9                 :            : 
      10                 :          0 : void register_sg_ops(struct sg_ops_s *ops)
      11                 :            : {
      12                 :          0 :         sg_ops = ops;
      13                 :          0 : }
      14                 :            : 
      15                 :          0 : const struct sg_ops_s *get_sg_ops(void)
      16                 :            : {
      17         [ #  # ]:          0 :         if (sg_ops == NULL)
      18                 :          0 :                 sg_init();
      19                 :          0 :         return sg_ops;
      20                 :            : }
      21                 :            : 
      22                 :            : /*
      23                 :            :  *
      24                 :            :  */
      25                 :            : static struct meter_ops_s *meter_ops;
      26                 :            : 
      27                 :          0 : void register_meter_ops(struct meter_ops_s *ops)
      28                 :            : {
      29                 :          0 :         meter_ops = ops;
      30                 :          0 : }
      31                 :            : 
      32                 :          0 : const struct meter_ops_s *get_meter_ops(void)
      33                 :            : {
      34         [ #  # ]:          0 :         if (meter_ops == NULL)
      35                 :          0 :                 meter_init();
      36                 :            : 
      37                 :          0 :         return meter_ops;
      38                 :            : }
      39                 :            : 
      40                 :            : /*
      41                 :            :  *
      42                 :            :  */
      43                 :            : static const struct ntnic_filter_ops *ntnic_filter_ops;
      44                 :            : 
      45                 :          0 : void register_ntnic_filter_ops(const struct ntnic_filter_ops *ops)
      46                 :            : {
      47                 :          0 :         ntnic_filter_ops = ops;
      48                 :          0 : }
      49                 :            : 
      50                 :          0 : const struct ntnic_filter_ops *get_ntnic_filter_ops(void)
      51                 :            : {
      52         [ #  # ]:          0 :         if (ntnic_filter_ops == NULL)
      53                 :          0 :                 ntnic_filter_init();
      54                 :            : 
      55                 :          0 :         return ntnic_filter_ops;
      56                 :            : }
      57                 :            : 
      58                 :            : static struct link_ops_s *link_100g_ops;
      59                 :            : 
      60                 :          0 : void register_100g_link_ops(struct link_ops_s *ops)
      61                 :            : {
      62                 :          0 :         link_100g_ops = ops;
      63                 :          0 : }
      64                 :            : 
      65                 :          0 : const struct link_ops_s *get_100g_link_ops(void)
      66                 :            : {
      67         [ #  # ]:          0 :         if (link_100g_ops == NULL)
      68                 :          0 :                 link_100g_init();
      69                 :          0 :         return link_100g_ops;
      70                 :            : }
      71                 :            : 
      72                 :            : static const struct port_ops *port_ops;
      73                 :            : 
      74                 :          0 : void register_port_ops(const struct port_ops *ops)
      75                 :            : {
      76                 :          0 :         port_ops = ops;
      77                 :          0 : }
      78                 :            : 
      79                 :          0 : const struct port_ops *get_port_ops(void)
      80                 :            : {
      81         [ #  # ]:          0 :         if (port_ops == NULL)
      82                 :          0 :                 port_init();
      83                 :          0 :         return port_ops;
      84                 :            : }
      85                 :            : 
      86                 :            : static const struct nt4ga_stat_ops *nt4ga_stat_ops;
      87                 :            : 
      88                 :          0 : void register_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops)
      89                 :            : {
      90                 :          0 :         nt4ga_stat_ops = ops;
      91                 :          0 : }
      92                 :            : 
      93                 :          0 : const struct nt4ga_stat_ops *get_nt4ga_stat_ops(void)
      94                 :            : {
      95         [ #  # ]:          0 :         if (nt4ga_stat_ops == NULL)
      96                 :          0 :                 nt4ga_stat_ops_init();
      97                 :            : 
      98                 :          0 :         return nt4ga_stat_ops;
      99                 :            : }
     100                 :            : 
     101                 :            : static const struct adapter_ops *adapter_ops;
     102                 :            : 
     103                 :          0 : void register_adapter_ops(const struct adapter_ops *ops)
     104                 :            : {
     105                 :          0 :         adapter_ops = ops;
     106                 :          0 : }
     107                 :            : 
     108                 :          0 : const struct adapter_ops *get_adapter_ops(void)
     109                 :            : {
     110         [ #  # ]:          0 :         if (adapter_ops == NULL)
     111                 :          0 :                 adapter_init();
     112                 :          0 :         return adapter_ops;
     113                 :            : }
     114                 :            : 
     115                 :            : static struct clk9563_ops *clk9563_ops;
     116                 :            : 
     117                 :          0 : void register_clk9563_ops(struct clk9563_ops *ops)
     118                 :            : {
     119                 :          0 :         clk9563_ops = ops;
     120                 :          0 : }
     121                 :            : 
     122                 :          0 : struct clk9563_ops *get_clk9563_ops(void)
     123                 :            : {
     124         [ #  # ]:          0 :         if (clk9563_ops == NULL)
     125                 :          0 :                 clk9563_ops_init();
     126                 :          0 :         return clk9563_ops;
     127                 :            : }
     128                 :            : 
     129                 :            : static struct rst_nt200a0x_ops *rst_nt200a0x_ops;
     130                 :            : 
     131                 :          0 : void register_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops)
     132                 :            : {
     133                 :          0 :         rst_nt200a0x_ops = ops;
     134                 :          0 : }
     135                 :            : 
     136                 :          0 : struct rst_nt200a0x_ops *get_rst_nt200a0x_ops(void)
     137                 :            : {
     138         [ #  # ]:          0 :         if (rst_nt200a0x_ops == NULL)
     139                 :          0 :                 rst_nt200a0x_ops_init();
     140                 :          0 :         return rst_nt200a0x_ops;
     141                 :            : }
     142                 :            : 
     143                 :            : static struct rst9563_ops *rst9563_ops;
     144                 :            : 
     145                 :          0 : void register_rst9563_ops(struct rst9563_ops *ops)
     146                 :            : {
     147                 :          0 :         rst9563_ops = ops;
     148                 :          0 : }
     149                 :            : 
     150                 :          0 : struct rst9563_ops *get_rst9563_ops(void)
     151                 :            : {
     152         [ #  # ]:          0 :         if (rst9563_ops == NULL)
     153                 :          0 :                 rst9563_ops_init();
     154                 :          0 :         return rst9563_ops;
     155                 :            : }
     156                 :            : 
     157                 :            : static const struct flow_backend_ops *flow_backend_ops;
     158                 :            : 
     159                 :          0 : void register_flow_backend_ops(const struct flow_backend_ops *ops)
     160                 :            : {
     161                 :          0 :         flow_backend_ops = ops;
     162                 :          0 : }
     163                 :            : 
     164                 :          0 : const struct flow_backend_ops *get_flow_backend_ops(void)
     165                 :            : {
     166         [ #  # ]:          0 :         if (flow_backend_ops == NULL)
     167                 :          0 :                 flow_backend_init();
     168                 :            : 
     169                 :          0 :         return flow_backend_ops;
     170                 :            : }
     171                 :            : 
     172                 :            : static const struct profile_inline_ops *profile_inline_ops;
     173                 :            : 
     174                 :          0 : void register_profile_inline_ops(const struct profile_inline_ops *ops)
     175                 :            : {
     176                 :          0 :         profile_inline_ops = ops;
     177                 :          0 : }
     178                 :            : 
     179                 :          0 : const struct profile_inline_ops *get_profile_inline_ops(void)
     180                 :            : {
     181         [ #  # ]:          0 :         if (profile_inline_ops == NULL)
     182                 :          0 :                 profile_inline_init();
     183                 :            : 
     184                 :          0 :         return profile_inline_ops;
     185                 :            : }
     186                 :            : 
     187                 :            : static const struct flow_filter_ops *flow_filter_ops;
     188                 :            : 
     189                 :          0 : void register_flow_filter_ops(const struct flow_filter_ops *ops)
     190                 :            : {
     191                 :          0 :         flow_filter_ops = ops;
     192                 :          0 : }
     193                 :            : 
     194                 :          0 : const struct flow_filter_ops *get_flow_filter_ops(void)
     195                 :            : {
     196         [ #  # ]:          0 :         if (flow_filter_ops == NULL)
     197                 :          0 :                 init_flow_filter();
     198                 :            : 
     199                 :          0 :         return flow_filter_ops;
     200                 :            : }
     201                 :            : 
     202                 :            : static const struct rte_flow_fp_ops *dev_fp_flow_ops;
     203                 :            : 
     204                 :          0 : void register_dev_fp_flow_ops(const struct rte_flow_fp_ops *ops)
     205                 :            : {
     206                 :          0 :         dev_fp_flow_ops = ops;
     207                 :          0 : }
     208                 :            : 
     209                 :          0 : const struct rte_flow_fp_ops *get_dev_fp_flow_ops(void)
     210                 :            : {
     211         [ #  # ]:          0 :         if (dev_fp_flow_ops == NULL)
     212                 :          0 :                 dev_fp_flow_init();
     213                 :            : 
     214                 :          0 :         return dev_fp_flow_ops;
     215                 :            : }
     216                 :            : 
     217                 :            : static const struct rte_flow_ops *dev_flow_ops;
     218                 :            : 
     219                 :          0 : void register_dev_flow_ops(const struct rte_flow_ops *ops)
     220                 :            : {
     221                 :          0 :         dev_flow_ops = ops;
     222                 :          0 : }
     223                 :            : 
     224                 :          0 : const struct rte_flow_ops *get_dev_flow_ops(void)
     225                 :            : {
     226         [ #  # ]:          0 :         if (dev_flow_ops == NULL)
     227                 :          0 :                 dev_flow_init();
     228                 :            : 
     229                 :          0 :         return dev_flow_ops;
     230                 :            : }
     231                 :            : 
     232                 :            : static struct ntnic_xstats_ops *ntnic_xstats_ops;
     233                 :            : 
     234                 :          0 : void register_ntnic_xstats_ops(struct ntnic_xstats_ops *ops)
     235                 :            : {
     236                 :          0 :         ntnic_xstats_ops = ops;
     237                 :          0 : }
     238                 :            : 
     239                 :          0 : struct ntnic_xstats_ops *get_ntnic_xstats_ops(void)
     240                 :            : {
     241         [ #  # ]:          0 :         if (ntnic_xstats_ops == NULL)
     242                 :          0 :                 ntnic_xstats_ops_init();
     243                 :            : 
     244                 :          0 :         return ntnic_xstats_ops;
     245                 :            : }

Generated by: LCOV version 1.14