Changeset f9df20e for lib/format_linux_common.h
- Timestamp:
- 06/19/18 16:48:33 (3 years ago)
- Branches:
- cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
- Children:
- 528a27c, 95ca714
- Parents:
- 86b365b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_linux_common.h
r4697684 rf9df20e 421 421 struct linux_per_stream_t *stream) 422 422 { 423 int fanout_opt = ((int)FORMAT_DATA->fanout_flags << 16) | 424 (int)FORMAT_DATA->fanout_group; 425 if (setsockopt(stream->fd, SOL_PACKET, PACKET_FANOUT, 426 &fanout_opt, sizeof(fanout_opt)) == -1) { 427 trace_set_err(libtrace, TRACE_ERR_INIT_FAILED, 423 int fanout_opt; 424 int attempts = 0; 425 while (attempts < 5) { 426 fanout_opt = ((int)FORMAT_DATA->fanout_flags << 16) | 427 (int)FORMAT_DATA->fanout_group; 428 429 if (setsockopt(stream->fd, SOL_PACKET, PACKET_FANOUT, 430 &fanout_opt, sizeof(fanout_opt)) == -1) { 431 trace_set_err(libtrace, TRACE_ERR_INIT_FAILED, 428 432 "Converting the fd to a socket fanout failed %s", 429 433 libtrace->uridata); 430 return -1; 434 FORMAT_DATA->fanout_group ++; 435 attempts ++; 436 continue; 437 } 438 return 0; 431 439 } 432 return 0;440 return -1; 433 441 } 434 442 #endif /* HAVE_NETPACKET_PACKET_H */
Note: See TracChangeset
for help on using the changeset viewer.