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> --- v14 * No change v13 * No change v12 * No change v11 * Initial post --- ofproto/ofproto.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index d328818..06a394c 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3027,7 +3027,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