LCOV - code coverage report
Current view: top level - lib/graph - rte_graph_model_rtc.h (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 9 0.0 %
Date: 2025-02-01 18:54:23 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(C) 2020 Marvell International Ltd.
       3                 :            :  * Copyright(C) 2023 Intel Corporation
       4                 :            :  */
       5                 :            : 
       6                 :            : #include "rte_graph_worker_common.h"
       7                 :            : 
       8                 :            : /**
       9                 :            :  * Perform graph walk on the circular buffer and invoke the process function
      10                 :            :  * of the nodes and collect the stats.
      11                 :            :  *
      12                 :            :  * @param graph
      13                 :            :  *   Graph pointer returned from rte_graph_lookup function.
      14                 :            :  *
      15                 :            :  * @see rte_graph_lookup()
      16                 :            :  */
      17                 :            : static inline void
      18                 :          0 : rte_graph_walk_rtc(struct rte_graph *graph)
      19                 :            : {
      20                 :          0 :         const rte_graph_off_t *cir_start = graph->cir_start;
      21                 :          0 :         const rte_node_t mask = graph->cir_mask;
      22                 :          0 :         uint32_t head = graph->head;
      23                 :            :         struct rte_node *node;
      24                 :            : 
      25                 :            :         /*
      26                 :            :          * Walk on the source node(s) ((cir_start - head) -> cir_start) and then
      27                 :            :          * on the pending streams (cir_start -> (cir_start + mask) -> cir_start)
      28                 :            :          * in a circular buffer fashion.
      29                 :            :          *
      30                 :            :          *      +-----+ <= cir_start - head [number of source nodes]
      31                 :            :          *      |     |
      32                 :            :          *      | ... | <= source nodes
      33                 :            :          *      |     |
      34                 :            :          *      +-----+ <= cir_start [head = 0] [tail = 0]
      35                 :            :          *      |     |
      36                 :            :          *      | ... | <= pending streams
      37                 :            :          *      |     |
      38                 :            :          *      +-----+ <= cir_start + mask
      39                 :            :          */
      40         [ #  # ]:          0 :         while (likely(head != graph->tail)) {
      41                 :          0 :                 node = (struct rte_node *)RTE_PTR_ADD(graph, cir_start[(int32_t)head++]);
      42                 :            :                 __rte_node_process(graph, node);
      43         [ #  # ]:          0 :                 head = likely((int32_t)head > 0) ? head & mask : head;
      44                 :            :         }
      45                 :          0 :         graph->tail = 0;
      46                 :          0 : }

Generated by: LCOV version 1.14