git: aca12148b113 - main - Improve error message printing in krping. Don't print completion queue flush as an error.

Hans Petter Selasky hselasky at FreeBSD.org
Mon Dec 28 13:37:45 UTC 2020


The branch main has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=aca12148b113b618afc19028c656a7ac4434231d

commit aca12148b113b618afc19028c656a7ac4434231d
Author:     Hans Petter Selasky <hps at selasky.org>
AuthorDate: 2020-12-09 12:59:01 +0000
Commit:     Hans Petter Selasky <hselasky at FreeBSD.org>
CommitDate: 2020-12-28 13:37:09 +0000

    Improve error message printing in krping.
    Don't print completion queue flush as an error.
    
    MFC after:      1 week
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
---
 sys/contrib/rdma/krping/krping.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sys/contrib/rdma/krping/krping.c b/sys/contrib/rdma/krping/krping.c
index c734da36247f..e9a379984dec 100644
--- a/sys/contrib/rdma/krping/krping.c
+++ b/sys/contrib/rdma/krping/krping.c
@@ -362,10 +362,6 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx)
 	int ret;
 
 	BUG_ON(cb->cq != cq);
-	if (cb->state == ERROR) {
-		printk(KERN_ERR PFX "cq completion in ERROR state\n");
-		return;
-	}
 	if (cb->frtest) {
 		printk(KERN_ERR PFX "cq completion event in frtest!\n");
 		return;
@@ -384,7 +380,10 @@ static void krping_cq_event_handler(struct ib_cq *cq, void *ctx)
 				goto error;
 			}
 		}
-
+		if (cb->state == ERROR) {
+			printk(KERN_ERR PFX "cq completion in ERROR state\n");
+			return;
+		}
 		switch (wc.opcode) {
 		case IB_WC_SEND:
 			DEBUG_LOG("send completion\n");


More information about the dev-commits-src-all mailing list