[LU-5956] o2iblnd: incorrect uses of kib_tx_t::tx_nfrags Created: 25/Nov/14 Updated: 01/Jul/16 Resolved: 10/Jul/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Isaac Huang (Inactive) | Assignee: | Isaac Huang (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | lnet | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 16635 | ||||
| Description |
665 kiblnd_map_tx(lnet_ni_t *ni, kib_tx_t *tx,
......
677 tx->tx_nfrags = nfrags;
678
679 rd->rd_nfrags =
680 kiblnd_dma_map_sg(hdev->ibh_ibdev,
681 tx->tx_frags, tx->tx_nfrags, tx->tx_dmadir);
As dma_map_sg() can return fewer entries in the mapped SG list, it may happen that "rd->rd_nfrags < tx->tx_nfrags". But the code seemed to assume "rd->rd_nfrags == tx->tx_nfrags": 642 kiblnd_unmap_tx(lnet_ni_t *ni, kib_tx_t *tx) 658 kiblnd_dma_unmap_sg(tx->tx_pool->tpo_hdev->ibh_ibdev, 659 tx->tx_frags, tx->tx_nfrags, tx->tx_dmadir); 1474 kiblnd_send (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) 1550 nob = offsetof(kib_get_msg_t, ibgm_rd.rd_frags[tx->tx_nfrags]); 1707 kiblnd_recv (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed, 1788 nob = offsetof(kib_putack_msg_t, ibpam_rd.rd_frags[tx->tx_nfrags]); It seemed that the # original SG entries is not needed anywhere in the code, so it can be fixed by assigning the # mapped SG entries to kib_tx_t::tx_nfrags. |
| Comments |
| Comment by Gerrit Updater [ 25/Nov/14 ] |
|
Isaac Huang (he.huang@intel.com) uploaded a new patch: http://review.whamcloud.com/12857 |
| Comment by Isaac Huang (Inactive) [ 05/Jan/15 ] |
|
Liang pointed out: So, kib_tx_t::tx_nfrags should still be kept intact, while kiblnd_send/kiblnd_recv should be fixed to use # mapped entries instead. |
| Comment by Gerrit Updater [ 10/Jul/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12857/ |
| Comment by Peter Jones [ 10/Jul/15 ] |
|
Landed for 2.8 |
| Comment by Gerrit Updater [ 11/Dec/15 ] |
|
Doug Oucharek (doug.s.oucharek@intel.com) uploaded a new patch: http://review.whamcloud.com/17558 |