ovsActionStats.txStt++;
break;
}
- ovsActionStats.txVxlan++;
ovsFwdCtx->tunnelTxNic = dstVport;
}
/* Assert that in the Rx direction, key is always setup. */
ASSERT(ovsFwdCtx->tunnelRxNic == NULL || ovsFwdCtx->tunKey.dst != 0);
- status = OvsExtractFlow(ovsFwdCtx->curNbl, ovsFwdCtx->srcVportNo,
- &key, &ovsFwdCtx->layers, ovsFwdCtx->tunKey.dst != 0 ?
- &ovsFwdCtx->tunKey : NULL);
+ status =
+ OvsExtractFlow(ovsFwdCtx->curNbl, ovsFwdCtx->srcVportNo,
+ &key, &ovsFwdCtx->layers,
+ ovsFwdCtx->tunKey.dst != 0 ? &ovsFwdCtx->tunKey : NULL);
if (status != NDIS_STATUS_SUCCESS) {
OvsCompleteNBLForwardingCtx(ovsFwdCtx,
L"OVS-Flow extract failed");
OvsFlowUsed(flow, ovsFwdCtx->curNbl, &ovsFwdCtx->layers);
ovsFwdCtx->switchContext->datapath.hits++;
status = OvsActionsExecute(ovsFwdCtx->switchContext,
- ovsFwdCtx->completionList, ovsFwdCtx->curNbl,
- ovsFwdCtx->srcVportNo, ovsFwdCtx->sendFlags,
- &key, &hash, &ovsFwdCtx->layers,
- flow->actions, flow->actionsLen);
+ ovsFwdCtx->completionList, ovsFwdCtx->curNbl,
+ ovsFwdCtx->srcVportNo, ovsFwdCtx->sendFlags,
+ &key, &hash, &ovsFwdCtx->layers,
+ flow->actions, flow->actionsLen);
ovsFwdCtx->curNbl = NULL;
} else {
LIST_ENTRY missedPackets;
UINT32 num = 0;
ovsFwdCtx->switchContext->datapath.misses++;
InitializeListHead(&missedPackets);
- status = OvsCreateAndAddPackets(NULL, 0, OVS_PACKET_CMD_MISS,
- ovsFwdCtx->srcVportNo,
+ status = OvsCreateAndAddPackets(NULL, 0, OVS_PACKET_CMD_MISS, vport,
&key,ovsFwdCtx->curNbl,
ovsFwdCtx->tunnelRxNic != NULL, &ovsFwdCtx->layers,
ovsFwdCtx->switchContext, &missedPackets, &num);
{
PNET_BUFFER_LIST newNbl;
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
- PNET_BUFFER nb;
/*
* Create a copy and work on the copy after this point. The original NBL is
* XXX Head room needs to include the additional encap.
* XXX copySize check is not considering multiple NBs.
*/
- nb = NET_BUFFER_LIST_FIRST_NB(ovsFwdCtx->curNbl);
newNbl = OvsPartialCopyNBL(ovsFwdCtx->switchContext, ovsFwdCtx->curNbl,
0, 0, TRUE /*copy NBL info*/);
ASSERT(ovsFwdCtx->destPortsSizeOut > 0 ||
ovsFwdCtx->tunnelTxNic != NULL || ovsFwdCtx->tunnelRxNic != NULL);
- /* Send the original packet out */
+ /* Send the original packet out and save the original source port number */
+ UINT32 tempVportNo = ovsFwdCtx->srcVportNo;
status = OvsOutputForwardingCtx(ovsFwdCtx);
ASSERT(ovsFwdCtx->curNbl == NULL);
ASSERT(ovsFwdCtx->destPortsSizeOut == 0);
OvsCompleteNBL(ovsFwdCtx->switchContext, newNbl, TRUE);
} else {
status = OvsInitForwardingCtx(ovsFwdCtx, ovsFwdCtx->switchContext,
- newNbl, ovsFwdCtx->srcVportNo, 0,
+ newNbl, tempVportNo, 0,
NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(newNbl),
ovsFwdCtx->completionList,
&ovsFwdCtx->layers, FALSE);
elem = OvsCreateQueueNlPacket((PVOID)userdataAttr,
userdataAttr->nlaLen,
OVS_PACKET_CMD_ACTION,
- portNo, key,ovsFwdCtx.curNbl,
+ vport, key, ovsFwdCtx.curNbl,
NET_BUFFER_LIST_FIRST_NB(ovsFwdCtx.curNbl),
isRecv,
layers);