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 17:29:39 +0530
From:	Krishna Kumar2 <krkumar2@...ibm.com>
To:	"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
Cc:	David Miller <davem@...emloft.net>, Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 2/3] tcp: Remove unrequired operations in tcp_push()

"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi> wrote on 12/10/2009 03:56:59
PM:

> Re: [PATCH 2/3] tcp: Remove unrequired operations in tcp_push()
>
> On Thu, 10 Dec 2009, Krishna Kumar2 wrote:
>
> > "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi> wrote on 12/10/2009
01:40:51
> > PM:
> >
> > > Re: [PATCH 2/3] tcp: Remove unrequired operations in tcp_push()
> > >
> > >
> > > >  static inline void tcp_push(struct sock *sk, int flags, int
mss_now,
> > > >               int nonagle)
> > > >  {
> > > > -   struct tcp_sock *tp = tcp_sk(sk);
> > > > -
> > > >     if (tcp_send_head(sk)) {
> > > > -      struct sk_buff *skb = tcp_write_queue_tail(sk);
> > > > -      if (!(flags & MSG_MORE) || forced_push(tp))
> > > > +      struct tcp_sock *tp = tcp_sk(sk);
> > > > +
> > > > +      if (!(flags & MSG_MORE) || forced_push(tp)) {
> > > > +         struct sk_buff *skb = tcp_write_queue_tail(sk);
> > > > +
> > > >           tcp_mark_push(tp, skb);
> > >
> > > I suppose one could kill the temporary variable completely then?
> >
> > I did consider that, but kept it this way for readability reasons.
> > Should I change it?
>
> Honestly that doesn't look that fuzzy code even if you'd stick it into
the
> tcp_mark_push line (nor should be even close to 80 limit). ...I was even
> thinking of getting totally rid of that skb arg of tcp_mark_push as I
> think it's always tcp_write_queue_tail(sk) that is put there.

Yes, the skb is always the one at the tail. But in 4/5 cases, the
skb pointer is already available, so may be OK to pass the skb. I
will resubmit with the change you suggested (remove the temporary
variable).

Also, for the NETIF_F_SG patch, I will try to put a meaningful
explanation and resubmit.

Thanks for your review,

- KK

--
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