Commit fe896ceb authored by Zhu Yanjun's avatar Zhu Yanjun Committed by Doug Ledford

IB/rxe: replace refcount_inc with skb_get

Follow the advice from Bart, the function refcount_inc is replaced
with skb_get in commit 99dae690 ("IB/rxe: optimize mcast recv process")
and commit 86af6176 ("IB/rxe: remove unnecessary skb_clone").

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Suggested-by: default avatarBart Van Assche <Bart.VanAssche@wdc.com>
Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 2e473507
...@@ -311,7 +311,7 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb) ...@@ -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 * increase the users of the skb then post to the next qp
*/ */
if (mce->qp_list.next != &mcg->qp_list) if (mce->qp_list.next != &mcg->qp_list)
refcount_inc(&skb->users); skb_get(skb);
pkt->qp = qp; pkt->qp = qp;
rxe_add_ref(qp); rxe_add_ref(qp);
......
...@@ -990,7 +990,7 @@ static int send_atomic_ack(struct rxe_qp *qp, struct rxe_pkt_info *pkt, ...@@ -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, memset((unsigned char *)SKB_TO_PKT(skb) + sizeof(ack_pkt), 0,
sizeof(skb->cb) - sizeof(ack_pkt)); sizeof(skb->cb) - sizeof(ack_pkt));
refcount_inc(&skb->users); skb_get(skb);
res->type = RXE_ATOMIC_MASK; res->type = RXE_ATOMIC_MASK;
res->atomic.skb = skb; res->atomic.skb = skb;
res->first_psn = ack_pkt.psn; res->first_psn = ack_pkt.psn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment