MCPcopy Create free account
hub / github.com/F-Stack/f-stack / check_pipeline_invalid_params

Function check_pipeline_invalid_params

dpdk/app/test/test_table_pipeline.c:158–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156static int check_pipeline_invalid_params(void);
157
158static int
159check_pipeline_invalid_params(void)
160{
161 struct rte_pipeline_params pipeline_params_1 = {
162 .name = NULL,
163 .socket_id = 0,
164 };
165 struct rte_pipeline_params pipeline_params_2 = {
166 .name = "PIPELINE",
167 .socket_id = -1,
168 };
169 struct rte_pipeline_params pipeline_params_3 = {
170 .name = "PIPELINE",
171 .socket_id = 127,
172 };
173
174 p = rte_pipeline_create(NULL);
175 if (p != NULL) {
176 RTE_LOG(INFO, PIPELINE,
177 "%s: configured pipeline with null params\n",
178 __func__);
179 goto fail;
180 }
181 p = rte_pipeline_create(&pipeline_params_1);
182 if (p != NULL) {
183 RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with NULL "
184 "name\n", __func__);
185 goto fail;
186 }
187
188 p = rte_pipeline_create(&pipeline_params_2);
189 if (p != NULL) {
190 RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with invalid "
191 "socket\n", __func__);
192 goto fail;
193 }
194
195 if (rte_eal_has_hugepages()) {
196 p = rte_pipeline_create(&pipeline_params_3);
197 if (p != NULL) {
198 RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with "
199 "invalid socket\n", __func__);
200 goto fail;
201 }
202 }
203
204 /* Check pipeline consistency */
205 if (!rte_pipeline_check(p)) {
206 rte_panic("Pipeline consistency reported as OK\n");
207 goto fail;
208 }
209
210
211 return 0;
212fail:
213 return -1;
214}
215

Callers 1

test_table_pipelineFunction · 0.85

Calls 3

rte_pipeline_createFunction · 0.85
rte_eal_has_hugepagesFunction · 0.85
rte_pipeline_checkFunction · 0.85

Tested by

no test coverage detected