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> --- ofproto/ofproto.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 97e00ab..6197520 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2989,7 +2989,17 @@ add_flow(struct ofproto *ofproto, struct ofconn *ofconn, rule->evictable = was_evictable; if (!evict) { - error = OFPERR_OFPFMFC_ALL_TABLES_FULL; + switch ((enum ofp_version)request->version) { + case OFP10_VERSION: + error = OFPERR_OFPFMFC_ALL_TABLES_FULL; + break; + case OFP11_VERSION: + case OFP12_VERSION: + error = OFPERR_OFPFMFC_TABLE_FULL; + break; + default: + NOT_REACHED(); + } goto exit; } else if (evict->pending) { error = OFPROTO_POSTPONE; -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev