All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Schillstrom <hans.schillstrom@ericsson.com>
To: Simon Horman <horms@verge.net.au>
Cc: Tinggong Wang <wangtinggong@gmail.com>,
	Wensong Zhang <wensong@linux-vs.org>,
	"lvs-devel@vger.kernel.org" <lvs-devel@vger.kernel.org>,
	Hans Schillstrom <hans@schillstrom.com>
Subject: Re: [PATCH 1/3] ipvs: use SYNC_MESG_HEADER_LEN instead of explicit header length
Date: Mon, 13 Dec 2010 09:16:58 +0100	[thread overview]
Message-ID: <1292228218.4983.8.camel@seasc0214> (raw)
In-Reply-To: <20101212214623.GE7914@verge.net.au>

On Sun, 2010-12-12 at 22:46 +0100, Simon Horman wrote:
> [ CCed Hans Schillstrom ]
> 
> On Sun, Dec 12, 2010 at 07:41:45PM +0800, Tinggong Wang wrote:
> > Signed-off-by: Tinggong Wang <wangtinggong@gmail.com>
> > ---
> >  net/netfilter/ipvs/ip_vs_sync.c |   10 +++++-----
> >  1 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
> > index ab85aed..7632a17 100644
> > --- a/net/netfilter/ipvs/ip_vs_sync.c
> > +++ b/net/netfilter/ipvs/ip_vs_sync.c
> > @@ -102,7 +102,6 @@ struct ip_vs_sync_thread_data {
> >        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> >  */
> >  
> > -#define SYNC_MESG_HEADER_LEN	4
> >  #define MAX_CONNS_PER_SYNCBUFF	255 /* nr_conns in ip_vs_sync_mesg is 8 bit */
> >  
> >  struct ip_vs_sync_mesg {
> > @@ -112,6 +111,7 @@ struct ip_vs_sync_mesg {
> >  
> >  	/* ip_vs_sync_conn entries start here */
> >  };
> > +#define SYNC_MESG_HEADER_LEN	(sizeof(struct ip_vs_sync_mesg))
> >  
> >  /* the maximum length of sync (sending/receiving) message */
> >  static int sync_send_mesg_maxlen;
> > @@ -188,8 +188,8 @@ static inline struct ip_vs_sync_buff * ip_vs_sync_buff_create(void)
> >  	}
> >  	sb->mesg->nr_conns = 0;
> >  	sb->mesg->syncid = ip_vs_master_syncid;
> > -	sb->mesg->size = 4;
> > -	sb->head = (unsigned char *)sb->mesg + 4;
> > +	sb->mesg->size = SYNC_MESG_HEADER_LEN;
> > +	sb->head = (unsigned char *)sb->mesg + SYNC_MESG_HEADER_LEN;
> >  	sb->end = (unsigned char *)sb->mesg + sync_send_mesg_maxlen;
> >  	sb->firstuse = jiffies;
> >  	return sb;
> > @@ -315,7 +315,7 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
> >  	char *p;
> >  	int i;
> >  
> > -	if (buflen < sizeof(struct ip_vs_sync_mesg)) {
> > +	if (buflen < SYNC_MESG_HEADER_LEN) {
> >  		IP_VS_ERR_RL("sync message header too short\n");
> >  		return;
> >  	}
> > @@ -335,7 +335,7 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
> >  		return;
> >  	}
> >  
> > -	p = (char *)buffer + sizeof(struct ip_vs_sync_mesg);
> > +	p = (char *)buffer + SYNC_MESG_HEADER_LEN;
> >  	for (i=0; i<m->nr_conns; i++) {
> >  		unsigned flags, state;
> >  
> > -- 
> > 1.7.2.3
> > 
> 
> This looks good to me, Hans can I get an Ack from you?

This patch is outdated, it doesn't look like this after IPv6 & PE
additions. 

(BTW I will post the network name space patch today, and the 4 is
already replaced there.)

Regards
Hans Schillstrom <hans.schillstrom@ericsson.com>



      reply	other threads:[~2010-12-13  8:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-12 11:41 [PATCH 1/3] ipvs: use SYNC_MESG_HEADER_LEN instead of explicit header length Tinggong Wang
2010-12-12 11:42 ` [PATCH 2/3] ipvs: check data validation before local_bh_disable Tinggong Wang
2010-12-12 11:43   ` [PATCH 3/3] ipvs: fix get_curr_sync_buff Tinggong Wang
2010-12-12 21:49     ` Simon Horman
2010-12-13  9:21       ` Hans Schillstrom
2010-12-13 23:32     ` Julian Anastasov
2010-12-14  3:00       ` Tinggong Wang
2010-12-14  8:28         ` Julian Anastasov
2010-12-15  8:28           ` Simon Horman
2010-12-12 21:48   ` [PATCH 2/3] ipvs: check data validation before local_bh_disable Simon Horman
2010-12-13  3:44     ` Tinggong Wang
2010-12-13  6:29       ` Simon Horman
2010-12-13  8:53         ` Hans Schillstrom
2010-12-13 10:49           ` Tinggong Wang
2010-12-13 18:06             ` Tinggong Wang
2010-12-12 21:46 ` [PATCH 1/3] ipvs: use SYNC_MESG_HEADER_LEN instead of explicit header length Simon Horman
2010-12-13  8:16   ` Hans Schillstrom [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=1292228218.4983.8.camel@seasc0214 \
    --to=hans.schillstrom@ericsson.com \
    --cc=hans@schillstrom.com \
    --cc=horms@verge.net.au \
    --cc=lvs-devel@vger.kernel.org \
    --cc=wangtinggong@gmail.com \
    --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.