Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807218/?format=api
{ "id": 807218, "url": "http://patchwork.ozlabs.org/api/patches/807218/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/1504030862-14591-3-git-send-email-yi.y.yang@intel.com/", "project": { "id": 47, "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api", "name": "Open vSwitch", "link_name": "openvswitch", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "git@github.com:openvswitch/ovs.git", "webscm_url": "https://github.com/openvswitch/ovs", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504030862-14591-3-git-send-email-yi.y.yang@intel.com>", "list_archive_url": null, "date": "2017-08-29T18:21:02", "name": "[ovs-dev,v5,2/2] nsh: add dec_nsh_ttl action", "commit_ref": null, "pull_url": null, "state": "deferred", "archived": false, "hash": "c1660b2e02150d36c1afde7a74c89d273ea0cebe", "submitter": { "id": 68962, "url": "http://patchwork.ozlabs.org/api/people/68962/?format=api", "name": "Yang, Yi", "email": "yi.y.yang@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/1504030862-14591-3-git-send-email-yi.y.yang@intel.com/mbox/", "series": [ { "id": 430, "url": "http://patchwork.ozlabs.org/api/series/430/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=430", "date": "2017-08-29T18:21:00", "name": "nsh: add new nsh key ttl and action dec_nsh_ttl", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/430/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807218/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807218/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<ovs-dev-bounces@openvswitch.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "dev@openvswitch.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "ovs-dev@mail.linuxfoundation.org" ], "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhcWs6lRXz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 04:25:45 +1000 (AEST)", "from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id C9B13B1F;\n\tTue, 29 Aug 2017 18:25:05 +0000 (UTC)", "from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 23787B1F\n\tfor <dev@openvswitch.org>; Tue, 29 Aug 2017 18:25:05 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id DDEF2196\n\tfor <dev@openvswitch.org>; Tue, 29 Aug 2017 18:25:03 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga105.jf.intel.com with ESMTP; 29 Aug 2017 11:25:03 -0700", "from unknown (HELO localhost.localdomain.bj.intel.com)\n\t([10.240.224.185])\n\tby orsmga003.jf.intel.com with ESMTP; 29 Aug 2017 11:25:01 -0700" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos; i=\"5.41,445,1498546800\"; d=\"scan'208\";\n\ta=\"1008955831\"", "From": "Yi Yang <yi.y.yang@intel.com>", "To": "dev@openvswitch.org", "Date": "Wed, 30 Aug 2017 02:21:02 +0800", "Message-Id": "<1504030862-14591-3-git-send-email-yi.y.yang@intel.com>", "X-Mailer": "git-send-email 2.1.0", "In-Reply-To": "<1504030862-14591-1-git-send-email-yi.y.yang@intel.com>", "References": "<1504030862-14591-1-git-send-email-yi.y.yang@intel.com>", "X-Spam-Status": "No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,\n\tRP_MATCHES_RCVD autolearn=disabled version=3.3.1", "X-Spam-Checker-Version": "SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org", "Cc": "e@erig.me, jbenc@redhat.com", "Subject": "[ovs-dev] [PATCH v5 2/2] nsh: add dec_nsh_ttl action", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.12", "Precedence": "list", "List-Id": "<ovs-dev.openvswitch.org>", "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>", "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>", "List-Post": "<mailto:ovs-dev@openvswitch.org>", "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>", "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "ovs-dev-bounces@openvswitch.org", "Errors-To": "ovs-dev-bounces@openvswitch.org" }, "content": "IETF NSH spec defines a ttl field in NSH header, it is a 6-bit\nfield ranged from 0 to 63, it should be decremented by 1 every\nhop, if it is 0 or it is so after decremented, the packet should\nbe dropped and a packet-in message is sent to main controller.\n\nSigned-off-by: Yi Yang <yi.y.yang@intel.com>\n---\n include/openvswitch/ofp-actions.h | 1 +\n lib/ofp-actions.c | 49 +++++++++++++++++++++++++++++++++++++++\n ofproto/ofproto-dpif-xlate.c | 31 +++++++++++++++++++++++++\n tests/nsh.at | 23 +++++++++---------\n utilities/ovs-ofctl.8.in | 13 ++++++++++-\n 5 files changed, 105 insertions(+), 12 deletions(-)", "diff": "diff --git a/include/openvswitch/ofp-actions.h b/include/openvswitch/ofp-actions.h\nindex ad8e1be..1296a9c 100644\n--- a/include/openvswitch/ofp-actions.h\n+++ b/include/openvswitch/ofp-actions.h\n@@ -93,6 +93,7 @@ struct vl_mff_map;\n OFPACT(DEC_MPLS_TTL, ofpact_null, ofpact, \"dec_mpls_ttl\") \\\n OFPACT(PUSH_MPLS, ofpact_push_mpls, ofpact, \"push_mpls\") \\\n OFPACT(POP_MPLS, ofpact_pop_mpls, ofpact, \"pop_mpls\") \\\n+ OFPACT(DEC_NSH_TTL, ofpact_null, ofpact, \"dec_nsh_ttl\") \\\n \\\n /* Generic encap & decap */ \\\n OFPACT(ENCAP, ofpact_encap, props, \"encap\") \\\ndiff --git a/lib/ofp-actions.c b/lib/ofp-actions.c\nindex 71eb70c..1a92b95 100644\n--- a/lib/ofp-actions.c\n+++ b/lib/ofp-actions.c\n@@ -348,6 +348,9 @@ enum ofp_raw_action_type {\n /* NX1.3+(47): struct nx_action_decap, ... */\n NXAST_RAW_DECAP,\n \n+ /* NX1.3+(48): void. */\n+ NXAST_RAW_DEC_NSH_TTL,\n+\n /* ## ------------------ ## */\n /* ## Debugging actions. ## */\n /* ## ------------------ ## */\n@@ -480,6 +483,7 @@ ofpact_next_flattened(const struct ofpact *ofpact)\n case OFPACT_NAT:\n case OFPACT_ENCAP:\n case OFPACT_DECAP:\n+ case OFPACT_DEC_NSH_TTL:\n return ofpact_next(ofpact);\n \n case OFPACT_CLONE:\n@@ -4330,6 +4334,39 @@ format_DECAP(const struct ofpact_decap *a,\n ds_put_format(s, \"%s)%s\", colors.paren, colors.end);\n }\n \n+/* Action dec_nsh_ttl */\n+\n+static enum ofperr\n+decode_NXAST_RAW_DEC_NSH_TTL(struct ofpbuf *out)\n+{\n+ ofpact_put_DEC_NSH_TTL(out);\n+ return 0;\n+}\n+\n+static void\n+encode_DEC_NSH_TTL(const struct ofpact_null *null OVS_UNUSED,\n+ enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out)\n+{\n+ put_NXAST_DEC_NSH_TTL(out);\n+}\n+\n+static char * OVS_WARN_UNUSED_RESULT\n+parse_DEC_NSH_TTL(char *arg OVS_UNUSED,\n+ const struct ofputil_port_map *port_map OVS_UNUSED,\n+ struct ofpbuf *ofpacts,\n+ enum ofputil_protocol *usable_protocols OVS_UNUSED)\n+{\n+ ofpact_put_DEC_NSH_TTL(ofpacts);\n+ return NULL;\n+}\n+\n+static void\n+format_DEC_NSH_TTL(const struct ofpact_null *a OVS_UNUSED,\n+ const struct ofputil_port_map *port_map OVS_UNUSED, struct ds *s)\n+{\n+ ds_put_format(s, \"%sdec_nsh_ttl%s\", colors.special, colors.end);\n+}\n+\n \f\n /* Action structures for NXAST_RESUBMIT, NXAST_RESUBMIT_TABLE, and\n * NXAST_RESUBMIT_TABLE_CT.\n@@ -7114,6 +7151,7 @@ ofpact_is_set_or_move_action(const struct ofpact *a)\n case OFPACT_SET_VLAN_VID:\n case OFPACT_ENCAP:\n case OFPACT_DECAP:\n+ case OFPACT_DEC_NSH_TTL:\n return true;\n case OFPACT_BUNDLE:\n case OFPACT_CLEAR_ACTIONS:\n@@ -7191,6 +7229,7 @@ ofpact_is_allowed_in_actions_set(const struct ofpact *a)\n case OFPACT_STRIP_VLAN:\n case OFPACT_ENCAP:\n case OFPACT_DECAP:\n+ case OFPACT_DEC_NSH_TTL:\n return true;\n \n /* In general these actions are excluded because they are not part of\n@@ -7304,6 +7343,7 @@ ofpacts_execute_action_set(struct ofpbuf *action_list,\n ofpacts_copy_last(action_list, action_set, OFPACT_PUSH_VLAN);\n ofpacts_copy_last(action_list, action_set, OFPACT_DEC_TTL);\n ofpacts_copy_last(action_list, action_set, OFPACT_DEC_MPLS_TTL);\n+ ofpacts_copy_last(action_list, action_set, OFPACT_DEC_NSH_TTL);\n ofpacts_copy_all(action_list, action_set, ofpact_is_set_or_move_action);\n ofpacts_copy_last(action_list, action_set, OFPACT_SET_QUEUE);\n \n@@ -7445,6 +7485,7 @@ ovs_instruction_type_from_ofpact_type(enum ofpact_type type)\n case OFPACT_NAT:\n case OFPACT_ENCAP:\n case OFPACT_DECAP:\n+ case OFPACT_DEC_NSH_TTL:\n default:\n return OVSINST_OFPIT11_APPLY_ACTIONS;\n }\n@@ -8131,6 +8172,13 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a,\n }\n return 0;\n \n+ case OFPACT_DEC_NSH_TTL:\n+ if ((flow->packet_type != htonl(PT_NSH)) &&\n+ (flow->dl_type != htons(ETH_TYPE_NSH))) {\n+ inconsistent_match(usable_protocols);\n+ }\n+ return 0;\n+\n default:\n OVS_NOT_REACHED();\n }\n@@ -8626,6 +8674,7 @@ ofpact_outputs_to_port(const struct ofpact *ofpact, ofp_port_t port)\n case OFPACT_NAT:\n case OFPACT_ENCAP:\n case OFPACT_DECAP:\n+ case OFPACT_DEC_NSH_TTL:\n default:\n return false;\n }\ndiff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c\nindex 933256e..d24e22c 100644\n--- a/ofproto/ofproto-dpif-xlate.c\n+++ b/ofproto/ofproto-dpif-xlate.c\n@@ -4832,6 +4832,28 @@ compose_dec_mpls_ttl_action(struct xlate_ctx *ctx)\n return true;\n }\n \n+static bool\n+compose_dec_nsh_ttl_action(struct xlate_ctx *ctx)\n+{\n+ struct flow *flow = &ctx->xin->flow;\n+\n+ if ((flow->packet_type == htonl(PT_NSH)) ||\n+ (flow->dl_type == htons(ETH_TYPE_NSH))) {\n+ ctx->wc->masks.nsh.ttl = 0xff;\n+ if (flow->nsh.ttl > 1) {\n+ flow->nsh.ttl--;\n+ return false;\n+ } else {\n+ execute_controller_action(ctx, UINT16_MAX, OFPR_INVALID_TTL, 0,\n+ NULL, 0);\n+ }\n+ }\n+\n+ /* Stop processing for current table. */\n+ xlate_report(ctx, OFT_WARN, \"NSH decrement TTL exception\");\n+ return true;\n+}\n+\n static void\n xlate_output_action(struct xlate_ctx *ctx,\n ofp_port_t port, uint16_t max_len, bool may_packet_in)\n@@ -5327,6 +5349,7 @@ reversible_actions(const struct ofpact *ofpacts, size_t ofpacts_len)\n case OFPACT_OUTPUT_TRUNC:\n case OFPACT_ENCAP:\n case OFPACT_DECAP:\n+ case OFPACT_DEC_NSH_TTL:\n return false;\n }\n }\n@@ -5537,6 +5560,7 @@ freeze_unroll_actions(const struct ofpact *a, const struct ofpact *end,\n case OFPACT_OUTPUT:\n case OFPACT_CONTROLLER:\n case OFPACT_DEC_MPLS_TTL:\n+ case OFPACT_DEC_NSH_TTL:\n case OFPACT_DEC_TTL:\n /* These actions may generate asynchronous messages, which include\n * table ID and flow cookie information. */\n@@ -6082,6 +6106,7 @@ recirc_for_mpls(const struct ofpact *a, struct xlate_ctx *ctx)\n case OFPACT_CLONE:\n case OFPACT_ENCAP:\n case OFPACT_DECAP:\n+ case OFPACT_DEC_NSH_TTL:\n case OFPACT_UNROLL_XLATE:\n case OFPACT_CT:\n case OFPACT_CT_CLEAR:\n@@ -6404,6 +6429,12 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len,\n }\n break;\n \n+ case OFPACT_DEC_NSH_TTL:\n+ if (compose_dec_nsh_ttl_action(ctx)) {\n+ return;\n+ }\n+ break;\n+\n case OFPACT_DEC_TTL:\n wc->masks.nw_ttl = 0xff;\n if (compose_dec_ttl(ctx, ofpact_get_DEC_TTL(a))) {\ndiff --git a/tests/nsh.at b/tests/nsh.at\nindex 93d8b42..521365b 100644\n--- a/tests/nsh.at\n+++ b/tests/nsh.at\n@@ -13,7 +13,7 @@ OVS_VSWITCHD_START([dnl\n add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2])\n \n AT_DATA([flows.txt], [dnl\n- table=0,in_port=1,dl_type=0x894f,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344,actions=set_field:0x2->nsh_flags,set_field:254->nsh_si,set_field:0x44332211->nsh_c1,2\n+ table=0,in_port=1,dl_type=0x894f,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344,actions=set_field:0x2->nsh_flags,set_field:254->nsh_si,set_field:0x44332211->nsh_c1,dec_nsh_ttl,2\n ])\n \n AT_CHECK([\n@@ -21,7 +21,7 @@ AT_CHECK([\n ovs-ofctl -Oopenflow13 add-flows br0 flows.txt\n ovs-ofctl -Oopenflow13 dump-flows br0 | ofctl_strip | sort | grep actions\n ], [0], [dnl\n- in_port=1,dl_type=0x894f,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344 actions=set_field:2->nsh_flags,set_field:254->nsh_si,set_field:0x44332211->nsh_c1,output:2\n+ in_port=1,dl_type=0x894f,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344 actions=set_field:2->nsh_flags,set_field:254->nsh_si,set_field:0x44332211->nsh_c1,dec_nsh_ttl,output:2\n ])\n \n AT_CHECK([\n@@ -35,11 +35,12 @@ bridge(\"br0\")\n set_field:2->nsh_flags\n set_field:254->nsh_si\n set_field:0x44332211->nsh_c1\n+ dec_nsh_ttl\n output:2\n \n-Final flow: in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,dl_type=0x894f,nsh_flags=2,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=254,nsh_c1=0x44332211,nsh_c2=0x55667788,nsh_c3=0x99aabbcc,nsh_c4=0xddeeff00,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0\n+Final flow: in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,dl_type=0x894f,nsh_flags=2,nsh_ttl=62,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=254,nsh_c1=0x44332211,nsh_c2=0x55667788,nsh_c3=0x99aabbcc,nsh_c4=0xddeeff00,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0\n Megaflow: recirc_id=0,eth,in_port=1,dl_type=0x894f,nsh_flags=0,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344\n-Datapath actions: set(nsh(flags=2,ttl=63,spi=0x123456,si=254,c1=0x44332211)),2\n+Datapath actions: set(nsh(flags=2,ttl=62,spi=0x123456,si=254,c1=0x44332211)),2\n ])\n \n OVS_VSWITCHD_STOP\n@@ -539,8 +540,8 @@ AT_DATA([br-in2.txt], [dnl\n table=2,packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=254,actions=output:2030\n table=2,packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=255,actions=encap(ethernet),set_field:77:88:99:aa:bb:cc->dl_dst,goto_table:4\n table=2,packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=254,actions=output:2010\n- table=4,dl_type=0x894f,dl_dst=11:22:33:44:55:66,actions=set_field:254->nsh_si,decap(),resubmit(,2)\n- table=4,dl_type=0x894f,dl_dst=77:88:99:aa:bb:cc,actions=set_field:254->nsh_si,decap(),resubmit(,2)\n+ table=4,dl_type=0x894f,dl_dst=11:22:33:44:55:66,actions=set_field:254->nsh_si,dec_nsh_ttl,decap(),resubmit(,2)\n+ table=4,dl_type=0x894f,dl_dst=77:88:99:aa:bb:cc,actions=set_field:254->nsh_si,dec_nsh_ttl,decap(),resubmit(,2)\n ])\n \n # br-in3 is SFC classifier (table 1) and final SFF (tables 2,3)\n@@ -603,8 +604,8 @@ AT_CHECK([\n table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=255 actions=encap(ethernet),set_field:77:88:99:aa:bb:cc->eth_dst,goto_table:4\n table=2, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=254 actions=output:2030\n table=2, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=255 actions=encap(ethernet),set_field:11:22:33:44:55:66->eth_dst,goto_table:4\n- table=4, dl_dst=11:22:33:44:55:66,dl_type=0x894f actions=set_field:254->nsh_si,decap(),resubmit(,2)\n- table=4, dl_dst=77:88:99:aa:bb:cc,dl_type=0x894f actions=set_field:254->nsh_si,decap(),resubmit(,2)\n+ table=4, dl_dst=11:22:33:44:55:66,dl_type=0x894f actions=set_field:254->nsh_si,dec_nsh_ttl,decap(),resubmit(,2)\n+ table=4, dl_dst=77:88:99:aa:bb:cc,dl_type=0x894f actions=set_field:254->nsh_si,dec_nsh_ttl,decap(),resubmit(,2)\n ip,in_port=30 actions=decap(),goto_table:1\n n_packets=2, n_bytes=216, packet_type=(1,0x894f),in_port=3010 actions=goto_table:2\n packet_type=(1,0x800),in_port=30 actions=goto_table:1\n@@ -632,7 +633,7 @@ AT_CHECK([\n ovs-appctl dpctl/dump-flows dummy@ovs-dummy | strip_used | grep -v ipv6 | sort\n ], [0], [flow-dump from non-dpdk interfaces:\n recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.20/255.255.255.248,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,encap_nsh(flags=0,ttl=63,mdtype=1,np=1,spi=0x3020,si=255,c1=0x0,c2=0x0,c3=0x0,c4=0x0),clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0xc000004,vni=0x0)),out_port(1)),set(ipv4(src=20.0.0.1,dst=20.0.0.2)),tnl_pop(4789))\n-tunnel(tun_id=0x0,src=20.0.0.1,dst=20.0.0.2,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),nsh(spi=0x3020,si=255), packets:1, bytes:108, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),set(nsh(spi=0x3020,si=254)),pop_eth,clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=aa:55:00:00:00:03,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.3,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0xc000004,vni=0x0)),out_port(2)),set(ipv4(src=30.0.0.2,dst=30.0.0.3)),tnl_pop(4789))\n+tunnel(tun_id=0x0,src=20.0.0.1,dst=20.0.0.2,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),nsh(ttl=63,spi=0x3020,si=255), packets:1, bytes:108, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),set(nsh(ttl=62,spi=0x3020,si=254)),pop_eth,clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=aa:55:00:00:00:03,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.3,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0xc000004,vni=0x0)),out_port(2)),set(ipv4(src=30.0.0.2,dst=30.0.0.3)),tnl_pop(4789))\n tunnel(tun_id=0x0,src=30.0.0.2,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),nsh(np=1,spi=0x3020,si=254), packets:1, bytes:108, used:0.0s, actions:decap_nsh(),recirc(0x2)\n tunnel(tun_id=0x0,src=30.0.0.2,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0x2),in_port(4789),packet_type(ns=1,id=0x800),ipv4(frag=no), packets:1, bytes:84, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=aa:55:aa:55:00:03),6\n ])\n@@ -658,8 +659,8 @@ AT_CHECK([\n table=2, n_packets=2, n_bytes=216, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=255 actions=encap(ethernet),set_field:11:22:33:44:55:66->eth_dst,goto_table:4\n table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=254 actions=output:2010\n table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=255 actions=encap(ethernet),set_field:77:88:99:aa:bb:cc->eth_dst,goto_table:4\n- table=4, dl_dst=77:88:99:aa:bb:cc,dl_type=0x894f actions=set_field:254->nsh_si,decap(),resubmit(,2)\n- table=4, n_packets=2, n_bytes=216, dl_dst=11:22:33:44:55:66,dl_type=0x894f actions=set_field:254->nsh_si,decap(),resubmit(,2)\n+ table=4, dl_dst=77:88:99:aa:bb:cc,dl_type=0x894f actions=set_field:254->nsh_si,dec_nsh_ttl,decap(),resubmit(,2)\n+ table=4, n_packets=2, n_bytes=216, dl_dst=11:22:33:44:55:66,dl_type=0x894f actions=set_field:254->nsh_si,dec_nsh_ttl,decap(),resubmit(,2)\n ip,in_port=30 actions=decap(),goto_table:1\n n_packets=2, n_bytes=216, packet_type=(1,0x894f),in_port=3010 actions=goto_table:2\n n_packets=2, n_bytes=216, packet_type=(1,0x894f),in_port=3020 actions=goto_table:2\ndiff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in\nindex c65de97..9b3e72d 100644\n--- a/utilities/ovs-ofctl.8.in\n+++ b/utilities/ovs-ofctl.8.in\n@@ -1280,6 +1280,15 @@ Processing the current set of actions then stops. However, if the current\n set of actions was reached through ``resubmit'' then remaining actions in\n outer levels resume processing.\n .\n+.IP \\fBdec_nsh_ttl\\fR\n+Decrement TTL of the outer NSH header of a packet. If the TTL\n+is initially zero or decrementing would make it so, no decrement occurs.\n+Instead, a ``packet-in'' message with reason code \\fBOFPR_INVALID_TTL\\fR\n+is sent to the main controller (id zero), if it has enabled receiving them.\n+Processing the current set of actions then stops. However, if the current\n+set of actions was reached through ``resubmit'' then remaining actions in\n+outer levels resume processing.\n+.\n .IP \\fBnote:\\fR[\\fIhh\\fR]...\n Does nothing at all. Any number of bytes represented as hex digits\n \\fIhh\\fR may be included. Pairs of hex digits may be separated by\n@@ -1578,6 +1587,8 @@ the action set, the one written later replaces the earlier action:\n \\fBdec_ttl\\fR\n .IQ\n \\fBdec_mpls_ttl\\fR\n+.IQ\n+\\fBdec_nsh_ttl\\fR\n .\n .IP 7.\n \\fBload\\fR\n@@ -1638,7 +1649,7 @@ not visible.)\n .RE\n .IP\n Only the actions listed above may be written to the action set.\n-\\fBencap\\fR and \\fBdecap\\fR actions are nonstandard.\n+\\fBencap\\fR, \\fBdecap\\fR and \\fBdec_nsh_ttl\\fR actions are nonstandard.\n .\n .IP \\fBwrite_metadata\\fB:\\fIvalue\\fR[/\\fImask\\fR]\n Updates the metadata field for the flow. If \\fImask\\fR is omitted, the\n", "prefixes": [ "ovs-dev", "v5", "2/2" ] }