From e1082da0e08ec69beb918124884f3c87ae0b7a93 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Jan 20 2022 17:40:56 +0000 Subject: Import openvswitch2.13-2.13.0-145 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 6f8be00..dd0509e 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -1285,7 +1285,7 @@ index 92b52f6712..b2bb3796ac 100644 OVS_CHECK_PRAGMA_MESSAGE AC_SUBST([OVS_CFLAGS]) diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c -index 5c9b5c3a0c..b3da3b19bc 100644 +index 5c9b5c3a0c..94bbc5a887 100644 --- a/datapath-windows/ovsext/Actions.c +++ b/datapath-windows/ovsext/Actions.c @@ -1112,9 +1112,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx, @@ -1579,7 +1579,7 @@ index 5c9b5c3a0c..b3da3b19bc 100644 if (status == STATUS_SUCCESS) { status = OvsProcessDeferredActions(switchContext, completionList, - portNo, sendFlags, layers); -+ portNo, sendFlags, NULL); ++ portNo, sendFlags); } return status; @@ -1657,7 +1657,7 @@ index eda42ac823..a468c3e6bc 100644 if (src->wscale & CT_WSCALE_FLAG diff --git a/datapath-windows/ovsext/Conntrack.c b/datapath-windows/ovsext/Conntrack.c -index ba5611697a..4d24706915 100644 +index ba5611697a..a36d42e01d 100644 --- a/datapath-windows/ovsext/Conntrack.c +++ b/datapath-windows/ovsext/Conntrack.c @@ -491,15 +491,32 @@ static __inline NDIS_STATUS @@ -1694,7 +1694,58 @@ index ba5611697a..4d24706915 100644 } if (key->ipKey.nwProto == IPPROTO_TCP || key->ipKey.nwProto == IPPROTO_UDP -@@ -753,6 +770,9 @@ OvsProcessConntrackEntry(OvsForwardingContext *fwdCtx, +@@ -607,6 +624,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, +@@ -627,6 +669,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; +@@ -681,6 +724,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); +@@ -753,6 +800,9 @@ OvsProcessConntrackEntry(OvsForwardingContext *fwdCtx, return NULL; } break; @@ -1717,7 +1768,7 @@ index bc6580d708..b0932186af 100644 /* Metadata mark for masked write to conntrack mark */ 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) @@ -1744,7 +1795,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; @@ -1752,16 +1810,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, @@ -1770,7 +1824,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, @@ -1780,7 +1834,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 @@ @@ -1799,7 +1853,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.13.spec b/SPECS/openvswitch2.13.spec index a1ef70c..9acc87b 100644 --- a/SPECS/openvswitch2.13.spec +++ b/SPECS/openvswitch2.13.spec @@ -59,7 +59,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.13.0 -Release: 144%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 145%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -712,6 +712,12 @@ exit 0 %endif %changelog +* Thu Jan 20 2022 Open vSwitch CI - 2.13.0-145 +- Merging upstream branch-2.13 [RH git: 035f2095f9] + Commit list: + 9572c60bfc datapath-windows: Pickup Ct tuple as CT lookup key in function OvsCtSetupLookupCtx + + * Tue Jan 18 2022 Open vSwitch CI - 2.13.0-144 - Merging upstream branch-2.13 [RH git: df42b314bc] Commit list: