Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137102008
D5931.id15128.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D5931.id15128.diff
View Options
Index: sys/contrib/rdma/krping/krping.h
===================================================================
--- sys/contrib/rdma/krping/krping.h
+++ sys/contrib/rdma/krping/krping.h
@@ -17,5 +17,4 @@
int krping_doit(char *, void *);
void krping_walk_cb_list(void (*)(struct krping_stats *, void *), void *);
void krping_init(void);
-void krping_printf(void *, const char *, ...);
int krping_sigpending(void);
Index: sys/contrib/rdma/krping/krping.c
===================================================================
--- sys/contrib/rdma/krping/krping.c
+++ sys/contrib/rdma/krping/krping.c
@@ -54,8 +54,8 @@
#include "getopt.h"
extern int krping_debug;
-#define DEBUG_LOG(cb, x...) if (krping_debug) krping_printf((cb)->cookie, x)
-#define PRINTF(cb, x...) krping_printf((cb)->cookie, x)
+#define DEBUG_LOG(cb, x...) if (krping_debug) log(LOG_INFO, x)
+#define PRINTF(cb, x...) log(LOG_INFO, x)
#define BIND_INFO 1
MODULE_AUTHOR("Steve Wise");
@@ -376,7 +376,7 @@
continue;
} else {
PRINTF(cb, "cq completion failed with "
- "wr_id %Lx status %d opcode %d vender_err %x\n",
+ "wr_id %lx status %d opcode %d vender_err %x\n",
wc.wr_id, wc.status, wc.opcode, wc.vendor_err);
goto error;
}
@@ -570,7 +570,7 @@
if (!cb->local_dma_lkey) {
buf.addr = cb->recv_dma_addr;
buf.size = sizeof cb->recv_buf;
- DEBUG_LOG(cb, "recv buf dma_addr %llx size %d\n", buf.addr,
+ DEBUG_LOG(cb, "recv buf dma_addr %lx size %d\n", buf.addr,
(int)buf.size);
iovbase = cb->recv_dma_addr;
cb->recv_mr = ib_reg_phys_mr(cb->pd, &buf, 1,
@@ -585,7 +585,7 @@
buf.addr = cb->send_dma_addr;
buf.size = sizeof cb->send_buf;
- DEBUG_LOG(cb, "send buf dma_addr %llx size %d\n", buf.addr,
+ DEBUG_LOG(cb, "send buf dma_addr %lx size %d\n", buf.addr,
(int)buf.size);
iovbase = cb->send_dma_addr;
cb->send_mr = ib_reg_phys_mr(cb->pd, &buf, 1,
@@ -657,7 +657,7 @@
ret = PTR_ERR(cb->rdma_mr);
goto bail;
}
- DEBUG_LOG(cb, "rdma buf dma_addr %llx size %d mr rkey 0x%x\n",
+ DEBUG_LOG(cb, "rdma buf dma_addr %lx size %d mr rkey 0x%x\n",
buf.addr, (int)buf.size, cb->rdma_mr->rkey);
break;
default:
@@ -691,7 +691,7 @@
buf.addr = cb->start_dma_addr;
buf.size = cb->size;
- DEBUG_LOG(cb, "start buf dma_addr %llx size %d\n",
+ DEBUG_LOG(cb, "start buf dma_addr %lx size %d\n",
buf.addr, (int)buf.size);
iovbase = cb->start_dma_addr;
cb->start_mr = ib_reg_phys_mr(cb->pd, &buf, 1,
@@ -882,11 +882,11 @@
for (i=0; i < cb->fastreg_wr.wr.fast_reg.page_list_len;
i++, p += PAGE_SIZE) {
cb->page_list->page_list[i] = p;
- DEBUG_LOG(cb, "page_list[%d] 0x%llx\n", i, p);
+ DEBUG_LOG(cb, "page_list[%d] 0x%lx\n", i, p);
}
DEBUG_LOG(cb, "post_inv = %d, fastreg new rkey 0x%x shift %u len %u"
- " iova_start %llx page_list_len %u\n",
+ " iova_start %lx page_list_len %u\n",
post_inv,
cb->fastreg_wr.wr.fast_reg.rkey,
cb->fastreg_wr.wr.fast_reg.page_shift,
@@ -930,7 +930,7 @@
#else
cb->bind_attr.addr = buf;
#endif
- DEBUG_LOG(cb, "binding mw rkey 0x%x to buf %llx mr rkey 0x%x\n",
+ DEBUG_LOG(cb, "binding mw rkey 0x%x to buf %lx mr rkey 0x%x\n",
#ifdef BIND_INFO
cb->mw->rkey, buf, cb->bind_attr.bind_info.mr->rkey);
#else
@@ -1588,11 +1588,11 @@
return 0;
}
if (!(attr.device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS)) {
- PRINTF(cb, "Fastreg not supported - device_cap_flags 0x%x\n",
+ PRINTF(cb, "Fastreg not supported - device_cap_flags 0x%lx\n",
attr.device_cap_flags);
return 0;
}
- DEBUG_LOG(cb, "Fastreg supported - device_cap_flags 0x%x\n",
+ DEBUG_LOG(cb, "Fastreg supported - device_cap_flags 0x%lx\n",
attr.device_cap_flags);
return 1;
}
@@ -1719,14 +1719,14 @@
DEBUG_LOG(cb, "%s dma_addr[%u] %p\n", __func__, scnt, (void *)dma_addr[scnt]);
for (i=0; i<plen; i++) {
pl[scnt]->page_list[i] = ((unsigned long)dma_addr[scnt] & PAGE_MASK) + (i * PAGE_SIZE);
- DEBUG_LOG(cb, "%s pl[%u]->page_list[%u] 0x%llx\n",
+ DEBUG_LOG(cb, "%s pl[%u]->page_list[%u] 0x%lx\n",
__func__, scnt, i, pl[scnt]->page_list[i]);
}
sgl[scnt].lkey = mr[scnt]->rkey;
sgl[scnt].length = cb->size;
sgl[scnt].addr = (u64)buf[scnt];
- DEBUG_LOG(cb, "%s sgl[%u].lkey 0x%x length %u addr 0x%llx\n",
+ DEBUG_LOG(cb, "%s sgl[%u].lkey 0x%x length %u addr 0x%lx\n",
__func__, scnt, sgl[scnt].lkey, sgl[scnt].length,
sgl[scnt].addr);
@@ -1778,7 +1778,7 @@
if (ret == 1) {
if (wc.status) {
PRINTF(cb,
- "completion error %u wr_id %lld "
+ "completion error %u wr_id %ld "
"opcode %d\n", wc.status,
wc.wr_id, wc.opcode);
goto err2;
@@ -1877,7 +1877,7 @@
while (cb->state < RDMA_READ_ADV) {
krping_cq_event_handler(cb->cq, cb);
}
- DEBUG_LOG(cb, "%s client STAG %x TO 0x%llx\n", __func__,
+ DEBUG_LOG(cb, "%s client STAG %x TO 0x%lx\n", __func__,
cb->remote_rkey, cb->remote_addr);
/* Send STAG/TO/Len to client */
@@ -1940,7 +1940,7 @@
while (cb->state < RDMA_WRITE_ADV) {
krping_cq_event_handler(cb->cq, cb);
}
- DEBUG_LOG(cb, "%s server STAG %x TO 0x%llx\n", __func__, cb->remote_rkey, cb->remote_addr);
+ DEBUG_LOG(cb, "%s server STAG %x TO 0x%lx\n", __func__, cb->remote_rkey, cb->remote_addr);
return krping_fr_test5(cb);
}
@@ -2043,7 +2043,7 @@
DEBUG_LOG(cb, "%s dma_addr[%u] %p\n", __func__, scnt, (void *)dma_addr[scnt]);
for (i=0; i<plen; i++) {
pl[scnt]->page_list[i] = ((unsigned long)dma_addr[scnt] & PAGE_MASK) + (i * PAGE_SIZE);
- DEBUG_LOG(cb, "%s pl[%u]->page_list[%u] 0x%llx\n",
+ DEBUG_LOG(cb, "%s pl[%u]->page_list[%u] 0x%lx\n",
__func__, scnt, i, pl[scnt]->page_list[i]);
}
@@ -2101,7 +2101,7 @@
if (ret == 1) {
if (wc.status) {
PRINTF(cb,
- "completion error %u wr_id %lld "
+ "completion error %u wr_id %ld "
"opcode %d\n", wc.status,
wc.wr_id, wc.opcode);
goto err2;
@@ -2200,7 +2200,7 @@
while (cb->state < RDMA_READ_ADV) {
krping_cq_event_handler(cb->cq, cb);
}
- DEBUG_LOG(cb, "%s client STAG %x TO 0x%llx\n", __func__,
+ DEBUG_LOG(cb, "%s client STAG %x TO 0x%lx\n", __func__,
cb->remote_rkey, cb->remote_addr);
/* Send STAG/TO/Len to client */
@@ -2263,7 +2263,7 @@
while (cb->state < RDMA_WRITE_ADV) {
krping_cq_event_handler(cb->cq, cb);
}
- DEBUG_LOG(cb, "%s server STAG %x TO 0x%llx\n", __func__, cb->remote_rkey, cb->remote_addr);
+ DEBUG_LOG(cb, "%s server STAG %x TO 0x%lx\n", __func__, cb->remote_rkey, cb->remote_addr);
return krping_fr_test6(cb);
}
Index: sys/contrib/rdma/krping/krping_dev.c
===================================================================
--- sys/contrib/rdma/krping/krping_dev.c
+++ sys/contrib/rdma/krping/krping_dev.c
@@ -209,16 +209,6 @@
return(err);
}
-void
-krping_printf(void *cookie, const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vtprintf(cookie, -1, fmt, ap);
- va_end(ap);
-}
-
int
krping_sigpending(void)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 22, 3:43 AM (12 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25896290
Default Alt Text
D5931.id15128.diff (6 KB)
Attached To
Mode
D5931: Send krping output to the log instead of the tty, as is done upstream.
Attached
Detach File
Event Timeline
Log In to Comment