LCOV - code coverage report
Current view: top level - drivers/net/atlantic - rte_pmd_atlantic.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 30 0.0 %
Date: 2025-05-01 17:49:45 Functions: 0 6 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 24 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(c) 2018 Aquantia Corporation
       3                 :            :  */
       4                 :            : 
       5                 :            : #include <ethdev_driver.h>
       6                 :            : 
       7                 :            : #include <eal_export.h>
       8                 :            : #include "rte_pmd_atlantic.h"
       9                 :            : #include "atl_ethdev.h"
      10                 :            : 
      11                 :            : 
      12                 :            : RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_atl_macsec_enable, 19.05)
      13                 :            : int
      14                 :          0 : rte_pmd_atl_macsec_enable(uint16_t port,
      15                 :            :                           uint8_t encr, uint8_t repl_prot)
      16                 :            : {
      17                 :            :         struct rte_eth_dev *dev;
      18                 :            : 
      19         [ #  # ]:          0 :         RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
      20                 :            : 
      21                 :          0 :         dev = &rte_eth_devices[port];
      22                 :            : 
      23         [ #  # ]:          0 :         if (!is_atlantic_supported(dev))
      24                 :            :                 return -ENOTSUP;
      25                 :            : 
      26                 :          0 :         return atl_macsec_enable(dev, encr, repl_prot);
      27                 :            : }
      28                 :            : 
      29                 :            : RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_atl_macsec_disable, 19.05)
      30                 :            : int
      31                 :          0 : rte_pmd_atl_macsec_disable(uint16_t port)
      32                 :            : {
      33                 :            :         struct rte_eth_dev *dev;
      34                 :            : 
      35         [ #  # ]:          0 :         RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
      36                 :            : 
      37                 :          0 :         dev = &rte_eth_devices[port];
      38                 :            : 
      39         [ #  # ]:          0 :         if (!is_atlantic_supported(dev))
      40                 :            :                 return -ENOTSUP;
      41                 :            : 
      42                 :          0 :         return atl_macsec_disable(dev);
      43                 :            : }
      44                 :            : 
      45                 :            : RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_atl_macsec_config_txsc, 19.05)
      46                 :            : int
      47                 :          0 : rte_pmd_atl_macsec_config_txsc(uint16_t port, uint8_t *mac)
      48                 :            : {
      49                 :            :         struct rte_eth_dev *dev;
      50                 :            : 
      51         [ #  # ]:          0 :         RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
      52                 :            : 
      53                 :          0 :         dev = &rte_eth_devices[port];
      54                 :            : 
      55         [ #  # ]:          0 :         if (!is_atlantic_supported(dev))
      56                 :            :                 return -ENOTSUP;
      57                 :            : 
      58                 :          0 :         return atl_macsec_config_txsc(dev, mac);
      59                 :            : }
      60                 :            : 
      61                 :            : RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_atl_macsec_config_rxsc, 19.05)
      62                 :            : int
      63                 :          0 : rte_pmd_atl_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi)
      64                 :            : {
      65                 :            :         struct rte_eth_dev *dev;
      66                 :            : 
      67         [ #  # ]:          0 :         RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
      68                 :            : 
      69                 :          0 :         dev = &rte_eth_devices[port];
      70                 :            : 
      71         [ #  # ]:          0 :         if (!is_atlantic_supported(dev))
      72                 :            :                 return -ENOTSUP;
      73                 :            : 
      74                 :          0 :         return atl_macsec_config_rxsc(dev, mac, pi);
      75                 :            : }
      76                 :            : 
      77                 :            : RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_atl_macsec_select_txsa, 19.05)
      78                 :            : int
      79                 :          0 : rte_pmd_atl_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
      80                 :            :                                  uint32_t pn, uint8_t *key)
      81                 :            : {
      82                 :            :         struct rte_eth_dev *dev;
      83                 :            : 
      84         [ #  # ]:          0 :         RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
      85                 :            : 
      86                 :          0 :         dev = &rte_eth_devices[port];
      87                 :            : 
      88         [ #  # ]:          0 :         if (!is_atlantic_supported(dev))
      89                 :            :                 return -ENOTSUP;
      90                 :            : 
      91                 :          0 :         return atl_macsec_select_txsa(dev, idx, an, pn, key);
      92                 :            : }
      93                 :            : 
      94                 :            : RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_atl_macsec_select_rxsa, 19.05)
      95                 :            : int
      96                 :          0 : rte_pmd_atl_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
      97                 :            :                                  uint32_t pn, uint8_t *key)
      98                 :            : {
      99                 :            :         struct rte_eth_dev *dev;
     100                 :            : 
     101         [ #  # ]:          0 :         RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
     102                 :            : 
     103                 :          0 :         dev = &rte_eth_devices[port];
     104                 :            : 
     105         [ #  # ]:          0 :         if (!is_atlantic_supported(dev))
     106                 :            :                 return -ENOTSUP;
     107                 :            : 
     108                 :          0 :         return atl_macsec_select_rxsa(dev, idx, an, pn, key);
     109                 :            : }

Generated by: LCOV version 1.14