Flush rx queue. 8< */
| 217 | |
| 218 | /* Flush rx queue. 8< */ |
| 219 | static void |
| 220 | flush_rx_queue(uint16_t node) |
| 221 | { |
| 222 | uint16_t j; |
| 223 | struct node *cl; |
| 224 | |
| 225 | if (cl_rx_buf[node].count == 0) |
| 226 | return; |
| 227 | |
| 228 | cl = &nodes[node]; |
| 229 | if (rte_ring_enqueue_bulk(cl->rx_q, (void **)cl_rx_buf[node].buffer, |
| 230 | cl_rx_buf[node].count, NULL) != cl_rx_buf[node].count){ |
| 231 | for (j = 0; j < cl_rx_buf[node].count; j++) |
| 232 | rte_pktmbuf_free(cl_rx_buf[node].buffer[j]); |
| 233 | cl->stats.rx_drop += cl_rx_buf[node].count; |
| 234 | } else |
| 235 | cl->stats.rx += cl_rx_buf[node].count; |
| 236 | |
| 237 | cl_rx_buf[node].count = 0; |
| 238 | } |
| 239 | /* >8 End of sending a burst of traffic to a node. */ |
| 240 | |
| 241 | /* |
no test coverage detected