Introduce flow flush callback for dpdk offloaded flows. Signed-off-by: Eli Britstein <el...@mellanox.com> Reviewed-by: Oz Shlomo <o...@mellanox.com> --- lib/netdev-offload-dpdk.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 6e1ca8a0d..64873759d 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -307,6 +307,21 @@ netdev_offload_dpdk_flow_del(struct netdev *netdev, const ovs_u128 *ufid, return netdev_offload_dpdk_destroy_flow(netdev, ufid, rte_flow); } +static int +netdev_offload_dpdk_flow_flush(struct netdev *netdev) +{ + struct rte_flow_error error; + int ret; + + ret = netdev_dpdk_rte_flow_flush(netdev, &error); + if (ret) { + VLOG_ERR("%s: rte flow flush error: %u : message : %s\n", + netdev_get_name(netdev), error.type, error.message); + } + + return ret; +} + static int netdev_offload_dpdk_init_flow_api(struct netdev *netdev) { @@ -315,6 +330,7 @@ netdev_offload_dpdk_init_flow_api(struct netdev *netdev) const struct netdev_flow_api netdev_offload_dpdk = { .type = "dpdk_flow_api", + .flow_flush = netdev_offload_dpdk_flow_flush, .flow_put = netdev_offload_dpdk_flow_put, .flow_del = netdev_offload_dpdk_flow_del, .init_flow_api = netdev_offload_dpdk_init_flow_api, -- 2.14.5 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev