Skip to content

Commit

Permalink
IB/rxe: replace refcount_inc with skb_get
Browse files Browse the repository at this point in the history
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 <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>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Zhu Yanjun authored and Doug Ledford committed Apr 19, 2018
1 parent 2e47350 commit fe896ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rxe/rxe_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rxe/rxe_resp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fe896ce

Please sign in to comment.