lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Jun 2008 12:50:30 +0300
From:	Octavian Purdila <opurdila@...acom.com>
To:	Jarek Poplawski <jarkao2@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [RESEND] [PATCH] tcp: fix for splice receive when used with software LRO

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


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