Skip to content

Commit 64cf903

Browse files
committed
codelab: forward: small style improvements
1 parent 95e1b63 commit 64cf903

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

codelab/forward.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,18 @@ main_loop(const char *netmap_port_one, const char *netmap_port_two,
118118

119119
while (!stop) {
120120
struct pollfd pfd[2];
121+
121122
pfd[0].fd = nmd_one->fd;
122-
pfd[0].events = 0;
123123
pfd[1].fd = nmd_two->fd;
124+
pfd[0].events = 0;
124125
pfd[1].events = 0;
125-
/* if port one has RX packets then
126+
/* TODO: if port one has RX packets then
126127
* POLLOUT on port two else POLLIN on
127128
* port one */
128129

129130
poll(pfd, 2, 1000);
130131

131-
/* try to copy as many packets as possible
132+
/* TODO: try to copy as many packets as possible
132133
* from port 1 to port 2
133134
*/
134135
}

0 commit comments

Comments
 (0)