diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 0ae820f..9ac46df 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -1238,10 +1238,49 @@ index 92b52f6712..0dc2a7dbca 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..f1f2c03197 100644 +index 5c9b5c3a0c..5557478be9 100644 --- a/datapath-windows/ovsext/Actions.c +++ b/datapath-windows/ovsext/Actions.c -@@ -1259,6 +1259,7 @@ OvsActionMplsPush(OvsForwardingContext *ovsFwdCtx, +@@ -1112,9 +1112,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx, + * should split the function and refactor. */ + if (!bufferData) { + EthHdr *ethHdr = (EthHdr *)bufferStart; +- /* If the frame is not VLAN make it a no op */ + if (ethHdr->Type != ETH_TYPE_802_1PQ_NBO) { +- return NDIS_STATUS_SUCCESS; ++ OVS_LOG_ERROR("Invalid ethHdr type %u, nbl %p", ethHdr->Type, ovsFwdCtx->curNbl); ++ return NDIS_STATUS_INVALID_PACKET; + } + } + RtlMoveMemory(bufferStart + shiftLength, bufferStart, shiftOffset); +@@ -1137,6 +1137,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx, + static __inline NDIS_STATUS + OvsPopVlanInPktBuf(OvsForwardingContext *ovsFwdCtx) + { ++ NDIS_STATUS status; ++ OVS_PACKET_HDR_INFO* layers = &ovsFwdCtx->layers; ++ + /* + * Declare a dummy vlanTag structure since we need to compute the size + * of shiftLength. The NDIS one is a unionized structure. +@@ -1145,7 +1148,15 @@ OvsPopVlanInPktBuf(OvsForwardingContext *ovsFwdCtx) + UINT32 shiftLength = sizeof(vlanTag.TagHeader); + UINT32 shiftOffset = sizeof(DL_EUI48) + sizeof(DL_EUI48); + +- return OvsPopFieldInPacketBuf(ovsFwdCtx, shiftOffset, shiftLength, NULL); ++ status = OvsPopFieldInPacketBuf(ovsFwdCtx, shiftOffset, shiftLength, ++ NULL); ++ ++ if (status == NDIS_STATUS_SUCCESS) { ++ layers->l3Offset -= (UINT16) shiftLength; ++ layers->l4Offset -= (UINT16) shiftLength; ++ } ++ ++ return status; + } + + +@@ -1259,6 +1270,7 @@ OvsActionMplsPush(OvsForwardingContext *ovsFwdCtx, */ static __inline NDIS_STATUS OvsUpdateEthHeader(OvsForwardingContext *ovsFwdCtx, @@ -1249,7 +1288,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 const struct ovs_key_ethernet *ethAttr) { PNET_BUFFER curNb; -@@ -1285,9 +1286,11 @@ OvsUpdateEthHeader(OvsForwardingContext *ovsFwdCtx, +@@ -1285,9 +1297,11 @@ OvsUpdateEthHeader(OvsForwardingContext *ovsFwdCtx, } ethHdr = (EthHdr *)(bufferStart + NET_BUFFER_CURRENT_MDL_OFFSET(curNb)); @@ -1264,7 +1303,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 return NDIS_STATUS_SUCCESS; } -@@ -1376,6 +1379,7 @@ PUINT8 OvsGetHeaderBySize(OvsForwardingContext *ovsFwdCtx, +@@ -1376,6 +1390,7 @@ PUINT8 OvsGetHeaderBySize(OvsForwardingContext *ovsFwdCtx, */ NDIS_STATUS OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, @@ -1272,7 +1311,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 const struct ovs_key_udp *udpAttr) { PUINT8 bufferStart; -@@ -1400,15 +1404,19 @@ OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, +@@ -1400,15 +1415,19 @@ OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, udpHdr->check = ChecksumUpdate16(udpHdr->check, udpHdr->source, udpAttr->udp_src); udpHdr->source = udpAttr->udp_src; @@ -1292,7 +1331,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 } return NDIS_STATUS_SUCCESS; -@@ -1423,6 +1431,7 @@ OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, +@@ -1423,6 +1442,7 @@ OvsUpdateUdpPorts(OvsForwardingContext *ovsFwdCtx, */ NDIS_STATUS OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx, @@ -1300,7 +1339,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 const struct ovs_key_tcp *tcpAttr) { PUINT8 bufferStart; -@@ -1447,11 +1456,13 @@ OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx, +@@ -1447,11 +1467,13 @@ OvsUpdateTcpPorts(OvsForwardingContext *ovsFwdCtx, tcpHdr->check = ChecksumUpdate16(tcpHdr->check, tcpHdr->source, tcpAttr->tcp_src); tcpHdr->source = tcpAttr->tcp_src; @@ -1314,7 +1353,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 } return NDIS_STATUS_SUCCESS; -@@ -1539,9 +1550,21 @@ OvsUpdateAddressAndPort(OvsForwardingContext *ovsFwdCtx, +@@ -1539,9 +1561,21 @@ OvsUpdateAddressAndPort(OvsForwardingContext *ovsFwdCtx, if (tcpHdr) { portField = &tcpHdr->dest; checkField = &tcpHdr->check; @@ -1336,7 +1375,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 } } -@@ -1579,6 +1602,7 @@ OvsUpdateAddressAndPort(OvsForwardingContext *ovsFwdCtx, +@@ -1579,6 +1613,7 @@ OvsUpdateAddressAndPort(OvsForwardingContext *ovsFwdCtx, */ NDIS_STATUS OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, @@ -1344,7 +1383,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 const struct ovs_key_ipv4 *ipAttr) { PUINT8 bufferStart; -@@ -1632,6 +1656,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, +@@ -1632,6 +1667,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, ipAttr->ipv4_src); } ipHdr->saddr = ipAttr->ipv4_src; @@ -1352,7 +1391,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 } if (ipHdr->daddr != ipAttr->ipv4_dst) { if (tcpHdr) { -@@ -1647,6 +1672,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, +@@ -1647,6 +1683,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, ipAttr->ipv4_dst); } ipHdr->daddr = ipAttr->ipv4_dst; @@ -1360,7 +1399,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 } if (ipHdr->protocol != ipAttr->ipv4_proto) { UINT16 oldProto = (ipHdr->protocol << 16) & 0xff00; -@@ -1661,6 +1687,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, +@@ -1661,6 +1698,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, ipHdr->check = ChecksumUpdate16(ipHdr->check, oldProto, newProto); } ipHdr->protocol = ipAttr->ipv4_proto; @@ -1368,7 +1407,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 } if (ipHdr->ttl != ipAttr->ipv4_ttl) { UINT16 oldTtl = (ipHdr->ttl) & 0xff; -@@ -1669,6 +1696,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, +@@ -1669,6 +1707,7 @@ OvsUpdateIPv4Header(OvsForwardingContext *ovsFwdCtx, ipHdr->check = ChecksumUpdate16(ipHdr->check, oldTtl, newTtl); } ipHdr->ttl = ipAttr->ipv4_ttl; @@ -1376,7 +1415,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 } return NDIS_STATUS_SUCCESS; -@@ -1691,12 +1719,12 @@ OvsExecuteSetAction(OvsForwardingContext *ovsFwdCtx, +@@ -1691,12 +1730,12 @@ OvsExecuteSetAction(OvsForwardingContext *ovsFwdCtx, switch (type) { case OVS_KEY_ATTR_ETHERNET: @@ -1391,7 +1430,7 @@ index 5c9b5c3a0c..f1f2c03197 100644 NlAttrGetUnspec(a, sizeof(struct ovs_key_ipv4))); break; -@@ -1709,16 +1737,17 @@ OvsExecuteSetAction(OvsForwardingContext *ovsFwdCtx, +@@ -1709,16 +1748,17 @@ OvsExecuteSetAction(OvsForwardingContext *ovsFwdCtx, status = SUCCEEDED(convertStatus) ? NDIS_STATUS_SUCCESS : NDIS_STATUS_FAILURE; ASSERT(status == NDIS_STATUS_SUCCESS); RtlCopyMemory(&ovsFwdCtx->tunKey, &tunKey, sizeof ovsFwdCtx->tunKey); @@ -1411,6 +1450,14 @@ index 5c9b5c3a0c..f1f2c03197 100644 NlAttrGetUnspec(a, sizeof(struct ovs_key_tcp))); break; +@@ -2053,6 +2093,7 @@ OvsDoExecuteActions(POVS_SWITCH_CONTEXT switchContext, + */ + status = OvsPopVlanInPktBuf(&ovsFwdCtx); + if (status != NDIS_STATUS_SUCCESS) { ++ OVS_LOG_ERROR("OVS-pop vlan action failed status = %lu", status); + dropReason = L"OVS-pop vlan action failed"; + goto dropit; + } diff --git a/datapath-windows/ovsext/Actions.h b/datapath-windows/ovsext/Actions.h index fd050d5dd8..bc12e1166d 100644 --- a/datapath-windows/ovsext/Actions.h diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index 3845de6..1132ec9 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: 127%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 128%{?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 Sep 30 2021 Open vSwitch CI - 2.13.0-128 +- Merging upstream branch-2.13 [RH git: 9d83aff7e3] + Commit list: + 695d25f507 datapath-windows:adjust Offset when processing packet in POP_VLAN action + + * Mon Sep 27 2021 Open vSwitch CI - 2.13.0-127 - Merging upstream branch-2.13 [RH git: a117849d24] Commit list: