Skip to content

Commit

Permalink
dp-packet: Remove unused helper dp_packet_to_string().
Browse files Browse the repository at this point in the history
dp_packet_to_string() does not appear to be used.

Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
shorman-netronome authored and blp committed Jan 11, 2016
1 parent b7407f2 commit df3790a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
15 changes: 0 additions & 15 deletions lib/dp-packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,21 +431,6 @@ dp_packet_steal_data(struct dp_packet *b)
return p;
}

/* Returns a string that describes some of 'b''s metadata plus a hex dump of up
* to 'maxbytes' from the start of the buffer. */
char *
dp_packet_to_string(const struct dp_packet *b, size_t maxbytes)
{
struct ds s;

ds_init(&s);
ds_put_format(&s, "size=%"PRIu32", allocated=%"PRIu32", head=%"PRIuSIZE", tail=%"PRIuSIZE"\n",
dp_packet_size(b), dp_packet_get_allocated(b),
dp_packet_headroom(b), dp_packet_tailroom(b));
ds_put_hex_dump(&s, dp_packet_data(b), MIN(dp_packet_size(b), maxbytes), 0, false);
return ds_cstr(&s);
}

static inline void
dp_packet_adjust_layer_offset(uint16_t *offset, int increment)
{
Expand Down
1 change: 0 additions & 1 deletion lib/dp-packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ static inline void *dp_packet_try_pull(struct dp_packet *, size_t);

void *dp_packet_steal_data(struct dp_packet *);

char *dp_packet_to_string(const struct dp_packet *, size_t maxbytes);
static inline bool dp_packet_equal(const struct dp_packet *,
const struct dp_packet *);

Expand Down

0 comments on commit df3790a

Please sign in to comment.