Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368591
b: refs/heads/master
c: 98e821a
h: refs/heads/master
i:
  368589: b5cb0c6
  368587: f1fc51a
  368583: 49724df
  368575: bb9b152
v: v3
  • Loading branch information
Willem de Bruijn authored and David S. Miller committed Mar 21, 2013
1 parent 0c5dd8f commit 85687aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eaaa31392690c7609f7afeec5ba38a79d009842d
refs/heads/master: 98e821a2a927b6dc0f7adc4b64ad29bec1b6ff89
8 changes: 7 additions & 1 deletion trunk/tools/testing/selftests/net/psock_fanout.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,13 @@ static char *sock_fanout_open_ring(int fd)
.tp_frame_nr = RING_NUM_FRAMES,
};
char *ring;
int val = TPACKET_V2;

if (setsockopt(fd, SOL_PACKET, PACKET_VERSION, (void *) &val,
sizeof(val))) {
perror("packetsock ring setsockopt version");
exit(1);
}
if (setsockopt(fd, SOL_PACKET, PACKET_RX_RING, (void *) &req,
sizeof(req))) {
perror("packetsock ring setsockopt");
Expand All @@ -201,7 +207,7 @@ static char *sock_fanout_open_ring(int fd)

static int sock_fanout_read_ring(int fd, void *ring)
{
struct tpacket_hdr *header = ring;
struct tpacket2_hdr *header = ring;
int count = 0;

while (header->tp_status & TP_STATUS_USER && count < RING_NUM_FRAMES) {
Expand Down

0 comments on commit 85687aa

Please sign in to comment.