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

packetblaster: use default number of tx/rx descriptors #883

Merged
merged 6 commits into from
May 12, 2016
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions src/apps/intel/intel10g.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ local timer = require("core.timer")
local bits, bitset = lib.bits, lib.bitset
local band, bor, lshift = bit.band, bit.bor, bit.lshift

num_descriptors = 512
--num_descriptors = 32
num_descriptors = 2048

-- Defaults for configurable items
local default = {
Expand Down
5 changes: 3 additions & 2 deletions src/core/packet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ local header_size = 8
local max_payload = tonumber(C.PACKET_PAYLOAD_SIZE)

-- Freelist containing empty packets ready for use.
local max_packets = 1e5
local max_packets = 1e6
local packet_allocation_step = 1000
local packets_allocated = 0
local packets_fl = freelist.new("struct packet *", max_packets)
Expand Down Expand Up @@ -108,7 +108,8 @@ function length (p) return p.length end

function preallocate_step()
if _G.developer_debug then
assert(packets_allocated + packet_allocation_step <= max_packets)
assert(packets_allocated + packet_allocation_step <= max_packets,
"packet allocation overflow")
end

for i=1, packet_allocation_step do
Expand Down
1 change: 0 additions & 1 deletion src/program/packetblaster/packetblaster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function run (args)
end
assert(nics > 0, "<PCI> matches no suitable devices.")
engine.busywait = true
intel10g.num_descriptors = 32*1024
engine.configure(c)
local fn = function ()
print("Transmissions (last 1 sec):")
Expand Down