Skip to content

Commit

Permalink
intel10g.lua: Fixed assertion failure bug.
Browse files Browse the repository at this point in the history
can_receive() did not establish the necessary precondition for receive().
  • Loading branch information
lukego committed Apr 1, 2014
1 parent 0b8c89b commit b9fd2dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/apps/intel/intel10g.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ function receive (dev)
end

function can_receive (dev)
return bit.band(dev.rxdesc[dev.rxnext].wb.status, 1) == 1
-- return dev.rxnext ~= dev.rdh
return dev.rxnext ~= dev.rdh and bit.band(dev.rxdesc[dev.rxnext].wb.status, 1) == 1
end

function can_add_receive_buffer (dev)
Expand Down

0 comments on commit b9fd2dd

Please sign in to comment.