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 133 0.0 %
Date: 2025-04-03 19:37:06 Functions: 0 38 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 38 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 :                 nthw_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 :                 nthw_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 :                 nthw_link_100g_init();
      69                 :          0 :         return link_100g_ops;
      70                 :            : }
      71                 :            : 
      72                 :            : /*
      73                 :            :  *
      74                 :            :  */
      75                 :            : static struct link_ops_s *link_agx_100g_ops;
      76                 :            : 
      77                 :          0 : void register_agx_100g_link_ops(struct link_ops_s *ops)
      78                 :            : {
      79                 :          0 :         link_agx_100g_ops = ops;
      80                 :          0 : }
      81                 :            : 
      82                 :          0 : const struct link_ops_s *get_agx_100g_link_ops(void)
      83                 :            : {
      84         [ #  # ]:          0 :         if (link_agx_100g_ops == NULL)
      85                 :          0 :                 link_agx_100g_init();
      86                 :          0 :         return link_agx_100g_ops;
      87                 :            : }
      88                 :            : 
      89                 :            : static const struct port_ops *port_ops;
      90                 :            : 
      91                 :          0 : void register_port_ops(const struct port_ops *ops)
      92                 :            : {
      93                 :          0 :         port_ops = ops;
      94                 :          0 : }
      95                 :            : 
      96                 :          0 : const struct port_ops *get_port_ops(void)
      97                 :            : {
      98         [ #  # ]:          0 :         if (port_ops == NULL)
      99                 :          0 :                 nthw_port_init();
     100                 :          0 :         return port_ops;
     101                 :            : }
     102                 :            : 
     103                 :            : static const struct nt4ga_stat_ops *nt4ga_stat_ops;
     104                 :            : 
     105                 :          0 : void register_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops)
     106                 :            : {
     107                 :          0 :         nt4ga_stat_ops = ops;
     108                 :          0 : }
     109                 :            : 
     110                 :          0 : const struct nt4ga_stat_ops *get_nt4ga_stat_ops(void)
     111                 :            : {
     112         [ #  # ]:          0 :         if (nt4ga_stat_ops == NULL)
     113                 :          0 :                 nt4ga_stat_ops_init();
     114                 :            : 
     115                 :          0 :         return nt4ga_stat_ops;
     116                 :            : }
     117                 :            : 
     118                 :            : static const struct adapter_ops *adapter_ops;
     119                 :            : 
     120                 :          0 : void register_adapter_ops(const struct adapter_ops *ops)
     121                 :            : {
     122                 :          0 :         adapter_ops = ops;
     123                 :          0 : }
     124                 :            : 
     125                 :          0 : const struct adapter_ops *get_adapter_ops(void)
     126                 :            : {
     127         [ #  # ]:          0 :         if (adapter_ops == NULL)
     128                 :          0 :                 nthw_adapter_init();
     129                 :          0 :         return adapter_ops;
     130                 :            : }
     131                 :            : 
     132                 :            : static struct clk9563_ops *clk9563_ops;
     133                 :            : 
     134                 :          0 : void register_clk9563_ops(struct clk9563_ops *ops)
     135                 :            : {
     136                 :          0 :         clk9563_ops = ops;
     137                 :          0 : }
     138                 :            : 
     139                 :          0 : struct clk9563_ops *get_clk9563_ops(void)
     140                 :            : {
     141         [ #  # ]:          0 :         if (clk9563_ops == NULL)
     142                 :          0 :                 clk9563_ops_init();
     143                 :          0 :         return clk9563_ops;
     144                 :            : }
     145                 :            : 
     146                 :            : static struct rst_nt200a0x_ops *rst_nt200a0x_ops;
     147                 :            : 
     148                 :          0 : void register_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops)
     149                 :            : {
     150                 :          0 :         rst_nt200a0x_ops = ops;
     151                 :          0 : }
     152                 :            : 
     153                 :          0 : struct rst_nt200a0x_ops *get_rst_nt200a0x_ops(void)
     154                 :            : {
     155         [ #  # ]:          0 :         if (rst_nt200a0x_ops == NULL)
     156                 :          0 :                 rst_nt200a0x_ops_init();
     157                 :          0 :         return rst_nt200a0x_ops;
     158                 :            : }
     159                 :            : 
     160                 :            : static struct rst9563_ops *rst9563_ops;
     161                 :            : 
     162                 :          0 : void register_rst9563_ops(struct rst9563_ops *ops)
     163                 :            : {
     164                 :          0 :         rst9563_ops = ops;
     165                 :          0 : }
     166                 :            : 
     167                 :          0 : struct rst9563_ops *get_rst9563_ops(void)
     168                 :            : {
     169         [ #  # ]:          0 :         if (rst9563_ops == NULL)
     170                 :          0 :                 rst9563_ops_init();
     171                 :          0 :         return rst9563_ops;
     172                 :            : }
     173                 :            : 
     174                 :            : static const struct flow_backend_ops *flow_backend_ops;
     175                 :            : 
     176                 :          0 : void register_flow_backend_ops(const struct flow_backend_ops *ops)
     177                 :            : {
     178                 :          0 :         flow_backend_ops = ops;
     179                 :          0 : }
     180                 :            : 
     181                 :            : static struct rst9574_ops *rst9574_ops;
     182                 :            : 
     183                 :          0 : void register_rst9574_ops(struct rst9574_ops *ops)
     184                 :            : {
     185                 :          0 :         rst9574_ops = ops;
     186                 :          0 : }
     187                 :            : 
     188                 :          0 : struct rst9574_ops *get_rst9574_ops(void)
     189                 :            : {
     190         [ #  # ]:          0 :         if (rst9574_ops == NULL)
     191                 :          0 :                 rst9574_ops_init();
     192                 :            : 
     193                 :          0 :         return rst9574_ops;
     194                 :            : }
     195                 :            : 
     196                 :            : static struct rst_nt400dxx_ops *rst_nt400dxx_ops;
     197                 :            : 
     198                 :          0 : void register_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops)
     199                 :            : {
     200                 :          0 :         rst_nt400dxx_ops = ops;
     201                 :          0 : }
     202                 :            : 
     203                 :          0 : struct rst_nt400dxx_ops *get_rst_nt400dxx_ops(void)
     204                 :            : {
     205         [ #  # ]:          0 :         if (rst_nt400dxx_ops == NULL)
     206                 :          0 :                 rst_nt400dxx_ops_init();
     207                 :            : 
     208                 :          0 :         return rst_nt400dxx_ops;
     209                 :            : }
     210                 :            : 
     211                 :          0 : const struct flow_backend_ops *get_flow_backend_ops(void)
     212                 :            : {
     213         [ #  # ]:          0 :         if (flow_backend_ops == NULL)
     214                 :          0 :                 nthw_flow_backend_init();
     215                 :            : 
     216                 :          0 :         return flow_backend_ops;
     217                 :            : }
     218                 :            : 
     219                 :            : static const struct profile_inline_ops *profile_inline_ops;
     220                 :            : 
     221                 :          0 : void register_profile_inline_ops(const struct profile_inline_ops *ops)
     222                 :            : {
     223                 :          0 :         profile_inline_ops = ops;
     224                 :          0 : }
     225                 :            : 
     226                 :          0 : const struct profile_inline_ops *get_profile_inline_ops(void)
     227                 :            : {
     228         [ #  # ]:          0 :         if (profile_inline_ops == NULL)
     229                 :          0 :                 profile_inline_init();
     230                 :            : 
     231                 :          0 :         return profile_inline_ops;
     232                 :            : }
     233                 :            : 
     234                 :            : static const struct flow_filter_ops *flow_filter_ops;
     235                 :            : 
     236                 :          0 : void register_flow_filter_ops(const struct flow_filter_ops *ops)
     237                 :            : {
     238                 :          0 :         flow_filter_ops = ops;
     239                 :          0 : }
     240                 :            : 
     241                 :          0 : const struct flow_filter_ops *get_flow_filter_ops(void)
     242                 :            : {
     243         [ #  # ]:          0 :         if (flow_filter_ops == NULL)
     244                 :          0 :                 nthw_init_flow_filter();
     245                 :            : 
     246                 :          0 :         return flow_filter_ops;
     247                 :            : }
     248                 :            : 
     249                 :            : static const struct rte_flow_fp_ops *dev_fp_flow_ops;
     250                 :            : 
     251                 :          0 : void register_dev_fp_flow_ops(const struct rte_flow_fp_ops *ops)
     252                 :            : {
     253                 :          0 :         dev_fp_flow_ops = ops;
     254                 :          0 : }
     255                 :            : 
     256                 :          0 : const struct rte_flow_fp_ops *get_dev_fp_flow_ops(void)
     257                 :            : {
     258         [ #  # ]:          0 :         if (dev_fp_flow_ops == NULL)
     259                 :          0 :                 nthw_dev_fp_flow_init();
     260                 :            : 
     261                 :          0 :         return dev_fp_flow_ops;
     262                 :            : }
     263                 :            : 
     264                 :            : static const struct rte_flow_ops *dev_flow_ops;
     265                 :            : 
     266                 :          0 : void register_dev_flow_ops(const struct rte_flow_ops *ops)
     267                 :            : {
     268                 :          0 :         dev_flow_ops = ops;
     269                 :          0 : }
     270                 :            : 
     271                 :          0 : const struct rte_flow_ops *get_dev_flow_ops(void)
     272                 :            : {
     273         [ #  # ]:          0 :         if (dev_flow_ops == NULL)
     274                 :          0 :                 nthw_dev_flow_init();
     275                 :            : 
     276                 :          0 :         return dev_flow_ops;
     277                 :            : }
     278                 :            : 
     279                 :            : static struct ntnic_xstats_ops *ntnic_xstats_ops;
     280                 :            : 
     281                 :          0 : void register_ntnic_xstats_ops(struct ntnic_xstats_ops *ops)
     282                 :            : {
     283                 :          0 :         ntnic_xstats_ops = ops;
     284                 :          0 : }
     285                 :            : 
     286                 :          0 : struct ntnic_xstats_ops *get_ntnic_xstats_ops(void)
     287                 :            : {
     288         [ #  # ]:          0 :         if (ntnic_xstats_ops == NULL)
     289                 :          0 :                 ntnic_xstats_ops_init();
     290                 :            : 
     291                 :          0 :         return ntnic_xstats_ops;
     292                 :            : }

Generated by: LCOV version 1.14