On 7/9/2022 12:20 AM, David Marchand wrote:
On Fri, Jul 8, 2022 at 10:11 PM Greg Rose <gvrose8...@gmail.com> wrote:

Update the necessary make and configure files to remove the Linux
datapath and then remove the datapath.

Move datapath/linux/compat/include/linux/openvswitch.h to
include/linux/openvswitch.h because it is needed to generate header
files used by the userspace switch.

Signed-off-by: Greg Rose <gvrose8...@gmail.com>
---

[snip]

diff --git a/Makefile.am b/Makefile.am
index cb8076433..520c46012 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,6 @@

  AUTOMAKE_OPTIONS = foreign subdir-objects
  ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = datapath

  AM_CPPFLAGS = $(SSL_CFLAGS)
  AM_LDFLAGS = $(SSL_LDFLAGS)
@@ -198,9 +197,6 @@ CLEAN_LOCAL += clean-pycov
  ALL_LOCAL += dist-hook-git
  dist-hook-git: distfiles
         @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
-         (cd datapath && $(MAKE) distfiles); \
-         (cat distfiles; sed 's|^|datapath/|' datapath/distfiles) | \
-           LC_ALL=C sort -u > all-distfiles; \
           (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \
             grep -v '\.gitattributes$$' | \
             LC_ALL=C sort -u > all-gitfiles; \
@@ -235,7 +231,7 @@ config-h-check:
         @cd $(srcdir); \
         if test -e .git && (git --version) >/dev/null 2>&1 && \
           git --no-pager grep -L '#include <config\.h>' `git ls-files | grep 
'\.c$$' | \
-           grep -vE 
'^datapath|^lib/sflow|^third-party|^datapath-windows|^python'`; \
+           grep -vE '^lib/sflow|^third-party|^datapath-windows|^python'`; \

I prefer alphabetical order, though it was already broken before your
change anyway :-).

Haha - well since I'm in there I can fix it up.



         then \
           echo "See above for list of violations of the rule that"; \
           echo "every C source file must #include <config.h>."; \
@@ -256,7 +252,7 @@ printf-check:
         @cd $(srcdir); \
         if test -e .git && (git --version) >/dev/null 2>&1 && \
           git --no-pager grep -n -E -e '%[-+ #0-9.*]*([ztj]|hh)' --and --not 
-e 'ovs_scan' `git ls-files | grep '\.[ch]$$' | \
-           grep -vE '^datapath|^lib/sflow|^third-party'`; \
+           grep -vE '^lib/sflow|^third-party'`; \

This pattern was matching datapath-windows too.
Should we keep on excluding datapath-windows?
To be safe, I'd say yes.

OK.



         then \
           echo "See above for list of violations of the rule that"; \
           echo "'z', 't', 'j', 'hh' printf() type modifiers are"; \
@@ -299,7 +295,7 @@ check-endian:
         @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \
           (cd $(srcdir) && git --no-pager grep -l -E \
            -e 'BIG_ENDIAN|LITTLE_ENDIAN' --and --not -e 'BYTE_ORDER' | \
-         $(EGREP) -v '^datapath/|^include/sparse/rte_'); \
+         $(EGREP) -v '^include/sparse/rte_'); \
         then \
           echo "See above for list of files that misuse LITTLE""_ENDIAN"; \
           echo "or BIG""_ENDIAN.  Please use WORDS_BIGENDIAN instead."; \
@@ -339,7 +335,7 @@ thread-safety-check:
         if test -e .git && (git --version) >/dev/null 2>&1 && \
           grep -n -f build-aux/thread-safety-forbidden \
             `git ls-files | grep '\.[ch]$$' \
-             | $(EGREP) -v '^datapath|^lib/sflow|^third-party'` /dev/null \
+             | $(EGREP) -v '^lib/sflow|^third-party'` /dev/null \
               | $(EGREP) -v ':[         ]*/?\*'; \
         then \
           echo "See above for list of calls to functions that are"; \

And here too.


Check.



@@ -468,11 +464,6 @@ install-data-local: $(INSTALL_DATA_LOCAL)
  uninstall-local: $(UNINSTALL_LOCAL)
  .PHONY: $(DIST_HOOKS) $(CLEAN_LOCAL) $(INSTALL_DATA_LOCAL) $(UNINSTALL_LOCAL)

-modules_install:
-if LINUX_ENABLED
-       cd datapath/linux && $(MAKE) modules_install
-endif
-
  dist-docs:
         VERSION=$(VERSION) MAKE='$(MAKE)' $(srcdir)/build-aux/dist-docs 
$(srcdir) $(docs)
  .PHONY: dist-docs
diff --git a/configure.ac b/configure.ac
index 59ea0a281..eed4e01bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,6 @@

  AC_PREREQ(2.63)
  AC_INIT(openvswitch, 2.17.90, b...@openvswitch.org)
-AC_CONFIG_SRCDIR([datapath/datapath.c])

I am not sure if we must keep it, though this parameter description
indicates it is strongly recommended, as a safety check.
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/html_node/Input.html#index-AC_005fCONFIG_005fSRCDIR

We may change it to:
+AC_CONFIG_SRCDIR([vswitchd/ovs-vswitchd.c])

That sounds like a good idea - I'll change it to that.



  AC_CONFIG_MACRO_DIR([m4])
  AC_CONFIG_AUX_DIR([build-aux])
  AC_CONFIG_HEADERS([config.h])
@@ -203,10 +202,6 @@ AC_SUBST([OVS_CFLAGS])
  AC_SUBST([OVS_LDFLAGS])

  AC_CONFIG_FILES(Makefile)
-AC_CONFIG_FILES(datapath/Makefile)
-AC_CONFIG_FILES(datapath/linux/Kbuild)
-AC_CONFIG_FILES(datapath/linux/Makefile)
-AC_CONFIG_FILES(datapath/linux/Makefile.main)
  AC_CONFIG_FILES(tests/atlocal)
  AC_CONFIG_FILES(lib/libopenvswitch.pc)
  AC_CONFIG_FILES(lib/libsflow.pc)
diff --git a/datapath-windows/include/automake.mk 
b/datapath-windows/include/automake.mk
index b8dcf83b9..a354f007f 100644
--- a/datapath-windows/include/automake.mk
+++ b/datapath-windows/include/automake.mk
@@ -3,7 +3,7 @@ BUILT_SOURCES += 
$(srcdir)/datapath-windows/include/OvsDpInterface.h
  endif

  $(srcdir)/datapath-windows/include/OvsDpInterface.h: \
-         datapath/linux/compat/include/linux/openvswitch.h \
+         include/linux/openvswitch.h \
           build-aux/extract-odp-netlink-windows-dp-h
         $(AM_V_GEN)sed -f $(srcdir)/build-aux/extract-odp-netlink-windows-dp-h < 
$< > $@


I think we are missing an update of include/linux/automake.mk in this
patch (adding include/linux/openvswitch.h to noinst_HEADERS).

Good catch.

Thanks for the review!

- Greg



_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to