From: David Miller <davem@davemloft.net>
To: firogm@gmail.com
Cc: eric.dumazet@gmail.com, gerrit@erg.abdn.ac.uk,
yoshfuji@linux-ipv6.org, jmorris@namei.org, kuznet@ms2.inr.ac.ru,
herbert@gondor.apana.org.au, ast@plumgrid.com,
ebiederm@xmission.com, dan.carpenter@oracle.com,
Julia.Lawall@lip6.fr, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] net: Add sock_common_listen for TCP and DCCP
Date: Mon, 15 Jun 2015 14:54:46 -0700 (PDT) [thread overview]
Message-ID: <20150615.145446.1566874356874515092.davem@davemloft.net> (raw)
In-Reply-To: <1434085077-4938-1-git-send-email-firogm@gmail.com>
From: Firo Yang <firogm@gmail.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@gmail.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.
prev parent reply other threads:[~2015-06-15 21:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 4:57 [PATCH v2] net: Add sock_common_listen for TCP and DCCP Firo Yang
2015-06-15 21:54 ` David Miller [this message]
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=20150615.145446.1566874356874515092.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Julia.Lawall@lip6.fr \
--cc=ast@plumgrid.com \
--cc=dan.carpenter@oracle.com \
--cc=ebiederm@xmission.com \
--cc=eric.dumazet@gmail.com \
--cc=firogm@gmail.com \
--cc=gerrit@erg.abdn.ac.uk \
--cc=herbert@gondor.apana.org.au \
--cc=jmorris@namei.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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).