All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Schillstrom <hans@schillstrom.com>
To: Simon Horman <horms@verge.net.au>
Cc: Hans Schillstrom <hans.schillstrom@ericsson.com>,
	ja@ssi.bg, daniel.lezcano@free.fr, wensong@linux-vs.org,
	lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org
Subject: Re: [*v2 PATCH 08/22] IPVS: netns preparation for proto_sctp
Date: Tue, 14 Dec 2010 07:27:03 +0100	[thread overview]
Message-ID: <201012140727.04411.hans@schillstrom.com> (raw)
In-Reply-To: <20101213222300.GK3221@verge.net.au>


On Monday, December 13, 2010 23:23:01 Simon Horman wrote:
> On Mon, Dec 13, 2010 at 02:38:16PM +0100, Hans Schillstrom wrote:
> > In this phase (one), all local vars will be moved to ipvs struct.
> > 
> > Remaining work, add param struct net *net to a couple of
> > functions that is common for all protos and use ip_vs_proto_data
> > 
> > Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
> 
> [ snip ]
> 
> > diff --git a/net/netfilter/ipvs/ip_vs_proto_sctp.c b/net/netfilter/ipvs/ip_vs_proto_sctp.c
> > index 521b827..108ae0c 100644
> > --- a/net/netfilter/ipvs/ip_vs_proto_sctp.c
> > +++ b/net/netfilter/ipvs/ip_vs_proto_sctp.c
> 
> [ snip ]
> 
> > @@ -1101,43 +1098,51 @@ static int sctp_app_conn_bind(struct ip_vs_conn *cp)
> >  			goto out;
> >  		}
> >  	}
> > -	spin_unlock(&sctp_app_lock);
> > +	spin_unlock(&ipvs->sctp_app_lock);
> >  out:
> >  	return result;
> >  }
> >  
> > -static void ip_vs_sctp_init(struct ip_vs_protocol *pp)
> > +/* ---------------------------------------------
> > + *   timeouts is netns related now.
> > + * ---------------------------------------------
> > + */
> > +static void __ip_vs_sctp_init(struct net *net, struct ip_vs_proto_data *pd)
> >  {
> > -	IP_VS_INIT_HASH_TABLE(sctp_apps);
> > -	pp->timeout_table = sctp_timeouts;
> > -}
> > +	struct netns_ipvs *ipvs = net_ipvs(net);
> >  
> > +	ip_vs_init_hash_table(ipvs->sctp_apps, SCTP_APP_TAB_SIZE);
> > +	spin_lock_init(&ipvs->tcp_app_lock);
> > +	pd->timeout_table = ip_vs_create_timeout_table((int*)sctp_timeouts,
> > +							sizeof(sctp_timeouts));
> > +}
> >  
> > -static void ip_vs_sctp_exit(struct ip_vs_protocol *pp)
> > +static void __ip_vs_sctp_exit(struct net *net, struct ip_vs_proto_data *pd)
> >  {
> > -
> > +	kfree(pd->timeout_table);
> >  }
> >  
> >  struct ip_vs_protocol ip_vs_protocol_sctp = {
> > -	.name = "SCTP",
> > -	.protocol = IPPROTO_SCTP,
> > -	.num_states = IP_VS_SCTP_S_LAST,
> > -	.dont_defrag = 0,
> > -	.appcnt = ATOMIC_INIT(0),
> > -	.init = ip_vs_sctp_init,
> > -	.exit = ip_vs_sctp_exit,

init & exit changed to NULL

> > -	.register_app = sctp_register_app,
> > +	.name		= "SCTP",
> > +	.protocol	= IPPROTO_SCTP,
> > +	.num_states	= IP_VS_SCTP_S_LAST,
> > +	.dont_defrag	= 0,
> > +	.init 		= NULL,
> > +	.exit 		= NULL,
> > +	.init_netns 	= __ip_vs_sctp_init,
> > +	.exit_netns 	= __ip_vs_sctp_exit,

init_netns and exit_netns added

> > +	.register_app	= sctp_register_app,
> >  	.unregister_app = sctp_unregister_app,
> > -	.conn_schedule = sctp_conn_schedule,
> > -	.conn_in_get = ip_vs_conn_in_get_proto,
> > -	.conn_out_get = ip_vs_conn_out_get_proto,
> > -	.snat_handler = sctp_snat_handler,
> > -	.dnat_handler = sctp_dnat_handler,
> > -	.csum_check = sctp_csum_check,
> > -	.state_name = sctp_state_name,
> > +	.conn_schedule	= sctp_conn_schedule,
> > +	.conn_in_get	= ip_vs_conn_in_get_proto,
> > +	.conn_out_get	= ip_vs_conn_out_get_proto,
> > +	.snat_handler	= sctp_snat_handler,
> > +	.dnat_handler	= sctp_dnat_handler,
> > +	.csum_check	= sctp_csum_check,
> > +	.state_name	= sctp_state_name,
> >  	.state_transition = sctp_state_transition,
> > -	.app_conn_bind = sctp_app_conn_bind,
> > -	.debug_packet = ip_vs_tcpudp_debug_packet,
> > -	.timeout_change = sctp_timeout_change,
> > -	.set_state_timeout = sctp_set_state_timeout,
> > +	.app_conn_bind	= sctp_app_conn_bind,
> > +	.debug_packet	= ip_vs_tcpudp_debug_packet,
> > +	.timeout_change	= NULL,
> > +/*	.set_state_timeout = sctp_set_state_timeout, */

set_state_timout removed or comment-out

> >  };
> 
> While I'm not a big fan or the original formatting,
> the whitespace changes above make it rather difficult to see
> what is really being changed. Could you either drop
> the whitespace changes or move them into a separate patch?

