mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
Slight restructure of iflib_busdma_load_mbuf_sg() to fix accounting
when m_collapse() fails. Submitted by: krzystof.galazka@intel.com Reviewed by: Jeb Cramer <cramerj@intel.com> Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D11476
This commit is contained in:
parent
9bc7588cb6
commit
9d35858f48
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321630
@ -2975,6 +2975,8 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag_t tag, bus_dmamap_t map,
|
||||
#endif
|
||||
ifsd_m[next] = m;
|
||||
while (buflen > 0) {
|
||||
if (i >= max_segs)
|
||||
goto err;
|
||||
max_sgsize = MIN(buflen, maxsegsz);
|
||||
curaddr = pmap_kextract(vaddr);
|
||||
sgsize = PAGE_SIZE - (curaddr & PAGE_MASK);
|
||||
@ -2984,8 +2986,6 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag_t tag, bus_dmamap_t map,
|
||||
vaddr += sgsize;
|
||||
buflen -= sgsize;
|
||||
i++;
|
||||
if (i >= max_segs)
|
||||
goto err;
|
||||
}
|
||||
count++;
|
||||
tmp = m;
|
||||
|
Loading…
Reference in New Issue
Block a user