Page MenuHomeFreeBSD

D28716.1794556780.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D28716.1794556780.diff

diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -4524,8 +4524,9 @@
caddr_t cl;
struct rx_buf_info *rxb;
struct cluster_metadata *clm;
- uint16_t max_pidx;
+ uint16_t max_pidx, zidx;
uint16_t hw_cidx = fl->hw_cidx; /* stable snapshot */
+ bool lowmem = false;
FL_LOCK_ASSERT_OWNED(fl);
@@ -4573,11 +4574,14 @@
sd->cl = NULL; /* gave up my reference */
}
MPASS(sd->cl == NULL);
- rxb = &sc->sge.rx_buf_info[fl->zidx];
+ zidx = lowmem ? fl->safe_zidx : fl->zidx;
+ rxb = &sc->sge.rx_buf_info[zidx];
cl = uma_zalloc(rxb->zone, M_NOWAIT);
if (__predict_false(cl == NULL)) {
- if (fl->zidx != fl->safe_zidx) {
- rxb = &sc->sge.rx_buf_info[fl->safe_zidx];
+ if (!lowmem && zidx != fl->safe_zidx) {
+ lowmem = true;
+ zidx = fl->safe_zidx;
+ rxb = &sc->sge.rx_buf_info[zidx];
cl = uma_zalloc(rxb->zone, M_NOWAIT);
}
if (cl == NULL)
@@ -4588,7 +4592,7 @@
pa = pmap_kextract((vm_offset_t)cl);
sd->cl = cl;
- sd->zidx = fl->zidx;
+ sd->zidx = zidx;
if (fl->flags & FL_BUF_PACKING) {
*d = htobe64(pa | rxb->hwidx2);

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 13, 7:59 AM (3 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41696197
Default Alt Text
D28716.1794556780.diff (1 KB)

Event Timeline