diff mbox

[1/1] IB/rxe: replace refcount_inc with skb_get

Message ID 1523367459-6837-1-git-send-email-yanjun.zhu@oracle.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhu Yanjun April 10, 2018, 1:37 p.m. UTC
Follow the advice from Bart, the function refcount_inc is replaced
with skb_get in commit 99dae690255e ("IB/rxe: optimize mcast recv process")
and commit 86af61764151 ("IB/rxe: remove unnecessary skb_clone").

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Suggested-by: Bart Van Assche <Bart.VanAssche@wdc.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
---
 drivers/infiniband/sw/rxe/rxe_recv.c | 2 +-
 drivers/infiniband/sw/rxe/rxe_resp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Bart Van Assche April 10, 2018, 11:28 p.m. UTC | #1
T24gVHVlLCAyMDE4LTA0LTEwIGF0IDA5OjM3IC0wNDAwLCBaaHUgWWFuanVuIHdyb3RlOg0KPiBG
b2xsb3cgdGhlIGFkdmljZSBmcm9tIEJhcnQsIHRoZSBmdW5jdGlvbiByZWZjb3VudF9pbmMgaXMg
cmVwbGFjZWQNCj4gd2l0aCBza2JfZ2V0IGluIGNvbW1pdCA5OWRhZTY5MDI1NWUgKCJJQi9yeGU6
IG9wdGltaXplIG1jYXN0IHJlY3YgcHJvY2VzcyIpDQo+IGFuZCBjb21taXQgODZhZjYxNzY0MTUx
ICgiSUIvcnhlOiByZW1vdmUgdW5uZWNlc3Nhcnkgc2tiX2Nsb25lIikuDQoNClJldmlld2VkLWJ5
OiBCYXJ0IFZhbiBBc3NjaGUgPGJhcnQudmFuYXNzY2hlQHdkYy5jb20+DQoNClRoYW5rcyENCg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford April 19, 2018, 5:59 p.m. UTC | #2
On Tue, 2018-04-10 at 23:28 +0000, Bart Van Assche wrote:
> On Tue, 2018-04-10 at 09:37 -0400, Zhu Yanjun wrote:
> > Follow the advice from Bart, the function refcount_inc is replaced
> > with skb_get in commit 99dae690255e ("IB/rxe: optimize mcast recv process")
> > and commit 86af61764151 ("IB/rxe: remove unnecessary skb_clone").
> 
> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
> 
> Thanks!
> 

Thanks, applied to for-next.
diff mbox

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c
index dd80c7d..c4c9f3b 100644
--- a/drivers/infiniband/sw/rxe/rxe_recv.c
+++ b/drivers/infiniband/sw/rxe/rxe_recv.c
@@ -311,7 +311,7 @@  static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb)
 		 * increase the users of the skb then post to the next qp
 		 */
 		if (mce->qp_list.next != &mcg->qp_list)
-			refcount_inc(&skb->users);
+			skb_get(skb);
 
 		pkt->qp = qp;
 		rxe_add_ref(qp);
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index c4172ed..ed402f0 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -990,7 +990,7 @@  static int send_atomic_ack(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
 	memset((unsigned char *)SKB_TO_PKT(skb) + sizeof(ack_pkt), 0,
 	       sizeof(skb->cb) - sizeof(ack_pkt));
 
-	refcount_inc(&skb->users);
+	skb_get(skb);
 	res->type = RXE_ATOMIC_MASK;
 	res->atomic.skb = skb;
 	res->first_psn = ack_pkt.psn;