From: David Miller <davem@davemloft.net>
To: jon.maloy@ericsson.com
Cc: netdev@vger.kernel.org,
mohan.krishna.ghanta.krishnamurthy@ericsson.com,
tung.q.nguyen@dektech.com.au, hoang.h.le@dektech.com.au,
canh.d.luu@dektech.com.au, ying.xue@windriver.com,
tipc-discussion@lists.sourceforge.net
Subject: Re: [net-next 1/1] tipc: eliminate buffer cloning in function tipc_msg_extract()
Date: Sat, 30 Jun 2018 20:48:41 +0900 (KST) [thread overview]
Message-ID: <20180630.204841.519988164548882830.davem@davemloft.net> (raw)
In-Reply-To: <1530217504-16466-1-git-send-email-jon.maloy@ericsson.com>
From: Jon Maloy <jon.maloy@ericsson.com>
Date: Thu, 28 Jun 2018 22:25:04 +0200
> From: Tung Nguyen <tung.q.nguyen@dektech.com.au>
>
> The function tipc_msg_extract() is using skb_clone() to clone inner
> messages from a message bundle buffer. Although this method is safe,
> it has an undesired effect that each buffer clone inherits the
> true-size of the bundling buffer. As a result, the buffer clone
> almost always ends up with being copied anyway by the message
> validation function. This makes the cloning into a sub-optimization.
>
> In this commit we take the consequence of this realization, and copy
> each inner message to a separately allocated buffer up front in the
> extraction function.
>
> As a bonus we can now eliminate the two cases where we had to copy
> re-routed packets that may potentially go out on the wire again.
>
> Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Applied, thanks for following up on this issue.
prev parent reply other threads:[~2018-06-30 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 20:25 [net-next 1/1] tipc: eliminate buffer cloning in function tipc_msg_extract() Jon Maloy
2018-06-30 11:48 ` David Miller [this message]
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=20180630.204841.519988164548882830.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=canh.d.luu@dektech.com.au \
--cc=hoang.h.le@dektech.com.au \
--cc=jon.maloy@ericsson.com \
--cc=mohan.krishna.ghanta.krishnamurthy@ericsson.com \
--cc=netdev@vger.kernel.org \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=tung.q.nguyen@dektech.com.au \
--cc=ying.xue@windriver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox