MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sw_port_unlink

Function sw_port_unlink

dpdk/drivers/event/sw/sw_evdev.c:93–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93static int
94sw_port_unlink(struct rte_eventdev *dev, void *port, uint8_t queues[],
95 uint16_t nb_unlinks)
96{
97 struct sw_port *p = port;
98 struct sw_evdev *sw = sw_pmd_priv(dev);
99 unsigned int i, j;
100
101 int unlinked = 0;
102 for (i = 0; i < nb_unlinks; i++) {
103 struct sw_qid *q = &sw->qids[queues[i]];
104 for (j = 0; j < q->cq_num_mapped_cqs; j++) {
105 if (q->cq_map[j] == p->id) {
106 q->cq_map[j] =
107 q->cq_map[q->cq_num_mapped_cqs - 1];
108 rte_smp_wmb();
109 q->cq_num_mapped_cqs--;
110 unlinked++;
111
112 p->num_qids_mapped--;
113
114 if (q->type == RTE_SCHED_TYPE_ORDERED)
115 p->num_ordered_qids--;
116
117 continue;
118 }
119 }
120 }
121
122 p->unlinks_in_progress += unlinked;
123 rte_smp_mb();
124
125 return unlinked;
126}
127
128static int
129sw_port_unlinks_in_progress(struct rte_eventdev *dev, void *port)

Callers

nothing calls this directly

Calls 2

sw_pmd_privFunction · 0.85
rte_smp_mbFunction · 0.85

Tested by

no test coverage detected