+static void
+ofctl_geneve_mod(struct ovs_cmdl_context *ctx, uint16_t command)
+{
+ enum ofputil_protocol usable_protocols;
+ enum ofputil_protocol protocol;
+ struct ofputil_geneve_table_mod gtm;
+ char *error;
+ enum ofp_version version;
+ struct ofpbuf *request;
+ struct vconn *vconn;
+
+ error = parse_ofp_geneve_table_mod_str(>m, command, ctx->argc > 2 ?
+ ctx->argv[2] : "",
+ &usable_protocols);
+ if (error) {
+ ovs_fatal(0, "%s", error);
+ }
+
+ protocol = open_vconn_for_flow_mod(ctx->argv[1], &vconn, usable_protocols);
+ version = ofputil_protocol_to_ofp_version(protocol);
+
+ request = ofputil_encode_geneve_table_mod(version, >m);
+ if (request) {
+ transact_noreply(vconn, request);
+ }
+
+ vconn_close(vconn);
+ ofputil_uninit_geneve_table(>m.mappings);
+}
+
+static void
+ofctl_add_geneve_map(struct ovs_cmdl_context *ctx)
+{
+ ofctl_geneve_mod(ctx, NXGTMC_ADD);
+}
+
+static void
+ofctl_del_geneve_map(struct ovs_cmdl_context *ctx)
+{
+ ofctl_geneve_mod(ctx, ctx->argc > 2 ? NXGTMC_DELETE : NXGTMC_CLEAR);
+}
+
+static void
+ofctl_dump_geneve_map(struct ovs_cmdl_context *ctx)
+{
+ dump_trivial_transaction(ctx->argv[1], OFPRAW_NXT_GENEVE_TABLE_REQUEST);
+}
+