Skip to content

Commit

Permalink
Remove support for obsolete "tun_id_from_cookie" extension.
Browse files Browse the repository at this point in the history
The "tun_id_from_cookie" OpenFlow extension predated NXM and supports only
a fraction of its features.  Nothing (at Nicira, anyway) uses it any
longer.  Support for it had been broken since January and it took until a
few days ago for anyone to complain, so it cannot be too important.  This
commit removes it.
  • Loading branch information
blp committed Apr 26, 2011
1 parent b0387df commit b78f6b7
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 313 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
post v1.1.0
------------------------
- Feature removals:
- Dropped support for "tun_id_from_cookie" OpenFlow extension.
(Use the extensible match extensions instead.)

v1.1.0 - 05 Apr 2011
------------------------
- Ability to define policies over IPv6
Expand Down
23 changes: 1 addition & 22 deletions include/openflow/nicira-ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,7 @@ enum nicira_type {
NXT_FLOW_END_CONFIG__OBSOLETE,
NXT_FLOW_END__OBSOLETE,
NXT_MGMT__OBSOLETE,

/* Use the high 32 bits of the cookie field as the tunnel ID in the flow
* match. */
NXT_TUN_ID_FROM_COOKIE,
NXT_TUN_ID_FROM_COOKIE__OBSOLETE,

/* Controller role support. The request body is struct nx_role_request.
* The reply echos the request. */
Expand Down Expand Up @@ -170,16 +167,6 @@ enum nicira_stats_type {
NXST_AGGREGATE /* Analogous to OFPST_AGGREGATE. */
};

/* NXT_TUN_ID_FROM_COOKIE request. */
struct nxt_tun_id_cookie {
struct ofp_header header;
ovs_be32 vendor; /* NX_VENDOR_ID. */
ovs_be32 subtype; /* NXT_TUN_ID_FROM_COOKIE */
uint8_t set; /* Nonzero to enable, zero to disable. */
uint8_t pad[7];
};
OFP_ASSERT(sizeof(struct nxt_tun_id_cookie) == 24);

/* Configures the "role" of the sending controller. The default role is:
*
* - Other (NX_ROLE_OTHER), which allows the controller access to all
Expand Down Expand Up @@ -604,12 +591,6 @@ enum nx_mp_algorithm {
*/
NX_MP_ALG_ITER_HASH /* Iterative Hash. */
};

/* Wildcard for tunnel ID. */
#define NXFW_TUN_ID (1 << 25)

#define NXFW_ALL NXFW_TUN_ID
#define OVSFW_ALL (OFPFW_ALL | NXFW_ALL)

/* Action structure for NXAST_AUTOPATH.
*
Expand Down Expand Up @@ -1165,8 +1146,6 @@ OFP_ASSERT(sizeof(struct nx_action_autopath) == 24);

enum nx_flow_format {
NXFF_OPENFLOW10 = 0, /* Standard OpenFlow 1.0 compatible. */
NXFF_TUN_ID_FROM_COOKIE = 1, /* OpenFlow 1.0, plus obtain tunnel ID from
* cookie. */
NXFF_NXM = 2 /* Nicira extended match. */
};

Expand Down
1 change: 0 additions & 1 deletion lib/learning-switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ lswitch_process_packet(struct lswitch *sw, struct rconn *rconn,
case OFPUTIL_OFPST_PORT_REPLY:
case OFPUTIL_OFPST_TABLE_REPLY:
case OFPUTIL_OFPST_AGGREGATE_REPLY:
case OFPUTIL_NXT_TUN_ID_FROM_COOKIE:
case OFPUTIL_NXT_ROLE_REQUEST:
case OFPUTIL_NXT_ROLE_REPLY:
case OFPUTIL_NXT_SET_FLOW_FORMAT:
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ parse_ofp_flow_mod_str(struct list *packets, enum nx_flow_format *cur_format,
parse_ofp_str(&fm, NULL, is_del ? NULL : &actions, string);
fm.command = command;

min_format = ofputil_min_flow_format(&fm.cr, true, fm.cookie);
min_format = ofputil_min_flow_format(&fm.cr);
next_format = MAX(*cur_format, min_format);
if (next_format != *cur_format) {
struct ofpbuf *sff = ofputil_make_set_flow_format(next_format);
Expand Down
22 changes: 4 additions & 18 deletions lib/ofp-print.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,9 +780,6 @@ ofp_match_to_string(const struct ofp_match *om, int verbosity)
skip_type = false;
}
}
if (w & NXFW_TUN_ID) {
ds_put_cstr(&f, "tun_id_wild,");
}
print_wild(&f, "in_port=", w & OFPFW_IN_PORT, verbosity,
"%d", ntohs(om->in_port));
print_wild(&f, "dl_vlan=", w & OFPFW_DL_VLAN, verbosity,
Expand Down Expand Up @@ -837,7 +834,7 @@ ofp_print_flow_mod(struct ds *s, const struct ofp_header *oh,
bool need_priority;
int error;

error = ofputil_decode_flow_mod(&fm, oh, NXFF_OPENFLOW10);
error = ofputil_decode_flow_mod(&fm, oh);
if (error) {
ofp_print_error(s, error);
return;
Expand Down Expand Up @@ -934,7 +931,7 @@ ofp_print_flow_removed(struct ds *string, const struct ofp_header *oh)
struct ofputil_flow_removed fr;
int error;

error = ofputil_decode_flow_removed(&fr, oh, NXFF_OPENFLOW10);
error = ofputil_decode_flow_removed(&fr, oh);
if (error) {
ofp_print_error(string, error);
return;
Expand Down Expand Up @@ -1070,7 +1067,7 @@ ofp_print_flow_stats_request(struct ds *string, const struct ofp_header *oh)
struct flow_stats_request fsr;
int error;

error = ofputil_decode_flow_stats_request(&fsr, oh, NXFF_OPENFLOW10);
error = ofputil_decode_flow_stats_request(&fsr, oh);
if (error) {
ofp_print_error(string, error);
return;
Expand Down Expand Up @@ -1103,7 +1100,7 @@ ofp_print_flow_stats_reply(struct ds *string, const struct ofp_header *oh)
struct ofputil_flow_stats fs;
int retval;

retval = ofputil_decode_flow_stats_reply(&fs, &b, NXFF_OPENFLOW10);
retval = ofputil_decode_flow_stats_reply(&fs, &b);
if (retval) {
if (retval != EOF) {
ds_put_cstr(string, " ***parse error***");
Expand Down Expand Up @@ -1331,13 +1328,6 @@ ofp_print_echo(struct ds *string, const struct ofp_header *oh, int verbosity)
}
}

static void
ofp_print_nxt_tun_id_from_cookie(struct ds *string,
const struct nxt_tun_id_cookie *ntic)
{
ds_put_format(string, " set=%"PRIu8, ntic->set);
}

static void
ofp_print_nxt_role_message(struct ds *string,
const struct nx_role_request *nrr)
Expand Down Expand Up @@ -1507,10 +1497,6 @@ ofp_to_string__(const struct ofp_header *oh,
ofp_print_ofpst_aggregate_reply(string, oh);
break;

case OFPUTIL_NXT_TUN_ID_FROM_COOKIE:
ofp_print_nxt_tun_id_from_cookie(string, msg);
break;

case OFPUTIL_NXT_ROLE_REQUEST:
case OFPUTIL_NXT_ROLE_REPLY:
ofp_print_nxt_role_message(string, msg);
Expand Down
Loading

0 comments on commit b78f6b7

Please sign in to comment.