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

Function port_flow_template_table_flush

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

Flush table */

Source from the content-addressed store, hash-verified

2664
2665/** Flush table */
2666int
2667port_flow_template_table_flush(portid_t port_id)
2668{
2669 struct rte_port *port;
2670 struct port_table **tmp;
2671 int ret = 0;
2672
2673 if (port_id_is_invalid(port_id, ENABLED_WARN) ||
2674 port_id == (portid_t)RTE_PORT_ALL)
2675 return -EINVAL;
2676 port = &ports[port_id];
2677 tmp = &port->table_list;
2678 while (*tmp) {
2679 struct rte_flow_error error;
2680 struct port_table *pt = *tmp;
2681
2682 /*
2683 * Poisoning to make sure PMDs update it in case
2684 * of error.
2685 */
2686 memset(&error, 0x33, sizeof(error));
2687
2688 if (pt->table &&
2689 rte_flow_template_table_destroy(port_id,
2690 pt->table,
2691 &error)) {
2692 ret = port_flow_complain(&error);
2693 printf("Template table #%u not destroyed\n", pt->id);
2694 tmp = &pt->next;
2695 } else {
2696 *tmp = pt->next;
2697 free(pt);
2698 }
2699 }
2700 return ret;
2701}
2702
2703/** Enqueue create flow rule operation. */
2704int

Callers 1

Calls 6

port_id_is_invalidFunction · 0.85
memsetFunction · 0.85
port_flow_complainFunction · 0.70
printfFunction · 0.50
freeFunction · 0.50

Tested by 1