Compare commits

...
Sign in to create a new pull request.

4 commits

3 changed files with 13 additions and 5 deletions

View file

@ -20,8 +20,8 @@ TARGETS = pixelflut-render pixelflut-bench
all: $(TARGETS) all: $(TARGETS)
pixelflut-render: new.c pixelflut.h pixelflut-render: pixelflut.c pixelflut.h
$(CC) $(STD) $(OPT) -pthread $(WARN) $(EXTRA) -o $@ new.c $(CC) $(STD) $(OPT) -pthread $(WARN) $(EXTRA) -o $@ pixelflut.c
pixelflut-bench: bench.c pixelflut.h pixelflut-bench: bench.c pixelflut.h
$(CC) $(STD) $(OPT) -pthread $(WARN) $(EXTRA) -o $@ bench.c $(CC) $(STD) $(OPT) -pthread $(WARN) $(EXTRA) -o $@ bench.c

View file

@ -65,7 +65,7 @@
#define FRAME_BYTES (FRAME_PIXELS * FRAME_CHANNELS) #define FRAME_BYTES (FRAME_PIXELS * FRAME_CHANNELS)
/* Top-left corner where the frame is drawn on the shared wall. */ /* Top-left corner where the frame is drawn on the shared wall. */
#define CANVAS_OFFSET_X 1200 #define CANVAS_OFFSET_X 80
#define CANVAS_OFFSET_Y 40 #define CANVAS_OFFSET_Y 40
/* Number of datagrams needed to cover a whole frame once. */ /* Number of datagrams needed to cover a whole frame once. */
@ -231,15 +231,21 @@ static void *worker_main(void *arg)
/* Transient back-pressure. Back off briefly so the queue /* Transient back-pressure. Back off briefly so the queue
* drains (rather than spinning on failing syscalls), then * drains (rather than spinning on failing syscalls), then
* resend the same batch - no need to repaint. */ * resend the same batch - no need to repaint. */
usleep(200); usleep(100);
continue; continue;
case ECONNREFUSED: case ECONNREFUSED:
break; /* stale ICMP on connected UDP; repaint and retry */ break; /* stale ICMP on connected UDP; repaint and retry */
case EHOSTUNREACH: /* display down / IPv6 ND unresolved */
case ENETUNREACH:
case EHOSTDOWN:
case ENETDOWN:
usleep(100000);
break;
default: default:
perror("sendmmsg"); perror("sendmmsg");
break; break;
} }
break; /* ECONNREFUSED / unexpected: stop, repaint, retry */ break;
} }
} }

2
run.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
./pixelflut-render ix1 2