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

Function rte_pipeline_check

dpdk/lib/pipeline/rte_pipeline.c:1031–1074  ·  view source on GitHub ↗

* Pipeline run-time */

Source from the content-addressed store, hash-verified

1029 * Pipeline run-time
1030 */
1031int
1032rte_pipeline_check(struct rte_pipeline *p)
1033{
1034 uint32_t port_in_id;
1035
1036 /* Check input arguments */
1037 if (p == NULL) {
1038 RTE_LOG(ERR, PIPELINE, "%s: pipeline parameter NULL\n",
1039 __func__);
1040 return -EINVAL;
1041 }
1042
1043 /* Check that pipeline has at least one input port, one table and one
1044 output port */
1045 if (p->num_ports_in == 0) {
1046 RTE_LOG(ERR, PIPELINE, "%s: must have at least 1 input port\n",
1047 __func__);
1048 return -EINVAL;
1049 }
1050 if (p->num_tables == 0) {
1051 RTE_LOG(ERR, PIPELINE, "%s: must have at least 1 table\n",
1052 __func__);
1053 return -EINVAL;
1054 }
1055 if (p->num_ports_out == 0) {
1056 RTE_LOG(ERR, PIPELINE, "%s: must have at least 1 output port\n",
1057 __func__);
1058 return -EINVAL;
1059 }
1060
1061 /* Check that all input ports are connected */
1062 for (port_in_id = 0; port_in_id < p->num_ports_in; port_in_id++) {
1063 struct rte_port_in *port_in = &p->ports_in[port_in_id];
1064
1065 if (port_in->table_id == RTE_TABLE_INVALID) {
1066 RTE_LOG(ERR, PIPELINE,
1067 "%s: Port IN ID %u is not connected\n",
1068 __func__, port_in_id);
1069 return -EINVAL;
1070 }
1071 }
1072
1073 return 0;
1074}
1075
1076static inline void
1077rte_pipeline_compute_masks(struct rte_pipeline *p, uint64_t pkts_mask)

Calls

no outgoing calls

Tested by 4

setup_acl_pipelineFunction · 0.68
test_table_typeFunction · 0.68
setup_pipelineFunction · 0.68