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] [day] [month] [year] [list]
Date:	Mon, 15 Jun 2015 14:54:46 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	firogm@...il.com
Cc:	eric.dumazet@...il.com, gerrit@....abdn.ac.uk,
	yoshfuji@...ux-ipv6.org, jmorris@...ei.org, kuznet@....inr.ac.ru,
	herbert@...dor.apana.org.au, ast@...mgrid.com,
	ebiederm@...ssion.com, dan.carpenter@...cle.com,
	Julia.Lawall@...6.fr, netdev@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2] net: Add sock_common_listen for TCP and DCCP

From: Firo Yang <firogm@...il.com>
Date: Fri, 12 Jun 2015 12:57:57 +0800

> Code refactoring:
> 1. Move the common code of inet_listen() and inet_dccp_listen() to
> sock_common_listen().
> 
> 2. Modify and rename inet_listen() to tcp_listen().
> 
> 3. Modify and rename inet_dccp_listen() to dccp_listen().
> 
> 4. Add new callback pointer listen in struct proto for
> tcp_listen() and dccp_listen().
> 
> This patch makes codes more modularized and removes redudant codes.
> 
> Signed-off-by: Firo Yang <firogm@...il.com>
> ---
> v2: 
> In according to the advices of Eric Dumazet, sock_common_listen() keep 
> using TCP_xxx state instead of introducing new aliases.
> 
> Test info:
> I test it on my x86 PC.

I don't think this is worthwhile, sorry.

Instead of having two straight line copies of a piece of logic, we now
have three functions and a new callback.  I'd rather have a single
duplicate copy of a function than all of that.
--
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