[ovs-dev] [next3 1/4] ofproto: Fix number of reported tables in OFPT_FEATURES_REPLY message.

Ben Pfaff blp at nicira.com
Wed Apr 27 21:36:59 UTC 2011


This has been wrong for a long time.
---
 ofproto/ofproto.c |    2 +-
 tests/ofproto.at  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 7f3ea6b..67f271e 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -1354,7 +1354,7 @@ handle_features_request(struct ofconn *ofconn, const struct ofp_header *oh)
     osf = make_openflow_xid(sizeof *osf, OFPT_FEATURES_REPLY, oh->xid, &buf);
     osf->datapath_id = htonll(ofproto->datapath_id);
     osf->n_buffers = htonl(pktbuf_capacity());
-    osf->n_tables = 2;
+    osf->n_tables = 1;
     osf->capabilities = htonl(OFPC_FLOW_STATS | OFPC_TABLE_STATS |
                               OFPC_PORT_STATS | OFPC_ARP_MATCH_IP);
     osf->actions = htonl((1u << OFPAT_OUTPUT) |
diff --git a/tests/ofproto.at b/tests/ofproto.at
index 9587c97..6f785e9 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -11,7 +11,7 @@ OFPROTO_START
 AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
 AT_CHECK([STRIP_XIDS stdout], [0], [dnl
 OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
-n_tables:2, n_buffers:256
+n_tables:1, n_buffers:256
 features: capabilities:0x87, actions:0xfff
  LOCAL(br0): addr:aa:55:aa:55:00:00, config: 0x1, state:0x1
 OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
@@ -33,7 +33,7 @@ do
     AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
     AT_CHECK_UNQUOTED([STRIP_XIDS stdout], [0], [dnl
 OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
-n_tables:2, n_buffers:256
+n_tables:1, n_buffers:256
 features: capabilities:0x87, actions:0xfff
  LOCAL(br0): addr:aa:55:aa:55:00:00, config: $config, state:$state
 OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
-- 
1.7.4.4




More information about the dev mailing list