summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorMichael Brown2010-09-12 20:11:59 +0200
committerMichael Brown2010-09-12 23:46:01 +0200
commit46c7f99c66e18bf1735a68ada35aa963c979d59b (patch)
treeaac3a1922b5504fa75f5e2f8ea19f9b6c81a605d /src/config
parent[hermon] Set event queue number for completion queues (diff)
downloadipxe-46c7f99c66e18bf1735a68ada35aa963c979d59b.tar.gz
ipxe-46c7f99c66e18bf1735a68ada35aa963c979d59b.tar.xz
ipxe-46c7f99c66e18bf1735a68ada35aa963c979d59b.zip
[hermon] Use correct alignment for doorbell records
Doorbell records are currently embedded within the completion queue and receive work queue strucures, which are allocated using zalloc() and so have an alignment guarantee of only sizeof(void*), i.e. four bytes. This is sufficient for the receive work queue, but not for the completion queue, which requires an alignment guarantee of eight bytes. Though not guaranteed, it so happens that zalloc() will always return a pointer that is exactly four bytes above a sixteen-byte boundary. The completion queue doorbell record is therefore always misaligned, and the value passed to the hardware via SW2HW_CQ is actually always pointing to the page_offset value within the MTT descriptor (which directly precedes the inline doorbell record). Provided that the page offset is greater than 0x100, this looks to the hardware like an update_ci value of greater than 0x010000 (taking into account endianness differences), and so the hardware will happily deliver more than 0x010000 completions before stopping. Hence this problem is rarely observable. Fix by allocating the doorbell records separately and using the correct alignment constraints. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config')
0 files changed, 0 insertions, 0 deletions