Re: [ovs-dev] [PATCH v2 python3 0/6] Remove Python 2 support

2019-09-19 Thread Numan Siddique
On Thu, Sep 19, 2019 at 7:29 AM Ben Pfaff  wrote:

> Python 2 will reach end-of-life at the beginning of 2020, in only
> a few months.  This series removes support for Python 2 from OVS
> and requires Python 3.
>
> v1->v2:
> - Fixed build problems found by travis.
> - Added a couple of commits at the beginning to make travis
>   failures more debuggable.
> - Fix test for sphinx-build, which always treated it as present.
> - Use pip3 on Mac OSX instead of pip2.
> - Fix "#! @PYTHON@" lines in numerous scripts to read "#! @PYTHON3@".
>
> Ben Pfaff (6):
>   travis: Obtain testsuite logs from the correct directory.
>   travis: Dump config.log if make fails.
>   Documentation: Work with sphinx-build for Python 3 also.
>   Recommend Sphinx from Python 3 in documentation and packaging.
>   xenserver: Make Python files parse in Python 3 also.
>   Require Python 3 and remove support for Python 2.
>

(I accidently replied to v1 of this series instead of v2, so replying
again).

I tested this series and it builds fine for me.
Acked-by: Numan Siddique  for the whole series with
one correction in patch 4 - which I replied separately.

Thanks
Numan



>  .cirrus.yml   |   3 +-
>  .travis.yml   |   2 +-
>  .travis/linux-build.sh|   4 +-
>  .travis/osx-build.sh  |  10 +-
>  .travis/osx-prepare.sh|   4 +-
>  Documentation/automake.mk |   1 -
>  Documentation/intro/install/documentation.rst |   6 +-
>  Documentation/intro/install/fedora.rst|   4 +-
>  Documentation/intro/install/general.rst   |   8 +-
>  Documentation/intro/install/netbsd.rst|  10 +-
>  Documentation/intro/install/rhel.rst  |   4 +-
>  Documentation/intro/install/windows.rst   |   4 +-
>  Documentation/intro/install/xenserver.rst |   4 +-
>  Makefile.am   |  12 +-
>  Vagrantfile   |  24 +-
>  Vagrantfile-FreeBSD   |   2 +-
>  appveyor.yml  |   2 +-
>  build-aux/check-structs   |   2 +-
>  build-aux/dpdkstrip.py|   2 +-
>  build-aux/extract-ofp-actions |   2 +-
>  build-aux/extract-ofp-errors  |   2 +-
>  build-aux/extract-ofp-fields  |   2 +-
>  build-aux/extract-ofp-msgs|   2 +-
>  build-aux/sodepends.py|   2 +-
>  build-aux/soexpand.py |   2 +-
>  build-aux/text2c  |   2 +-
>  build-aux/xml2nroff   |   2 +-
>  configure.ac  |   3 +-
>  debian/.gitignore |   1 +
>  debian/automake.mk|   4 +-
>  debian/control|  35 +-
>  debian/openvswitch-test.install   |   2 +-
>  debian/python-openvswitch.install |   1 -
>  ...nvswitch.dirs => python3-openvswitch.dirs} |   0
>  debian/python3-openvswitch.install|   1 +
>  debian/rules  |   2 +-
>  include/openflow/automake.mk  |   2 -
>  ipsec/ovs-monitor-ipsec.in|   2 +-
>  m4/openvswitch.m4 | 112 +
>  manpages.mk   |   6 -
>  ovn/automake.mk   |   8 +-
>  ovsdb/ovsdb-dot.in|   2 +-
>  ovsdb/ovsdb-idlc.in   |   2 +-
>  python/automake.mk|   9 +-
>  rhel/openvswitch-fedora.spec.in   |   2 +-
>  rhel/openvswitch.spec.in  |   2 +-
>  tests/atlocal.in  |  42 +-
>  tests/automake.mk |   2 +-
>  tests/check-structs.at|   3 +-
>  tests/checkpatch.at   |  17 +-
>  tests/daemon-py.at| 453 --
>  tests/flowgen.py  |   2 +-
>  tests/interface-reconfigure.at|   2 +-
>  tests/json.at |  57 +--
>  tests/jsonrpc-py.at   |  67 +--
>  tests/library.at  |  42 +-
>  tests/ofproto-dpif.at |  10 +-
>  tests/ofproto.at  |   4 +-
>  tests/ovs-macros.at   |   2 +-
>  tests/ovs-xapi-sync.at|   3 +-
>  tests/ovsdb-data.at   |   9 +-
>  tests/ovsdb-idl.at| 188 ++--
>  tests/ovsdb-macros.at |  52 +-
>  tests/ovsdb-monitor.at|  20 +-
>  tests/reconnect.at|  13 +-
>  tests/system-common-macros.at |   2 

Re: [ovs-dev] [PATCH python3 0/4] Remove Python 2 support

2019-09-19 Thread Numan Siddique
On Wed, Sep 18, 2019 at 11:34 PM Ben Pfaff  wrote:

> Python 2 will reach end-of-life at the beginning of 2020, in only
> a few months.  This series removes support for Python 2 from OVS
> and requires Python 3.
>
> This is currently building on Travis:
> https://travis-ci.org/blp/ovs-reviews/builds/586655314
>
Ben Pfaff (4):
>   Documentation: Work with sphinx-build for Python 3 also.
>   Recommend Sphinx from Python 3 in documentation and packaging.
>   xenserver: Make Python files parse in Python 3 also.
>   Require Python 3 and remove support for Python 2.
>

I tested this series and it builds fine for me.
Acked-by: Numan Siddique  for the whole series with
one correction in patch 4 - which I replied separately.

Thanks
Numan


>  .cirrus.yml   |   3 +-
>  .travis.yml   |   2 +-
>  Documentation/automake.mk |   1 -
>  Documentation/intro/install/documentation.rst |   6 +-
>  Documentation/intro/install/fedora.rst|   4 +-
>  Documentation/intro/install/general.rst   |   8 +-
>  Documentation/intro/install/netbsd.rst|  10 +-
>  Documentation/intro/install/rhel.rst  |   4 +-
>  Documentation/intro/install/windows.rst   |   4 +-
>  Documentation/intro/install/xenserver.rst |   4 +-
>  Makefile.am   |  12 +-
>  Vagrantfile   |  24 +-
>  Vagrantfile-FreeBSD   |   2 +-
>  appveyor.yml  |   2 +-
>  build-aux/check-structs   |   2 +-
>  build-aux/dpdkstrip.py|   2 +-
>  build-aux/extract-ofp-actions |   2 +-
>  build-aux/extract-ofp-errors  |   2 +-
>  build-aux/extract-ofp-fields  |   2 +-
>  build-aux/extract-ofp-msgs|   2 +-
>  build-aux/sodepends.py|   2 +-
>  build-aux/soexpand.py |   2 +-
>  build-aux/text2c  |   2 +-
>  build-aux/xml2nroff   |   2 +-
>  configure.ac  |   3 +-
>  debian/.gitignore |   1 +
>  debian/automake.mk|   4 +-
>  debian/control|  35 +-
>  debian/openvswitch-test.install   |   2 +-
>  debian/python-openvswitch.install |   1 -
>  ...nvswitch.dirs => python3-openvswitch.dirs} |   0
>  debian/python3-openvswitch.install|   1 +
>  debian/rules  |   2 +-
>  include/openflow/automake.mk  |   2 -
>  m4/openvswitch.m4 | 112 +
>  manpages.mk   |   6 -
>  ovn/automake.mk   |   8 +-
>  python/automake.mk|   9 +-
>  rhel/openvswitch-fedora.spec.in   |   2 +-
>  rhel/openvswitch.spec.in  |   2 +-
>  tests/atlocal.in  |  42 +-
>  tests/automake.mk |   2 +-
>  tests/check-structs.at|   3 +-
>  tests/checkpatch.at   |  17 +-
>  tests/daemon-py.at| 453 --
>  tests/flowgen.py  |   2 +-
>  tests/interface-reconfigure.at|   2 +-
>  tests/json.at |  57 +--
>  tests/jsonrpc-py.at   |  67 +--
>  tests/library.at  |  42 +-
>  tests/ofproto-dpif.at |  10 +-
>  tests/ofproto.at  |   4 +-
>  tests/ovs-macros.at   |   2 +-
>  tests/ovs-xapi-sync.at|   3 +-
>  tests/ovsdb-data.at   |   9 +-
>  tests/ovsdb-idl.at| 188 ++--
>  tests/ovsdb-macros.at |  52 +-
>  tests/ovsdb-monitor.at|  20 +-
>  tests/reconnect.at|  13 +-
>  tests/system-common-macros.at |   2 +-
>  tests/system-kmod-macros.at   |   3 +-
>  tests/system-traffic.at   |  16 +-
>  tests/system-userspace-macros.at  |   4 +-
>  tests/unixctl-py.at   | 208 
>  tests/vlog.at | 219 -
>  utilities/automake.mk |   5 +-
>  utilities/bugtool/automake.mk |   2 -
>  utilities/checkpatch.py   |   2 +-
>  vswitchd/automake.mk  |   4 +-
>  vtep/automake.mk  |   4 +-
>  ...urce_libexec_InterfaceReconfigureBridge.py |  10 +-
>  ...xsconsole_plugins-base_XSFeatureVSwitch.py |  14 +-
>  72 files changed, 654 insertions(+), 1123 

Re: [ovs-dev] [PATCH v2 python3 4/6] Recommend Sphinx from Python 3 in documentation and packaging.

2019-09-19 Thread Numan Siddique
On Thu, Sep 19, 2019 at 7:31 AM Ben Pfaff  wrote:

> Signed-off-by: Ben Pfaff 
> ---
>  .travis.yml   | 2 +-
>  Documentation/intro/install/documentation.rst | 6 +++---
>  Documentation/intro/install/rhel.rst  | 2 +-
>  rhel/openvswitch-fedora.spec.in   | 2 +-
>  rhel/openvswitch.spec.in  | 2 +-
>  5 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 370b3d0a6c98..68026312ba84 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -20,7 +20,7 @@ addons:
>- libjemalloc1
>- libjemalloc-dev
>- libnuma-dev
> -  - python-sphinx
> +  - python3-sphinx
>- libelf-dev
>- selinux-policy-dev
>- libunbound-dev
> diff --git a/Documentation/intro/install/documentation.rst
> b/Documentation/intro/install/documentation.rst
> index d7eb25d9ef06..acf5b3a3ff33 100644
> --- a/Documentation/intro/install/documentation.rst
> +++ b/Documentation/intro/install/documentation.rst
> @@ -45,11 +45,11 @@ Sphinx. A detailed guide on installing Sphinx in many
> environments is available
>  on the `Sphinx website`__ but, for most Linux distributions, you can
> install
>  with your package manager. For example, on Debian/Ubuntu run::
>
> -$ sudo apt-get install python-sphinx
> +$ sudo apt-get install python3-sphinx
>
>  Similarly, on RHEL/Fedora run::
>
> -$ sudo dnf install python-sphinx
> +$ sudo dnf install python3-sphinx
>
>  A ``requirements.txt`` is also provided in the ``/Documentation``, should
> you
>  wish to install using ``pip``::
> @@ -71,7 +71,7 @@ available on the `Sphinx website`__.
>  Building
>  
>
> -Once Sphinx installed, the documentation can be built using the provided
> +Once Sphinx is installed, the documentation can be built using the
> provided
>  Makefile targets::
>
>  $ make docs-check
> diff --git a/Documentation/intro/install/rhel.rst
> b/Documentation/intro/install/rhel.rst
> index 6f062e89446a..0e5ca2743ef5 100644
> --- a/Documentation/intro/install/rhel.rst
> +++ b/Documentation/intro/install/rhel.rst
> @@ -89,7 +89,7 @@ And to install specific dependencies, use yum-builddep
> tool::
>
>  Once that is completed, remove the file ``/tmp/ovs.spec``.
>
> -If python-sphinx package is not available in your version of RHEL, you can
> +If python3-sphinx package is not available in your version of RHEL, you
> can
>  install it via pip with 'pip install sphinx'.
>
>  Open vSwitch requires python 2.7 or newer which is not available in older
> diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/
> openvswitch-fedora.spec.in
> index 9c752ff4ed4e..9c407123296a 100644
> --- a/rhel/openvswitch-fedora.spec.in
> +++ b/rhel/openvswitch-fedora.spec.in
> @@ -79,7 +79,7 @@ BuildRequires: python3-devel
>  BuildRequires: desktop-file-utils
>  BuildRequires: groff graphviz
>  BuildRequires: checkpolicy, selinux-policy-devel
> -BuildRequires: /usr/bin/sphinx-build
> +BuildRequires: /usr/bin/sphinx3-build
>

This needs to be changed to - /usr/bin/sphinx-build-3

make rpm-fedora is failing for me.

The python3-sphinx rpm package install /usr/bin/sphinx-build-3.


Thanks
Numan


>  # make check dependencies
>  BuildRequires: %{_py2}-twisted%{?rhel:-core} %{_py2}-zope-interface
> %{_py2}-six
>  BuildRequires: procps-ng
> diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
> index c8361f5f29ff..7f27fedd6886 100644
> --- a/rhel/openvswitch.spec.in
> +++ b/rhel/openvswitch.spec.in
> @@ -37,7 +37,7 @@ BuildRequires: python-six
>  BuildRequires: openssl-devel
>  BuildRequires: checkpolicy, selinux-policy-devel
>  BuildRequires: autoconf, automake, libtool
> -BuildRequires: python-sphinx
> +BuildRequires: python3-sphinx
>  BuildRequires: unbound-devel
>
>  %bcond_without check
> --
> 2.21.0
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/2 ovn] OVN: Fix container build.

2019-09-19 Thread Numan Siddique
On Fri, Sep 20, 2019 at 2:15 AM  wrote:

> From: Aliasgar Ginwala 
>
> Current code changes in ovs/ovn split replaced openvswitch with ovn and
> caused container patches to break.
> Also, as per ff4439d, one should build ovn specifying ovs source.
> This patch fixes the same.
>
> Signed-off-by: Aliasgar Ginwala 
>

Thanks. I  applied this series to master.

Numan


> ---
>  utilities/automake.mk  |  1 -
>  utilities/docker/create_ovn_dbs.sh | 18 --
>  utilities/docker/debian/Dockerfile | 12 +---
>  utilities/docker/debian/build.sh   | 20 +---
>  utilities/docker/start-ovn | 26 +-
>  5 files changed, 35 insertions(+), 42 deletions(-)
>  delete mode 100755 utilities/docker/create_ovn_dbs.sh
>
> diff --git a/utilities/automake.mk b/utilities/automake.mk
> index ab0f6003a..197cc7011 100644
> --- a/utilities/automake.mk
> +++ b/utilities/automake.mk
> @@ -35,7 +35,6 @@ EXTRA_DIST += \
>  utilities/checkpatch.py \
>  utilities/docker/Makefile \
>  utilities/docker/start-ovn \
> -utilities/docker/create_ovn_dbs.sh \
>  utilities/docker/ovn_default_nb_port \
>  utilities/docker/ovn_default_sb_port \
>  utilities/docker/ovn_default_northd_host \
> diff --git a/utilities/docker/create_ovn_dbs.sh
> b/utilities/docker/create_ovn_dbs.sh
> deleted file mode 100755
> index 43ab367d6..0
> --- a/utilities/docker/create_ovn_dbs.sh
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -#!/bin/sh
> -#
> -# Licensed under the Apache License, Version 2.0 (the "License");
> -# you may not use this file except in compliance with the License.
> -# You may obtain a copy of the License at:
> -#
> -# http://www.apache.org/licenses/LICENSE-2.0
> -#
> -# Unless required by applicable law or agreed to in writing, software
> -# distributed under the License is distributed on an "AS IS" BASIS,
> -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> -# See the License for the specific language governing permissions and
> -# limitations under the License.
> -
> -ovsdb-tool create /etc/openvswitch/ovnnb_db.db \
> -/usr/share/openvswitch/ovn-nb.ovsschema
> -ovsdb-tool create /etc/openvswitch/ovnsb_db.db \
> -/usr/share/openvswitch/ovn-sb.ovsschema
> diff --git a/utilities/docker/debian/Dockerfile
> b/utilities/docker/debian/Dockerfile
> index fe72c3a33..30504480d 100644
> --- a/utilities/docker/debian/Dockerfile
> +++ b/utilities/docker/debian/Dockerfile
> @@ -9,14 +9,12 @@ ARG DISTRO
>  copy $DISTRO/build.sh /build.sh
>  RUN /build.sh $KERNEL_VERSION $OVN_BRANCH $GITHUB_SRC
>
> -COPY create_ovn_dbs.sh /etc/openvswitch/create_ovn_dbs.sh
> -RUN /etc/openvswitch/create_ovn_dbs.sh
> -
> -COPY ovn_default_nb_port /etc/openvswitch/ovn_default_nb_port
> -COPY ovn_default_sb_port /etc/openvswitch/ovn_default_sb_port
> -COPY ovn_default_northd_host /etc/openvswitch/ovn_default_northd_host
> +COPY ovn_default_nb_port /etc/ovn/ovn_default_nb_port
> +COPY ovn_default_sb_port /etc/ovn/ovn_default_sb_port
> +COPY ovn_default_northd_host /etc/ovn/ovn_default_northd_host
>
>  COPY start-ovn /bin/start-ovn
>  VOLUME ["/var/log/openvswitch", \
> -"/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch"]
> +"/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch", \
> +"/var/log/ovn", "/var/lib/ovn", "/var/run/ovn", "/etc/ovn"]
>  ENTRYPOINT ["start-ovn"]
> diff --git a/utilities/docker/debian/build.sh
> b/utilities/docker/debian/build.sh
> index fd26a8aa8..3c404bc39 100755
> --- a/utilities/docker/debian/build.sh
> +++ b/utilities/docker/debian/build.sh
> @@ -25,20 +25,34 @@ dh-autoreconf openssl"
>  apt-get update
>  apt-get install -y ${linux} ${build_deps}
>
> -# get the source
> +# get ovs source always from master as its needed as dependency
>  mkdir /build; cd /build
> +git clone --depth 1 -b master https://github.com/openvswitch/ovs.git
> +cd ovs;
> +mkdir _gcc;
> +
> +# build and install
> +./boot.sh
> +cd _gcc
> +../configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
> +--with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl
> +cd ..; make -C _gcc install; cd ..
> +
> +
> +# get ovn source
>  git clone --depth 1 -b $OVN_BRANCH $GITHUB_SRC
>  cd ovn
>
>  # build and install
>  ./boot.sh
>  ./configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
> ---with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl
> +--with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl \
> +--with-ovs-source=/build/ovs/ --with-ovs-build=/build/ovs/_gcc
>  make -j8; make install
>
>  # remove deps to make the container light weight.
>  apt-get remove --purge -y ${build_deps}
>  apt-get autoremove -y --purge
> -cd ..; rm -rf ovn
> +cd ..; rm -rf ovn; rm -rf ovs
>  basic_utils="vim kmod net-tools uuid-runtime iproute2"
>  apt-get install -y ${basic_utils}
> diff --git a/utilities/docker/start-ovn b/utilities/docker/start-ovn
> index 7f87e65a3..7457836fe 100755
> --- 

