[ovs-dev] [PATCH 3/6] datapath-windows: Add support for OVS_TUNNEL_KEY_ATTR_TP_DST

Sairam Venugopal vsairam at vmware.com
Tue Jan 17 21:37:28 UTC 2017


We should consolidate this logic into 1 function for retrieving the tunKey from attr. This can be done separately. 

Acked-by: Sairam Venugopal <vsairam at vmware.com>





On 1/10/17, 8:48 AM, "ovs-dev-bounces at openvswitch.org on behalf of Alin Serdean" <ovs-dev-bounces at openvswitch.org on behalf of aserdean at cloudbasesolutions.com> wrote:

>Add support for netlink attribute OVS_TUNNEL_KEY_ATTR_TP_DST get/set
>flow functions.
>
>Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
>---
> datapath-windows/ovsext/Flow.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
>diff --git a/datapath-windows/ovsext/Flow.c b/datapath-windows/ovsext/Flow.c
>index 749d83a..96ff9fa 100644
>--- a/datapath-windows/ovsext/Flow.c
>+++ b/datapath-windows/ovsext/Flow.c
>@@ -1737,6 +1737,9 @@ OvsTunnelAttrToIPv4TunnelKey(PNL_ATTR attr,
>         case OVS_TUNNEL_KEY_ATTR_OAM:
>             tunKey->flags |= OVS_TNL_F_OAM;
>             break;
>+        case OVS_TUNNEL_KEY_ATTR_TP_DST:
>+            tunKey->dst_port = NlAttrGetBe16(a);
>+            break;
>         case OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS:
>             if (hasOpt) {
>                 /* Duplicate options attribute is not allowed. */
>@@ -1812,6 +1815,11 @@ MapTunAttrToFlowPut(PNL_ATTR *keyAttrs,
>             destKey->tunKey.flags |= OVS_TNL_F_OAM;
>         }
> 
>+        if (tunAttrs[OVS_TUNNEL_KEY_ATTR_TP_DST]) {
>+            destKey->tunKey.dst_port =
>+                NlAttrGetU16(tunAttrs[OVS_TUNNEL_KEY_ATTR_TP_DST]);
>+        }
>+
>         if (tunAttrs[OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS]) {
>         NTSTATUS status = OvsTunnelAttrToGeneveOptions(
>                           tunAttrs[OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS],
>-- 
>2.10.2.windows.1
>_______________________________________________
>dev mailing list
>dev at openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=Z6vowHUOjP5ysP_g372c49Nqc1vEKqHKNBkR5Q5Z7uo&m=b5wDdE2vUUc40ZLOT7Qh6Xa7oJn8L5PUF1xaK4QXlRc&s=wV7RC6p0TO50RU-QknKEC1uCMcEjT0QBCechGsJCnWc&e= 


More information about the dev mailing list