Re: [ovs-dev] [PATCH] alloc_ofp_port does not allocate the port number correctly

2013-01-11 Thread Krishna Kondaka
Thanks Justin! Krishna - Original Message - From: "Justin Pettit" To: "Krishna Kondaka" Cc: dev@openvswitch.org Sent: Friday, January 11, 2013 3:10:41 PM Subject: Re: [ovs-dev] [PATCH] alloc_ofp_port does not allocate the port number correctly I pushed this

Re: [ovs-dev] [PATCH] alloc_ofp_port does not allocate the port number correctly

2013-01-11 Thread Justin Pettit
I pushed this change with a slight modification. I changed this: if (++ofproto->alloc_port_no == ofproto->max_ports) { to this: if (++ofproto->alloc_port_no >= ofproto->max_ports) { Your code was correct, but this just seems a bit safer. Thanks for the fix! --Justin

[ovs-dev] [PATCH] alloc_ofp_port does not allocate the port number correctly

2013-01-10 Thread Krishna Kondaka
From: Krishna Kondaka alloc_ofp_port() does not allocate the port number correctly if the port number passed initially is already in use. The following if block if (ofp_port >= ofproto->max_ports || bitmap_is_set(ofproto->ofp_port_ids, ofp_port)) { is entered when either of the two

Re: [ovs-dev] [PATCH] alloc_ofp_port does not allocate the port number correctly

2013-01-10 Thread Krishna Kondaka
Thanks Justin. I will send out updated patch soon. Thanks Krishna - Original Message - From: "Justin Pettit" To: "Krishna Kondaka" Cc: dev@openvswitch.org Sent: Thursday, January 10, 2013 6:36:17 PM Subject: Re: [ovs-dev] [PATCH] alloc_ofp_port does not allo

Re: [ovs-dev] [PATCH] alloc_ofp_port does not allocate the port number correctly

2013-01-10 Thread Justin Pettit
On Jan 9, 2013, at 4:10 PM, Krishna Kondaka wrote: > -/* Search for a free OpenFlow port number. We try not to > - * immediately reuse them to prevent problems due to old > - * flows. */ I think the comment about not reusing port numbers is still useful for explaining w

Re: [ovs-dev] [PATCH] alloc_ofp_port does not allocate the port number correctly

2013-01-10 Thread Jarno Rajahalme
On Jan 10, 2013, at 2:10 , ext Krishna Kondaka wrote: > > From: Krishna Kondaka > > alloc_ofp_port() does not allocate the port number correctly if the port > number passed initially is already in use. The following if block > > if (ofp_port >= ofproto->max_ports >|| bitmap_is_set(o

[ovs-dev] [PATCH] alloc_ofp_port does not allocate the port number correctly

2013-01-09 Thread Krishna Kondaka
From: Krishna Kondaka alloc_ofp_port() does not allocate the port number correctly if the port number passed initially is already in use. The following if block if (ofp_port >= ofproto->max_ports || bitmap_is_set(ofproto->ofp_port_ids, ofp_port)) { is entered when either of the two