Re: [ovs-dev] [PATCH v10] ovsdb-tool: Convert clustered db to standalone db.

2019-09-19 Thread aginwala
Hi Ben:

Just a gentle reminder. Can you please help merge this patch if no
additional comments? Got acked-by Han on the same already.

On Fri, Aug 30, 2019 at 8:30 AM  wrote:

> From: Aliasgar Ginwala 
>
> Add support in ovsdb-tool for migrating clustered dbs to standalone dbs.
> E.g. usage to migrate nb/sb db to standalone db from raft:
> ovsdb-tool cluster-to-standalone ovnnb_db.db ovnnb_db_cluster.db
>
> Signed-off-by: Aliasgar Ginwala 
> Acked-by: Han Zhou 
> ---
>  Documentation/ref/ovsdb.7.rst |   3 +
>  NEWS  |   3 +
>  ovsdb/ovsdb-tool.1.in |   8 +++
>  ovsdb/ovsdb-tool.c| 101 +-
>  tests/ovsdb-tool.at   |  38 +
>  5 files changed, 152 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/ref/ovsdb.7.rst b/Documentation/ref/ovsdb.7.rst
> index cd1c63d64..b12d8066c 100644
> --- a/Documentation/ref/ovsdb.7.rst
> +++ b/Documentation/ref/ovsdb.7.rst
> @@ -514,6 +514,9 @@ standalone database from the contents of a running
> clustered database.
>  When the cluster is down and cannot be revived, ``ovsdb-client backup``
> will
>  not work.
>
> +Use ``ovsdb-tool cluster-to-standalone`` to convert clustered database to
> +standalone database when the cluster is down and cannot be revived.
> +
>  Upgrading or Downgrading a Database
>  ---
>
> diff --git a/NEWS b/NEWS
> index c5caa13d6..a02f9f1a6 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -49,6 +49,9 @@ v2.12.0 - xx xxx 
> quickly after a brief disconnection, saving bandwidth and CPU time.
> See section 4.1.15 of ovsdb-server(7) for details of related OVSDB
> protocol extension.
> + * Support to convert from cluster database to standalone database is
> now
> +   available when clustered is down and cannot be revived using
> ovsdb-tool
> +   . Check "Database Migration Commands" in ovsdb-tool man section.
> - OVN:
>   * IPAM/MACAM:
> - select IPAM mac_prefix in a random manner if not provided by the
> user
> diff --git a/ovsdb/ovsdb-tool.1.in b/ovsdb/ovsdb-tool.1.in
> index ec85e14c4..31a918d90 100644
> --- a/ovsdb/ovsdb-tool.1.in
> +++ b/ovsdb/ovsdb-tool.1.in
> @@ -147,6 +147,14 @@ avoid this possibility, specify
> \fB\-\-cid=\fIuuid\fR, where
>  \fIuuid\fR is the cluster ID of the cluster to join, as printed by
>  \fBovsdb\-tool get\-cid\fR.
>  .
> +.SS "Database Migration Commands"
> +This commands will convert cluster database to standalone database.
> +.
> +.IP "\fBcluster\-to\-standalone\fI db clusterdb"
> +Use this command to convert to standalone database from clustered database
> +when the cluster is down and cannot be revived. It creates new standalone
> +\fIdb\fR file from the given cluster \fIdb\fR file.
> +.
>  .SS "Version Management Commands"
>  .so ovsdb/ovsdb-schemas.man
>  .PP
> diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c
> index 438f97590..3bbf4c8bc 100644
> --- a/ovsdb/ovsdb-tool.c
> +++ b/ovsdb/ovsdb-tool.c
> @@ -173,6 +173,9 @@ usage(void)
> "  compare-versions A OP B  compare OVSDB schema version
> numbers\n"
> "  query [DB] TRNS execute read-only transaction on
> DB\n"
> "  transact [DB] TRNS  execute read/write transaction on
> DB\n"
> +   "  cluster-to-standalone DB DBConvert clustered DB to\n"
> +   "  standalone DB when cluster is down and cannot be\n"
> +   "revived\n"
> "  [-m]... show-log [DB]   print DB's log entries\n"
> "The default DB is %s.\n"
> "The default SCHEMA is %s.\n",
> @@ -942,6 +945,55 @@ print_raft_record(const struct raft_record *r,
>  }
>  }
>
> +static void
> +raft_header_to_standalone_log(const struct raft_header *h,
> +  struct ovsdb_log *db_log_data)
> +{
> +if (h->snap_index) {
> +if (!h->snap.data || json_array(h->snap.data)->n != 2) {
> +ovs_fatal(0, "Incorrect raft header data array length");
> +}
> +
> +struct json *schema_json = json_array(h->snap.data)->elems[0];
> +if (schema_json->type != JSON_NULL) {
> +struct ovsdb_schema *schema;
> +check_ovsdb_error(ovsdb_schema_from_json(schema_json,
> ));
> +ovsdb_schema_destroy(schema);
> +check_ovsdb_error(ovsdb_log_write_and_free(db_log_data,
> +   schema_json));
> +}
> +
> +struct json *data_json = json_array(h->snap.data)->elems[1];
> +if (!data_json || data_json->type != JSON_OBJECT) {
> +ovs_fatal(0, "Invalid raft header data");
> +}
> +if (data_json->type != JSON_NULL) {
> +check_ovsdb_error(ovsdb_log_write_and_free(db_log_data,
> +   data_json));
> +}
> +}
> +}
> +
> +static void
> +raft_record_to_standalone_log(const struct raft_record *r,

Re: [ovs-dev] [PATCH branch-2.8] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread 0-day Robot
Bleep bloop.  Greetings Gregory Rose, I am a robot and I have tried out your 
patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Unexpected sign-offs from developers who are not authors or co-authors 
or committers: Ben Pfaff 
Lines checked: 206, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-2.7] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread 0-day Robot
Bleep bloop.  Greetings Gregory Rose, I am a robot and I have tried out your 
patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Unexpected sign-offs from developers who are not authors or co-authors 
or committers: Ben Pfaff 
Lines checked: 194, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-2.6] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread 0-day Robot
Bleep bloop.  Greetings Gregory Rose, I am a robot and I have tried out your 
patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Unexpected sign-offs from developers who are not authors or co-authors 
or committers: Ben Pfaff 
Lines checked: 180, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [Branch 2.9 Patch] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread Gregory Rose



On 9/19/2019 10:04 AM, Gregory Rose wrote:


On 9/19/2019 4:53 AM, Vishal Deep Ajmera wrote:
Upstream commit 648700f76b03 ("inet: frags: use rhashtables...") 
changed

how ipv6 fragmentation is implemented.  This patch was backported to
the upstream stable 4.9.x kernel starting at 4.9.135.

This patch creates the compatibility layer changes required to both
compile and also operate correctly with ipv6 fragmentation on these
kernels. Check if the inet_frags 'rnd' field is present to key on
whether the upstream patch is present.  Also update Travis to the
latest 4.9 kernel release so that this patch is compile tested.

Passes Travis:
https://travis-ci.org/gvrose8192/ovs-experimental/builds/478033409


Hi Ben, Greg,

We are using OVS 2.6 branch and facing same issue with kernel 4.4.177
(ubuntu-4.4.0.148). Looks like this field 'rnd' is not present in 
inet_frags

structure here.

Is it possible to get a backport of this patch on 2.6  & 2.8 branch 
as well

?

Warm Regards,
Vishal Ajmera


I'll be able to provide the patches but you will need to test them 
since I no longer have an
environment that will build branches older than 2.8.  I'll post 
patches for 2.8, 2.7 and 2.6

in a bit.


The patches are posted Vishal, please test and review.

Thanks,

- Greg

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


[ovs-dev] [PATCH branch-2.8] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread Greg Rose
Upstream commit 648700f76b03 ("inet: frags: use rhashtables...") changed
how ipv6 fragmentation is implemented.  This patch was backported to
the upstream stable 4.9.x kernel starting at 4.9.135.

This patch creates the compatibility layer changes required to both
compile and also operate correctly with ipv6 fragmentation on these
kernels. Check if the inet_frags 'rnd' field is present to key on
whether the upstream patch is present.  Also update Travis to the
latest 4.9 kernel release so that this patch is compile tested.

Passes Travis with just a few unrelated errors:
https://travis-ci.org/gvrose8192/ovs-experimental/builds/587124329

Cc: William Tu 
Cc: Yi-Hung Wei 
Cc: Yifeng Sun 
Acked-by: Yi-Hung Wei 
Signed-off-by: Greg Rose 
Signed-off-by: Ben Pfaff 
---
 .travis.yml|  2 +-
 acinclude.m4   |  3 ++
 datapath/linux/compat/nf_conntrack_reasm.c | 54 --
 3 files changed, 56 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 935424b..37ed0bd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,7 +30,7 @@ env:
   - KERNEL=3.16.46 DPDK=1 OPTS="--enable-shared"
   - KERNEL=4.12.2
   - KERNEL=4.11.11
-  - KERNEL=4.9.38
+  - KERNEL=4.9.149
   - KERNEL=4.4.77
   - KERNEL=4.1.42
   - KERNEL=3.10.107
diff --git a/acinclude.m4 b/acinclude.m4
index e0dca2a..8a515d6 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -769,6 +769,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_helper.h],
   [nf_conntrack_helper_put],
   [OVS_DEFINE(HAVE_NF_CONNTRACK_HELPER_PUT)])
+  OVS_FIND_FIELD_IFELSE([$KSRC/include/net/inet_frag.h], [inet_frags],
+[rnd],
+[OVS_DEFINE([HAVE_INET_FRAGS_RND])])
 
   if cmp -s datapath/linux/kcompat.h.new \
 datapath/linux/kcompat.h >/dev/null 2>&1; then
diff --git a/datapath/linux/compat/nf_conntrack_reasm.c 
b/datapath/linux/compat/nf_conntrack_reasm.c
index ce13112..9d77d98 100644
--- a/datapath/linux/compat/nf_conntrack_reasm.c
+++ b/datapath/linux/compat/nf_conntrack_reasm.c
@@ -99,6 +99,7 @@ static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h)
return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK);
 }
 
+#ifdef HAVE_INET_FRAGS_RND
 static unsigned int nf_hash_frag(__be32 id, const struct in6_addr *saddr,
 const struct in6_addr *daddr)
 {
@@ -125,6 +126,7 @@ static unsigned int nf_hashfn(struct inet_frag_queue *q)
return nf_hash_frag(nq->id, >saddr, >daddr);
 }
 
+#endif /* HAVE_INET_FRAGS_RND */
 static void nf_ct_frag6_expire(unsigned long data)
 {
struct frag_queue *fq;
@@ -133,9 +135,14 @@ static void nf_ct_frag6_expire(unsigned long data)
fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
net = get_net_from_netns_frags6(fq->q.net);
 
+#ifdef HAVE_INET_FRAGS_RND
ip6_expire_frag_queue(net, fq, _frags);
+#else
+   ip6_expire_frag_queue(net, fq);
+#endif
 }
 
+#ifdef HAVE_INET_FRAGS_RND
 /* Creation primitives. */
 static inline struct frag_queue *fq_find(struct net *net, __be32 id,
 u32 user, struct in6_addr *src,
@@ -168,7 +175,27 @@ static inline struct frag_queue *fq_find(struct net *net, 
__be32 id,
}
return container_of(q, struct frag_queue, q);
 }
+#else
+static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
+ const struct ipv6hdr *hdr, int iif)
+{
+   struct frag_v6_compare_key key = {
+   .id = id,
+   .saddr = hdr->saddr,
+   .daddr = hdr->daddr,
+   .user = user,
+   .iif = iif,
+   };
+   struct inet_frag_queue *q;
+
+   q = inet_frag_find(>nf_frag.frags, );
+   if (!q)
+   return NULL;
+
+   return container_of(q, struct frag_queue, q);
+}
 
+#endif  /* HAVE_INET_FRAGS_RND */
 
 static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
 const struct frag_hdr *fhdr, int nhoff)
@@ -317,7 +344,11 @@ found:
return 0;
 
 discard_fq:
+#ifdef HAVE_INET_FRAGS_RND
inet_frag_kill(>q, _frags);
+#else
+   inet_frag_kill(>q);
+#endif
 err:
return -1;
 }
@@ -339,7 +370,11 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff 
*prev,  struct net_devic
intpayload_len;
u8 ecn;
 
+#ifdef HAVE_INET_FRAGS_RND
inet_frag_kill(>q, _frags);
+#else
+   inet_frag_kill(>q);
+#endif
 
WARN_ON(head == NULL);
WARN_ON(NFCT_FRAG6_CB(head)->offset != 0);
@@ -561,8 +596,13 @@ int rpl_nf_ct_frag6_gather(struct net *net, struct sk_buff 
*skb, u32 user)
 #endif
 
skb_orphan(skb);
+#ifdef HAVE_INET_FRAGS_RND
fq = fq_find(net, fhdr->identification, user, >saddr, >daddr,
 ip6_frag_ecn(hdr));
+#else
+   

[ovs-dev] [PATCH branch-2.7] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread Greg Rose
Upstream commit 648700f76b03 ("inet: frags: use rhashtables...") changed
how ipv6 fragmentation is implemented.  This patch was backported to
the upstream stable 4.9.x kernel starting at 4.9.135.

This patch creates the compatibility layer changes required to both
compile and also operate correctly with ipv6 fragmentation on these
kernels. Check if the inet_frags 'rnd' field is present to key on
whether the upstream patch is present.  Also update Travis to the
latest 4.9 kernel release so that this patch is compile tested.

Passes Travis with one unrelated error:
https://travis-ci.org/gvrose8192/ovs-experimental/builds/587124155

Cc: William Tu 
Cc: Yi-Hung Wei 
Cc: Yifeng Sun 
Acked-by: Yi-Hung Wei 
Signed-off-by: Greg Rose 
Signed-off-by: Ben Pfaff 
---
 .travis.yml|  2 +-
 acinclude.m4   |  4 ++-
 datapath/linux/compat/nf_conntrack_reasm.c | 52 --
 3 files changed, 54 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a30e913..a4da7af 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,7 +28,7 @@ env:
   - BUILD_ENV="-m32" OPTS="--disable-ssl"
   - KERNEL=3.16.39 DPDK=1
   - KERNEL=3.16.39 DPDK=1 OPTS="--enable-shared"
-  - KERNEL=4.9
+  - KERNEL=4.9.149
   - KERNEL=4.8.14
   - KERNEL=4.4.38
   - KERNEL=4.1.36
diff --git a/acinclude.m4 b/acinclude.m4
index cb67d51..18009d5 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -701,7 +701,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
 [OVS_DEFINE([HAVE_UDP_ADD_OFFLOAD_TAKES_NET])])
   OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [family_list],
 [OVS_DEFINE([HAVE_GENL_FAMILY_LIST])])
-
+  OVS_FIND_FIELD_IFELSE([$KSRC/include/net/inet_frag.h], [inet_frags],
+[rnd],
+[OVS_DEFINE([HAVE_INET_FRAGS_RND])])
 
   if cmp -s datapath/linux/kcompat.h.new \
 datapath/linux/kcompat.h >/dev/null 2>&1; then
diff --git a/datapath/linux/compat/nf_conntrack_reasm.c 
b/datapath/linux/compat/nf_conntrack_reasm.c
index fb0a746..dffab9a 100644
--- a/datapath/linux/compat/nf_conntrack_reasm.c
+++ b/datapath/linux/compat/nf_conntrack_reasm.c
@@ -73,6 +73,7 @@ static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h)
return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK);
 }
 
+#ifdef HAVE_INET_FRAGS_RND
 static unsigned int nf_hash_frag(__be32 id, const struct in6_addr *saddr,
 const struct in6_addr *daddr)
 {
@@ -99,6 +100,7 @@ static unsigned int nf_hashfn(struct inet_frag_queue *q)
return nf_hash_frag(nq->id, >saddr, >daddr);
 }
 
+#endif /* HAVE_INET_FRAGS_RND */
 static void nf_ct_frag6_expire(unsigned long data)
 {
struct frag_queue *fq;
@@ -107,9 +109,14 @@ static void nf_ct_frag6_expire(unsigned long data)
fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
net = container_of(fq->q.net, struct net, nf_frag.frags);
 
+#ifdef HAVE_INET_FRAGS_RND
ip6_expire_frag_queue(net, fq, _frags);
+#else
+   ip6_expire_frag_queue(net, fq);
+#endif
 }
 
+#ifdef HAVE_INET_FRAGS_RND
 /* Creation primitives. */
 static inline struct frag_queue *fq_find(struct net *net, __be32 id,
 u32 user, struct in6_addr *src,
@@ -140,7 +147,27 @@ static inline struct frag_queue *fq_find(struct net *net, 
__be32 id,
}
return container_of(q, struct frag_queue, q);
 }
+#else
+static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
+ const struct ipv6hdr *hdr, int iif)
+{
+   struct frag_v6_compare_key key = {
+   .id = id,
+   .saddr = hdr->saddr,
+   .daddr = hdr->daddr,
+   .user = user,
+   .iif = iif,
+   };
+   struct inet_frag_queue *q;
 
+   q = inet_frag_find(>nf_frag.frags, );
+   if (!q)
+   return NULL;
+
+   return container_of(q, struct frag_queue, q);
+}
+
+#endif  /* HAVE_INET_FRAGS_RND */
 
 static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
 const struct frag_hdr *fhdr, int nhoff)
@@ -289,7 +316,11 @@ found:
return 0;
 
 discard_fq:
+#ifdef HAVE_INET_FRAGS_RND
inet_frag_kill(>q, _frags);
+#else
+   inet_frag_kill(>q);
+#endif
 err:
return -1;
 }
@@ -311,7 +342,11 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff 
*prev,  struct net_devic
intpayload_len;
u8 ecn;
 
+#ifdef HAVE_INET_FRAGS_RND
inet_frag_kill(>q, _frags);
+#else
+   inet_frag_kill(>q);
+#endif
 
WARN_ON(head == NULL);
WARN_ON(NFCT_FRAG6_CB(head)->offset != 0);
@@ -530,8 +565,13 @@ int nf_ct_frag6_gather(struct net *net, struct sk_buff 
*skb, u32 user)
local_bh_enable();
 #endif
 
+#ifdef HAVE_INET_FRAGS_RND
fq = fq_find(net, fhdr->identification, user, >saddr, >daddr,
 

[ovs-dev] [PATCH branch-2.6] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread Greg Rose
Upstream commit 648700f76b03 ("inet: frags: use rhashtables...") changed
how ipv6 fragmentation is implemented.  This patch was backported to
the upstream stable 4.9.x kernel starting at 4.9.135.

This patch creates the compatibility layer changes required to both
compile and also operate correctly with ipv6 fragmentation on these
kernels. Check if the inet_frags 'rnd' field is present to key on
whether the upstream patch is present.  Also update Travis to the
latest 4.9 kernel release so that this patch is compile tested.

Passes Travis:
https://travis-ci.org/gvrose8192/ovs-experimental/builds/587185472

Cc: William Tu 
Cc: Yi-Hung Wei 
Cc: Yifeng Sun 
Acked-by: Yi-Hung Wei 
Signed-off-by: Greg Rose 
Signed-off-by: Ben Pfaff 
---
 acinclude.m4   |  4 ++-
 datapath/linux/compat/nf_conntrack_reasm.c | 52 --
 2 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 55d2784..d52974c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -694,7 +694,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_FIND_PARAM_IFELSE([$KSRC/include/net/protocol.h],
 [udp_add_offload], [net],
 [OVS_DEFINE([HAVE_UDP_ADD_OFFLOAD_TAKES_NET])])
-
+  OVS_FIND_FIELD_IFELSE([$KSRC/include/net/inet_frag.h], [inet_frags],
+[rnd],
+[OVS_DEFINE([HAVE_INET_FRAGS_RND])])
 
   if cmp -s datapath/linux/kcompat.h.new \
 datapath/linux/kcompat.h >/dev/null 2>&1; then
diff --git a/datapath/linux/compat/nf_conntrack_reasm.c 
b/datapath/linux/compat/nf_conntrack_reasm.c
index fb0a746..dffab9a 100644
--- a/datapath/linux/compat/nf_conntrack_reasm.c
+++ b/datapath/linux/compat/nf_conntrack_reasm.c
@@ -73,6 +73,7 @@ static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h)
return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK);
 }
 
+#ifdef HAVE_INET_FRAGS_RND
 static unsigned int nf_hash_frag(__be32 id, const struct in6_addr *saddr,
 const struct in6_addr *daddr)
 {
@@ -99,6 +100,7 @@ static unsigned int nf_hashfn(struct inet_frag_queue *q)
return nf_hash_frag(nq->id, >saddr, >daddr);
 }
 
+#endif /* HAVE_INET_FRAGS_RND */
 static void nf_ct_frag6_expire(unsigned long data)
 {
struct frag_queue *fq;
@@ -107,9 +109,14 @@ static void nf_ct_frag6_expire(unsigned long data)
fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
net = container_of(fq->q.net, struct net, nf_frag.frags);
 
+#ifdef HAVE_INET_FRAGS_RND
ip6_expire_frag_queue(net, fq, _frags);
+#else
+   ip6_expire_frag_queue(net, fq);
+#endif
 }
 
+#ifdef HAVE_INET_FRAGS_RND
 /* Creation primitives. */
 static inline struct frag_queue *fq_find(struct net *net, __be32 id,
 u32 user, struct in6_addr *src,
@@ -140,7 +147,27 @@ static inline struct frag_queue *fq_find(struct net *net, 
__be32 id,
}
return container_of(q, struct frag_queue, q);
 }
+#else
+static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
+ const struct ipv6hdr *hdr, int iif)
+{
+   struct frag_v6_compare_key key = {
+   .id = id,
+   .saddr = hdr->saddr,
+   .daddr = hdr->daddr,
+   .user = user,
+   .iif = iif,
+   };
+   struct inet_frag_queue *q;
 
+   q = inet_frag_find(>nf_frag.frags, );
+   if (!q)
+   return NULL;
+
+   return container_of(q, struct frag_queue, q);
+}
+
+#endif  /* HAVE_INET_FRAGS_RND */
 
 static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
 const struct frag_hdr *fhdr, int nhoff)
@@ -289,7 +316,11 @@ found:
return 0;
 
 discard_fq:
+#ifdef HAVE_INET_FRAGS_RND
inet_frag_kill(>q, _frags);
+#else
+   inet_frag_kill(>q);
+#endif
 err:
return -1;
 }
@@ -311,7 +342,11 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff 
*prev,  struct net_devic
intpayload_len;
u8 ecn;
 
+#ifdef HAVE_INET_FRAGS_RND
inet_frag_kill(>q, _frags);
+#else
+   inet_frag_kill(>q);
+#endif
 
WARN_ON(head == NULL);
WARN_ON(NFCT_FRAG6_CB(head)->offset != 0);
@@ -530,8 +565,13 @@ int nf_ct_frag6_gather(struct net *net, struct sk_buff 
*skb, u32 user)
local_bh_enable();
 #endif
 
+#ifdef HAVE_INET_FRAGS_RND
fq = fq_find(net, fhdr->identification, user, >saddr, >daddr,
 ip6_frag_ecn(hdr));
+#else
+   fq = fq_find(net, fhdr->identification, user, hdr,
+skb->dev ? skb->dev->ifindex : 0);
+#endif
if (fq == NULL)
return -ENOMEM;
 
@@ -553,7 +593,11 @@ int nf_ct_frag6_gather(struct net *net, struct sk_buff 
*skb, u32 user)
 
 out_unlock:
spin_unlock_bh(>q.lock);
+#ifdef HAVE_INET_FRAGS_RND
inet_frag_put(>q, _frags);
+#else
+ 

Re: [ovs-dev] [PATCH 1/2 ovn] OVN: Fix container build.

2019-09-19 Thread aginwala
Thanks Numan for review:

The issue was create_ovn_dbs.sh needs to be deleted from automake.mk as per
new patch. While testing, my env var used master branch  vs my custom
branch ovn_docker_unix and hence it had create_ovn_dbs.sh and it built fine
as per new build scripts. I submitted v2
https://patchwork.ozlabs.org/patch/1164870/ to handle the same. PTAL.

On Thu, Sep 19, 2019 at 11:15 AM Numan Siddique  wrote:

>
>
> On Thu, Sep 12, 2019 at 7:00 AM aginwala  wrote:
>
>> Signed-off-by: Aliasgar Ginwala 
>>
>>
> Hi Ali,
>
> This patch is failing when I compile.
>
> Can you please take a look.
>
>
>  > utilities/ovn-lib.tmp
> make[1]: *** No rule to make target 'utilities/docker/create_ovn_dbs.sh',
> needed by 'all-am'.  Stop.
> make[1]: *** Waiting for unfinished jobs
> mv controller-vtep/ovn-controller-vtep.8.tmp
> controller-vtep/ovn-controller-vtep.8
> mv controller/ovn-controller.8.tmp controller/ovn-controller.8
> mv utilities/ovn-lib.tmp utilities/ovn-lib
> mv northd/ovn-northd.8.tmp northd/ovn-northd.8
>
>
> Thaks
> Numan
>
> On Wed, Sep 11, 2019 at 6:00 PM 0-day Robot  wrote:
>>
>> > Bleep bloop.  Greetings aginwala aginwala, I am a robot and I have tried
>> > out your patch.
>> > Thanks for your contribution.
>> >
>> > I encountered some error that I wasn't expecting.  See the details
>> below.
>> >
>> >
>> > checkpatch:
>> > ERROR: Author Aliasgar Ginwala  needs to sign off.
>> > Lines checked: 157, Warnings: 0, Errors: 1
>> >
>> >
>> > Please check this out.  If you feel there has been an error, please
>> email
>> > acon...@redhat.com
>> >
>> > Thanks,
>> > 0-day Robot
>> > ___
>> > dev mailing list
>> > d...@openvswitch.org
>> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>> >
>> ___
>> dev mailing list
>> d...@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2 2/2 ovn] Support starting containers with unix socket

2019-09-19 Thread amginwal
From: Aliasgar Ginwala 

Signed-off-by: Aliasgar Ginwala 
---
 Documentation/intro/install/general.rst | 14 ++
 utilities/docker/start-ovn  |  9 +
 2 files changed, 23 insertions(+)

diff --git a/Documentation/intro/install/general.rst 
b/Documentation/intro/install/general.rst
index 4936540fb..bbf05723b 100644
--- a/Documentation/intro/install/general.rst
+++ b/Documentation/intro/install/general.rst
@@ -449,6 +449,20 @@ Start OVN containers using below command::
 $ docker run -itd --net=host --name=ovn-northd \
   : ovn-northd-tcp
 
+Start OVN containers using unix socket::
+
+$ docker run -itd --net=host --name=ovn-nb \
+  -v /var/run/ovn/:/var/run/ovn/ \
+  : ovn-nb
+
+$ docker run -itd --net=host --name=ovn-sb \
+  -v /var/run/ovn/:/var/run/ovn/
+  : ovn-sb
+
+$ docker run -itd --net=host --name=ovn-northd \
+  -v /var/run/ovn/:/var/run/ovn/
+  : ovn-northd
+
 .. note::
 Current ovn central components comes up in docker image in a standalone
 mode with protocol tcp.
diff --git a/utilities/docker/start-ovn b/utilities/docker/start-ovn
index 7457836fe..fbdd2af91 100755
--- a/utilities/docker/start-ovn
+++ b/utilities/docker/start-ovn
@@ -13,6 +13,15 @@
 # limitations under the License.
 
 case $1 in
+"ovn-nb") /usr/share/ovn/scripts/ovn-ctl run_nb_ovsdb
+;;
+"ovn-sb") /usr/share/ovn/scripts/ovn-ctl run_sb_ovsdb
+;;
+"ovn-northd") ovn-northd --pidfile \
+  --ovnnb-db="unix:/var/run/ovn/ovnnb_db.sock" \
+  --ovnsb-db="unix:/var/run/ovn/ovnsb_db.sock" \
+  --log-file=/var/log/ovn/ovn-northd.log
+;;
 "ovn-nb-tcp") source /etc/ovn/ovn_default_nb_port
   /usr/share/ovn/scripts/ovn-ctl start_ovsdb
   ovn-nbctl set-connection ptcp:$nb_db_port
-- 
2.20.1 (Apple Git-117)

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


[ovs-dev] [PATCH v2 1/2 ovn] OVN: Fix container build.

2019-09-19 Thread amginwal
From: Aliasgar Ginwala 

Current code changes in ovs/ovn split replaced openvswitch with ovn and
caused container patches to break.
Also, as per ff4439d, one should build ovn specifying ovs source.
This patch fixes the same.

Signed-off-by: Aliasgar Ginwala 
---
 utilities/automake.mk  |  1 -
 utilities/docker/create_ovn_dbs.sh | 18 --
 utilities/docker/debian/Dockerfile | 12 +---
 utilities/docker/debian/build.sh   | 20 +---
 utilities/docker/start-ovn | 26 +-
 5 files changed, 35 insertions(+), 42 deletions(-)
 delete mode 100755 utilities/docker/create_ovn_dbs.sh

diff --git a/utilities/automake.mk b/utilities/automake.mk
index ab0f6003a..197cc7011 100644
--- a/utilities/automake.mk
+++ b/utilities/automake.mk
@@ -35,7 +35,6 @@ EXTRA_DIST += \
 utilities/checkpatch.py \
 utilities/docker/Makefile \
 utilities/docker/start-ovn \
-utilities/docker/create_ovn_dbs.sh \
 utilities/docker/ovn_default_nb_port \
 utilities/docker/ovn_default_sb_port \
 utilities/docker/ovn_default_northd_host \
diff --git a/utilities/docker/create_ovn_dbs.sh 
b/utilities/docker/create_ovn_dbs.sh
deleted file mode 100755
index 43ab367d6..0
--- a/utilities/docker/create_ovn_dbs.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-ovsdb-tool create /etc/openvswitch/ovnnb_db.db \
-/usr/share/openvswitch/ovn-nb.ovsschema
-ovsdb-tool create /etc/openvswitch/ovnsb_db.db \
-/usr/share/openvswitch/ovn-sb.ovsschema
diff --git a/utilities/docker/debian/Dockerfile 
b/utilities/docker/debian/Dockerfile
index fe72c3a33..30504480d 100644
--- a/utilities/docker/debian/Dockerfile
+++ b/utilities/docker/debian/Dockerfile
@@ -9,14 +9,12 @@ ARG DISTRO
 copy $DISTRO/build.sh /build.sh
 RUN /build.sh $KERNEL_VERSION $OVN_BRANCH $GITHUB_SRC
 
-COPY create_ovn_dbs.sh /etc/openvswitch/create_ovn_dbs.sh
-RUN /etc/openvswitch/create_ovn_dbs.sh
-
-COPY ovn_default_nb_port /etc/openvswitch/ovn_default_nb_port
-COPY ovn_default_sb_port /etc/openvswitch/ovn_default_sb_port
-COPY ovn_default_northd_host /etc/openvswitch/ovn_default_northd_host
+COPY ovn_default_nb_port /etc/ovn/ovn_default_nb_port
+COPY ovn_default_sb_port /etc/ovn/ovn_default_sb_port
+COPY ovn_default_northd_host /etc/ovn/ovn_default_northd_host
 
 COPY start-ovn /bin/start-ovn
 VOLUME ["/var/log/openvswitch", \
-"/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch"]
+"/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch", \
+"/var/log/ovn", "/var/lib/ovn", "/var/run/ovn", "/etc/ovn"]
 ENTRYPOINT ["start-ovn"]
diff --git a/utilities/docker/debian/build.sh b/utilities/docker/debian/build.sh
index fd26a8aa8..3c404bc39 100755
--- a/utilities/docker/debian/build.sh
+++ b/utilities/docker/debian/build.sh
@@ -25,20 +25,34 @@ dh-autoreconf openssl"
 apt-get update
 apt-get install -y ${linux} ${build_deps}
 
-# get the source
+# get ovs source always from master as its needed as dependency
 mkdir /build; cd /build
+git clone --depth 1 -b master https://github.com/openvswitch/ovs.git
+cd ovs;
+mkdir _gcc;
+
+# build and install
+./boot.sh
+cd _gcc
+../configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
+--with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl
+cd ..; make -C _gcc install; cd ..
+
+
+# get ovn source
 git clone --depth 1 -b $OVN_BRANCH $GITHUB_SRC
 cd ovn
 
 # build and install
 ./boot.sh
 ./configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
---with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl
+--with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl \
+--with-ovs-source=/build/ovs/ --with-ovs-build=/build/ovs/_gcc
 make -j8; make install
 
 # remove deps to make the container light weight.
 apt-get remove --purge -y ${build_deps}
 apt-get autoremove -y --purge
-cd ..; rm -rf ovn
+cd ..; rm -rf ovn; rm -rf ovs
 basic_utils="vim kmod net-tools uuid-runtime iproute2"
 apt-get install -y ${basic_utils}
diff --git a/utilities/docker/start-ovn b/utilities/docker/start-ovn
index 7f87e65a3..7457836fe 100755
--- a/utilities/docker/start-ovn
+++ b/utilities/docker/start-ovn
@@ -13,28 +13,28 @@
 # limitations under the License.
 
 case $1 in
-"ovn-nb-tcp") source /etc/openvswitch/ovn_default_nb_port
-  /usr/share/openvswitch/scripts/ovn-ctl start_ovsdb
+"ovn-nb-tcp") source /etc/ovn/ovn_default_nb_port
+  

Re: [ovs-dev] [PATCH 1/2 ovn] OVN: Fix container build.

2019-09-19 Thread Numan Siddique
On Thu, Sep 12, 2019 at 7:00 AM aginwala  wrote:

> Signed-off-by: Aliasgar Ginwala 
>
>
Hi Ali,

This patch is failing when I compile.

Can you please take a look.


 > utilities/ovn-lib.tmp
make[1]: *** No rule to make target 'utilities/docker/create_ovn_dbs.sh',
needed by 'all-am'.  Stop.
make[1]: *** Waiting for unfinished jobs
mv controller-vtep/ovn-controller-vtep.8.tmp
controller-vtep/ovn-controller-vtep.8
mv controller/ovn-controller.8.tmp controller/ovn-controller.8
mv utilities/ovn-lib.tmp utilities/ovn-lib
mv northd/ovn-northd.8.tmp northd/ovn-northd.8


Thaks
Numan

On Wed, Sep 11, 2019 at 6:00 PM 0-day Robot  wrote:
>
> > Bleep bloop.  Greetings aginwala aginwala, I am a robot and I have tried
> > out your patch.
> > Thanks for your contribution.
> >
> > I encountered some error that I wasn't expecting.  See the details below.
> >
> >
> > checkpatch:
> > ERROR: Author Aliasgar Ginwala  needs to sign off.
> > Lines checked: 157, Warnings: 0, Errors: 1
> >
> >
> > Please check this out.  If you feel there has been an error, please email
> > acon...@redhat.com
> >
> > Thanks,
> > 0-day Robot
> > ___
> > dev mailing list
> > d...@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [Branch 2.9 Patch] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread Gregory Rose



On 9/19/2019 4:53 AM, Vishal Deep Ajmera wrote:

Upstream commit 648700f76b03 ("inet: frags: use rhashtables...") changed
how ipv6 fragmentation is implemented.  This patch was backported to
the upstream stable 4.9.x kernel starting at 4.9.135.

This patch creates the compatibility layer changes required to both
compile and also operate correctly with ipv6 fragmentation on these
kernels. Check if the inet_frags 'rnd' field is present to key on
whether the upstream patch is present.  Also update Travis to the
latest 4.9 kernel release so that this patch is compile tested.

Passes Travis:
https://travis-ci.org/gvrose8192/ovs-experimental/builds/478033409


Hi Ben, Greg,

We are using OVS 2.6 branch and facing same issue with kernel 4.4.177
(ubuntu-4.4.0.148). Looks like this field 'rnd' is not present in inet_frags
structure here.

Is it possible to get a backport of this patch on 2.6  & 2.8 branch as well
?

Warm Regards,
Vishal Ajmera


I'll be able to provide the patches but you will need to test them since 
I no longer have an
environment that will build branches older than 2.8.  I'll post patches 
for 2.8, 2.7 and 2.6

in a bit.

Thanks,

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


Re: [ovs-dev] [Branch 2.9 Patch] compat: Fixup ipv6 fragmentation on 4.9.135+ kernels

2019-09-19 Thread Vishal Deep Ajmera via dev
> > Upstream commit 648700f76b03 ("inet: frags: use rhashtables...") changed
> > how ipv6 fragmentation is implemented.  This patch was backported to
> > the upstream stable 4.9.x kernel starting at 4.9.135.
> >
> > This patch creates the compatibility layer changes required to both
> > compile and also operate correctly with ipv6 fragmentation on these
> > kernels. Check if the inet_frags 'rnd' field is present to key on
> > whether the upstream patch is present.  Also update Travis to the
> > latest 4.9 kernel release so that this patch is compile tested.
> >
> > Passes Travis:
> > https://travis-ci.org/gvrose8192/ovs-experimental/builds/478033409
> >
Hi Ben, Greg,

We are using OVS 2.6 branch and facing same issue with kernel 4.4.177
(ubuntu-4.4.0.148). Looks like this field 'rnd' is not present in inet_frags
structure here.

Is it possible to get a backport of this patch on 2.6  & 2.8 branch as well
?

Warm Regards,
Vishal Ajmera
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] RPS Group ( prototype + carbon fiber + plastic )

2019-09-19 Thread rps_mould4
Dear Dev, 

I am Rita, Marketing Manager of RPS Group ( Dongguan RPS Mould Co., Ltd ). 
Please allow me to express my most sincere greetings on behalf of the RPS Group!

May I ask do you have Chinese Supplier?

Now I will give a short presentation about our RPS Group. Our group has five 
companies with three main business types.
1. Carbon fiber products;
Main Service: Aviation/Military Projects/Automobile/Racing Car/Medical Care
2. Rapid prototyping;
3. Injection molds and injection molded products;
 Main Service: Automotive / Medical Care

 If you need help with the above business or want to know more, please let me 
know and I will give you asap.

2019-09-19



Tnx. &  B.R.
Rita Wu

Dongguan RPS Mould Co., Ltd
1st Floor, No. 124 BBK Avenue, Jiangbei, Wusha, Chang'an Town, Dongguan 523859, 
China
Tel / WhatsApp / Wechat: +86-13688979087
Skype: live:1916236323f783de
Email: rps_mou...@vip.163.com
Website:www.realrps.com;  www.RPS-mould.com
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v7 0/1] Balance-tcp bond mode optimization

2019-09-19 Thread Vishal Deep Ajmera via dev
> 
> All unit test passed, plus others I did.
> 
> Tested-by: Matteo Croce 
> 
Thank you Matteo for your efforts in testing this patch.

Warm Regards,
Vishal Ajmera
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v7 0/1] Balance-tcp bond mode optimization

2019-09-19 Thread Matteo Croce
On Tue, Sep 17, 2019 at 10:57 AM Vishal Deep Ajmera
 wrote:
>
> v6->v7:
>  Fixed issue reported by Matteo for bond/show.
>
> v5->v6:
>  Addressed comments from Ilya Maximets.
>  https://mail.openvswitch.org/pipermail/ovs-dev/2019-August/362001.html
>  Rebased to OVS master.
>
> v4->v5:
>  Support for stats per hash bucket.
>  Support for dynamic load balancing.
>  Rebased to OVS Master.
>
> v3->v4:
>  Addressed Ilya Maximets comments.
>  https://mail.openvswitch.org/pipermail/ovs-dev/2019-July/360452.html
>
> v2->v3:
>  Rebased to OVS master.
>  Fixed git merge issue.
>
> v1->v2:
>  Updated datapath action to hash + lb-output.
>  Updated throughput test observations.
>  Rebased to OVS master.
>

All unit test passed, plus others I did.

Tested-by: Matteo Croce 

-- 
Matteo Croce
per aspera ad upstream

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


Re: [ovs-dev] Regarding TSO using AF_PACKET in OVS

2019-09-19 Thread Ramana Reddy
Hi William,
Thanks for your reply. Please find the inline comments.

On Fri, Aug 30, 2019 at 9:26 PM William Tu  wrote:

> Hi Ramana,
>
> I'm trying to understand your setup.
>
> On Wed, Aug 28, 2019 at 4:11 AM Ramana Reddy  wrote:
> >
> > Hi Ben, Justin, Jesse and All,
> >
> > Hope everyone doing great.
> >
> > During my work, I create a socket using AF_PACKET with virtio_net_hdr and
> > filled all the fields in the virtio_net_hdr
> > and the flag to VIRTIO_NET_GSO_TCPV4 to enable TSO using af_packet.
> >
> > vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
> >
> > The code is not working when I am trying to send large packets over OVS
> > VXLAN tunnel. It's dropping the large packets and
> > the application is resending the MTU sized packets. The code is working
> > fine in non ovs case (directly sending without ovs).
>
> Do you create AF_PACKET and bind its socket to OVS's vxlan device,
> ex: vxlan_sys_4789?
>
No. We created a AF_PACKET and binding it our own interface in the
container. It takes the help of the routing table in the container
and routes the packets to the OVS veth interface, and from there, the OVS
rule selects the respective out_port  based on the destination IP address.
We can't select  vxlan_sys_4789 interface as it is in the host namespace.
It's up to the OVS  to select the respective interface (out_port).
And we are not aware and need not know about the underlying network (OVS
bridge or linux or some docker bridge) in the host.

In the non-ovs working case, do you bind AF_PACKET to the vxlan device
> created
> by using ip link command?
>
> >
> > I understood that UDP tunneling offloading (VXLAN) not happening because
> of
> > nic may not support this offloading feature,
> > but when I send iperf (AF_INET) traffic, though the offloading is not
> > happening, but the large packets are fragmented and the
> > VXLAN tunneling sending the fragmented packets.  Why are we seeing this
> > different behavior?
>
> OVS's vxlan device is a light-weight tunnel device, so it might not
> have all the
> features.
>
This is the same question in my mind. OVS may not be handling AF_PACKET
with vnet_hdr.

>
> >
> > What is the expected behavior in AF_PACKET in OVS? Does OVS support
> > AF_PACKET offloading mechanism?
>
> AF_PACKET (see net/packet/af_packet.c) just from userspace send packet into
> kernel and to the device you bind to.  It creates skb and invokes the
> device's xmit
> function.
>
This I understood. But OVS should understand this and offload the packet to
the driver or to the nic
when virtio_net_hdr is set. If we send the packets to the normal interface
(eth0) without ovs, the kernel
is able to understand the TSO packets with virtio_net_hdr and handover the
offloading to the driver (GSO) or nic (TSO).

>
> William
>
> > If not, how we can avoid the retransmission of the packets. What are
> things
> > to be done so that the kernel fragments
> > large packets and send them out without dropping ( in case if offloading
> > feature not available)?
> >
> > Looking forward to your reply.
> >
> > Regards,
> > Ramana
> > ___
> > dev mailing list
> > d...@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn] Exclude inport and outport symbol tables from conjunction

2019-09-19 Thread Han Zhou
On Wed, Sep 18, 2019 at 2:51 AM Dumitru Ceara  wrote:
>
> On Wed, Sep 18, 2019 at 9:30 AM Dumitru Ceara  wrote:
> >
> > On Tue, Sep 17, 2019 at 6:49 PM Han Zhou  wrote:
> > >
> > >
> > >
> > > On Tue, Sep 17, 2019 at 5:21 AM Mark Michelson 
wrote:
> > > >
> > > > On 9/16/19 12:04 PM, Han Zhou wrote:
> > > > >
> > > > >
> > > > > On Mon, Sep 16, 2019 at 4:15 AM Dumitru Ceara  > > > > > wrote:
> > > > >  >
> > > > >  > On Sat, Sep 14, 2019 at 7:16 PM Han Zhou  > > > > > wrote:
> > > > >  > >
> > > > >  > >
> > > > >  > >
> > > > >  > > On Sat, Sep 14, 2019 at 9:09 AM Han Zhou  > > > > > wrote:
> > > > >  > > >
> > > > >  > > >
> > > > >  > > >
> > > > >  > > > On Sat, Sep 14, 2019 at 12:40 AM Numan Siddique
> > > > > mailto:nusid...@redhat.com>> wrote:
> > > > >  > > > >
> > > > >  > > > >
> > > > >  > > > >
> > > > >  > > > > On Sat, Sep 14, 2019 at 2:41 AM Daniel Alvarez Sanchez
> > > > > mailto:dalva...@redhat.com>> wrote:
> > > > >  > > > >>
> > > > >  > > > >> Acked-by: Daniel Alvarez  > > > > >
> > > > >  > > > >>
> > > > >  > > > >>
> > > > >  > > > >> On Fri, Sep 13, 2019 at 11:02 PM Mark Michelson
> > > > > mailto:mmich...@redhat.com>> wrote:
> > > > >  > > > >> >
> > > > >  > > > >> > Acked-by: Mark Michelson
> > > > >  > > > >> >
> > > > >  > > > >> > It sucks that we lose the efficiency of the
conjunctive
> > > > > match altogether
> > > > >  > > > >> > on port groups because of this error, but I
understand this
> > > > > is a huge
> > > > >  > > > >> > bug and needs fixing.
> > > > >  > > > >> If I'm not mistaken, from OpenStack standpoint
conjunction was
> > > > > *only*
> > > > >  > > > >> being used when using port groups and ACLs that matched
on
> > > > > port ranges
> > > > >  > > > >> ( e.g tcp.dst >= X && tcp.dst <=Y) which was not
working.
> > > > > Therefore
> > > > >  > > > >> we're not losing performance because it was already
broken
> > > > > (given that
> > > > >  > > > >> there was more than one ACL like that).
> > > > >  > > > >>
> > > > >  > > > >> >
> > > > >  > > > >> > Perhaps it would be good to start up a discussion on
this
> > > > > list about a
> > > > >  > > > >> > more longterm solution that would allow for
conjunctive
> > > > > matches with no
> > > > >  > > > >> > ambiguity.
> > > > >  > > > >> Agreed! We already discussed some ideas on IRC but it'd
be
> > > > > awesome to
> > > > >  > > > >> have a thread and brainstorm there.
> > > > >  > > > >>
> > > > >  > > > >
> > > > >  > > > > Thanks for the reviews. I applied this to master.
> > > > >  > > > > Agree we can discuss it further and come up with ideas.
> > > > >  > > > >
> > > > >  > > > > I know Dumitru has some idea to make use of conjunctions
for
> > > > > port groups.
> > > > >  > > > > CC'ing Han if he has any comments on ideas.
> > > > >  > > > >
> > > > >  > > >
> > > > >  > > > Hi Numan,
> > > > >  > > >
> > > > >  > > > This is a good finding. However, I think it is not
specifically a
> > > > > problem of port group. It seems to be a more general problem and
this
> > > > > patch fixes only a special case.
> > > > >  > > > For example, would there be similar problem for below ACLs
> > > > > without port groups:
> > > > >  > > >
> > > > >  > > > ip4 && tcp.src >= 1000 && tcp.src <= 1001 && tcp.dst >=
500 &&
> > > > > tcp.dst <= 501
> > > > >  > > > ip4 && tcp.src >= 1000 && tcp.src <= 1001 && tcp.dst >=
600 &&
> > > > > tcp.dst <= 601
> > > > >  > > >
> > > > >  > > > Another example is with address set:
> > > > >  > > >
> > > > >  > > > ip4 && ip4.src == $as1 && tcp.dst >= 500 && tcp.dst <= 501
> > > > >  > > > ip4 && ip4.src == $as1 && tcp.dst >= 600 && tcp.dst <= 601
> > > > >  > > >
> > > > >  > > > Or even without range:
> > > > >  > > > ip4 && tcp.src == {1000, 1001} && tcp.dst == {500, 501}
> > > > >  > > > ip4 && tcp.src == {1000, 1001} && tcp.dst == {600, 601}
> > > > >  > > >
> > > > >  > > > You may think of more examples. Whenever there are multiple
> > > > > conjunctionable ACLs with same match as part of the conjunction,
it
> > > > > should result in such problem.
> > > > >  > > >
> > > > >  > > > A quick fix to all these problems may be just abandon
> > > > > conjunction, but I believe there are better ways to address it.
> > > > >  > > >
> > > > >  > > > First of all, these matches can be rewritten by combining
them in
> > > > > a single ACL with "OR" operator, e.g.:
> > > > >  > > >
> > > > >  > > > outport == @pg1 && ip4 && tcp.dst >= 500 && tcp.dst <= 501
> > > > >  > > > outport == @pg1 && ip4 && tcp.dst >= 600 && tcp.dst <= 601
> > > > >  > > >
> > > > >  > > > can be rewritten as >
> > > > >  > > >
> > > > >  > > > outport == @pg1 && ip4 && (tcp.dst >= 500 && tcp.dst <=
501 ||
> > > > > tcp.dst >= 600 && tcp.dst <= 601)
> > > > >  > > >
> > > > >  > > > Similar can be done for all above examples. So, a
workaround to
> > > > > the problem is from user side (e.g. OpenStack) to