From 2dbca9e29a6813f2df53261ffaa59b9439c13fdd Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 10 Apr 2018 22:24:41 +0900 Subject: use sorted single master table for route server setup https://github.com/osrg/gobgp/issues/1249 The IN policy was removed. The modification by the IMPORT policy are visible to all route server peers. This saves some dozens bytes memory per a path. Signed-off-by: FUJITA Tomonori --- api/grpc_server.go | 5 ----- api/util.go | 3 --- 2 files changed, 8 deletions(-) (limited to 'api') diff --git a/api/grpc_server.go b/api/grpc_server.go index 817199b5..30934cda 100644 --- a/api/grpc_server.go +++ b/api/grpc_server.go @@ -388,7 +388,6 @@ func ToPathApi(path *table.Path) *Path { IsWithdraw: path.IsWithdraw, Validation: int32(path.ValidationStatus().ToInt()), ValidationDetail: NewValidationFromTableStruct(path.Validation()), - Filtered: path.Filtered("") == table.POLICY_DIRECTION_IN, Family: family, Stale: path.IsStale(), IsFromExternal: path.IsFromExternal(), @@ -2132,8 +2131,6 @@ func NewAPIPolicyAssignmentFromTableStruct(t *table.PolicyAssignment) *PolicyAss return &PolicyAssignment{ Type: func() PolicyType { switch t.Type { - case table.POLICY_DIRECTION_IN: - return PolicyType_IN case table.POLICY_DIRECTION_IMPORT: return PolicyType_IMPORT case table.POLICY_DIRECTION_EXPORT: @@ -2261,8 +2258,6 @@ func toPolicyAssignmentName(a *PolicyAssignment) (string, table.PolicyDirection, } case Resource_LOCAL: switch a.Type { - case PolicyType_IN: - return a.Name, table.POLICY_DIRECTION_IN, nil case PolicyType_IMPORT: return a.Name, table.POLICY_DIRECTION_IMPORT, nil case PolicyType_EXPORT: diff --git a/api/util.go b/api/util.go index 53a94ed3..9a16bef5 100644 --- a/api/util.go +++ b/api/util.go @@ -135,9 +135,6 @@ func (p *Path) ToNativePath(option ...ToNativeOption) (*table.Path, error) { }) path.MarkStale(p.Stale) path.SetUUID(p.Uuid) - if p.Filtered { - path.Filter("", table.POLICY_DIRECTION_IN) - } path.IsNexthopInvalid = p.IsNexthopInvalid return path, nil } -- cgit v1.2.3