Rename all the netdev_dpdk_* functions names (originated from the file netdev-dpdk.c) into the netdev_rte_offloads_* functions names.
Signed-off-by: Ophir Munk <[email protected]> --- lib/netdev-rte-offloads.c | 45 +++++++++++++++++++++++---------------------- lib/netdev-rte-offloads.h | 17 +++++++++-------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/lib/netdev-rte-offloads.c b/lib/netdev-rte-offloads.c index c75aef8..986b834 100644 --- a/lib/netdev-rte-offloads.c +++ b/lib/netdev-rte-offloads.c @@ -395,12 +395,12 @@ add_flow_rss_action(struct flow_actions *actions, } static int -netdev_dpdk_add_rte_flow_offload(struct netdev *netdev, - const struct match *match, - struct nlattr *nl_actions OVS_UNUSED, - size_t actions_len OVS_UNUSED, - const ovs_u128 *ufid, - struct offload_info *info) +netdev_rte_offloads_add_flow(struct netdev *netdev, + const struct match *match, + struct nlattr *nl_actions OVS_UNUSED, + size_t actions_len OVS_UNUSED, + const ovs_u128 *ufid, + struct offload_info *info) { const struct rte_flow_attr flow_attr = { .group = 0, @@ -577,7 +577,8 @@ netdev_dpdk_add_rte_flow_offload(struct netdev *netdev, rss = add_flow_rss_action(&actions, netdev); add_flow_action(&actions, RTE_FLOW_ACTION_TYPE_END, NULL); - flow = netdev_dpdk_rte_flow_create(netdev, &flow_attr,patterns.items, + flow = netdev_dpdk_rte_flow_create(netdev, &flow_attr, + patterns.items, actions.actions, &error); free(rss); @@ -601,7 +602,7 @@ out: * Check if any unsupported flow patterns are specified. */ static int -netdev_dpdk_validate_flow(const struct match *match) +netdev_rte_offloads_validate_flow(const struct match *match) { struct match match_zero_wc; const struct flow *masks = &match->wc.masks; @@ -670,9 +671,9 @@ err: } static int -netdev_dpdk_destroy_rte_flow(struct netdev *netdev, - const ovs_u128 *ufid, - struct rte_flow *rte_flow) +netdev_rte_offloads_destroy_flow(struct netdev *netdev, + const ovs_u128 *ufid, + struct rte_flow *rte_flow) { struct rte_flow_error error; int ret = netdev_dpdk_rte_flow_destroy(netdev, rte_flow, &error); @@ -691,10 +692,10 @@ netdev_dpdk_destroy_rte_flow(struct netdev *netdev, } int -netdev_dpdk_flow_put(struct netdev *netdev, struct match *match, - struct nlattr *actions, size_t actions_len, - const ovs_u128 *ufid, struct offload_info *info, - struct dpif_flow_stats *stats OVS_UNUSED) +netdev_rte_offloads_flow_put(struct netdev *netdev, struct match *match, + struct nlattr *actions, size_t actions_len, + const ovs_u128 *ufid, struct offload_info *info, + struct dpif_flow_stats *stats OVS_UNUSED) { struct rte_flow *rte_flow; int ret; @@ -705,24 +706,24 @@ netdev_dpdk_flow_put(struct netdev *netdev, struct match *match, */ rte_flow = ufid_to_rte_flow_find(ufid); if (rte_flow) { - ret = netdev_dpdk_destroy_rte_flow(netdev, ufid, rte_flow); + ret = netdev_rte_offloads_destroy_flow(netdev, ufid, rte_flow); if (ret < 0) { return ret; } } - ret = netdev_dpdk_validate_flow(match); + ret = netdev_rte_offloads_validate_flow(match); if (ret < 0) { return ret; } - return netdev_dpdk_add_rte_flow_offload(netdev, match, actions, - actions_len, ufid, info); + return netdev_rte_offloads_add_flow(netdev, match, actions, + actions_len, ufid, info); } int -netdev_dpdk_flow_del(struct netdev *netdev, const ovs_u128 *ufid, - struct dpif_flow_stats *stats OVS_UNUSED) +netdev_rte_offloads_flow_del(struct netdev *netdev, const ovs_u128 *ufid, + struct dpif_flow_stats *stats OVS_UNUSED) { struct rte_flow *rte_flow = ufid_to_rte_flow_find(ufid); @@ -730,5 +731,5 @@ netdev_dpdk_flow_del(struct netdev *netdev, const ovs_u128 *ufid, return -1; } - return netdev_dpdk_destroy_rte_flow(netdev, ufid, rte_flow); + return netdev_rte_offloads_destroy_flow(netdev, ufid, rte_flow); } diff --git a/lib/netdev-rte-offloads.h b/lib/netdev-rte-offloads.h index afdc0be..3f7d15f 100644 --- a/lib/netdev-rte-offloads.h +++ b/lib/netdev-rte-offloads.h @@ -25,15 +25,16 @@ struct nlattr; struct offload_info; struct dpif_flow_stats; -int netdev_dpdk_flow_put(struct netdev *netdev, struct match *match, - struct nlattr *actions, size_t actions_len, - const ovs_u128 *ufid, struct offload_info *info, - struct dpif_flow_stats *stats); -int netdev_dpdk_flow_del(struct netdev *netdev, const ovs_u128 *ufid, - struct dpif_flow_stats *stats); +int netdev_rte_offloads_flow_put(struct netdev *netdev, struct match *match, + struct nlattr *actions, size_t actions_len, + const ovs_u128 *ufid, + struct offload_info *info, + struct dpif_flow_stats *stats); +int netdev_rte_offloads_flow_del(struct netdev *netdev, const ovs_u128 *ufid, + struct dpif_flow_stats *stats); #define DPDK_FLOW_OFFLOAD_API \ - .flow_put = netdev_dpdk_flow_put, \ - .flow_del = netdev_dpdk_flow_del + .flow_put = netdev_rte_offloads_flow_put, \ + .flow_del = netdev_rte_offloads_flow_del #endif /* netdev-rte-offloads.h */ -- 1.8.3.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
