Re: [ovs-dev] [PATCH v2] ovn: increase size of ingress and egress pipelines

2017-05-30 Thread Ben Pfaff
On Tue, May 16, 2017 at 11:04:56PM -0700, Mickey Spiegel wrote:
> The OVN ingress pipeline for a logical switch is maxed out at 16 stages.
> 
> This patch takes the simple approach of starting the ingress pipeline at
> table 8 rather than table 16, and starting the egress pipeline at
> table 40 rather than table 48.
> 
> v1->v2:
> Bumped range of Logical_Flow.table_id column in ovn/ovn-sb.ovsschema
> from 0 to 15, to 0 to 23.
> Ran automated tests with an extra noop table, pushing S_SWITCH_IN_L2_LKUP
> to 16.
> 
> Signed-off-by: Mickey Spiegel 

Thank you!

I folded in changes to ovn-openstack.rst that reflect the new table
numbering and applied this to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2] ovn: increase size of ingress and egress pipelines

2017-05-17 Thread Mickey Spiegel
The OVN ingress pipeline for a logical switch is maxed out at 16 stages.

This patch takes the simple approach of starting the ingress pipeline at
table 8 rather than table 16, and starting the egress pipeline at
table 40 rather than table 48.

v1->v2:
Bumped range of Logical_Flow.table_id column in ovn/ovn-sb.ovsschema
from 0 to 15, to 0 to 23.
Ran automated tests with an extra noop table, pushing S_SWITCH_IN_L2_LKUP
to 16.

Signed-off-by: Mickey Spiegel 
---
 ovn/controller/lflow.h |  6 +++---
 ovn/ovn-architecture.7.xml | 27 ++-
 ovn/ovn-sb.ovsschema   |  6 +++---
 ovn/utilities/ovn-trace.c  |  2 +-
 tests/ovn.at   | 40 
 tests/test-ovn.c   |  6 +++---
 6 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/ovn/controller/lflow.h b/ovn/controller/lflow.h
index 8761b1e..a23cde0 100644
--- a/ovn/controller/lflow.h
+++ b/ovn/controller/lflow.h
@@ -49,17 +49,17 @@ struct uuid;
  * These are heavily documented in ovn-architecture(7), please update it if
  * you make any changes. */
 #define OFTABLE_PHY_TO_LOG0
-#define OFTABLE_LOG_INGRESS_PIPELINE 16 /* First of LOG_PIPELINE_LEN tables. */
+#define OFTABLE_LOG_INGRESS_PIPELINE  8 /* First of LOG_PIPELINE_LEN tables. */
 #define OFTABLE_REMOTE_OUTPUT32
 #define OFTABLE_LOCAL_OUTPUT 33
 #define OFTABLE_CHECK_LOOPBACK   34
-#define OFTABLE_LOG_EGRESS_PIPELINE  48 /* First of LOG_PIPELINE_LEN tables. */
+#define OFTABLE_LOG_EGRESS_PIPELINE  40 /* First of LOG_PIPELINE_LEN tables. */
 #define OFTABLE_SAVE_INPORT  64
 #define OFTABLE_LOG_TO_PHY   65
 #define OFTABLE_MAC_BINDING  66
 
 /* The number of tables for the ingress and egress pipelines. */
-#define LOG_PIPELINE_LEN 16
+#define LOG_PIPELINE_LEN 24
 
 void lflow_init(void);
 void lflow_run(struct controller_ctx *,
diff --git a/ovn/ovn-architecture.7.xml b/ovn/ovn-architecture.7.xml
index d8114f1..eb6744b 100644
--- a/ovn/ovn-architecture.7.xml
+++ b/ovn/ovn-architecture.7.xml
@@ -774,7 +774,7 @@
 VXLAN tunnels do not transmit the logical output port field.
 Since VXLAN tunnels do not carry a logical output port field in
 the tunnel key, when a packet is received from VXLAN tunnel by
-an OVN hypervisor, the packet is resubmitted to table 16 to
+an OVN hypervisor, the packet is resubmitted to table 8 to
 determine the output port(s);  when the packet reaches table 32,
 these packets are resubmitted to table 33 for local delivery by
 checking a MLF_RCV_FROM_VXLAN flag, which is set when the packet
@@ -835,7 +835,7 @@
 the packet's ingress port.  Its actions annotate the packet with
 logical metadata, by setting the logical datapath field to identify the
 logical datapath that the packet is traversing and the logical input
-port field to identify the ingress port.  Then it resubmits to table 16
+port field to identify the ingress port.  Then it resubmits to table 8
 to enter the logical ingress pipeline.
   
 
@@ -864,13 +864,13 @@
 
 
   
-OpenFlow tables 16 through 31 execute the logical ingress pipeline from
+OpenFlow tables 8 through 31 execute the logical ingress pipeline from
 the Logical_Flow table in the OVN Southbound database.
 These tables are expressed entirely in terms of logical concepts like
 logical ports and logical datapaths.  A big part of
 ovn-controller's job is to translate them into equivalent
 OpenFlow (in particular it translates the table numbers:
-Logical_Flow tables 0 through 15 become OpenFlow tables 16
+Logical_Flow tables 0 through 23 become OpenFlow tables 8
 through 31).
   
 
@@ -999,7 +999,7 @@
 and resubmit these packets to table 33 for local delivery. Packets
 received from VXLAN tunnels reach here because of a lack of logical
 output port field in the tunnel key and thus these packets needed to
-be submitted to table 16 to determine the output port.
+be submitted to table 8 to determine the output port.
   
 
   
@@ -1024,13 +1024,13 @@
   
 Table 34 matches and drops packets for which the logical input and
 output ports are the same and the MLF_ALLOW_LOOPBACK flag is not
-set.  It resubmits other packets to table 48.
+set.  It resubmits other packets to table 40.
   
 
 
 
   
-OpenFlow tables 48 through 63 execute the logical egress pipeline from
+OpenFlow tables 40 through 63 execute the logical egress pipeline from
 the Logical_Flow table in the OVN Southbound database.
 The egress pipeline can perform a final stage of validation before
 packet delivery.  Eventually, it may execute an output
@@ -1110,27 +1110,28 @@
 
 
   In OVS versions 2.7