Skip to content

Commit fe896ce

Browse files
Zhu Yanjundledford
authored andcommitted
IB/rxe: replace refcount_inc with skb_get
Follow the advice from Bart, the function refcount_inc is replaced with skb_get in commit 99dae69 ("IB/rxe: optimize mcast recv process") and commit 86af617 ("IB/rxe: remove unnecessary skb_clone"). CC: Srinivas Eeda <[email protected]> CC: Junxiao Bi <[email protected]> Suggested-by: Bart Van Assche <[email protected]> Signed-off-by: Zhu Yanjun <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 2e47350 commit fe896ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/infiniband/sw/rxe/rxe_recv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb)
311311
* increase the users of the skb then post to the next qp
312312
*/
313313
if (mce->qp_list.next != &mcg->qp_list)
314-
refcount_inc(&skb->users);
314+
skb_get(skb);
315315

316316
pkt->qp = qp;
317317
rxe_add_ref(qp);

drivers/infiniband/sw/rxe/rxe_resp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ static int send_atomic_ack(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
990990
memset((unsigned char *)SKB_TO_PKT(skb) + sizeof(ack_pkt), 0,
991991
sizeof(skb->cb) - sizeof(ack_pkt));
992992

993-
refcount_inc(&skb->users);
993+
skb_get(skb);
994994
res->type = RXE_ATOMIC_MASK;
995995
res->atomic.skb = skb;
996996
res->first_psn = ack_pkt.psn;

0 commit comments

Comments
 (0)