mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 14:55:18 +00:00
datapath-windows: Cleanup OVS
Removed duplicate include of "Switch.h" header. Removed useless usage of UNREFERENCED_PARAMETER macro for a referenced parameter. Added debug logs for dropped packets. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
committed by
Ben Pfaff
parent
1c1e46ed84
commit
eda457f1a0
@@ -764,6 +764,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
|||||||
{
|
{
|
||||||
NDIS_STATUS status = STATUS_SUCCESS;
|
NDIS_STATUS status = STATUS_SUCCESS;
|
||||||
POVS_SWITCH_CONTEXT switchContext = ovsFwdCtx->switchContext;
|
POVS_SWITCH_CONTEXT switchContext = ovsFwdCtx->switchContext;
|
||||||
|
PCWSTR dropReason;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle the case where the some of the destination ports are tunneled
|
* Handle the case where the some of the destination ports are tunneled
|
||||||
@@ -792,6 +793,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
|||||||
if (newNbl == NULL) {
|
if (newNbl == NULL) {
|
||||||
status = NDIS_STATUS_RESOURCES;
|
status = NDIS_STATUS_RESOURCES;
|
||||||
ovsActionStats.noCopiedNbl++;
|
ovsActionStats.noCopiedNbl++;
|
||||||
|
dropReason = L"Dropped due to failure to create NBL copy.";
|
||||||
goto dropit;
|
goto dropit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -804,6 +806,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
|||||||
if (status != NDIS_STATUS_SUCCESS) {
|
if (status != NDIS_STATUS_SUCCESS) {
|
||||||
OvsCompleteNBL(ovsFwdCtx->switchContext, newNbl, TRUE);
|
OvsCompleteNBL(ovsFwdCtx->switchContext, newNbl, TRUE);
|
||||||
ovsActionStats.cannotGrowDest++;
|
ovsActionStats.cannotGrowDest++;
|
||||||
|
dropReason = L"Dropped due to failure to update destinations.";
|
||||||
goto dropit;
|
goto dropit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -819,8 +822,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
|||||||
ovsFwdCtx->completionList,
|
ovsFwdCtx->completionList,
|
||||||
&ovsFwdCtx->layers, FALSE);
|
&ovsFwdCtx->layers, FALSE);
|
||||||
if (status != NDIS_STATUS_SUCCESS) {
|
if (status != NDIS_STATUS_SUCCESS) {
|
||||||
OvsCompleteNBLForwardingCtx(ovsFwdCtx,
|
dropReason = L"Dropped due to resouces.";
|
||||||
L"Dropped due to resouces");
|
|
||||||
goto dropit;
|
goto dropit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -841,7 +843,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
|||||||
|
|
||||||
dropit:
|
dropit:
|
||||||
if (status != NDIS_STATUS_SUCCESS) {
|
if (status != NDIS_STATUS_SUCCESS) {
|
||||||
OvsCompleteNBLForwardingCtx(ovsFwdCtx, L"Dropped due to XXX");
|
OvsCompleteNBLForwardingCtx(ovsFwdCtx, dropReason);
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#include "User.h"
|
#include "User.h"
|
||||||
#include "Datapath.h"
|
#include "Datapath.h"
|
||||||
#include "Jhash.h"
|
#include "Jhash.h"
|
||||||
#include "Switch.h"
|
|
||||||
#include "Vport.h"
|
#include "Vport.h"
|
||||||
#include "Event.h"
|
#include "Event.h"
|
||||||
#include "User.h"
|
#include "User.h"
|
||||||
|
@@ -1882,7 +1882,6 @@ RemoveFlow(OVS_DATAPATH *datapath,
|
|||||||
{
|
{
|
||||||
OvsFlow *f = *flow;
|
OvsFlow *f = *flow;
|
||||||
*flow = NULL;
|
*flow = NULL;
|
||||||
UNREFERENCED_PARAMETER(datapath);
|
|
||||||
|
|
||||||
ASSERT(datapath->nFlows);
|
ASSERT(datapath->nFlows);
|
||||||
datapath->nFlows--;
|
datapath->nFlows--;
|
||||||
|
Reference in New Issue
Block a user