On Fri, Oct 12, 2012 at 09:26:58AM +0900, Simon Horman wrote: > Use OFPERR_OFPFMFC_ALL_TABLES_FULL in place of > OFPERR_OFPFMFC_TABLE_FULL for OpenFlow 1.1+. > > OFPERR_OFPFMFC_ALL_TABLES_FULL only exists in OpenFlow 1.0. > OFPERR_OFPFMFC_TABLE_FULL was added in OpenFlow 1.1. > > Signed-off-by: Simon Horman <ho...@verge.net.au>
These two codes represent essentially the same condition so I think the following would be a better change. What you think? --8<--------------------------cut here-------------------------->8-- From: Ben Pfaff <b...@nicira.com> Date: Fri, 12 Oct 2012 10:00:11 -0700 Subject: [PATCH] ofp-errors: Merge OF1.0 "all tables full" with OF1.1+ "table full". These codes represent essentially the same condition and only one of them exists in any given version of OpenFlow, so merge them together into a single OFPERR_* code. Reported-by: Simon Horman <ho...@verge.net.au> Signed-off-by: Ben Pfaff <b...@nicira.com> --- lib/ofp-errors.h | 5 +---- ofproto/ofproto.c | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/ofp-errors.h b/lib/ofp-errors.h index a883e20..ffac8aa 100644 --- a/lib/ofp-errors.h +++ b/lib/ofp-errors.h @@ -309,10 +309,7 @@ enum ofperr { /* OF1.1+(5,0). Unspecified error. */ OFPERR_OFPFMFC_UNKNOWN, - /* OF1.0(3,0). Flow not added because of full tables. */ - OFPERR_OFPFMFC_ALL_TABLES_FULL, - - /* OF1.1+(5,1). Flow not added because table was full. */ + /* OF1.0(3,0), OF1.1+(5,1). Flow not added because of full table(s). */ OFPERR_OFPFMFC_TABLE_FULL, /* OF1.1+(5,2). Table does not exist */ diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index a128a6d..6cdce93 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2988,7 +2988,7 @@ add_flow(struct ofproto *ofproto, struct ofconn *ofconn, rule->evictable = was_evictable; if (!evict) { - error = OFPERR_OFPFMFC_ALL_TABLES_FULL; + error = OFPERR_OFPFMFC_TABLE_FULL; goto exit; } else if (evict->pending) { error = OFPROTO_POSTPONE; @@ -3293,7 +3293,7 @@ handle_flow_mod(struct ofconn *ofconn, const struct ofp_header *oh) * is not required in OpenFlow 1.0.1 and removed from OpenFlow 1.1. * There is no good error code, so just state that the flow table * is full. */ - error = OFPERR_OFPFMFC_ALL_TABLES_FULL; + error = OFPERR_OFPFMFC_TABLE_FULL; } if (!error) { error = ofpacts_check(fm.ofpacts, fm.ofpacts_len, -- 1.7.2.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev