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

Function pipeline_port_in_disable

dpdk/examples/ip_pipeline/thread.c:866–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864}
865
866int
867pipeline_port_in_disable(const char *pipeline_name,
868 uint32_t port_id)
869{
870 struct pipeline *p;
871 struct pipeline_msg_req *req;
872 struct pipeline_msg_rsp *rsp;
873 int status;
874
875 /* Check input params */
876 if (pipeline_name == NULL)
877 return -1;
878
879 p = pipeline_find(pipeline_name);
880 if ((p == NULL) ||
881 (port_id >= p->n_ports_in))
882 return -1;
883
884 if (!pipeline_is_running(p)) {
885 status = rte_pipeline_port_in_disable(p->p, port_id);
886 return status;
887 }
888
889 /* Allocate request */
890 req = pipeline_msg_alloc();
891 if (req == NULL)
892 return -1;
893
894 /* Write request */
895 req->type = PIPELINE_REQ_PORT_IN_DISABLE;
896 req->id = port_id;
897
898 /* Send request and wait for response */
899 rsp = pipeline_msg_send_recv(p, req);
900
901 /* Read response */
902 status = rsp->status;
903
904 /* Free response */
905 pipeline_msg_free(rsp);
906
907 return status;
908}
909
910int
911pipeline_port_out_stats_read(const char *pipeline_name,

Callers 1

Calls 6

pipeline_is_runningFunction · 0.85
pipeline_msg_allocFunction · 0.85
pipeline_msg_send_recvFunction · 0.85
pipeline_msg_freeFunction · 0.85
pipeline_findFunction · 0.70

Tested by

no test coverage detected