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:	Thu, 10 Dec 2009 12:42:09 +0200 (EET)
From:	"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To:	Krishna Kumar2 <krkumar2@...ibm.com>
cc:	David Miller <davem@...emloft.net>, Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 3/3] tcp: Slightly optimize tcp_sendmsg

On Thu, 10 Dec 2009, Krishna Kumar2 wrote:

> Hi Ilpo,
> 
> "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi> wrote on 12/10/2009 01:47:30
> PM:
> 
> > Subject: Re: [PATCH 3/3] tcp: Slightly optimize tcp_sendmsg>
> >
> > > Slightly optimize tcp_sendmsg since NETIF_F_SG is used many
> > > times iteratively in the loop. The only other modification is
> > > to change:
> > >          } else if (i == MAX_SKB_FRAGS ||
> > >                (!i &&
> > >                !(sk->sk_route_caps & NETIF_F_SG))) {
> > >    to:
> > >          } else if (i == MAX_SKB_FRAGS || !sg) {
> >
> > I can see that you make this change from the patch itself but could you
> > give a justification on why dropping the !i is possible? ...I couldn't
> > see what would allow that.
> 
> From what *I understood*, this code (other than the MAX_SKB_FRAGS case)
> executes only due to the else part of "if (skb_tailroom(skb) > 0) {" -
> there was no space in the skb to put the data inline. Hence SG is false
> is a sufficient condition and there is no way to add a fragment (i == 0
> since skb_fill_page_desc cannot be called when !SG).

Please put this description into the patch description then :-). ...After 
some more thinking, reading and verification it seems right, however, it 
certainly wassn't immediately obvious from the code.

...You can add my Acked-by: Ilpo Järvinen <ilpo.jarvinen@...sinki.fi> for 
the resubmission.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