Skip to content

Commit

Permalink
Update the flow drop reason list in flow utility
Browse files Browse the repository at this point in the history
Change-Id: I2135446723dddf526babf1f033dd1492e22e9cf3
closes-bug: #1729818
  • Loading branch information
haripk committed Nov 7, 2017
1 parent c24c559 commit 081a617
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 21 deletions.
51 changes: 30 additions & 21 deletions include/vr_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,36 @@ typedef enum {
#define VR_FLOW_BGP_SERVICE 0x80

/* Flow Action Reason code */
#define VR_FLOW_DR_UNKNOWN 0x00
#define VR_FLOW_DR_UNAVIALABLE_INTF 0x01
#define VR_FLOW_DR_IPv4_FWD_DIS 0x02
#define VR_FLOW_DR_UNAVAILABLE_VRF 0x03
#define VR_FLOW_DR_NO_SRC_ROUTE 0x04
#define VR_FLOW_DR_NO_DST_ROUTE 0x05
#define VR_FLOW_DR_AUDIT_ENTRY 0x06
#define VR_FLOW_DR_VRF_CHANGE 0x07
#define VR_FLOW_DR_NO_REVERSE_FLOW 0x08
#define VR_FLOW_DR_REVERSE_FLOW_CHANGE 0x09
#define VR_FLOW_DR_NAT_CHANGE 0x0a
#define VR_FLOW_DR_FLOW_LIMIT 0x0b
#define VR_FLOW_DR_LINKLOCAL_SRC_NAT 0x0c
#define VR_FLOW_DR_POLICY 0x0d
#define VR_FLOW_DR_OUT_POLICY 0x0e
#define VR_FLOW_DR_SG 0x0f
#define VR_FLOW_DR_OUT_SG 0x10
#define VR_FLOW_DR_REVERSE_SG 0x11
#define VR_FLOW_DR_REVERSE_OUT_SG 0x12
#define VR_FLOW_DR_SAME_FLOW_RFLOW_KEY 0x13
#define VR_FLOW_DR_NO_MIRROR_ENTRY 0x14
#define VR_FLOW_DR_UNKNOWN 0x00
#define VR_FLOW_DR_UNAVIALABLE_INTF 0x01
#define VR_FLOW_DR_IPv4_FWD_DIS 0x02
#define VR_FLOW_DR_UNAVAILABLE_VRF 0x03
#define VR_FLOW_DR_NO_SRC_ROUTE 0x04
#define VR_FLOW_DR_NO_DST_ROUTE 0x05
#define VR_FLOW_DR_AUDIT_ENTRY 0x06
#define VR_FLOW_DR_VRF_CHANGE 0x07
#define VR_FLOW_DR_NO_REVERSE_FLOW 0x08
#define VR_FLOW_DR_REVERSE_FLOW_CHANGE 0x09
#define VR_FLOW_DR_NAT_CHANGE 0x0a
#define VR_FLOW_DR_FLOW_LIMIT 0x0b
#define VR_FLOW_DR_LINKLOCAL_SRC_NAT 0x0c
#define VR_FLOW_DR_FAILED_VROUTER_INSTALL 0x0d
#define VR_FLOW_DR_INVALID_L2_FLOW 0x0e
#define VR_FLOW_DR_FLOW_ON_TSN 0x0f
#define VR_FLOW_DR_NO_MIRROR_ENTRY 0x10
#define VR_FLOW_DR_SAME_FLOW_RFLOW_KEY 0x11
#define VR_FLOW_DR_PORT_MAP_DROP 0x12
#define VR_FLOW_DR_NO_SRC_ROUTE_L2RPF 0x13
#define VR_FLOW_DR_POLICY 0x14
#define VR_FLOW_DR_OUT_POLICY 0x15
#define VR_FLOW_DR_SG 0x16
#define VR_FLOW_DR_OUT_SG 0x17
#define VR_FLOW_DR_REVERSE_SG 0x18
#define VR_FLOW_DR_REVERSE_OUT_SG 0x19
#define VR_FLOW_DR_FW_POLICY 0x1a
#define VR_FLOW_DR_OUT_FW_POLICY 0x1b
#define VR_FLOW_DR_REVERSE_FW_POLICY 0x1c
#define VR_FLOW_DR_REVERSE_OUT_FW_POLICY 0x1d

#define VR_IP6_ADDRESS_LEN 16

Expand Down
18 changes: 18 additions & 0 deletions utils/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,16 @@ flow_get_drop_reason(uint8_t drop_code)
return "FlowLim";
case VR_FLOW_DR_LINKLOCAL_SRC_NAT:
return "LinkSrcNatErr";
case VR_FLOW_DR_FAILED_VROUTER_INSTALL:
return "VrouterInstallFail";
case VR_FLOW_DR_INVALID_L2_FLOW:
return "InvalidL2Flow";
case VR_FLOW_DR_FLOW_ON_TSN:
return "TSNFlow";
case VR_FLOW_DR_PORT_MAP_DROP:
return "NoFipPortMap";
case VR_FLOW_DR_NO_SRC_ROUTE_L2RPF:
return "NoSrcRtRpfNh";
case VR_FLOW_DR_POLICY:
return "Policy";
case VR_FLOW_DR_OUT_POLICY:
Expand All @@ -378,6 +388,14 @@ flow_get_drop_reason(uint8_t drop_code)
return "RevSG";
case VR_FLOW_DR_REVERSE_OUT_SG:
return "RevOutSG";
case VR_FLOW_DR_FW_POLICY:
return "FwPolicy";
case VR_FLOW_DR_OUT_FW_POLICY:
return "OutFwPolicy";
case VR_FLOW_DR_REVERSE_FW_POLICY:
return "RevFwPolicy";
case VR_FLOW_DR_REVERSE_OUT_FW_POLICY:
return "RevOutFwPolicy";
case VR_FLOW_DR_SAME_FLOW_RFLOW_KEY:
return "SameFlowRflowKey";
case VR_FLOW_DR_NO_MIRROR_ENTRY:
Expand Down

0 comments on commit 081a617

Please sign in to comment.