All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonatan Cohen <yonatanc-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Yanjun Zhu <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	jgg-uk2M96/98Pc@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCHv2 1/1] IB/rxe: remove unnecessary skb_clone
Date: Sun, 18 Feb 2018 10:12:27 +0200	[thread overview]
Message-ID: <9ae90bdd-3b40-4485-2a0e-0afa08200fed@mellanox.com> (raw)
In-Reply-To: <20180214103630.GB4282@yuvallap>

On 2/14/2018 12:36 PM, Yuval Shaia wrote:
>>>>    	}
>>>> -	skb_copy = skb_clone(skb, GFP_ATOMIC);
>>>> -	if (skb_copy)
>>>> -		rxe_add_ref(qp); /* for the new SKB */
>>> Are you sure we don't need this?
>>  From my stress tests and performance tests, it will get better performance
>> to remove skb_clone.
> 
> My concern is only with the above ref count.
I agree with yuval in case xmit fails.
	send_atomic_ack()
	{
	   rxe_xmit_packet()
	   {
	      rxe_send()
	      {
		 rxe_add_ref(pkt->qp)  <--- add qp ref
		 err = ip_local_out() <---- fail here
	      }
	
	   if (rxe_xmit_packet() fails) {
		rxe_drop_ref(qp) <--- you must deref here
	   }
	}
> 
>> And there is no memory leak.  The whole soft RoCE can work well.
>> So I think removing this function is a good choice.
>>
>> Zhu Yanjun
>>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-02-18  8:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05  8:19 [PATCH 1/1] IB/rxe: remove unnecessary skb_clone in xmit Zhu Yanjun
     [not found] ` <1515140391-24752-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-02-13  7:59   ` [PATCHv2 1/1] IB/rxe: remove unnecessary skb_clone Zhu Yanjun
     [not found]     ` <1518508786-3204-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-02-13 11:21       ` Yuval Shaia
2018-02-14 10:30         ` Yanjun Zhu
     [not found]           ` <5779a11b-d0f2-3231-a63f-009b1f080fb8-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-02-14 10:36             ` Yuval Shaia
2018-02-17  0:48               ` Yanjun Zhu
2018-02-18  8:12               ` Yonatan Cohen [this message]
2018-02-14 10:36         ` [PATCHv3 " Zhu Yanjun

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=9ae90bdd-3b40-4485-2a0e-0afa08200fed@mellanox.com \
    --to=yonatanc-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jgg-uk2M96/98Pc@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.