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

Function pipeline_port_in_enable

dpdk/examples/ip_pipeline/thread.c:822–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820}
821
822int
823pipeline_port_in_enable(const char *pipeline_name,
824 uint32_t port_id)
825{
826 struct pipeline *p;
827 struct pipeline_msg_req *req;
828 struct pipeline_msg_rsp *rsp;
829 int status;
830
831 /* Check input params */
832 if (pipeline_name == NULL)
833 return -1;
834
835 p = pipeline_find(pipeline_name);
836 if ((p == NULL) ||
837 (port_id >= p->n_ports_in))
838 return -1;
839
840 if (!pipeline_is_running(p)) {
841 status = rte_pipeline_port_in_enable(p->p, port_id);
842 return status;
843 }
844
845 /* Allocate request */
846 req = pipeline_msg_alloc();
847 if (req == NULL)
848 return -1;
849
850 /* Write request */
851 req->type = PIPELINE_REQ_PORT_IN_ENABLE;
852 req->id = port_id;
853
854 /* Send request and wait for response */
855 rsp = pipeline_msg_send_recv(p, req);
856
857 /* Read response */
858 status = rsp->status;
859
860 /* Free response */
861 pipeline_msg_free(rsp);
862
863 return status;
864}
865
866int
867pipeline_port_in_disable(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