Re: [ovs-dev] [PATCH 1/4] classifier: Remove redundant index.

2016-04-21 Thread Ben Pfaff
On Wed, Apr 13, 2016 at 07:06:43PM -0700, Jarno Rajahalme wrote:
> The test for figuring out if the last index had the same fields as the
> actual rules map as broken, resulting into keeping an unnecessary
> index around.
> 
> Signed-off-by: Jarno Rajahalme 

Acked-by: Ben Pfaff 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH 1/4] classifier: Remove redundant index.

2016-04-20 Thread Jarno Rajahalme

> On Apr 18, 2016, at 1:26 PM, Ryan Moats  wrote:
> 
> > --- Original Message ---
> > The test for figuring out if the last index had the same fields as the
> > actual rules map as broken, resulting into keeping an unnecessary
> > index around.
> > 
> > Signed-off-by: Jarno Rajahalme  > >
> > ---
> 
> Acked-by: Ryan Moats 
> 
Thanks for the reviews Ryan!

Ben wanted to review these as well, so I’ll wait what he has to say before 
merging the series,

  Jarno
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH 1/4] classifier: Remove redundant index.

2016-04-18 Thread Ryan Moats

> --- Original Message ---
> The test for figuring out if the last index had the same fields as the
> actual rules map as broken, resulting into keeping an unnecessary
> index around.
>
> Signed-off-by: Jarno Rajahalme 
> ---

Acked-by: Ryan Moats 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH 1/4] classifier: Remove redundant index.

2016-04-13 Thread Jarno Rajahalme
The test for figuring out if the last index had the same fields as the
actual rules map as broken, resulting into keeping an unnecessary
index around.

Signed-off-by: Jarno Rajahalme 
---
 lib/classifier.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/classifier.c b/lib/classifier.c
index 8bc6353..4861672 100644
--- a/lib/classifier.c
+++ b/lib/classifier.c
@@ -1490,11 +1490,11 @@ insert_subtable(struct classifier *cls, const struct 
minimask *mask)
 /* Map for the final stage. */
 *CONST_CAST(struct flowmap *, >index_maps[index])
 = miniflow_get_map_in_range(>masks, prev, FLOW_U64S);
-/* Check if the final stage adds any bits,
- * and remove the last index if it doesn't. */
+/* Check if the final stage adds any bits. */
 if (index > 0) {
-if (flowmap_equal(subtable->index_maps[index],
-  subtable->index_maps[index - 1])) {
+if (flowmap_is_empty(subtable->index_maps[index])) {
+/* Remove the last index, as it has the same fields as the rules
+ * map. */
 --index;
 cmap_destroy(>indices[index]);
 }
-- 
2.1.4

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev