LCOV - code coverage report
Current view: top level - drivers/net/xsc - xsc_ethdev.h (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 4 0.0 %
Date: 2025-10-01 17:51:42 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 48 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright 2025 Yunsilicon Technology Co., Ltd.
       3                 :            :  */
       4                 :            : 
       5                 :            : #ifndef _XSC_ETHDEV_H_
       6                 :            : #define _XSC_ETHDEV_H_
       7                 :            : 
       8                 :            : #include "xsc_dev.h"
       9                 :            : 
      10                 :            : struct xsc_ethdev_priv {
      11                 :            :         struct rte_eth_dev *eth_dev;
      12                 :            :         struct rte_pci_device *pci_dev;
      13                 :            :         struct xsc_dev *xdev;
      14                 :            :         struct xsc_repr_port *repr_port;
      15                 :            :         struct xsc_dev_config config;
      16                 :            :         struct rte_eth_dev_data *dev_data;
      17                 :            :         struct rte_ether_addr mac[XSC_MAX_MAC_ADDRESSES];
      18                 :            :         struct rte_eth_rss_conf rss_conf;
      19                 :            : 
      20                 :            :         int representor_id;
      21                 :            :         uint32_t ifindex;
      22                 :            :         uint16_t mtu;
      23                 :            :         uint8_t isolated;
      24                 :            :         uint8_t is_representor;
      25                 :            : 
      26                 :            :         uint32_t mode:7;
      27                 :            :         uint32_t member_bitmap:8;
      28                 :            :         uint32_t funcid_type:3;
      29                 :            :         uint32_t funcid:14;
      30                 :            : 
      31                 :            :         uint16_t eth_type;
      32                 :            :         uint16_t qp_set_id;
      33                 :            : 
      34                 :            :         uint16_t num_sq;
      35                 :            :         uint16_t num_rq;
      36                 :            : 
      37                 :            :         struct xsc_txq_data *(*txqs)[];
      38                 :            :         struct xsc_rxq_data *(*rxqs)[];
      39                 :            : };
      40                 :            : 
      41                 :            : #define TO_XSC_ETHDEV_PRIV(dev) ((struct xsc_ethdev_priv *)(dev)->data->dev_private)
      42                 :            : 
      43                 :            : static __rte_always_inline struct xsc_txq_data *
      44                 :            : xsc_txq_get(struct xsc_ethdev_priv *priv, uint16_t idx)
      45                 :            : {
      46   [ #  #  #  #  :          0 :         if (priv->txqs != NULL && (*priv->txqs)[idx] != NULL)
          #  #  #  #  #  
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  #  
                      # ]
      47                 :          0 :                 return (*priv->txqs)[idx];
      48                 :            :         return NULL;
      49                 :            : }
      50                 :            : 
      51                 :            : static __rte_always_inline struct xsc_rxq_data *
      52                 :            : xsc_rxq_get(struct xsc_ethdev_priv *priv, uint16_t idx)
      53                 :            : {
      54   [ #  #  #  #  :          0 :         if (priv->rxqs != NULL && (*priv->rxqs)[idx] != NULL)
          #  #  #  #  #  
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  #  
                      # ]
      55                 :          0 :                 return (*priv->rxqs)[idx];
      56                 :            :         return NULL;
      57                 :            : }
      58                 :            : 
      59                 :            : #endif /* _XSC_ETHDEV_H_ */

Generated by: LCOV version 1.14