From: Bob Pearson <rpearsonhpe@gmail.com>
To: zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Cc: Bob Pearson <rpearson@hpe.com>
Subject: [PATCH v2 02/16] rdma_rxe: Fixed style warnings
Date: Tue, 18 Aug 2020 22:39:50 -0500 [thread overview]
Message-ID: <20200819034002.8835-3-rpearson@hpe.com> (raw)
In-Reply-To: <20200819034002.8835-1-rpearson@hpe.com>
Fixed several minor checkpatch warnings in existing rxe source.
Signed-off-by: Bob Pearson <rpearson@hpe.com>
---
drivers/infiniband/sw/rxe/rxe_comp.c | 3 +--
drivers/infiniband/sw/rxe/rxe_net.c | 2 +-
drivers/infiniband/sw/rxe/rxe_qp.c | 3 +--
drivers/infiniband/sw/rxe/rxe_task.h | 2 +-
drivers/infiniband/sw/rxe/rxe_verbs.c | 13 ++++++++-----
include/uapi/rdma/rdma_user_rxe.h | 6 +++---
6 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c
index ab1e61ca98d0..d9a527c138d3 100644
--- a/drivers/infiniband/sw/rxe/rxe_comp.c
+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
@@ -665,9 +665,8 @@ int rxe_completer(void *arg)
*/
/* there is nothing to retry in this case */
- if (!wqe || (wqe->state == wqe_state_posted)) {
+ if (!wqe || (wqe->state == wqe_state_posted))
goto exit;
- }
/* if we've started a retry, don't start another
* retry sequence, unless this is a timeout.
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index c4cab17188e2..d75cdc6c64d5 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -95,7 +95,7 @@ static struct dst_entry *rxe_find_route6(struct net_device *ndev,
ndst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(recv_sockets.sk6->sk),
recv_sockets.sk6->sk, &fl6,
NULL);
- if (unlikely(IS_ERR(ndst))) {
+ if (IS_ERR(ndst)) {
pr_err_ratelimited("no route to %pI6\n", daddr);
return NULL;
}
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index b6bf74b2fe06..edfd8e7a21d4 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -603,9 +603,8 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
if (mask & IB_QP_QKEY)
qp->attr.qkey = attr->qkey;
- if (mask & IB_QP_AV) {
+ if (mask & IB_QP_AV)
rxe_init_av(&attr->ah_attr, &qp->pri_av);
- }
if (mask & IB_QP_ALT_PATH) {
rxe_init_av(&attr->alt_ah_attr, &qp->alt_av);
diff --git a/drivers/infiniband/sw/rxe/rxe_task.h b/drivers/infiniband/sw/rxe/rxe_task.h
index 1b5bc405cafe..b2920a663683 100644
--- a/drivers/infiniband/sw/rxe/rxe_task.h
+++ b/drivers/infiniband/sw/rxe/rxe_task.h
@@ -35,7 +35,7 @@ struct rxe_task {
/*
* init rxe_task structure
* arg => parameter to pass to fcn
- * fcn => function to call until it returns != 0
+ * func => function to call until it returns != 0
*/
int rxe_init_task(void *obj, struct rxe_task *task,
void *arg, int (*func)(void *), char *name);
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 8a7b23f6e7b6..0e6cf5aca4e8 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -579,6 +579,12 @@ static int init_send_wqe(struct rxe_qp *qp, const struct ib_send_wr *ibwr,
qp_type(qp) == IB_QPT_GSI)
memcpy(&wqe->av, &to_rah(ud_wr(ibwr)->ah)->av, sizeof(wqe->av));
+ if (mask & WR_REG_MASK) {
+ wqe->mask = mask;
+ wqe->state = wqe_state_posted;
+ return 0;
+ }
+
if (unlikely(ibwr->send_flags & IB_SEND_INLINE)) {
p = wqe->dma.inline_data;
@@ -589,13 +595,10 @@ static int init_send_wqe(struct rxe_qp *qp, const struct ib_send_wr *ibwr,
p += sge->length;
}
- } else if (mask & WR_REG_MASK) {
- wqe->mask = mask;
- wqe->state = wqe_state_posted;
- return 0;
- } else
+ } else {
memcpy(wqe->dma.sge, ibwr->sg_list,
num_sge * sizeof(struct ib_sge));
+ }
wqe->iova = mask & WR_ATOMIC_MASK ? atomic_wr(ibwr)->remote_addr :
mask & WR_READ_OR_WRITE_MASK ? rdma_wr(ibwr)->remote_addr : 0;
diff --git a/include/uapi/rdma/rdma_user_rxe.h b/include/uapi/rdma/rdma_user_rxe.h
index aae2e696bb38..d8f2e0e46dab 100644
--- a/include/uapi/rdma/rdma_user_rxe.h
+++ b/include/uapi/rdma/rdma_user_rxe.h
@@ -99,8 +99,8 @@ struct rxe_send_wr {
struct ib_mr *mr;
__aligned_u64 reserved;
};
- __u32 key;
- __u32 access;
+ __u32 key;
+ __u32 access;
} reg;
} wr;
};
@@ -112,7 +112,7 @@ struct rxe_sge {
};
struct mminfo {
- __aligned_u64 offset;
+ __aligned_u64 offset;
__u32 size;
__u32 pad;
};
--
2.25.1
next prev parent reply other threads:[~2020-08-19 3:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 3:39 Memory window support for rdma_rxe Bob Pearson
2020-08-19 3:39 ` [PATCH v2 01/16] rdma_rxe: Added SPDX headers to rxe source files Bob Pearson
2020-08-20 13:43 ` Zhu Yanjun
2020-08-20 13:48 ` Bob Pearson
2020-08-19 3:39 ` Bob Pearson [this message]
2020-08-19 3:39 ` [PATCH v2 03/16] ib_user_verbs.h: Added ib_uverbs_wc_opcode Bob Pearson
2020-08-19 3:39 ` [PATCH v2 04/16] ib_verbs.h: Added missing IB_WR_BIND_MW opcode Bob Pearson
2020-08-19 3:39 ` [PATCH v2 05/16] rdma_rxe: Added bind_mw parameters to rxe_send_wr Bob Pearson
2020-08-19 3:39 ` [PATCH v2 06/16] rdma_rxe: Added stubs for alloc_mw and dealloc_mw verbs Bob Pearson
2020-08-19 3:40 ` [PATCH v2 07/16] rdma_rxe: Separated MR and MW objects Bob Pearson
2020-08-19 3:40 ` [PATCH v2 08/16] rdma_rxe: Added mw object Bob Pearson
2020-08-19 3:40 ` [PATCH v2 09/16] rdma_rxe: Extended pools to support both keys and indices Bob Pearson
2020-08-19 3:40 ` [PATCH v2 10/16] rdma_rxe: Implemented functional alloc_mw and dealloc_mw APIs Bob Pearson
2020-08-19 3:40 ` [PATCH v2 11/16] rdma_rxe: Address an issue with hardened user copy Bob Pearson
2020-08-19 3:40 ` [PATCH v2 12/16] rdma_rxe: Added bind mw API stub Bob Pearson
2020-08-19 3:40 ` [PATCH v2 13/16] rdma_rxe: Give MR and MW objects indices and keys Bob Pearson
2020-08-19 3:40 ` [PATCH v2 14/16] rdma_rxe: Added stub for invalidate mw Bob Pearson
2020-08-19 3:40 ` [PATCH v2 15/16] rdma_rxe: Added functional bind and invalidate MW ops Bob Pearson
2020-08-19 6:01 ` kernel test robot
2020-08-19 3:40 ` [PATCH v2 16/16] rdma_rxe: Implemented read/write/atomic access to MW Bob Pearson
2020-08-19 5:02 ` Memory window support for rdma_rxe Leon Romanovsky
[not found] ` <13f4a586-9f9c-e348-ec85-d9109adcab5b@gmail.com>
[not found] ` <20200820074116.GZ7555@unreal>
[not found] ` <92e509ee-8a6a-6e3b-c1e3-1d6ec84c44fe@gmail.com>
2020-08-20 21:51 ` Bob Pearson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200819034002.8835-3-rpearson@hpe.com \
--to=rpearsonhpe@gmail.com \
--cc=linux-rdma@vger.kernel.org \
--cc=rpearson@hpe.com \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).