Re: [ovs-dev] [PATCH ovn v3] tests: Remove table numbers from "action parsing".
Bleep bloop. Greetings Xavier Simonart, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. git-am: error: sha1 information is lacking or useless (tests/ovn.at). error: could not build fake ancestor hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 tests: Remove table numbers from "action parsing". When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Please check this out. If you feel there has been an error, please email acon...@redhat.com Thanks, 0-day Robot ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH ovn v3] tests: Remove table numbers from "action parsing".
Hi Mark Sorry, drop this patch - missing the 1/2. Will resend. Thanks Xavier On Fri, Mar 15, 2024 at 7:03 PM Xavier Simonart wrote: > This patch uses the recently introduced macros defining openflow table > numbers. > > Signed-off-by: Xavier Simonart > > --- > v2: - Handled Ales' comments (i.e. fix few remaining hard-coded numbers) > - Rebase on origin/main > v3: - Rebase on origin/main > --- > tests/ovn-macros.at | 4 + > tests/ovn.at| 245 +++- > 2 files changed, 132 insertions(+), 117 deletions(-) > > diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at > index 3410afb74..45ec06c02 100644 > --- a/tests/ovn-macros.at > +++ b/tests/ovn-macros.at > @@ -1042,6 +1042,8 @@ m4_define([OFTABLE_OUTPUT_LARGE_PKT_DETECT], [37]) > m4_define([OFTABLE_OUTPUT_LARGE_PKT_PROCESS], [38]) > m4_define([OFTABLE_REMOTE_OUTPUT], [39]) > m4_define([OFTABLE_LOCAL_OUTPUT], [40]) > +m4_define([OFTABLE_LOG_EGRESS_PIPELINE], [42]) > +m4_define([OFTABLE_SAVE_INPORT], [64]) > m4_define([OFTABLE_LOG_TO_PHY], [65]) > m4_define([OFTABLE_MAC_BINDING], [66]) > m4_define([OFTABLE_MAC_LOOKUP], [67]) > @@ -1057,3 +1059,5 @@ m4_define([OFTABLE_ECMP_NH_MAC], [76]) > m4_define([OFTABLE_ECMP_NH], [77]) > m4_define([OFTABLE_CHK_LB_AFFINITY], [78]) > m4_define([OFTABLE_MAC_CACHE_USE], [79]) > + > +m4_define([OFTABLE_SAVE_INPORT_HEX], [m4_eval(OFTABLE_SAVE_INPORT, 16)]) > diff --git a/tests/ovn.at b/tests/ovn.at > index 2a5417685..de103a5bf 100644 > --- a/tests/ovn.at > +++ b/tests/ovn.at > @@ -979,6 +979,17 @@ AT_CLEANUP > AT_SETUP([action parsing]) > dnl Unindented text is input (a set of OVN logical actions). > dnl Indented text is expected output. > + > +# lflow table hard-coded to 10 in test-ovn, so next is 11. > +m4_define([lflow_table], [11]) > + > +m4_define([NEXT], [m4_if( > +$1, ingress, [m4_eval($2 + OFTABLE_LOG_INGRESS_PIPELINE)], > +$1, egress, [m4_eval($2 + OFTABLE_LOG_EGRESS_PIPELINE)])]) > + > +m4_define([oflow_in_table], [NEXT(ingress, lflow_table)]) > +m4_define([oflow_out_table], [NEXT(egress, lflow_table)]) > + > AT_DATA([test-cases.txt], [ > # drop > drop; > @@ -990,18 +1001,18 @@ next; drop; > > # output > output; > -encodes as resubmit(,64) > +encodes as resubmit(,OFTABLE_SAVE_INPORT) > > # next > next; > -encodes as resubmit(,19) > -next(11); > +encodes as resubmit(,oflow_in_table) > +next(lflow_table); > formats as next; > -encodes as resubmit(,19) > +encodes as resubmit(,oflow_in_table) > next(0); > -encodes as resubmit(,8) > +encodes as resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > next(23); > -encodes as resubmit(,31) > +encodes as resubmit(,NEXT(ingress, 23)) > > next(); > Syntax error at `)' expecting "pipeline" or "table". > @@ -1010,29 +1021,29 @@ next(10; > next(24); > "next" action cannot advance beyond table 23. > > -next(table=11); > +next(table=lflow_table); > formats as next; > -encodes as resubmit(,19) > +encodes as resubmit(,oflow_in_table) > next(pipeline=ingress); > formats as next; > -encodes as resubmit(,19) > -next(table=11, pipeline=ingress); > +encodes as resubmit(,oflow_in_table) > +next(table=lflow_table, pipeline=ingress); > formats as next; > -encodes as resubmit(,19) > -next(pipeline=ingress, table=11); > +encodes as resubmit(,oflow_in_table) > +next(pipeline=ingress, table=lflow_table); > formats as next; > -encodes as resubmit(,19) > +encodes as resubmit(,oflow_in_table) > > next(pipeline=egress); > -formats as next(pipeline=egress, table=11); > -encodes as resubmit(,53) > +formats as next(pipeline=egress, table=lflow_table); > +encodes as resubmit(,oflow_out_table) > > next(pipeline=egress, table=5); > -encodes as resubmit(,47) > +encodes as resubmit(,NEXT(egress, 5)) > > next(table=10); > formats as next(10); > -encodes as resubmit(,18) > +encodes as resubmit(,NEXT(ingress, 10)) > > # Loading a constant value. > tcp.dst=80; > @@ -1054,7 +1065,7 @@ ip.ttl=4; > has prereqs eth.type == 0x800 || eth.type == 0x86dd > outport="eth0"; next; outport="LOCAL"; next; > formats as outport = "eth0"; next; outport = "LOCAL"; next; > -encodes as > set_field:0x5->reg15,resubmit(,19),set_field:0xfffe->reg15,resubmit(,19) > +encodes as > set_field:0x5->reg15,resubmit(,oflow_in_table),set_field:0xfffe->reg15,resubmit(,oflow_in_table) > > inport[[1]] = 1; > Cannot select subfield of string field inport. > @@ -1152,35 +1163,35 @@ pkt.mark = "foo"; > > # load balancing. > ct_lb; > -encodes as ct(table=19,zone=NXM_NX_REG13[[0..15]],nat) > +encodes as ct(table=oflow_in_table,zone=NXM_NX_REG13[[0..15]],nat) > has prereqs ip > ct_lb(); > formats as ct_lb; > -encodes as ct(table=19,zone=NXM_NX_REG13[[0..15]],nat) > +encodes as ct(table=oflow_in_table,zone=NXM_NX_REG13[[0..15]],nat) > has prereqs ip > ct_lb(192.168.1.2:80,
[ovs-dev] [PATCH ovn v3] tests: Remove table numbers from "action parsing".
This patch uses the recently introduced macros defining openflow table numbers. Signed-off-by: Xavier Simonart --- v2: - Handled Ales' comments (i.e. fix few remaining hard-coded numbers) - Rebase on origin/main v3: - Rebase on origin/main --- tests/ovn-macros.at | 4 + tests/ovn.at| 245 +++- 2 files changed, 132 insertions(+), 117 deletions(-) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 3410afb74..45ec06c02 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -1042,6 +1042,8 @@ m4_define([OFTABLE_OUTPUT_LARGE_PKT_DETECT], [37]) m4_define([OFTABLE_OUTPUT_LARGE_PKT_PROCESS], [38]) m4_define([OFTABLE_REMOTE_OUTPUT], [39]) m4_define([OFTABLE_LOCAL_OUTPUT], [40]) +m4_define([OFTABLE_LOG_EGRESS_PIPELINE], [42]) +m4_define([OFTABLE_SAVE_INPORT], [64]) m4_define([OFTABLE_LOG_TO_PHY], [65]) m4_define([OFTABLE_MAC_BINDING], [66]) m4_define([OFTABLE_MAC_LOOKUP], [67]) @@ -1057,3 +1059,5 @@ m4_define([OFTABLE_ECMP_NH_MAC], [76]) m4_define([OFTABLE_ECMP_NH], [77]) m4_define([OFTABLE_CHK_LB_AFFINITY], [78]) m4_define([OFTABLE_MAC_CACHE_USE], [79]) + +m4_define([OFTABLE_SAVE_INPORT_HEX], [m4_eval(OFTABLE_SAVE_INPORT, 16)]) diff --git a/tests/ovn.at b/tests/ovn.at index 2a5417685..de103a5bf 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -979,6 +979,17 @@ AT_CLEANUP AT_SETUP([action parsing]) dnl Unindented text is input (a set of OVN logical actions). dnl Indented text is expected output. + +# lflow table hard-coded to 10 in test-ovn, so next is 11. +m4_define([lflow_table], [11]) + +m4_define([NEXT], [m4_if( +$1, ingress, [m4_eval($2 + OFTABLE_LOG_INGRESS_PIPELINE)], +$1, egress, [m4_eval($2 + OFTABLE_LOG_EGRESS_PIPELINE)])]) + +m4_define([oflow_in_table], [NEXT(ingress, lflow_table)]) +m4_define([oflow_out_table], [NEXT(egress, lflow_table)]) + AT_DATA([test-cases.txt], [ # drop drop; @@ -990,18 +1001,18 @@ next; drop; # output output; -encodes as resubmit(,64) +encodes as resubmit(,OFTABLE_SAVE_INPORT) # next next; -encodes as resubmit(,19) -next(11); +encodes as resubmit(,oflow_in_table) +next(lflow_table); formats as next; -encodes as resubmit(,19) +encodes as resubmit(,oflow_in_table) next(0); -encodes as resubmit(,8) +encodes as resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) next(23); -encodes as resubmit(,31) +encodes as resubmit(,NEXT(ingress, 23)) next(); Syntax error at `)' expecting "pipeline" or "table". @@ -1010,29 +1021,29 @@ next(10; next(24); "next" action cannot advance beyond table 23. -next(table=11); +next(table=lflow_table); formats as next; -encodes as resubmit(,19) +encodes as resubmit(,oflow_in_table) next(pipeline=ingress); formats as next; -encodes as resubmit(,19) -next(table=11, pipeline=ingress); +encodes as resubmit(,oflow_in_table) +next(table=lflow_table, pipeline=ingress); formats as next; -encodes as resubmit(,19) -next(pipeline=ingress, table=11); +encodes as resubmit(,oflow_in_table) +next(pipeline=ingress, table=lflow_table); formats as next; -encodes as resubmit(,19) +encodes as resubmit(,oflow_in_table) next(pipeline=egress); -formats as next(pipeline=egress, table=11); -encodes as resubmit(,53) +formats as next(pipeline=egress, table=lflow_table); +encodes as resubmit(,oflow_out_table) next(pipeline=egress, table=5); -encodes as resubmit(,47) +encodes as resubmit(,NEXT(egress, 5)) next(table=10); formats as next(10); -encodes as resubmit(,18) +encodes as resubmit(,NEXT(ingress, 10)) # Loading a constant value. tcp.dst=80; @@ -1054,7 +1065,7 @@ ip.ttl=4; has prereqs eth.type == 0x800 || eth.type == 0x86dd outport="eth0"; next; outport="LOCAL"; next; formats as outport = "eth0"; next; outport = "LOCAL"; next; -encodes as set_field:0x5->reg15,resubmit(,19),set_field:0xfffe->reg15,resubmit(,19) +encodes as set_field:0x5->reg15,resubmit(,oflow_in_table),set_field:0xfffe->reg15,resubmit(,oflow_in_table) inport[[1]] = 1; Cannot select subfield of string field inport. @@ -1152,35 +1163,35 @@ pkt.mark = "foo"; # load balancing. ct_lb; -encodes as ct(table=19,zone=NXM_NX_REG13[[0..15]],nat) +encodes as ct(table=oflow_in_table,zone=NXM_NX_REG13[[0..15]],nat) has prereqs ip ct_lb(); formats as ct_lb; -encodes as ct(table=19,zone=NXM_NX_REG13[[0..15]],nat) +encodes as ct(table=oflow_in_table,zone=NXM_NX_REG13[[0..15]],nat) has prereqs ip ct_lb(192.168.1.2:80, 192.168.1.3:80); Syntax error at `192.168.1.2' expecting backends. ct_lb(backends=192.168.1.2:80,192.168.1.3:80); encodes as group:1 -uses group: id(1),