[ovs-dev] [RFC PATCH v2 02/10] openvswitch.h: add vport to ovs_action_push_tnl.

Ian Stokes ian.stokes at intel.com
Fri Aug 25 16:40:24 UTC 2017


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 <ian.stokes at intel.com>
---
 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];
 };
-- 
1.7.0.7



More information about the dev mailing list