Skip to content

Commit 1bc3b55

Browse files
kishanpsSRAVANI KANASANI
authored andcommitted
Migrating punt_qos_test.cc from IxNetwork to OTG.
Signed-off-by: SRAVANI KANASANI <[email protected]>
1 parent cb99ae2 commit 1bc3b55

File tree

6 files changed

+149
-222
lines changed

6 files changed

+149
-222
lines changed

lib/otg_helper.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ otg::FlowIpv6& AddIPv6Header(otg::Flow& flow, absl::string_view src_ipv6,
9696
return *ipv6_header;
9797
}
9898

99-
void SetIPv6Priority(otg::FlowIpv6& ip_packet, int dscp, int ecn) {
100-
int traffic_class_value = (dscp << 2) | ecn;
101-
ip_packet.mutable_traffic_class()->set_choice(
102-
otg::PatternFlowIpv6TrafficClass::Choice::value);
103-
ip_packet.mutable_traffic_class()->set_value(traffic_class_value);
104-
}
105-
10699
absl::Status SetTrafficTransmissionState(
107100
otg::Openapi::StubInterface& otg_stub,
108101
otg::StateTrafficFlowTransmit::State::Enum transmission_state) {

lib/otg_helper.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ void SetIPv4Priority(otg::FlowIpv4& ip_packet, int dscp, int ecn);
3535
otg::FlowIpv6& AddIPv6Header(otg::Flow& flow, absl::string_view src_ipv6,
3636
absl::string_view dst_ipv6);
3737

38-
void SetIPv6Priority(otg::FlowIpv6& ip_packet, int dscp, int ecn);
39-
4038
absl::Status SetTrafficTransmissionState(
4139
otg::Openapi::StubInterface& otg_stub,
4240
otg::StateTrafficFlowTransmit::State::Enum transmission_state);

lib/otg_helper_test.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,6 @@ TEST(OtgHelperTest, AddIPv6HeaderTest) {
151151
EXPECT_THAT(ipv6_header, EqualsProto(flow.packet(0).ipv6()));
152152
}
153153

154-
TEST(OtgHelperTest, SetIPv6PriorityTest) {
155-
otg::FlowIpv6 ipv6_header;
156-
157-
SetIPv6Priority(ipv6_header, /*dscp=*/10, /*ecn=*/1);
158-
159-
EXPECT_THAT(ipv6_header, EqualsProto(R"pb(
160-
traffic_class { choice: value value: 41 }
161-
)pb"));
162-
}
163-
164154
TEST(OtgHelperTest, SetTrafficTransmissionStateSuccess) {
165155
otg::MockOpenapiStub mock_stub;
166156

tests/qos/BUILD.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ cc_library(
109109
"//gutil/gutil:status",
110110
"//gutil/gutil:status_matchers",
111111
"//gutil/gutil:testing",
112-
"//lib:otg_helper",
112+
"//lib:ixia_helper",
113113
"//lib/gnmi:gnmi_helper",
114114
"//lib/gnmi:openconfig_cc_proto",
115115
"//lib/utils:generic_testbed_utils",
@@ -122,6 +122,7 @@ cc_library(
122122
"//sai_p4/instantiations/google:instantiations",
123123
"//sai_p4/instantiations/google:sai_pd_cc_proto",
124124
"//sai_p4/instantiations/google/test_tools:test_entries",
125+
"//tests/forwarding:util",
125126
"//tests/gnmi:util",
126127
"//tests/integration/system/nsf:util",
127128
"//tests/integration/system/nsf/interfaces:testbed",
@@ -133,13 +134,11 @@ cc_library(
133134
"//thinkit/proto:generic_testbed_cc_proto",
134135
"@com_github_gnmi//proto/gnmi:gnmi_cc_grpc_proto",
135136
"@com_github_gnmi//proto/gnmi:gnmi_cc_proto",
136-
"@com_github_grpc_grpc//:grpc++_unsecure",
137-
"@com_github_otg_models//:otg_cc_proto",
138-
"@com_github_otg_models//:otg_grpc_proto",
139137
"@com_github_p4lang_p4runtime//:p4info_cc_proto",
140138
"@com_github_p4lang_p4runtime//:p4runtime_cc_proto",
141139
"@com_google_absl//absl/base:core_headers",
142140
"@com_google_absl//absl/container:flat_hash_map",
141+
"@com_google_absl//absl/container:flat_hash_set",
143142
"@com_google_absl//absl/flags:flag",
144143
"@com_google_absl//absl/log",
145144
"@com_google_absl//absl/status",
@@ -148,6 +147,7 @@ cc_library(
148147
"@com_google_absl//absl/strings:str_format",
149148
"@com_google_absl//absl/synchronization",
150149
"@com_google_absl//absl/time",
150+
"@com_google_absl//absl/types:optional",
151151
"@com_google_googletest//:gtest",
152152
],
153153
alwayslink = True,

0 commit comments

Comments
 (0)