> -----Original Message-----
> From: Ilya Maximets <i.maxim...@samsung.com>
> Sent: Thursday, February 28, 2019 10:30 AM
> To: Ophir Munk <ophi...@mellanox.com>; ovs-dev@openvswitch.org
> Cc: Asaf Penso <as...@mellanox.com>; Ian Stokes <ian.sto...@intel.com>;
> Shahaf Shuler <shah...@mellanox.com>; Olga Shern
> <ol...@mellanox.com>; Kevin Traynor <ktray...@redhat.com>; Roni Bar
> Yanai <ron...@mellanox.com>
> Subject: Re: [PATCH v3 3/3] netdev-rte-offloads: Rename netdev_dpdk_*
> functions
> 
> On 28.02.2019 1:37, Ophir Munk wrote:
> > 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 <ophi...@mellanox.com>
> > ---
> >  lib/netdev-rte-offloads.c | 39
> > ++++++++++++++++++++-------------------
> >  lib/netdev-rte-offloads.h | 17 +++++++++--------
> >  2 files changed, 29 insertions(+), 27 deletions(-)
> >
> > diff --git a/lib/netdev-rte-offloads.c b/lib/netdev-rte-offloads.c
> > index 27432b8..55ab6be 100644
> > --- a/lib/netdev-rte-offloads.c
> > +++ b/lib/netdev-rte-offloads.c
> > @@ -394,12 +394,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,
> > @@ -609,8 +609,9 @@ end_proto_check:
> >      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,
> > -                            actions.actions, &error);
> > +    flow = netdev_dpdk_rte_flow_create(netdev, &flow_attr,
> > +                                       patterns.items,
> > +                                       actions.actions, &error);
> >
> >      free(rss);
> >      if (!flow) {
> > @@ -633,7 +634,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;
> >
> > @@ -712,9 +713,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);
> > @@ -733,7 +734,7 @@ netdev_dpdk_destroy_rte_flow(struct netdev
> > *netdev,  }
> >
> >  int
> > -netdev_dpdk_flow_put(struct netdev *netdev, struct match *match,
> > +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)
> 
> Please, update the alignments.
> 

Fixed in v4

> > @@ -747,23 +748,23 @@ 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,
> > +netdev_rte_offloads_flow_del(struct netdev *netdev, const ovs_u128
> > +*ufid,
> >                       struct dpif_flow_stats *stats OVS_UNUSED)
> 
> Ditto.
> 

Fixed in v4

> >  {
> >      struct rte_flow *rte_flow = ufid_to_rte_flow_find(ufid); @@
> > -772,5 +773,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 6db68fe..5093d7e 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 OVS_UNUSED);
> > -int netdev_dpdk_flow_del(struct netdev *netdev, const ovs_u128 *ufid,
> > -                     struct dpif_flow_stats *stats OVS_UNUSED);
> > +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
> > +OVS_UNUSED); int netdev_rte_offloads_flow_del(struct netdev
> *netdev, const ovs_u128 *ufid,
> > +                                 struct dpif_flow_stats *stats
> > +OVS_UNUSED);
> 
> OVS_UNUSED, probably, not needed.
> 

Fixed in v4

> >
> >  #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 */
> >
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to