These bugs would manifest as data corruption or crashes.
* Reduced verbosity of router buffer allocation CDEBUGs
siov->iov_base + soffset, this_nob);
nob -= this_nob;
- if (diov->iov_len < doffset + this_nob) {
+ if (diov->iov_len > doffset + this_nob) {
doffset += this_nob;
} else {
diov++;
+ ndiov--;
doffset = 0;
}
- if (siov->iov_len < soffset + this_nob) {
+ if (siov->iov_len > soffset + this_nob) {
soffset += this_nob;
} else {
siov++;
+ nsiov--;
soffset = 0;
}
} while (nob > 0);
cfs_kunmap(diov->kiov_page);
daddr = NULL;
diov++;
+ ndiov--;
doffset = 0;
}
cfs_kunmap(siov->kiov_page);
saddr = NULL;
siov++;
+ nsiov--;
soffset = 0;
}
} while (nob > 0);
memcpy (iov->iov_base + iovoffset, addr, this_nob);
nob -= this_nob;
- if (iov->iov_len < iovoffset + this_nob) {
+ if (iov->iov_len > iovoffset + this_nob) {
iovoffset += this_nob;
} else {
iov++;
+ niov--;
iovoffset = 0;
}
- if (kiov->kiov_len < kiovoffset + this_nob) {
+ if (kiov->kiov_len > kiovoffset + this_nob) {
addr += this_nob;
kiovoffset += this_nob;
} else {
cfs_kunmap(kiov->kiov_page);
addr = NULL;
kiov++;
+ nkiov--;
kiovoffset = 0;
}
memcpy (addr, iov->iov_base + iovoffset, this_nob);
nob -= this_nob;
- if (kiov->kiov_len < kiovoffset + this_nob) {
+ if (kiov->kiov_len > kiovoffset + this_nob) {
addr += this_nob;
kiovoffset += this_nob;
} else {
cfs_kunmap(kiov->kiov_page);
addr = NULL;
kiov++;
+ nkiov--;
kiovoffset = 0;
}
- if (iov->iov_len < iovoffset + this_nob) {
+ if (iov->iov_len > iovoffset + this_nob) {
iovoffset += this_nob;
} else {
iov++;
+ niov--;
iovoffset = 0;
}
} while (nob > 0);
__u32 net2;
int rc;
- CDEBUG(D_WARNING, "Add route: net %s hops %u gw %s\n",
+ CDEBUG(D_NET, "Add route: net %s hops %u gw %s\n",
libcfs_net2str(net), hops, libcfs_nid2str(gateway));
if (gateway == LNET_NID_ANY ||
struct list_head *e2;
int rc = -ENOENT;
- CDEBUG(D_WARNING, "Del route: net %s : gw %s\n",
+ CDEBUG(D_NET, "Del route: net %s : gw %s\n",
libcfs_net2str(net), libcfs_nid2str(gw_nid));
/* NB Caller may specify either all routes via the given gateway
lnet_rtrpool_init(&the_lnet.ln_rtrpools[2], large_pages);
for (rc = 0; rc < LNET_NRBPOOLS; rc++)
- CDEBUG(D_WARNING, "Pages[%d]: %d\n", rc,
+ CDEBUG(D_NET, "Pages[%d]: %d\n", rc,
the_lnet.ln_rtrpools[rc].rbp_npages);
the_lnet.ln_routing = forwarding;