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

Function port_queue_flow_push

dpdk/app/test-pmd/config.c:3257–3282  ·  view source on GitHub ↗

Push all the queue operations in the queue to the NIC. */

Source from the content-addressed store, hash-verified

3255
3256/** Push all the queue operations in the queue to the NIC. */
3257int
3258port_queue_flow_push(portid_t port_id, queueid_t queue_id)
3259{
3260 struct rte_port *port;
3261 struct rte_flow_error error;
3262 int ret = 0;
3263
3264 if (port_id_is_invalid(port_id, ENABLED_WARN) ||
3265 port_id == (portid_t)RTE_PORT_ALL)
3266 return -EINVAL;
3267 port = &ports[port_id];
3268
3269 if (queue_id >= port->queue_nb) {
3270 printf("Queue #%u is invalid\n", queue_id);
3271 return -EINVAL;
3272 }
3273
3274 memset(&error, 0x55, sizeof(error));
3275 ret = rte_flow_push(port_id, queue_id, &error);
3276 if (ret < 0) {
3277 printf("Failed to push operations in the queue\n");
3278 return -EINVAL;
3279 }
3280 printf("Queue #%u operations pushed\n", queue_id);
3281 return ret;
3282}
3283
3284/** Calculate the hash result for a given pattern in a given table. */
3285int

Callers 1

cmd_flow_parsedFunction · 0.85

Calls 4

port_id_is_invalidFunction · 0.85
memsetFunction · 0.85
rte_flow_pushFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected