diff --git a/SOURCES/openvswitch-2.15.0.patch b/SOURCES/openvswitch-2.15.0.patch index 3bb9a75..b264063 100644 --- a/SOURCES/openvswitch-2.15.0.patch +++ b/SOURCES/openvswitch-2.15.0.patch @@ -298,7 +298,7 @@ index fd82d7d270..e45de27433 100644 AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c -index 4f43369844..0c18c62548 100644 +index 4f43369844..70ac0a0e56 100644 --- a/datapath-windows/ovsext/Actions.c +++ b/datapath-windows/ovsext/Actions.c @@ -1112,9 +1112,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx, @@ -444,12 +444,12 @@ index 4f43369844..0c18c62548 100644 if (status == STATUS_SUCCESS) { status = OvsProcessDeferredActions(switchContext, completionList, - portNo, sendFlags, layers); -+ portNo, sendFlags, NULL); ++ portNo, sendFlags); } return status; diff --git a/datapath-windows/ovsext/Conntrack.c b/datapath-windows/ovsext/Conntrack.c -index 2610d626a0..fd6f3bae04 100644 +index 2610d626a0..7f1d2fb412 100644 --- a/datapath-windows/ovsext/Conntrack.c +++ b/datapath-windows/ovsext/Conntrack.c @@ -493,15 +493,32 @@ static __inline NDIS_STATUS @@ -486,8 +486,59 @@ index 2610d626a0..fd6f3bae04 100644 } if (key->ipKey.nwProto == IPPROTO_TCP || key->ipKey.nwProto == IPPROTO_UDP +@@ -609,6 +626,31 @@ OvsReverseIcmpType(UINT8 type) + } + } + ++static __inline void ++OvsPickupCtTupleAsLookupKey(POVS_CT_KEY ctKey, UINT16 zone, OvsFlowKey *flowKey) ++{ ++ UINT32 ipAddrSrc = 0, ipAddrDst = 0; ++ ++ if (!flowKey || !ctKey) return; ++ ++ if (flowKey->l2.dlType == htons(ETH_TYPE_IPV4)) { ++ ipAddrSrc = flowKey->ct.tuple_ipv4.ipv4_src; ++ ipAddrDst = flowKey->ct.tuple_ipv4.ipv4_dst; ++ ++ if ((ipAddrSrc > 0 && ipAddrDst > 0) && ++ (zone == flowKey->ct.zone)) { ++ /* if the ct tuple_ipv4 in flowKey is not null and ct.zone is same with ++ * zone parameter pickup the tuple_ipv4 value as the lookup key ++ */ ++ ctKey->src.addr.ipv4 = flowKey->ct.tuple_ipv4.ipv4_src; ++ ctKey->dst.addr.ipv4 = flowKey->ct.tuple_ipv4.ipv4_dst; ++ ctKey->nw_proto = flowKey->ct.tuple_ipv4.ipv4_proto; ++ ctKey->src.port = flowKey->ct.tuple_ipv4.src_port; ++ ctKey->dst.port = flowKey->ct.tuple_ipv4.dst_port; ++ } ++ } ++} ++ + static __inline NDIS_STATUS + OvsCtSetupLookupCtx(OvsFlowKey *flowKey, + UINT16 zone, +@@ -629,6 +671,7 @@ OvsCtSetupLookupCtx(OvsFlowKey *flowKey, + + ctx->key.src.port = flowKey->ipKey.l4.tpSrc; + ctx->key.dst.port = flowKey->ipKey.l4.tpDst; ++ + if (flowKey->ipKey.nwProto == IPPROTO_ICMP) { + ICMPHdr icmpStorage; + const ICMPHdr *icmp; +@@ -683,6 +726,10 @@ OvsCtSetupLookupCtx(OvsFlowKey *flowKey, + /* Translate address first for reverse NAT */ + ctx->key = natEntry->ctEntry->key; + OvsCtKeyReverse(&ctx->key); ++ } else { ++ if (flowKey->l2.dlType == htons(ETH_TYPE_IPV4)) { ++ OvsPickupCtTupleAsLookupKey(&(ctx->key), zone, flowKey); ++ } + } + + ctx->hash = OvsCtHashKey(&ctx->key); diff --git a/datapath-windows/ovsext/Recirc.c b/datapath-windows/ovsext/Recirc.c -index 2febf060dd..a32b75352b 100644 +index 2febf060dd..7a688c8742 100644 --- a/datapath-windows/ovsext/Recirc.c +++ b/datapath-windows/ovsext/Recirc.c @@ -277,16 +277,23 @@ OvsDeferredActionsQueuePush(POVS_DEFERRED_ACTION_QUEUE queue) @@ -514,7 +565,14 @@ index 2febf060dd..a32b75352b 100644 } return deferredAction; -@@ -309,9 +316,16 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, +@@ -303,15 +310,17 @@ NDIS_STATUS + OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, + OvsCompletionList *completionList, + UINT32 portNo, +- ULONG sendFlags, +- OVS_PACKET_HDR_INFO *layers) ++ ULONG sendFlags) + { NDIS_STATUS status = NDIS_STATUS_SUCCESS; POVS_DEFERRED_ACTION_QUEUE queue = OvsDeferredActionsQueueGet(); POVS_DEFERRED_ACTION deferredAction = NULL; @@ -522,16 +580,12 @@ index 2febf060dd..a32b75352b 100644 /* Process all deferred actions. */ while ((deferredAction = OvsDeferredActionsQueuePop(queue)) != NULL) { -+ if (layers) { -+ layersDeferred = layers; -+ } else { -+ layersDeferred = &(deferredAction->layers); -+ } ++ layersDeferred = &(deferredAction->layers); + if (deferredAction->actions) { status = OvsDoExecuteActions(switchContext, completionList, -@@ -319,7 +333,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, +@@ -319,7 +328,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, portNo, sendFlags, &deferredAction->key, NULL, @@ -540,7 +594,7 @@ index 2febf060dd..a32b75352b 100644 NlAttrGetSize(deferredAction->actions)); } else { status = OvsDoRecirc(switchContext, -@@ -327,7 +341,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, +@@ -327,7 +336,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, deferredAction->nbl, &deferredAction->key, portNo, @@ -550,7 +604,7 @@ index 2febf060dd..a32b75352b 100644 } diff --git a/datapath-windows/ovsext/Recirc.h b/datapath-windows/ovsext/Recirc.h -index 2b314ce274..74130a4600 100644 +index 2b314ce274..b2d02a65c2 100644 --- a/datapath-windows/ovsext/Recirc.h +++ b/datapath-windows/ovsext/Recirc.h @@ -18,6 +18,7 @@ @@ -569,7 +623,17 @@ index 2b314ce274..74130a4600 100644 } OVS_DEFERRED_ACTION, *POVS_DEFERRED_ACTION; /* -@@ -52,6 +54,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, +@@ -39,8 +41,7 @@ NDIS_STATUS + OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, + OvsCompletionList *completionList, + UINT32 portNo, +- ULONG sendFlags, +- OVS_PACKET_HDR_INFO *layers); ++ ULONG sendFlags); + + /* + * -------------------------------------------------------------------------- +@@ -52,6 +53,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext, POVS_DEFERRED_ACTION OvsAddDeferredActions(PNET_BUFFER_LIST packet, OvsFlowKey *key, diff --git a/SPECS/openvswitch2.15.spec b/SPECS/openvswitch2.15.spec index 3535627..21d5c75 100644 --- a/SPECS/openvswitch2.15.spec +++ b/SPECS/openvswitch2.15.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.15.0 -Release: 58%{?dist} +Release: 59%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -699,6 +699,12 @@ exit 0 %endif %changelog +* Thu Jan 20 2022 Open vSwitch CI - 2.15.0-59 +- Merging upstream branch-2.15 [RH git: d17382a24e] + Commit list: + 2632aeb374 datapath-windows: Pickup Ct tuple as CT lookup key in function OvsCtSetupLookupCtx + + * Tue Jan 18 2022 Open vSwitch CI - 2.15.0-58 - Merging upstream branch-2.15 [RH git: 14826e19b9] Commit list: