[ovs-dev] [PATCH ovn pipeline 6/6] ovn-northd: Implement basic Pipeline generation.

Russell Bryant rbryant at redhat.com
Mon Apr 20 21:07:32 UTC 2015


On 04/18/2015 01:04 PM, Ben Pfaff wrote:
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  ovn/northd/automake.mk  |   6 +-
>  ovn/northd/ovn-northd.c | 345 ++++++++++++++++++++++++++++++++++++++++++++++++
>  ovn/ovn-nb.xml          |  14 +-
>  3 files changed, 358 insertions(+), 7 deletions(-)

I haven't finished a complete review.  Right now I'm trying it out and
just trying to make sure I understand the output.

I did a really simple test with this.  I created an lswitch and 2 lports.

    $ ovn-nbctl lswitch-add sw0
    $ ovn-nbctl lport-add sw0 sw0-port0
    $ ovn-nbctl lport-add sw0 sw0-port1
    $ ovn-nbctl lport-set-macs sw0-port0 00:00:00:00:00:01
    $ ovn-nbctl lport-set-macs sw0-port1 00:00:00:00:00:02

I then looked at the contents of the Pipeline table using 'ovsdb-client
dump OVN_Southbound'.  Here's the contents, slightly reordered to group
entries by table_id and priority.

> Pipeline table
> _uuid                                actions                                                                 logical_datapath                     match                          priority table_id
> ------------------------------------ ----------------------------------------------------------------------- ------------------------------------ ------------------------------ -------- --------
> a7a35b29-bd97-4582-b6b9-96f2e77381d7 drop                                                                    9900ce6f-3c9b-4203-bd09-9045934b2612 "eth.src[40]"                  100      0       
> 917fc0d1-e81a-4e15-ab93-d51bab6f08cb drop                                                                    9900ce6f-3c9b-4203-bd09-9045934b2612 vlan.present                   100      0       
> 927d89f2-1998-415c-9b6b-6a2526b2e567 resubmit                                                                9900ce6f-3c9b-4203-bd09-9045934b2612 "inport == \"sw0-port0\""      50       0       
> 00825af7-3818-4f28-a348-691273ccbbff resubmit                                                                9900ce6f-3c9b-4203-bd09-9045934b2612 "inport == \"sw0-port1\""      50       0       
> 0f144b3c-85b6-41a2-a6c3-23edb0525161 drop                                                                    9900ce6f-3c9b-4203-bd09-9045934b2612 "1"                            0        0       

> 13733abe-03ef-46b7-855b-db1d16fb2c62 "outport = \"sw0-port0\"; resubmit; outport = \"sw0-port1\"; resubmit;" 9900ce6f-3c9b-4203-bd09-9045934b2612 "eth.dst[40]"                  100      1       
> 68abb6fc-62fb-4f31-b9c4-d40b15fbf092 "outport = \"sw0-port0\"; resubmit;"                                    9900ce6f-3c9b-4203-bd09-9045934b2612 "eth.dst == 00:00:00:00:00:01" 50       1       
> dec4b716-f1a4-4b4c-8578-f1c3261a3421 "outport = \"sw0-port1\"; resubmit;"                                    9900ce6f-3c9b-4203-bd09-9045934b2612 "eth.dst == 00:00:00:00:00:02" 50       1       

> 0ee4dd57-23e2-47a9-bac3-397cb3fbfe80 resubmit                                                                9900ce6f-3c9b-4203-bd09-9045934b2612 "1"                            0        2       

> 15747000-c3d0-42ff-bc84-1ad4b4923d4d "output(\"sw0-port0\")"                                                 9900ce6f-3c9b-4203-bd09-9045934b2612 "outport == \"sw0-port0\""     50       3       
> a75a98fd-06b5-48cd-8ad1-403c90e248b6 "output(\"sw0-port1\")"                                                 9900ce6f-3c9b-4203-bd09-9045934b2612 "outport == \"sw0-port1\""     50       3       

In table 1, if "eth.dst[40]" matches, the output is all ports.  Is that
intentional?  Or should it be output to all ports except the source port?

> diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml
> index 6985f5e..a1b3a07 100644
> --- a/ovn/ovn-nb.xml
> +++ b/ovn/ovn-nb.xml
> @@ -144,12 +144,14 @@
>        </p>
>  
>        <p>
> -        Exact syntax is TBD.  One could simply use comma- or
> -        space-separated L2 and L3 addresses in each set member, or
> -        replace this by a subset of the general-purpose expression
> -        language used for the <ref column="match" table="Pipeline"
> -        db="OVN_Southbound"/> column in the OVN Southbound database's
> -        <ref table="Pipeline" db="OVN_Southbound"/> table.
> +	Each member of the set is a comma- or space-separated list.  A single
> +	set member may have an Ethernet address, an IPv4 address, and an IPv6
> +	address, or any subset.  Order is not significant.
> +      </p>
> +
> +      <p>
> +	TBD: exact semantics.  For now only Ethernet port security is
> +	implemented.
>        </p>
>      </column>
>  
> 

It looks like you've got tabs here where most of the file is spaces.  I
posted a patch to convert these XML files to exclusively use spaces for
consistency.

-- 
Russell Bryant



More information about the dev mailing list