From patchwork Tue Aug 29 18:21:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Yi" X-Patchwork-Id: 807217 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xhcW41bf1z9sMN for ; Wed, 30 Aug 2017 04:25:03 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 87815AF0; Tue, 29 Aug 2017 18:25:01 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B09A2258 for ; Tue, 29 Aug 2017 18:24:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D07E6E3 for ; Tue, 29 Aug 2017 18:24:58 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 29 Aug 2017 11:24:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.41,445,1498546800"; d="scan'208"; a="1008955758" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([10.240.224.185]) by orsmga003.jf.intel.com with ESMTP; 29 Aug 2017 11:24:56 -0700 From: Yi Yang To: dev@openvswitch.org Date: Wed, 30 Aug 2017 02:21:00 +0800 Message-Id: <1504030862-14591-1-git-send-email-yi.y.yang@intel.com> X-Mailer: git-send-email 2.1.0 X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: e@erig.me, jbenc@redhat.com Subject: [ovs-dev] [PATCH v5 0/2] nsh: add new nsh key ttl and action dec_nsh_ttl X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org v4->v5 - Remove fix patch 1 in v4 because it is merged - Fix several comments by Jan Scheurich v3->v4 - Add new action dec_nsh_ttl - Remove encap_nsh and decap_nsh changes - Remove netlink rework to adapt to OVS 2.8 - Dynamically allocate struct ovs_action_encap_nsh and put appropriate size for ENCAP_NSH netlink message. v2->v3 - Fix several comments Jan Scheurich v1->v2 - Rework per kernel datapath review comments - Add new NSH key ttl - Add many helpers in nsh.h and replace much code with these helpers - nsh.h includes the lasted NSH spec - bits of flags and mdtype have a change This patch adds new NSH key 'ttl' and a new action dec_nsh_ttl to follow the lasted IETF NSH draft: https://datatracker.ietf.org/doc/draft-ietf-sfc-nsh/ I have double confirmed from one of its authors, this is a final version which will be approved as IETF RFC, the NSH header format won't be change anymore. Yi Yang (2): nsh: add new flow key 'ttl' nsh: add dec_nsh_ttl action datapath/linux/compat/include/linux/openvswitch.h | 17 +- include/openvswitch/flow.h | 6 +- include/openvswitch/match.h | 6 + include/openvswitch/meta-flow.h | 31 +- include/openvswitch/nsh.h | 326 ++++++++++++++++++++-- include/openvswitch/ofp-actions.h | 1 + include/openvswitch/packets.h | 18 +- lib/flow.c | 64 ++--- lib/flow.h | 2 +- lib/match.c | 56 +++- lib/meta-flow.c | 49 +++- lib/meta-flow.xml | 9 +- lib/nx-match.c | 33 ++- lib/odp-execute.c | 16 +- lib/odp-util.c | 173 ++++++------ lib/ofp-actions.c | 49 ++++ lib/packets.c | 5 +- ofproto/ofproto-dpif-xlate.c | 41 ++- tests/nsh.at | 61 ++-- utilities/ovs-ofctl.8.in | 13 +- 20 files changed, 709 insertions(+), 267 deletions(-)