diff mbox series

[ovs-dev] expr.c: Remove the force_crossproduct related code.

Message ID 20220330054925.2656141-1-hzhou@ovn.org
State Accepted
Headers show
Series [ovs-dev] expr.c: Remove the force_crossproduct related code. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_ovn-kubernetes success github build: passed
ovsrobot/github-robot-_Build_and_Test fail github build: failed

Commit Message

Han Zhou March 30, 2022, 5:49 a.m. UTC
This is not needed any more and force_crossproduct is always false.

Signed-off-by: Han Zhou <hzhou@ovn.org>
---
 lib/expr.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

Comments

Mark Michelson April 5, 2022, 5:59 p.m. UTC | #1
This is my favorite type of change :)

Acked-by: Mark Michelson <mmichels@redhat.com>

On 3/30/22 01:49, Han Zhou wrote:
> This is not needed any more and force_crossproduct is always false.
> 
> Signed-off-by: Han Zhou <hzhou@ovn.org>
> ---
>   lib/expr.c | 15 +--------------
>   1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/lib/expr.c b/lib/expr.c
> index 47ef6108e..77c67cde4 100644
> --- a/lib/expr.c
> +++ b/lib/expr.c
> @@ -33,19 +33,6 @@
>   
>   VLOG_DEFINE_THIS_MODULE(expr);
>   
> -/* Right now conjunction flows generated by ovn-controller
> - * has issues. If there are multiple flows with the same
> - * match for different conjunctions, ovn-controller doesn't
> - * handle it properly.
> - * Eg.
> - * match 1 - ip4.src == {IP1, IP2} && tcp.dst >=500 && tcp.src <=600
> - * action - drop
> - *
> - * match 2 - ip4.src == {IP1, IP2} && tcp.dst >=700 && tcp.src <=800
> - * action - allow.
> - */
> -static bool force_crossproduct = false;
> -
>   static struct expr *parse_and_annotate(const char *s,
>                                          const struct shash *symtab,
>                                          struct ovs_list *nesting,
> @@ -2916,7 +2903,7 @@ expr_normalize_and(struct expr *expr)
>   
>           ovs_assert(sub->type == EXPR_T_OR);
>           const struct expr_symbol *symbol = expr_get_unique_symbol(sub);
> -        if (!symbol || force_crossproduct || symbol->must_crossproduct ) {
> +        if (!symbol || symbol->must_crossproduct) {
>               struct expr *or = expr_create_andor(EXPR_T_OR);
>               struct expr *k;
>   
>
Han Zhou April 6, 2022, 11:49 p.m. UTC | #2
On Tue, Apr 5, 2022 at 10:59 AM Mark Michelson <mmichels@redhat.com> wrote:
>
> This is my favorite type of change :)

It happens to be mine, too :)

>
> Acked-by: Mark Michelson <mmichels@redhat.com>
>
Thanks Mark. Applied to main.

> On 3/30/22 01:49, Han Zhou wrote:
> > This is not needed any more and force_crossproduct is always false.
> >
> > Signed-off-by: Han Zhou <hzhou@ovn.org>
> > ---
> >   lib/expr.c | 15 +--------------
> >   1 file changed, 1 insertion(+), 14 deletions(-)
> >
> > diff --git a/lib/expr.c b/lib/expr.c
> > index 47ef6108e..77c67cde4 100644
> > --- a/lib/expr.c
> > +++ b/lib/expr.c
> > @@ -33,19 +33,6 @@
> >
> >   VLOG_DEFINE_THIS_MODULE(expr);
> >
> > -/* Right now conjunction flows generated by ovn-controller
> > - * has issues. If there are multiple flows with the same
> > - * match for different conjunctions, ovn-controller doesn't
> > - * handle it properly.
> > - * Eg.
> > - * match 1 - ip4.src == {IP1, IP2} && tcp.dst >=500 && tcp.src <=600
> > - * action - drop
> > - *
> > - * match 2 - ip4.src == {IP1, IP2} && tcp.dst >=700 && tcp.src <=800
> > - * action - allow.
> > - */
> > -static bool force_crossproduct = false;
> > -
> >   static struct expr *parse_and_annotate(const char *s,
> >                                          const struct shash *symtab,
> >                                          struct ovs_list *nesting,
> > @@ -2916,7 +2903,7 @@ expr_normalize_and(struct expr *expr)
> >
> >           ovs_assert(sub->type == EXPR_T_OR);
> >           const struct expr_symbol *symbol =
expr_get_unique_symbol(sub);
> > -        if (!symbol || force_crossproduct || symbol->must_crossproduct
) {
> > +        if (!symbol || symbol->must_crossproduct) {
> >               struct expr *or = expr_create_andor(EXPR_T_OR);
> >               struct expr *k;
> >
> >
>
diff mbox series

Patch

diff --git a/lib/expr.c b/lib/expr.c
index 47ef6108e..77c67cde4 100644
--- a/lib/expr.c
+++ b/lib/expr.c
@@ -33,19 +33,6 @@ 
 
 VLOG_DEFINE_THIS_MODULE(expr);
 
-/* Right now conjunction flows generated by ovn-controller
- * has issues. If there are multiple flows with the same
- * match for different conjunctions, ovn-controller doesn't
- * handle it properly.
- * Eg.
- * match 1 - ip4.src == {IP1, IP2} && tcp.dst >=500 && tcp.src <=600
- * action - drop
- *
- * match 2 - ip4.src == {IP1, IP2} && tcp.dst >=700 && tcp.src <=800
- * action - allow.
- */
-static bool force_crossproduct = false;
-
 static struct expr *parse_and_annotate(const char *s,
                                        const struct shash *symtab,
                                        struct ovs_list *nesting,
@@ -2916,7 +2903,7 @@  expr_normalize_and(struct expr *expr)
 
         ovs_assert(sub->type == EXPR_T_OR);
         const struct expr_symbol *symbol = expr_get_unique_symbol(sub);
-        if (!symbol || force_crossproduct || symbol->must_crossproduct ) {
+        if (!symbol || symbol->must_crossproduct) {
             struct expr *or = expr_create_andor(EXPR_T_OR);
             struct expr *k;