From 68b64aa36656955c12d4f70f4c5a7e13dda7e158 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Jan 20 2022 06:50:29 +0000 Subject: Import openvswitch2.16-2.16.0-39 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.16.0.patch b/SOURCES/openvswitch-2.16.0.patch index 01515ea..ac1fd48 100644 --- a/SOURCES/openvswitch-2.16.0.patch +++ b/SOURCES/openvswitch-2.16.0.patch @@ -160,7 +160,7 @@ index 16b32be965..92817b62e1 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 e130c2f966..0c18c62548 100644 +index e130c2f966..70ac0a0e56 100644 --- a/datapath-windows/ovsext/Actions.c +++ b/datapath-windows/ovsext/Actions.c @@ -1112,9 +1112,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx, @@ -295,12 +295,12 @@ index e130c2f966..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 @@ -337,8 +337,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) @@ -365,7 +416,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; @@ -373,16 +431,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, @@ -391,7 +445,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, @@ -401,7 +455,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 @@ @@ -420,7 +474,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.16.spec b/SPECS/openvswitch2.16.spec index eed45b7..c97c1bd 100644 --- a/SPECS/openvswitch2.16.spec +++ b/SPECS/openvswitch2.16.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.16.0 -Release: 38%{?dist} +Release: 39%{?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.16.0-39 +- Merging upstream branch-2.16 [RH git: 349d687673] + Commit list: + f2ee013f73 datapath-windows: Pickup Ct tuple as CT lookup key in function OvsCtSetupLookupCtx + + * Tue Jan 18 2022 Open vSwitch CI - 2.16.0-38 - Merging upstream branch-2.16 [RH git: e370e283cf] Commit list: