[ovs-dev] [PATCH v3 ovn] Include common ovn header files from include/ovn instead of ovs/include/ovn

Numan Siddique nusiddiq at redhat.com
Mon Jul 29 16:23:31 UTC 2019


On Mon, Jul 29, 2019 at 5:23 PM Dumitru Ceara <dceara at redhat.com> wrote:

> On Mon, Jul 29, 2019 at 1:02 PM <nusiddiq at redhat.com> wrote:
> >
> > From: Numan Siddique <nusiddiq at redhat.com>
> >
> > For the other header files present in lib/, the previous commit [1]
> > changed the path. But few were left out. This patch fixes them too.
> >
> > Also updated the end comments in the header files with the correct path.
> >
> > [1] - a469954c00c4("Include ovn header files from lib/ instead of
> ovn/lib/")
> >
> > Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
>
> Acked-by: Dumitru Ceara <dceara at redhat.com>
>
>
Thanks for the review. I pushed it to master.

Numan


> > ---
> >
> > v2 -> v3
> > ======
> >   * Updated the end comments in the header files.
> >
> > v1 -> v2
> > =======
> >  * Addressed Dumitru's comments and updated lib/chassis-index.c
> >
> >
> >  Makefile.am                 | 2 ++
> >  controller/binding.h        | 2 +-
> >  controller/chassis.h        | 2 +-
> >  controller/encaps.h         | 2 +-
> >  controller/ip-mcast.h       | 2 +-
> >  controller/lflow.h          | 2 +-
> >  controller/lport.h          | 2 +-
> >  controller/ofctrl.h         | 2 +-
> >  controller/ovn-controller.h | 2 +-
> >  controller/patch.h          | 2 +-
> >  controller/physical.h       | 2 +-
> >  controller/pinctrl.h        | 2 +-
> >  lib/acl-log.h               | 2 +-
> >  lib/chassis-index.c         | 4 ++--
> >  lib/chassis-index.h         | 2 +-
> >  lib/extend-table.h          | 2 +-
> >  lib/inc-proc-eng.h          | 2 +-
> >  lib/ip-mcast-index.c        | 4 ++--
> >  lib/ip-mcast-index.h        | 2 +-
> >  lib/mcast-group-index.h     | 2 +-
> >  lib/ovn-sb-idl.ann          | 4 ++--
> >  21 files changed, 25 insertions(+), 23 deletions(-)
> >
> > diff --git a/Makefile.am b/Makefile.am
> > index e3dea1912..4fe0d2899 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -19,6 +19,8 @@ AM_CPPFLAGS = $(SSL_CFLAGS)
> >  AM_LDFLAGS = $(SSL_LDFLAGS)
> >  AM_LDFLAGS += $(OVS_LDFLAGS)
> >
> > +AM_CPPFLAGS += -I $(top_srcdir)/include
> > +
> >  if WIN32
> >  AM_CPPFLAGS += -I $(top_srcdir)/ovs/include
> >  AM_CPPFLAGS += -I $(top_srcdir)/ovs/lib
> > diff --git a/controller/binding.h b/controller/binding.h
> > index 8d9492630..bae162ede 100644
> > --- a/controller/binding.h
> > +++ b/controller/binding.h
> > @@ -54,4 +54,4 @@ bool binding_evaluate_port_binding_changes(
> >          struct sset *active_tunnels,
> >          struct sset *local_lports);
> >
> > -#endif /* ovn/binding.h */
> > +#endif /* controller/binding.h */
> > diff --git a/controller/chassis.h b/controller/chassis.h
> > index 16a131a3b..eb46ca3fc 100644
> > --- a/controller/chassis.h
> > +++ b/controller/chassis.h
> > @@ -43,4 +43,4 @@ bool chassis_get_mac(const struct sbrec_chassis
> *chassis,
> >                       struct eth_addr *chassis_mac);
> >  const char *chassis_get_id(void);
> >
> > -#endif /* ovn/chassis.h */
> > +#endif /* controller/chassis.h */
> > diff --git a/controller/encaps.h b/controller/encaps.h
> > index afa41830a..c919d18e6 100644
> > --- a/controller/encaps.h
> > +++ b/controller/encaps.h
> > @@ -45,4 +45,4 @@ bool  encaps_tunnel_id_parse(const char *tunnel_id,
> char **chassis_id,
> >  bool  encaps_tunnel_id_match(const char *tunnel_id, const char
> *chassis_id,
> >                               const char *encap_ip);
> >
> > -#endif /* ovn/encaps.h */
> > +#endif /* controller/encaps.h */
> > diff --git a/controller/ip-mcast.h b/controller/ip-mcast.h
> > index 6014f43d5..b3447d4c7 100644
> > --- a/controller/ip-mcast.h
> > +++ b/controller/ip-mcast.h
> > @@ -49,4 +49,4 @@ void igmp_group_delete(const struct sbrec_igmp_group
> *g);
> >  bool igmp_group_cleanup(struct ovsdb_idl_txn *ovnsb_idl_txn,
> >                          struct ovsdb_idl_index *igmp_groups);
> >
> > -#endif /* ovn/controller/ip-mcast.h */
> > +#endif /* controller/ip-mcast.h */
> > diff --git a/controller/lflow.h b/controller/lflow.h
> > index 4e1086eb6..54da00b49 100644
> > --- a/controller/lflow.h
> > +++ b/controller/lflow.h
> > @@ -181,4 +181,4 @@ void lflow_handle_changed_neighbors(
> >
> >  void lflow_destroy(void);
> >
> > -#endif /* ovn/lflow.h */
> > +#endif /* controller/lflow.h */
> > diff --git a/controller/lport.h b/controller/lport.h
> > index 7dcd5bee0..2d4bb7164 100644
> > --- a/controller/lport.h
> > +++ b/controller/lport.h
> > @@ -49,4 +49,4 @@ const struct sbrec_multicast_group
> *mcgroup_lookup_by_dp_name(
> >      struct ovsdb_idl_index *sbrec_multicast_group_by_name_datapath,
> >      const struct sbrec_datapath_binding *, const char *name);
> >
> > -#endif /* ovn/lport.h */
> > +#endif /* controller/lport.h */
> > diff --git a/controller/ofctrl.h b/controller/ofctrl.h
> > index ed8918aae..114c9ef65 100644
> > --- a/controller/ofctrl.h
> > +++ b/controller/ofctrl.h
> > @@ -84,4 +84,4 @@ void ofctrl_check_and_add_flow(struct
> ovn_desired_flow_table *,
> >  bool ofctrl_is_connected(void);
> >  void ofctrl_set_probe_interval(int probe_interval);
> >
> > -#endif /* ovn/ofctrl.h */
> > +#endif /* controller/ofctrl.h */
> > diff --git a/controller/ovn-controller.h b/controller/ovn-controller.h
> > index be34a24c0..41feec378 100644
> > --- a/controller/ovn-controller.h
> > +++ b/controller/ovn-controller.h
> > @@ -82,4 +82,4 @@ enum chassis_tunnel_type {
> >
> >  uint32_t get_tunnel_type(const char *name);
> >
> > -#endif /* ovn/ovn-controller.h */
> > +#endif /* controller/ovn-controller.h */
> > diff --git a/controller/patch.h b/controller/patch.h
> > index dd052cfd8..9018e4967 100644
> > --- a/controller/patch.h
> > +++ b/controller/patch.h
> > @@ -39,4 +39,4 @@ void patch_run(struct ovsdb_idl_txn *ovs_idl_txn,
> >                 const struct ovsrec_bridge *br_int,
> >                 const struct sbrec_chassis *);
> >
> > -#endif /* ovn/patch.h */
> > +#endif /* controller/patch.h */
> > diff --git a/controller/physical.h b/controller/physical.h
> > index c5544e8de..a85e29734 100644
> > --- a/controller/physical.h
> > +++ b/controller/physical.h
> > @@ -71,4 +71,4 @@ void physical_handle_mc_group_changes(
> >          const struct simap *ct_zones,
> >          const struct hmap *local_datapaths,
> >          struct ovn_desired_flow_table *);
> > -#endif /* ovn/physical.h */
> > +#endif /* controller/physical.h */
> > diff --git a/controller/pinctrl.h b/controller/pinctrl.h
> > index fcfce6bcf..80da28d34 100644
> > --- a/controller/pinctrl.h
> > +++ b/controller/pinctrl.h
> > @@ -48,4 +48,4 @@ void pinctrl_run(struct ovsdb_idl_txn *ovnsb_idl_txn,
> >  void pinctrl_wait(struct ovsdb_idl_txn *ovnsb_idl_txn);
> >  void pinctrl_destroy(void);
> >
> > -#endif /* ovn/pinctrl.h */
> > +#endif /* controller/pinctrl.h */
> > diff --git a/lib/acl-log.h b/lib/acl-log.h
> > index 55dc75b7f..4f23f790d 100644
> > --- a/lib/acl-log.h
> > +++ b/lib/acl-log.h
> > @@ -51,4 +51,4 @@ uint8_t log_severity_from_string(const char *name);
> >
> >  void handle_acl_log(const struct flow *headers, struct ofpbuf
> *userdata);
> >
> > -#endif /* ovn/lib/acl-log.h */
> > +#endif /* lib/acl-log.h */
> > diff --git a/lib/chassis-index.c b/lib/chassis-index.c
> > index 10f70fb4a..39066f4cc 100644
> > --- a/lib/chassis-index.c
> > +++ b/lib/chassis-index.c
> > @@ -13,8 +13,8 @@
> >   */
> >
> >  #include <config.h>
> > -#include "ovn/lib/chassis-index.h"
> > -#include "ovn/lib/ovn-sb-idl.h"
> > +#include "lib/chassis-index.h"
> > +#include "lib/ovn-sb-idl.h"
> >
> >  struct ovsdb_idl_index *
> >  chassis_index_create(struct ovsdb_idl *idl)
> > diff --git a/lib/chassis-index.h b/lib/chassis-index.h
> > index 9bc610ad2..302e5f0fd 100644
> > --- a/lib/chassis-index.h
> > +++ b/lib/chassis-index.h
> > @@ -27,4 +27,4 @@ struct ovsdb_idl_index
> *ha_chassis_group_index_create(struct ovsdb_idl *idl);
> >  const struct sbrec_ha_chassis_group *ha_chassis_group_lookup_by_name(
> >      struct ovsdb_idl_index *sbrec_ha_chassis_grp_by_name, const char
> *name);
> >
> > -#endif /* ovn/lib/chassis-index.h */
> > +#endif /* lib/chassis-index.h */
> > diff --git a/lib/extend-table.h b/lib/extend-table.h
> > index 5be13fee1..833dceda4 100644
> > --- a/lib/extend-table.h
> > +++ b/lib/extend-table.h
> > @@ -79,4 +79,4 @@ uint32_t ovn_extend_table_assign_id(struct
> ovn_extend_table *,
> >      HMAP_FOR_EACH_SAFE (EXISTING, NEXT, hmap_node, &(TABLE)->existing) \
> >          if (!ovn_extend_table_lookup(&(TABLE)->desired, EXISTING))
> >
> > -#endif /* ovn/lib/extend-table.h */
> > +#endif /* lib/extend-table.h */
> > diff --git a/lib/inc-proc-eng.h b/lib/inc-proc-eng.h
> > index aab899e13..6f0d08d96 100644
> > --- a/lib/inc-proc-eng.h
> > +++ b/lib/inc-proc-eng.h
> > @@ -231,4 +231,4 @@ static void
> (*en_##DB_NAME##_##TBL_NAME##_cleanup)(struct engine_node *node) \
> >  #define ENGINE_NODE_OVS(TBL_NAME, TBL_NAME_STR) \
> >      ENGINE_NODE_OVSDB(ovs, "OVS", TBL_NAME, TBL_NAME_STR,
> ovs_idl_loop.idl);
> >
> > -#endif /* ovn/lib/inc-proc-eng.h */
> > +#endif /* lib/inc-proc-eng.h */
> > diff --git a/lib/ip-mcast-index.c b/lib/ip-mcast-index.c
> > index 1f6ebc4ae..6b01041cc 100644
> > --- a/lib/ip-mcast-index.c
> > +++ b/lib/ip-mcast-index.c
> > @@ -15,8 +15,8 @@
> >
> >  #include <config.h>
> >
> > -#include "ovn/lib/ip-mcast-index.h"
> > -#include "ovn/lib/ovn-sb-idl.h"
> > +#include "lib/ip-mcast-index.h"
> > +#include "lib/ovn-sb-idl.h"
> >
> >  struct ovsdb_idl_index *
> >  ip_mcast_index_create(struct ovsdb_idl *idl)
> > diff --git a/lib/ip-mcast-index.h b/lib/ip-mcast-index.h
> > index a23b4a7e6..3ac65798b 100644
> > --- a/lib/ip-mcast-index.h
> > +++ b/lib/ip-mcast-index.h
> > @@ -33,4 +33,4 @@ const struct sbrec_ip_multicast *ip_mcast_lookup(
> >      struct ovsdb_idl_index *ip_mcast_index,
> >      const struct sbrec_datapath_binding *datapath);
> >
> > -#endif /* ovn/lib/ip-mcast-index.h */
> > +#endif /* lib/ip-mcast-index.h */
> > diff --git a/lib/mcast-group-index.h b/lib/mcast-group-index.h
> > index 859e6a72f..15a1592d2 100644
> > --- a/lib/mcast-group-index.h
> > +++ b/lib/mcast-group-index.h
> > @@ -29,4 +29,4 @@ mcast_group_lookup(struct ovsdb_idl_index
> *mcgroup_index,
> >                     const char *name,
> >                     const struct sbrec_datapath_binding *datapath);
> >
> > -#endif /* ovn/lib/mcast-group-index.h */
> > +#endif /* lib/mcast-group-index.h */
> > diff --git a/lib/ovn-sb-idl.ann b/lib/ovn-sb-idl.ann
> > index e51238b92..22124b868 100644
> > --- a/lib/ovn-sb-idl.ann
> > +++ b/lib/ovn-sb-idl.ann
> > @@ -6,9 +6,9 @@
> >  # it can generate more programmer-friendly data structures.
> >
> >  s["idlPrefix"] = "sbrec_"
> > -s["idlHeader"] = "\"ovn/lib/ovn-sb-idl.h\""
> > +s["idlHeader"] = "\"lib/ovn-sb-idl.h\""
> >
> > -s["hDecls"] = '#include "ovn/lib/ovn-util.h"'
> > +s["hDecls"] = '#include "lib/ovn-util.h"'
> >
> >  # Adds an integer column named 'column' to 'table' in 's'.  The column
> >  # values is calculated with 'expression' based on the values of the
> columns
> > --
> > 2.21.0
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list