diff options
author | Numan Siddique <nusiddiq@redhat.com> | 2017-04-25 19:59:39 +0530 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-05-02 15:19:43 -0700 |
commit | ea991ad220e494812093a71f17ef51e2a7b6324c (patch) | |
tree | 785b5cf1f22491cf31827f10a43efcd88547c858 /ovn/ovn-sb.xml | |
parent | f7c5e0db6ef790d146e844da220ebc829346687f (diff) | |
download | openvswitch-ea991ad220e494812093a71f17ef51e2a7b6324c.tar.gz |
ovn-controller: Add 'dns_lookup' action
This patch adds a new OVN action 'dns_lookup' to support native DNS.
ovn-controller parses this action and adds a NXT_PACKET_IN2
OF flow with 'pause' flag set.
A new table 'DNS' is added in the SB DB to look up and resolve
the DNS queries. When a valid DNS packet is received by
ovn-controller, it looks up the DNS name in the 'DNS' table
and if successful, it frames a DNS reply, resumes the packet
and stores 1 in the 1-bit subfield. If the packet is invalid
or cannot be resolved, it resumes the packet without any
modifications and stores 0 in the 1-bit subfield.
reg0[4] = dns_lookup(); next;
An upcoming patch will use this action and adds logical flows.
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Acked-by: Gurucharan Shetty <guru@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn/ovn-sb.xml')
-rw-r--r-- | ovn/ovn-sb.xml | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/ovn/ovn-sb.xml b/ovn/ovn-sb.xml index 5542f7ee2..b92c2d065 100644 --- a/ovn/ovn-sb.xml +++ b/ovn/ovn-sb.xml @@ -311,7 +311,7 @@ transmitted and received with reasonable performance. It is a hint to senders transmitting data to this chassis that they should use checksums to protect OVN metadata. <code>ovn-controller</code> - populates this key with the value defined in + populates this key with the value defined in <ref table="Open_vSwitch" column="external_ids:ovn-encap-csum"/> column of the Open_vSwitch database's <ref table="Open_vSwitch" db="Open_vSwitch"/> table. Other applications should treat this key as @@ -1465,6 +1465,53 @@ packet in that connection. </p> </dd> + + <dt> + <code><var>R</var> = dns_lookup();</code> + </dt> + + <dd> + <p> + <b>Parameters</b>: No parameters. + </p> + + <p> + <b>Result</b>: stored to a 1-bit subfield <var>R</var>. + </p> + + <p> + Valid only in the ingress pipeline. + </p> + + <p> + When this action is applied to a valid DNS request (a UDP packet + typically directed to port 53), it attempts to resolve the query + using the contents of the <ref table="DNS"/> table. If it is + successful, it changes the packet into a DNS reply and stores 1 in + <var>R</var>. If the action is applied to a non-DNS packet, an + invalid DNS request packet, or a valid DNS request for which the + <ref table="DNS"/> table does not supply an answer, it leaves the + packet unchanged and stores 0 in <var>R</var>. + </p> + + <p> + Regardless of success, the action does not make any of the changes + to the flow that are necessary to direct the packet back to the + requester. The logical pipeline can implement this behavior with + matches and actions in later tables. + </p> + + <p> + <b>Example:</b> + <code> + reg0[3] = dns_lookup(); + </code> + </p> + + <p> + <b>Prerequisite:</b> <code>udp</code> + </p> + </dd> </dl> <p> @@ -2686,4 +2733,30 @@ tcp.flags = RST; <column name="external_ids"/> </group> </table> + <table name="DNS" title="Native DNS resolution"> + <p> + Each row in this table stores the DNS records. The OVN action + <code>dns_lookup</code> uses this table for DNS resolution. + </p> + + <column name="records"> + Key-value pair of DNS records with <code>DNS query name</code> as the key + and a string of IP address(es) separated by comma or space as the + value. + + <p><b>Example: </b> "vm1.ovn.org" = "10.0.0.4 aef0::4"</p> + </column> + + <column name="datapaths"> + The DNS records defined in the column <ref column="records"/> will be + applied only to the DNS queries originating from the datapaths defined + in this column. + </column> + + <group title="Common Columns"> + <column name="external_ids"> + See <em>External IDs</em> at the beginning of this document. + </column> + </group> + </table> </database> |