From patchwork Fri Aug 25 16:40:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Stokes, Ian" X-Patchwork-Id: 805966 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 3xf6PG0VZJz9sNc for ; Sat, 26 Aug 2017 02:41:22 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 8FA95B8A; Fri, 25 Aug 2017 16:40:43 +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 D3AB5A85 for ; Fri, 25 Aug 2017 16:40:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6E6F3E0 for ; Fri, 25 Aug 2017 16:40:40 +0000 (UTC) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Aug 2017 09:40:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,426,1498546800"; d="scan'208";a="143933013" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga005.fm.intel.com with ESMTP; 25 Aug 2017 09:40:34 -0700 From: Ian Stokes To: dev@openvswitch.org Date: Fri, 25 Aug 2017 17:40:24 +0100 Message-Id: <1503679232-11135-3-git-send-email-ian.stokes@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1503679232-11135-1-git-send-email-ian.stokes@intel.com> References: <1503679232-11135-1-git-send-email-ian.stokes@intel.com> X-Spam-Status: No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI, 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 Subject: [ovs-dev] [RFC PATCH v2 02/10] openvswitch.h: add vport to ovs_action_push_tnl. 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 Upon callback for building/pushing a packet header when encapsulating for tunneling a reference to the vport in question is required to access associated devices such as cryptodevs. This patch adds this pointer and will enable future work with cryptodevs that are associated with a vport. Signed-off-by: Ian Stokes --- datapath/linux/compat/include/linux/openvswitch.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/datapath/linux/compat/include/linux/openvswitch.h b/datapath/linux/compat/include/linux/openvswitch.h index bc6c94b..afa7faf 100644 --- a/datapath/linux/compat/include/linux/openvswitch.h +++ b/datapath/linux/compat/include/linux/openvswitch.h @@ -723,6 +723,8 @@ struct ovs_action_hash { * @tnl_port: To identify tunnel port to pass header info. * @out_port: Physical port to send encapsulated packet. * @header_len: Length of the header to be pushed. + * @dev: Pointer to vport so that the cryptodev parameters associated with the + * vport can be accessed at the callback function. * @tnl_type: This is only required to format this header. Otherwise * ODP layer can not parse %header. * @header: Partial header for the tunnel. Tunnel push action can use @@ -732,6 +734,7 @@ struct ovs_action_push_tnl { odp_port_t tnl_port; odp_port_t out_port; uint32_t header_len; + struct netdev_vport *dev; uint32_t tnl_type; /* For logging. */ uint32_t header[TNL_PUSH_HEADER_SIZE / 4]; };