Skip to content

Commit

Permalink
refs #27: Minor code clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Feb 27, 2016
1 parent 9d3970b commit 9afc778
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/test_utils.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <cassert>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <rte_mbuf.h>
#include <nba/framework/test_utils.hh>
#include <nba/element/annotation.hh>
#include <nba/element/packet.hh>
Expand Down Expand Up @@ -32,7 +33,8 @@ PacketBatch *nba::testing::create_batch
assert(pkt_idx < num_pkts);
assert(nullptr != batch->packets[pkt_idx]);
batch->packets[pkt_idx]->nb_segs = 1;
batch->packets[pkt_idx]->buf_addr = (void *) ((uintptr_t) batch->packets[pkt_idx] + sizeof(struct rte_mbuf));
batch->packets[pkt_idx]->buf_addr = (void *) ((uintptr_t) batch->packets[pkt_idx]
+ sizeof(struct rte_mbuf));
batch->packets[pkt_idx]->data_off = RTE_PKTMBUF_HEADROOM;
batch->packets[pkt_idx]->port = 0;
batch->packets[pkt_idx]->pkt_len = pkt_size;
Expand Down

0 comments on commit 9afc778

Please sign in to comment.