[ovs-dev] [PATCH v4 0/2] ovn: Support native DHCP using 'continuations'

Numan Siddique nusiddiq at redhat.com
Mon May 16 09:12:31 UTC 2016


v3 -> v4 changes
----------------

 * Addressed the v3 review comments 

 * Renamed the action name from "dhcp_offer" to "put_dhcp_opts".

 * The action "put_dhcp_opts" will now store the result in the OVS register to indicate
   the success or failure of the action.


v2 -> v3 changes
----------------

* Removed RFC tag

* Added a new table 'Subnet' in NB DB to store the DHCP options. A new column 'subnets'
  is added in 'Logical_Switch' table which refers to this table.

* Added new commands in ovn-nbctl to create and delete subnets belonging to a lswitch
  and to set DHCP options.

* Added a new table 'DHCP_Options' in SB DB to store the supported DHCP option codes.

* Added test cases.


v1 -> v2 changes
--------------

* Added basic documentation

* Added support for classless static routes - dhcp option 121

* Added a new egress table (Table 0) to skip the ACL stages for response dhcp packets.
  This is required until the below reported bug is fixed.
  Please see - http://openvswitch.org/pipermail/dev/2016-April/069542.html

* Added support for storing dhcp options for multiple subnets belonging
  to a lswitch.

Example.
If a lswitch has logical ports having IPv4 addresses belonging to 2 subnets - 10.0.0.0/24 and 20.0.0.0/24,
Then the DHCP options needs to be stored in Logical_Switch.dhcp_options as :

"10.0.0.0/24": "{"server_id": "10.0.0.1", "lease_time": "43200",
                 "mtu": "1450", "netmask": "255.255.255.0",
                 "router": "10.0.0.1", "dns_server": "{7.7.7.7,8.8.8.8}",
                 "server_mac": "fa:16:3e:3e:b8:8a"}"

"20.0.0.0/24": "{"server_id": "20.0.0.1", "lease_time": "43200",
                 "mtu": "1450", "netmask": "255.255.255.0",
                 "router": "20.0.0.1", "server_mac": "fa:16:3e:3e:b8:8b",
                 "classless_static_route": "{30.0.0.0/24,20.0.0.4, 0.0.0.0/0,20.0.0.1}"}"

* Few other small changes.

TODO :
* Add a new table in southbound db and store the supported dhcp option names and codes.
* Test cases

With v3 hoping to remove the RFC tag.

----------------------------------------------

Numan Siddique (2):
  ovn-controller: Add 'put_dhcp_opts' action in ovn-controller
  ovn: Add logical flows to support native DHCP

 include/openvswitch/meta-flow.h |  12 ++
 lib/dhcp.h                      |  13 ++
 ovn/controller/lflow.c          |  11 ++
 ovn/controller/pinctrl.c        | 169 +++++++++++++++++++++-
 ovn/lib/actions.c               | 203 ++++++++++++++++++++++++++-
 ovn/lib/actions.h               |   8 ++
 ovn/lib/automake.mk             |   3 +-
 ovn/lib/expr.c                  |  48 ++-----
 ovn/lib/expr.h                  |  37 +++++
 ovn/lib/ovn-dhcp.h              | 112 +++++++++++++++
 ovn/northd/ovn-northd.8.xml     |  89 +++++++++++-
 ovn/northd/ovn-northd.c         | 261 +++++++++++++++++++++++++++++++++-
 ovn/ovn-nb.ovsschema            |  19 ++-
 ovn/ovn-nb.xml                  | 191 ++++++++++++++++++++++++-
 ovn/ovn-sb.ovsschema            |  16 ++-
 ovn/ovn-sb.xml                  | 194 ++++++++++++++++++++++++++
 ovn/utilities/ovn-nbctl.8.xml   |  29 ++++
 ovn/utilities/ovn-nbctl.c       | 196 ++++++++++++++++++++++++++
 tests/automake.mk               |   1 +
 tests/ovn.at                    | 301 ++++++++++++++++++++++++++++++++++++++++
 tests/test-ovn-dhcp.c           | 284 +++++++++++++++++++++++++++++++++++++
 21 files changed, 2145 insertions(+), 52 deletions(-)
 create mode 100644 ovn/lib/ovn-dhcp.h
 create mode 100644 tests/test-ovn-dhcp.c

-- 
2.5.5




More information about the dev mailing list