Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packetdrill: fix compilation/runtime error for linux 3.x #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions gtests/net/packetdrill/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ static void write_tcp_info(struct code_state *code,
const struct _tcp_info *info,
int len)
{
assert(len >= sizeof(struct _tcp_info));

write_symbols(code);

/* Emit the recorded values of tcpi_foo values. */
Expand Down Expand Up @@ -204,6 +202,7 @@ static void write_tcp_info(struct code_state *code,
emit_var_end(code);
}

#if HAVE_TCP_CC_INFO
/* Write out a formatted representation of the given _tcp_bbr_info buffer. */
static void write_tcp_bbr_cc_info(struct code_state *code,
const union _tcp_cc_info *info,
Expand Down Expand Up @@ -270,7 +269,9 @@ static void write_tcp_cc_info(struct code_state *code,
write_tcp_vegas_cc_info(code, info, len);
emit_var_end(code);
}
#endif /* HAVE_TCP_CC_INFO */

#if HAVE_SO_MEMINFO
/* Write out a formatted representation of the given mem_info buffer. */
static void write_so_meminfo(struct code_state *code,
const u32 *mem_info,
Expand All @@ -290,6 +291,7 @@ static void write_so_meminfo(struct code_state *code,

emit_var_end(code);
}
#endif /* HAVE_SO_MEMINFO */
#endif /* linux */

#if defined(__FreeBSD__)
Expand All @@ -299,8 +301,6 @@ static void write_tcp_info(struct code_state *code,
const struct _tcp_info *info,
int len)
{
assert(len >= sizeof(struct _tcp_info));

write_symbols(code);

/* Emit the recorded values of tcpi_foo values. */
Expand Down Expand Up @@ -735,7 +735,6 @@ void run_code_event(struct state *state, struct event *event,

void *data = NULL;
void *data_ext = NULL;
void *data_meminfo = NULL;
int data_len = 0;
#if HAVE_TCP_INFO
code->data_type = DATA_TCP_INFO;
Expand All @@ -761,6 +760,7 @@ void run_code_event(struct state *state, struct event *event,
#endif /* HAVE_TCP_CC_INFO */
#if HAVE_SO_MEMINFO
code->data_type = DATA_SO_MEMINFO;
void *data_meminfo = NULL;
data_meminfo = get_data(state, event, fd, code->data_type, &data_len);
if (data_meminfo)
append_data(code, code->data_type, data_meminfo, data_len);
Expand Down