From: Octavian Purdila <opurdila@ixiacom.com>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RESEND] [PATCH] tcp: fix for splice receive when used with software LRO
Date: Mon, 23 Jun 2008 12:50:30 +0300 [thread overview]
Message-ID: <200806231250.31087.opurdila@ixiacom.com> (raw)
In-Reply-To: <20080622210747.GA17472@ami.dom.local>
On Monday 23 June 2008, Jarek Poplawski wrote:
>
> IMHO it's really more readable, and probably should be sometimes faster
> if these divisions are optimized by a compiler. So, since the work is
> done anyway, you could try to submit this - you got nothing to lose.
Cool, thanks for reviewing it.
> But, I think it's better to separate the change of functionality (a
> recursive processing of frag_list) to another patch (if there is a
> practical reason for this).
>
Yes, it makes sense, I'll remove the recursion from this patch.
About the recursion: don't know if it makes a difference from a functional
perspective (I don't think that we can have frag_lists in frag_lists), but
I've noticed that skb_copy_bits does recurse. Any idea why?
> static inline void __segment_seek(struct page **page, int *poff, int *plen,
> int off)
>
> //?? unsigned ints (especially *poff for "/,%" optimization)?
Ack, will fix.
> static inline int __splice_segment(struct page *page, unsigned int poff,
> unsigned int plen, unsigned int *off,
> unsigned int *len, struct sk_buff *skb,
> struct splice_pipe_desc *spd)
> {
> //?? if (!*len)
> //?? return 1;
Ack, will fix.
> /* skip this segment if already processed */
> if (*off >= plen) {
> *off -= plen;
> return 0;
> }
>
> /* ignore any bits we already processed */
> if (*off) {
> __segment_seek(&page, &poff, &plen, *off);
> *off = 0;
> }
>
> do {
> unsigned int flen = min(*len, plen);
>
> //?? needed for a linear region?:
> //?? flen = min_t(unsigned int, flen, PAGE_SIZE - poff);
>
Oops, missed that, thanks for catching it.
>
> //?? The original comment with fixed "Returns..." (unless changed to void)?
>
Will add the comment back, since removing the recursions will make it correct
again and will need the return type to decide if we go into the frag list or
not, up in skb_splice_bits.
>
> //?? I'm not sure this recursion is really needed here, so I'd prefer
> //?? to move this back to skb_splice_bits() for now, and maybe to
> //?? propose this change as a separate patch giving the reasons for this.
Ack.
Thanks,
tavi
next prev parent reply other threads:[~2008-06-23 9:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <485B4ADE.8070102@domat.com.pl>
2008-06-18 16:07 ` [RESEND] [PATCH] tcp: fix for splice receive when used with software LRO Octavian Purdila
2008-06-20 6:37 ` Jarek Poplawski
2008-06-20 10:09 ` Octavian Purdila
2008-06-20 11:01 ` Jarek Poplawski
2008-06-20 12:39 ` Octavian Purdila
2008-06-20 13:01 ` Jarek Poplawski
2008-06-20 20:44 ` Octavian Purdila
2008-06-22 21:07 ` Jarek Poplawski
2008-06-23 9:50 ` Octavian Purdila [this message]
2008-06-23 20:48 ` Jarek Poplawski
2008-06-20 21:57 ` Jarek Poplawski
2008-06-21 0:40 ` Octavian Purdila
2008-06-21 8:39 ` Jarek Poplawski
2008-06-21 10:32 ` Octavian Purdila
2008-06-28 0:27 ` David Miller
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=200806231250.31087.opurdila@ixiacom.com \
--to=opurdila@ixiacom.com \
--cc=jarkao2@gmail.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).