We should consolidate this logic into 1 function for retrieving the tunKey from attr. This can be done separately.
Acked-by: Sairam Venugopal <[email protected]> On 1/10/17, 8:48 AM, "[email protected] on behalf of Alin Serdean" <[email protected] on behalf of [email protected]> wrote: >Add support for netlink attribute OVS_TUNNEL_KEY_ATTR_TP_DST get/set >flow functions. > >Signed-off-by: Alin Gabriel Serdean <[email protected]> >--- > 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 >[email protected] >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= > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
