summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2012-02-08 11:43:29 +0000
committerluigi <luigi@FreeBSD.org>2012-02-08 11:43:29 +0000
commit0290a0c2f7684d3b3159f5cd92c0fb2e08aba725 (patch)
treedc9a4f4f3227fea430bc6d74c565a7291e95bc05 /tools
parent507691dbd9aa5a7e9229bb26aa781572f120595c (diff)
downloadFreeBSD-src-0290a0c2f7684d3b3159f5cd92c0fb2e08aba725.zip
FreeBSD-src-0290a0c2f7684d3b3159f5cd92c0fb2e08aba725.tar.gz
- change the buffer size from a constant to a
TUNABLE variable (hw.netmap.buf_size) so we can experiment with values different from 2048 which may give better cache performance. - rearrange the memory allocation code so it will be easier to replace it with a different implementation. The current code relies on a single large contiguous chunk of memory obtained through contigmalloc. The new implementation (not committed yet) uses multiple smaller chunks which are easier to fit in a fragmented address space.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/netmap/pkt-gen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tools/netmap/pkt-gen.c b/tools/tools/netmap/pkt-gen.c
index f2f4e40..5627e9e 100644
--- a/tools/tools/netmap/pkt-gen.c
+++ b/tools/tools/netmap/pkt-gen.c
@@ -124,7 +124,7 @@ struct pkt {
struct ether_header eh;
struct ip ip;
struct udphdr udp;
- uint8_t body[NETMAP_BUF_SIZE];
+ uint8_t body[2048]; // XXX hardwired
} __attribute__((__packed__));
/*
OpenPOWER on IntegriCloud