mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 13:58:14 +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;
|
||||
POVS_SWITCH_CONTEXT switchContext = ovsFwdCtx->switchContext;
|
||||
PCWSTR dropReason;
|
||||
|
||||
/*
|
||||
* Handle the case where the some of the destination ports are tunneled
|
||||
@@ -792,6 +793,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
||||
if (newNbl == NULL) {
|
||||
status = NDIS_STATUS_RESOURCES;
|
||||
ovsActionStats.noCopiedNbl++;
|
||||
dropReason = L"Dropped due to failure to create NBL copy.";
|
||||
goto dropit;
|
||||
}
|
||||
}
|
||||
@@ -804,6 +806,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
||||
if (status != NDIS_STATUS_SUCCESS) {
|
||||
OvsCompleteNBL(ovsFwdCtx->switchContext, newNbl, TRUE);
|
||||
ovsActionStats.cannotGrowDest++;
|
||||
dropReason = L"Dropped due to failure to update destinations.";
|
||||
goto dropit;
|
||||
}
|
||||
|
||||
@@ -819,8 +822,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
||||
ovsFwdCtx->completionList,
|
||||
&ovsFwdCtx->layers, FALSE);
|
||||
if (status != NDIS_STATUS_SUCCESS) {
|
||||
OvsCompleteNBLForwardingCtx(ovsFwdCtx,
|
||||
L"Dropped due to resouces");
|
||||
dropReason = L"Dropped due to resouces.";
|
||||
goto dropit;
|
||||
}
|
||||
}
|
||||
@@ -841,7 +843,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
|
||||
|
||||
dropit:
|
||||
if (status != NDIS_STATUS_SUCCESS) {
|
||||
OvsCompleteNBLForwardingCtx(ovsFwdCtx, L"Dropped due to XXX");
|
||||
OvsCompleteNBLForwardingCtx(ovsFwdCtx, dropReason);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include "User.h"
|
||||
#include "Datapath.h"
|
||||
#include "Jhash.h"
|
||||
#include "Switch.h"
|
||||
#include "Vport.h"
|
||||
#include "Event.h"
|
||||
#include "User.h"
|
||||
|
@@ -1882,7 +1882,6 @@ RemoveFlow(OVS_DATAPATH *datapath,
|
||||
{
|
||||
OvsFlow *f = *flow;
|
||||
*flow = NULL;
|
||||
UNREFERENCED_PARAMETER(datapath);
|
||||
|
||||
ASSERT(datapath->nFlows);
|
||||
datapath->nFlows--;
|
||||
|
Reference in New Issue
Block a user