I do agree that the changes is hard to see,
It's the same changes that's in tcp and udp.
I don't think it's worth the effort to make a new patch just for that,
but if you still insists ...



  reply	other threads:[~2010-12-14  6:27 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13 13:38 [*v2 PATCH 00/22] IPVS, Network Name Space aware Hans Schillstrom
2010-12-13 13:38 ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 01/22] IPVS: netns, add basic init per netns Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 14:08   ` Jan Engelhardt
2010-12-13 15:12     ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 02/22] IPVS: netns to services part 1 Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 03/22] IPVS: netns awarness to lblcr sheduler Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 04/22] IPVS: netns awarness to lblc sheduler Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 05/22] IPVS: netns, prepare protocol Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 06/22] IPVS: netns preparation for proto_tcp Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 22:18   ` Simon Horman
2010-12-14  6:42     ` Hans Schillstrom
2010-12-15 21:37       ` Julian Anastasov
2010-12-13 13:38 ` [*v2 PATCH 07/22] IPVS: netns preparation for proto_udp Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 08/22] IPVS: netns preparation for proto_sctp Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 22:23   ` Simon Horman
2010-12-14  6:27     ` Hans Schillstrom [this message]
2010-12-13 13:38 ` [*v2 PATCH 09/22] IPVS: netns preparation for proto_ah_esp Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 22:19   ` Simon Horman
2010-12-13 13:38 ` [*v2 PATCH 10/22] IPVS: netns, use ip_vs_proto_data as param Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 11/22] IPVS: netns, common protocol changes and use of appcnt Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 12/22] IPVS: netns awareness to ip_vs_app Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 13/22] IPVS: netns awareness to ip_vs_est Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 14/22] IPVS: netns awareness to ip_vs_sync Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 15/22] IPVS: netns, ip_vs_stats and its procfs Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 16/22] IPVS: netns, connection hash got net as param Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 17/22] IPVS: netns, ip_vs_ctl local vars moved to ipvs struct Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 18/22] IPVS: netns, defense work timer Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 19/22] IPVS: netns, trash handling Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 20/22] IPVS: netns, svc counters moved in ip_vs_ctl,c Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 21/22] IPVS: netns, misc init_net removal in core Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-13 13:38 ` [*v2 PATCH 22/22] IPVS: netns, final patch enabling network name space Hans Schillstrom
2010-12-13 13:38   ` Hans Schillstrom
2010-12-14 23:43 ` [*v2 PATCH 00/22] IPVS, Network Name Space aware Julian Anastasov
2010-12-15 10:32   ` Hans Schillstrom
2010-12-15 21:11     ` Julian Anastasov
2010-12-15 10:52   ` Hans Schillstrom
2010-12-15 12:15     ` Graeme Fowler

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=201012140727.04411.hans@schillstrom.com \
    --to=hans@schillstrom.com \
    --cc=daniel.lezcano@free.fr \
    --cc=hans.schillstrom@ericsson.com \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=wensong@linux-vs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.