diff mbox

[13/25] ipvs: remove check for IP_VS_CONN_F_SYNC from ip_vs_bind_dest

Message ID 1336436539-5880-14-git-send-email-pablo@netfilter.org
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Pablo Neira Ayuso May 8, 2012, 12:22 a.m. UTC
From: Julian Anastasov <ja@ssi.bg>

	As the IP_VS_CONN_F_INACTIVE bit is properly set
in cp->flags for all kind of connections we do not need to
add special checks for synced connections when updating
the activeconns/inactconns counters for first time. Now
logic will look just like in ip_vs_unbind_dest.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 net/netfilter/ipvs/ip_vs_conn.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

David Miller May 8, 2012, 1:36 a.m. UTC | #1
From: pablo@netfilter.org
Date: Tue,  8 May 2012 02:22:07 +0200

> +		/* It is a normal connection, so modify the counters
> +		 * according to the flags, later the protocol can
> +		 * update them on state change */

Rather:

		/* It is a normal connection, so modify the counters
		 * according to the flags, later the protocol can
		 * update them on state change
		 */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman May 8, 2012, 2:08 a.m. UTC | #2
On Mon, May 07, 2012 at 09:36:07PM -0400, David Miller wrote:
> From: pablo@netfilter.org
> Date: Tue,  8 May 2012 02:22:07 +0200
> 
> > +		/* It is a normal connection, so modify the counters
> > +		 * according to the flags, later the protocol can
> > +		 * update them on state change */
> 
> Rather:
> 
> 		/* It is a normal connection, so modify the counters
> 		 * according to the flags, later the protocol can
> 		 * update them on state change
> 		 */

Hi Dave,

can I fix this up as a subsequent patch?

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Engelhardt May 8, 2012, 2:15 a.m. UTC | #3
On Tuesday 2012-05-08 03:36, David Miller wrote:

>From: pablo@netfilter.org
>Date: Tue,  8 May 2012 02:22:07 +0200
>
>> +		/* It is a normal connection, so modify the counters
>> +		 * according to the flags, later the protocol can
>> +		 * update them on state change */
>
>Rather:
>
>		/* It is a normal connection, so modify the counters
>		 * according to the flags, later the protocol can
>		 * update them on state change
>		 */

Well, CodingStyle even says

>		/*
>		 * It is a normal connection, so modify the counters
>		 * according to the flags, later the protocol can
>		 * update them on state change.
>		 */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller May 8, 2012, 2:16 a.m. UTC | #4
From: Simon Horman <horms@verge.net.au>
Date: Tue, 8 May 2012 11:08:44 +0900

> can I fix this up as a subsequent patch?

Pablo's tree needs to get respun to address the other feedback
I gave, so no reason for him or you to not fix this as well.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller May 8, 2012, 2:17 a.m. UTC | #5
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 8 May 2012 04:15:15 +0200 (CEST)

> On Tuesday 2012-05-08 03:36, David Miller wrote:
> 
>>From: pablo@netfilter.org
>>Date: Tue,  8 May 2012 02:22:07 +0200
>>
>>> +		/* It is a normal connection, so modify the counters
>>> +		 * according to the flags, later the protocol can
>>> +		 * update them on state change */
>>
>>Rather:
>>
>>		/* It is a normal connection, so modify the counters
>>		 * according to the flags, later the protocol can
>>		 * update them on state change
>>		 */
> 
> Well, CodingStyle even says

We've discussed this to death, subsystem maintainers can ask
for whatever they want and this is what I've asked for for years.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman May 8, 2012, 3:15 a.m. UTC | #6
On Mon, May 07, 2012 at 10:16:17PM -0400, David Miller wrote:
> From: Simon Horman <horms@verge.net.au>
> Date: Tue, 8 May 2012 11:08:44 +0900
> 
> > can I fix this up as a subsequent patch?
> 
> Pablo's tree needs to get respun to address the other feedback
> I gave, so no reason for him or you to not fix this as well.

Understood.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira Ayuso May 8, 2012, 7:32 a.m. UTC | #7
On Tue, May 08, 2012 at 12:15:47PM +0900, Simon Horman wrote:
> On Mon, May 07, 2012 at 10:16:17PM -0400, David Miller wrote:
> > From: Simon Horman <horms@verge.net.au>
> > Date: Tue, 8 May 2012 11:08:44 +0900
> > 
> > > can I fix this up as a subsequent patch?
> > 
> > Pablo's tree needs to get respun to address the other feedback
> > I gave, so no reason for him or you to not fix this as well.
> 
> Understood.

Yes, I'll fix it myself.

Expect a new batch in a couple of minutes.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index f562e63..7647f3b 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -585,11 +585,10 @@  ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
 
 	/* Update the connection counters */
 	if (!(cp->flags & IP_VS_CONN_F_TEMPLATE)) {
-		/* It is a normal connection, so increase the inactive
-		   connection counter because it is in TCP SYNRECV
-		   state (inactive) or other protocol inacive state */
-		if ((cp->flags & IP_VS_CONN_F_SYNC) &&
-		    (!(cp->flags & IP_VS_CONN_F_INACTIVE)))
+		/* It is a normal connection, so modify the counters
+		 * according to the flags, later the protocol can
+		 * update them on state change */
+		if (!(cp->flags & IP_VS_CONN_F_INACTIVE))
 			atomic_inc(&dest->activeconns);
 		else
 			atomic_inc(&dest->inactconns);