Skip to content

Commit c9e778f

Browse files
sink
1 parent 88337b8 commit c9e778f

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

sink.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,35 +57,9 @@ udp_port_match(const char *buf, unsigned len, int udp_port)
5757
static int
5858
main_loop(const char *netmap_port, int udp_port)
5959
{
60-
struct nm_desc *nmd;
61-
62-
nmd = nm_open(netmap_port, NULL, 0, NULL);
63-
/* check for errors */
64-
6560
while (!stop) {
66-
int r;
67-
/* for each ring index from nmd->first_rx_ring to
68-
* nmd->last_rx_ring (included)
69-
*/
70-
/* synchronize! */
71-
ioctl(nmd->fd, NIOCRXSYNC);
72-
for (r = nmd->first_rx_ring; r <= nmd->last_rx_ring; r++) {
73-
struct netmap_ring *ring = NETMAP_RXRING(nifp, r);
74-
75-
/* for each packet from ring->head to ring->tail
76-
* (excluded) */
77-
for ( ; ring->head != ring->tail;
78-
ring->head = nm_ring_next(ring, ring->head)) {
79-
struct netmap_slot *slot = &ring->slot[ring->head];
80-
void *buf = NETMAP_BUF(ring, slot->buf_idx);
81-
/* count if match */
82-
}
83-
/* update ring->head and ring->cur */
84-
ring->cur = ring->head;
85-
}
8661
}
8762

88-
8963
return 0;
9064
}
9165

0 commit comments

Comments
 (0)