Re: [ovs-dev] [PATCH ovn v2] ovn-controller: Propagate nb_cfg to the local OVS DB.

2020-11-18 Thread Numan Siddique
On Wed, Nov 18, 2020 at 6:27 PM Dumitru Ceara  wrote:
>
> The NB.NB_Global.nb_cfg value gets propagated to
> Chassis_Private.nb_cfg (and then to NB.NB_Global.hv_cfg) as soon as
> ovn-controller has finished installing OVS flows corresponding to
> the NB DB state.
>
> However, if the CMS runs monitoring applications on the chassis itself,
> in order to detect that the NB changes have been applied, it has to
> connect to the NB/SB database.  In a scaled deployment this additional
> connection might induce performance issues.
>
> In order to avoid that we now (also) propagate nb_cfg to the local OVS
> DB, in the record corresponding to the integration bridge in table
> Bridge, as external_id "ovn-nb-cfg".
>
> Signed-off-by: Dumitru Ceara 

Thanks for v2. I applied this patch to master.

Numan

> ---
> V2:
> - Addressed Numan's comments:
>   - Update ovn-controller doc.
>   - Store the seqno in OVS..external_ids:ovn-nb-cfg.
> - Update NEWS.
> ---
>  NEWS|  2 ++
>  controller/ovn-controller.8.xml | 12 ++
>  controller/ovn-controller.c | 51 
> ++---
>  tests/ovn-controller.at | 21 +
>  4 files changed, 73 insertions(+), 13 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 6010230..a681573 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -8,6 +8,8 @@ Post-v20.09.0
>   server.
> - Support other_config:vlan-passthru=true to allow VLAN tagged incoming
>   traffic.
> +   - Propagate currently processed SB_Global.nb_cfg in ovn-controller to the
> + local OVS DB integration bridge external_ids:ovn-nb-cfg.
>
>  OVN v20.09.0 - 28 Sep 2020
>  --
> diff --git a/controller/ovn-controller.8.xml b/controller/ovn-controller.8.xml
> index 16bc47b..0d57355 100644
> --- a/controller/ovn-controller.8.xml
> +++ b/controller/ovn-controller.8.xml
> @@ -378,6 +378,18 @@
>logical patch port that it implements.
>  
>
> +
> +  
> +external-ids:ovn-nb-cfg in the Bridge table
> +  
> +
> +  
> +
> +  This key represents the last known
> +  OVN_Southbound.SB_Global.nb_cfg value for which all
> +  flows have been successfully installed in OVS.
> +
> +  
>  
>
>  OVN Southbound Database Usage
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index 25de0c7..70a193b 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -85,6 +85,8 @@ static unixctl_cb_func debug_delay_nb_cfg_report;
>
>  #define CONTROLLER_LOOP_STOPWATCH_NAME "ovn-controller-flow-generation"
>
> +#define OVS_NB_CFG_NAME "ovn-nb-cfg"
> +
>  static char *parse_options(int argc, char *argv[]);
>  OVS_NO_RETURN static void usage(void);
>
> @@ -792,6 +794,40 @@ get_nb_cfg(const struct sbrec_sb_global_table 
> *sb_global_table)
>  return sb ? sb->nb_cfg : 0;
>  }
>
> +/* Propagates the local cfg seqno, 'cur_cfg', to the chassis_private record
> + * and to the local OVS DB.
> + */
> +static void
> +store_nb_cfg(struct ovsdb_idl_txn *sb_txn, struct ovsdb_idl_txn *ovs_txn,
> + const struct sbrec_chassis_private *chassis,
> + const struct ovsrec_bridge *br_int,
> + unsigned int delay_nb_cfg_report,
> + int64_t cur_cfg)
> +{
> +if (!cur_cfg) {
> +return;
> +}
> +
> +if (sb_txn && chassis && cur_cfg != chassis->nb_cfg) {
> +sbrec_chassis_private_set_nb_cfg(chassis, cur_cfg);
> +sbrec_chassis_private_set_nb_cfg_timestamp(chassis, 
> time_wall_msec());
> +
> +if (delay_nb_cfg_report) {
> +VLOG_INFO("Sleep for %u sec", delay_nb_cfg_report);
> +xsleep(delay_nb_cfg_report);
> +}
> +}
> +
> +if (ovs_txn && br_int &&
> +cur_cfg != smap_get_ullong(_int->external_ids,
> +   OVS_NB_CFG_NAME, 0)) {
> +char *cur_cfg_str = xasprintf("%"PRId64, cur_cfg);
> +ovsrec_bridge_update_external_ids_setkey(br_int, OVS_NB_CFG_NAME,
> + cur_cfg_str);
> +free(cur_cfg_str);
> +}
> +}
> +
>  static const char *
>  get_transport_zones(const struct ovsrec_open_vswitch_table *ovs_table)
>  {
> @@ -2692,19 +2728,8 @@ main(int argc, char *argv[])
>  engine_set_force_recompute(false);
>  }
>
> -if (ovnsb_idl_txn && chassis_private) {
> -int64_t cur_cfg = ofctrl_get_cur_cfg();
> -if (cur_cfg && cur_cfg != chassis_private->nb_cfg) {
> -sbrec_chassis_private_set_nb_cfg(chassis_private, 
> cur_cfg);
> -sbrec_chassis_private_set_nb_cfg_timestamp(
> -chassis_private, time_wall_msec());
> -if (delay_nb_cfg_report) {
> -VLOG_INFO("Sleep for %u sec", delay_nb_cfg_report);
> -

Re: [ovs-dev] [PATCH ovn v7 0/5] Add DDlog implementation of ovn-northd

2020-11-18 Thread Numan Siddique
On Thu, Nov 19, 2020 at 10:43 AM Ben Pfaff  wrote:
>
> v1->v2:
>   - Applied several patches.
>   - New commit to add documentation for the system-userspace testsuite.
>   - New patches to improve the testsuite a couple of ways.
>   - Revised "Prepare for multiple northd types" to fix system-userspace
> testsuite.
>   - Updated DDlog implementation of northd to match latest master.
>   - Updated copyright notices in DDlog implementation.
>
> v2->v3:
>   - Applied documentation patch.
>   - Added some test improvements to fix reported problems.
>   - Really updated copyright notices (didn't commit, last time).
>   - Correctly skip ddlog tests when ddlog not compiled.
>
> v3->v4:
>   - Fix dependencies for parallel build.
>   - Fix spelling error in documentation.
>   - Use --wait=sb, not --wait=hv, when no chassis are running.
>   - Fixed IGMP and MLD tests by porting commit 9d2e8d32fb98
> ("ofctrl.c: Fix duplicated flow handling in I-P while merging
> opposite changes."), which I had missed before.
>
> v4.1->v5:
>   - Drop patch for ACL log meters (this was included in v4.1 by mistake).
>   - In addition to waiting for database, also wait for ports to come up.
>   - New patch to support more arguments to wait_for_row_count that waiting
> for ports indirectly needed.
>   - Port commit c29221d9322a ("Allow VLAN traffic when 
> LS:vlan-passthru=true").
>   - Port commit 36a8745de859 ("Add support for DHCP options 28 (Broadcast 
> Address)")
>   - Add patch to improve "ARP/ND request broadcast limiting" test.
>
> v5->v6:
>   - Applied and dropped patch for "test a == b".
>   - Applied and dropped patch to allow more args to wait_for_row_count().
>   - Applied and dropped ARP/ND broadcast test improvement patch.
>   - Fix whitespace in patch to export ddlog_warn() and ddlog_err().
>
> v6->v7:
>   - Fixed "make dist" (thanks to Numan for reporting this.)
>   - Fix probe interval setting (thanks to Numan again).
>   - Small amount of improvement of OVN DDlog code (use lambdas in more 
> places).
>   - Fine-tuning of ovn-northd-ddlog code for jsonrpc session usage.
>   - Fix newline issues in tests reported by Dumitru.
>   - Add ack from Dumitru.

Thanks Ben for sending out v7.

I have few comments w.r.t to scaling.

1. In the last OVN weekly irc meeting, I had mentioned about
ovn-northd-ddlog taking a lot of time in the loop. I also shared the
scale test results with ddlog
(https://imgur.com/JJpsMhv)  and without ddlog (https://imgur.com/gmbhfoa).

I was able to come up with a dirty script which you can run locally.
This script creates OVN resources
250 times. As the scale increases you will notice the warning messages
in the ovn-northd-ddlog log file

***
timeval|WARN|Unreasonably long 1160ms poll interval (8ms user, 0ms system)
***

As the test progresses the time reported in the warning also increases
gradually and it reaches around 3500ms
in my setup.

I do not observe such warning messages with the c version of northd.

Can you please test it out locally with this script -
https://gist.github.com/numansiddique/1adf22cef57f6b125981b3581085694d

2. ovn-northd-ddlog is missing support for connecting to a raft cluster.

Thanks
Numan



Thanks
Numan







>
> Ben Pfaff (3):
>   tests: Prepare for multiple northd types.
>   tests: Eliminate most "sleep" calls.
>   tests: Improve debuggability of tests.
>
> Leonid Ryzhyk (2):
>   Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog
>   ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.
>
>  Documentation/automake.mk |2 +
>  Documentation/intro/install/general.rst   |   31 +-
>  Documentation/topics/debugging-ddlog.rst  |  280 +
>  Documentation/topics/index.rst|1 +
>  Documentation/tutorials/ddlog-new-feature.rst |  362 +
>  Documentation/tutorials/index.rst |1 +
>  NEWS  |6 +
>  TODO.rst  |6 +
>  acinclude.m4  |   43 +
>  configure.ac  |5 +
>  lib/ovn-util.c|   15 +
>  lib/ovn-util.h|5 +
>  m4/ovn.m4 |   16 +
>  northd/.gitignore |4 +
>  northd/automake.mk|  104 +
>  northd/helpers.dl |   89 +
>  northd/ipam.dl|  506 ++
>  northd/lrouter.dl |  715 ++
>  northd/lswitch.dl |  643 ++
>  northd/multicast.dl   |  259 +
>  northd/ovn-nb.dlopts  |   13 +
>  northd/ovn-northd-ddlog.c | 1749 
>  northd/ovn-sb.dlopts  |   28 +
>  northd/ovn.dl |  384 +
>  northd/ovn.rs |  857 ++
>  

Re: [ovs-dev] [PATCH ovn] northd: Fix leak of lflow scratchpads.

2020-11-18 Thread Numan Siddique
On Thu, Nov 19, 2020 at 4:28 AM Ilya Maximets  wrote:
>
> Dynamic strings that backs 'match' and 'actions' are never destroyed
> and leaked on every lflow re-build cycle.
>
>  28,224 bytes in 126 blocks are definitely lost in loss record 494 of 498
> at 0x483BD19: realloc (vg_replace_malloc.c:834)
> by 0x4AEF14: xrealloc (util.c:149)
> by 0x465533: ds_reserve (dynamic-string.c:63)
> by 0x46587B: ds_put_format_valist (dynamic-string.c:161)
> by 0x465956: ds_put_format (dynamic-string.c:142)
> by 0x42187F: build_ipv6_input_flows_for_lrouter_port (ovn-northd.c:11188)
> by 0x42187F: build_lswitch_and_lrouter_iterate_by_op (ovn-northd.c:11279)
> by 0x42187F: build_lswitch_and_lrouter_flows.constprop.0 
> (ovn-northd.c:11316)
> by 0x422503: build_lflows (ovn-northd.c:11398)
> by 0x42478D: ovnnb_db_run (ovn-northd.c:12334)
> by 0x42478D: ovn_db_run (ovn-northd.c:12927)
> by 0x408E84: main (ovn-northd.c:1)
>
> Fixes: ddf9f1d71319 ("ovn-northd: reorganize processing of lflows")
> Signed-off-by: Ilya Maximets 

Thanks Ilya. I applied this patch to master.

Numan

> ---
>  northd/ovn-northd.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 8ce756c8a..148d2a051 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -11296,6 +11296,9 @@ build_lswitch_and_lrouter_flows(struct hmap 
> *datapaths, struct hmap *ports,
>  }
>  free(svc_check_match);
>
> +ds_destroy();
> +ds_destroy();
> +
>  /* Legacy lswitch build - to be migrated. */
>  build_lswitch_flows(datapaths, ports, lflows, mcgroups,
>  igmp_groups, lbs);
> --
> 2.25.4
>
> ___
> 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] Loan Offer

2020-11-18 Thread Roland Marcus via dev
Hello,

  Apply for a loan, at a 3% interest rate.

   
Do you need a personal loan?
   
Do you need a business loan?
   
Do you need a consolidation loan?  
 
Do you need a secure loan?
   
Do you need an unsecured loan?
   
Do you need a mortgage loan?
   
Do you need a pay off debt loan?
   
Do you need a project loan?

Do you need a student loan?
  

Whatever loan that you are looking for, kindly send us a mail:  
(trustfinanc...@gmail.com)

Mr. Roland Marcus
Managing Director
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn v7 5/5] ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Ben Pfaff, 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: Comment with 'xxx' marker
#4617 FILE: northd/ovn-northd-ddlog.c:1271:
 * XXX If the transaction we're sending to the database fails, then

WARNING: Line lacks whitespace around operator
WARNING: Line lacks whitespace around operator
WARNING: Line lacks whitespace around operator
#4821 FILE: northd/ovn-northd-ddlog.c:1475:
  --ovnnb-db=DATABASE   connect to ovn-nb database at DATABASE\n\

WARNING: Line lacks whitespace around operator
WARNING: Line lacks whitespace around operator
WARNING: Line lacks whitespace around operator
#4823 FILE: northd/ovn-northd-ddlog.c:1477:
  --ovnsb-db=DATABASE   connect to ovn-sb database at DATABASE\n\

WARNING: Line lacks whitespace around operator
WARNING: Line lacks whitespace around operator
#4825 FILE: northd/ovn-northd-ddlog.c:1479:
  --unixctl=SOCKET  override default control socket name\n\

WARNING: Line has trailing whitespace
#6561 FILE: northd/ovn_northd.dl:160:
var l3dgw_port = peer.and_then(|p| p.router.l3dgw_port),

Lines checked: 14371, Warnings: 10, 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 ovn v7 1/5] Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Ben Pfaff, 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: 76, 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


[ovs-dev] [PATCH ovn v7 2/5] tests: Prepare for multiple northd types.

2020-11-18 Thread Ben Pfaff
The idea is to run each test twice, once with ovn-northd, once
with ovn-northd-ddlog.  To do that, we add a macro OVN_FOR_EACH_NORTHD
and bracket each test that uses ovn-northd in it.

Signed-off-by: Ben Pfaff 
---
 tests/ovn-ic.at |  11 +-
 tests/ovn-macros.at |  96 ++--
 tests/ovn-northd.at | 161 +-
 tests/ovn.at| 268 +---
 tests/ovs-macros.at |  20 ++--
 tests/system-ovn.at | 122 +++-
 6 files changed, 537 insertions(+), 141 deletions(-)

diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
index 0638af401295..2a4fba031f36 100644
--- a/tests/ovn-ic.at
+++ b/tests/ovn-ic.at
@@ -1,4 +1,5 @@
 AT_BANNER([OVN Interconnection Controller])
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- AZ register])
 
 ovn_init_ic_db
@@ -29,7 +30,9 @@ availability-zone az3
 OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- transit switch handling])
 
 ovn_init_ic_db
@@ -59,7 +62,9 @@ check_column ts2 nb:Logical_Switch name
 OVN_CLEANUP_IC([az1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- gateway sync])
 
 ovn_init_ic_db
@@ -120,8 +125,9 @@ OVN_CLEANUP_SBOX(gw2)
 OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- port sync])
 
 ovn_init_ic_db
@@ -185,7 +191,9 @@ OVN_CLEANUP_SBOX(gw1)
 OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- route sync])
 
 ovn_init_ic_db
@@ -310,3 +318,4 @@ OVS_WAIT_WHILE([ovn_as az1 ovn-nbctl lr-route-list lr1 | 
grep learned | grep 10.
 OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
+])
diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at
index 59e500c5705a..44c0e20cfdc5 100644
--- a/tests/ovn-macros.at
+++ b/tests/ovn-macros.at
@@ -47,10 +47,12 @@ m4_define([OVN_CLEANUP],[
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([[$NORTHD_TYPE]])
 
-as northd-backup
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+if test -d northd-backup; then
+as northd-backup
+OVS_APP_EXIT_AND_WAIT([[$NORTHD_TYPE]])
+fi
 
 OVN_CLEANUP_VSWITCH([main])
 ])
@@ -69,10 +71,12 @@ m4_define([OVN_CLEANUP_AZ],[
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as $1/northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([[$NORTHD_TYPE]])
 
-as $1/northd-backup
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+if test -d $1/northd-backup; then
+as $1/northd-backup
+OVS_APP_EXIT_AND_WAIT([[$NORTHD_TYPE]])
+fi
 
 as $1/ic
 OVS_APP_EXIT_AND_WAIT([ovn-ic])
@@ -134,15 +138,48 @@ ovn_init_ic_db () {
 ovn_init_db ovn-ic-sb
 }
 
-# ovn_start [AZ]
+# ovn_start_northd (primary|backup) [AZ]
+ovn_start_northd() {
+local priority=$1
+local AZ=$2
+local msg_prefix=${AZ:+$AZ: }
+local d_prefix=${AZ:+$AZ/}
+
+local suffix=
+case $priority in
+backup) suffix=-backup ;;
+esac
+
+local northd_args=
+case ${NORTHD_TYPE:=ovn-northd} in
+ovn-northd) ;;
+ovn-northd-ddlog) 
northd_args="--ddlog-record=${AZ:+$AZ/}replay$suffix.dat -v" ;;
+esac
+
+local name=${d_prefix}northd${suffix}
+echo "${prefix}starting $name"
+test -d "$ovs_base/$name" || mkdir "$ovs_base/$name"
+as $name start_daemon $NORTHD_TYPE $northd_args -vjsonrpc \
+   --ovnnb-db=$OVN_NB_DB --ovnsb-db=$OVN_SB_DB
+}
+
+# ovn_start [--no-backup-northd] [AZ]
 #
 # Creates and initializes ovn-sb and ovn-nb databases and starts their
 # ovsdb-server instance, sets appropriate environment variables so that
 # ovn-sbctl and ovn-nbctl use them by default, and starts ovn-northd running
 # against them.
 ovn_start () {
-if test -n "$1"; then
-mkdir "$ovs_base"/$1
+local backup_northd=:
+case $1 in
+--no-backup-northd) backup_northd=false; shift ;;
+esac
+local AZ=$1
+local msg_prefix=${AZ:+$AZ: }
+local d_prefix=${AZ:+$AZ/}
+
+if test -n "$AZ"; then
+mkdir "$ovs_base"/$AZ
 fi
 
 ovn_init_db ovn-sb $1; ovn-sbctl init
@@ -150,36 +187,19 @@ ovn_start () {
 if test -n "$1"; then
 ovn-nbctl set NB_Global . name=$1
 fi
-local ovn_sb_db=$OVN_SB_DB
-local ovn_nb_db=$OVN_NB_DB
 
-local as_d=northd
-if test -n "$1"; then
-as_d=$1/$as_d
+ovn_start_northd primary $AZ
+if $backup_northd; then
+ovn_start_northd backup $AZ
 fi
-echo "starting ovn-northd"
-mkdir "$ovs_base"/$as_d
-as $as_d start_daemon ovn-northd -v \
-   --ovnnb-db=$ovn_nb_db \
-   --ovnsb-db=$ovn_sb_db
 
-as_d=northd-backup
-if test -n "$1"; then
-as_d=$1/$as_d
-fi
-echo "starting backup ovn-northd"
-mkdir "$ovs_base"/$as_d
-as $as_d start_daemon ovn-northd -v \
-   --ovnnb-db=$ovn_nb_db \
-   --ovnsb-db=$ovn_sb_db
+if test -n "$AZ"; then
+

[ovs-dev] [PATCH ovn v7 3/5] tests: Eliminate most "sleep" calls.

2020-11-18 Thread Ben Pfaff
Many of these could be replaced by "ovn-nbctl sync".  Some weren't
really needed at all because they were adjacent to something that itself
called sync or otherwise used --wait.  Some were more appropriately
done with explicit waits for what was really needed.

I left some "sleep"s.  Some were because they were "negative" sleeps:
they were giving time for something to happen that should *not* happen
(in other words, if you wait for it to happen, you'll wait forever,
unless there's a bug).  Some were because I didn't know how to properly
wait for what they were waiting for, or because I didn't understand
the circumstances deeply enough.

Signed-off-by: Ben Pfaff 
---
 tests/ovn-macros.at |  15 +++
 tests/ovn-northd.at |  11 +-
 tests/ovn.at| 259 ++--
 3 files changed, 155 insertions(+), 130 deletions(-)

diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at
index 44c0e20cfdc5..b4dc387e54a4 100644
--- a/tests/ovn-macros.at
+++ b/tests/ovn-macros.at
@@ -437,6 +437,21 @@ wait_column() {
   echo "$column in $db table $table has value $found, from the following 
rows:"
   ovn-${db}ctl list $table])
 }
+
+# wait_for_ports_up [PORT...]
+#
+# With arguments, waits for specified Logical_Switch_Ports to come up.
+# Without arguments, waits for all Logical_Switch_Ports (except
+# localnet, localport, and virtual ports) to come up.
+wait_for_ports_up() {
+if test $# = 0; then
+wait_row_count nb:Logical_Switch_Port 0 up!=true type!=localnet 
type!=localport type!=virtual
+else
+for port; do
+wait_row_count nb:Logical_Switch_Port 1 up=true name=$port
+done
+fi
+}
 OVS_END_SHELL_HELPERS
 
 m4_define([OVN_POPULATE_ARP], [AT_CHECK(ovn_populate_arp__, [0], [ignore])])
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 949a8eee054e..78b1ff728af3 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -878,7 +878,7 @@ uuid=$(fetch_column Port_Binding _uuid 
logical_port=cr-DR-S1)
 echo "CR-LRP UUID is: " $uuid
 
 check ovn-nbctl set Logical_Router $cr_uuid options:chassis=gw1
-check ovn-nbctl --wait=hv sync
+check ovn-nbctl --wait=sb sync
 
 ovn-nbctl create Address_Set name=allowed_range addresses=\"1.1.1.1\"
 ovn-nbctl create Address_Set name=disallowed_range addresses=\"2.2.2.2\"
@@ -1120,6 +1120,7 @@ ovn-nbctl --wait=sb -- --id=@hc create \
 Load_Balancer_Health_Check vip="10.0.0.10\:80" -- add Load_Balancer . \
 health_check @hc
 wait_row_count Service_Monitor 2
+check ovn-nbctl --wait=sb sync
 
 ovn-sbctl dump-flows sw0 | grep ct_lb | grep priority=120 > lflows.txt
 AT_CHECK([cat lflows.txt | sed 's/table=..//'], [0], [dnl
@@ -1139,6 +1140,7 @@ OVS_WAIT_FOR_OUTPUT(
 # Set the service monitor for sw1-p1 to offline
 check ovn-sbctl set service_monitor sw1-p1 status=offline
 wait_row_count Service_Monitor 1 logical_port=sw1-p1 status=offline
+check ovn-nbctl --wait=sb sync
 
 AT_CAPTURE_FILE([sbflows4])
 OVS_WAIT_FOR_OUTPUT(
@@ -1150,6 +1152,7 @@ OVS_WAIT_FOR_OUTPUT(
 ovn-sbctl set service_monitor $sm_sw0_p1 status=offline
 
 wait_row_count Service_Monitor 1 logical_port=sw0-p1 status=offline
+check ovn-nbctl --wait=sb sync
 
 AT_CAPTURE_FILE([sbflows5])
 OVS_WAIT_FOR_OUTPUT(
@@ -1166,6 +1169,7 @@ ovn-sbctl set service_monitor $sm_sw0_p1 status=online
 ovn-sbctl set service_monitor $sm_sw1_p1 status=online
 
 wait_row_count Service_Monitor 1 logical_port=sw1-p1 status=online
+check ovn-nbctl --wait=sb sync
 
 AT_CAPTURE_FILE([sbflows7])
 OVS_WAIT_FOR_OUTPUT(
@@ -1176,6 +1180,7 @@ OVS_WAIT_FOR_OUTPUT(
 # Set the service monitor for sw1-p1 to error
 ovn-sbctl set service_monitor $sm_sw1_p1 status=error
 wait_row_count Service_Monitor 1 logical_port=sw1-p1 status=error
+check ovn-nbctl --wait=sb sync
 
 ovn-sbctl dump-flows sw0 | grep "ip4.dst == 10.0.0.10 && tcp.dst == 80" \
 | grep priority=120 > lflows.txt
@@ -1214,6 +1219,7 @@ OVS_WAIT_FOR_OUTPUT(
 check ovn-sbctl set service_monitor sw1-p1 status=online
 
 wait_row_count Service_Monitor 1 logical_port=sw1-p1 status=online
+check ovn-nbctl --wait=sb sync
 
 AT_CAPTURE_FILE([sbflows10])
 OVS_WAIT_FOR_OUTPUT(
@@ -1244,6 +1250,7 @@ AT_CHECK([ovn-nbctl -- --id=@hc create 
Load_Balancer_Health_Check vip="10.0.0.10
 
 check ovn-nbctl ls-lb-add sw0 lb2
 check ovn-nbctl ls-lb-add sw1 lb2
+check ovn-nbctl --wait=sb sync
 
 wait_row_count Service_Monitor 5
 
@@ -1756,7 +1763,7 @@ check ovn-nbctl pg-add pg0 sw0-p1 sw1-p1
 check ovn-nbctl acl-add pg0 from-lport 1002 "inport == @pg0 && ip4 && tcp && 
tcp.dst == 80" reject
 check ovn-nbctl acl-add pg0 to-lport 1003 "outport == @pg0 && ip6 && udp" 
reject
 
-check ovn-nbctl --wait=hv sync
+check ovn-nbctl --wait=sb sync
 
 AS_BOX([1])
 
diff --git a/tests/ovn.at b/tests/ovn.at
index 2f295dd6ee98..6a81ec6f07a5 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -1792,16 +1792,13 @@ get_lsp_uuid () {
 ovn-nbctl create Port_Group name=pg1 ports=`get_lsp_uuid lp22`,`get_lsp_uuid 
lp33`
 ovn-nbctl acl-add lsw0 to-lport 1000 

[ovs-dev] [PATCH ovn v7 4/5] tests: Improve debuggability of tests.

2020-11-18 Thread Ben Pfaff
These changes should make it easier to debug various tests.

Signed-off-by: Ben Pfaff 
---
 tests/ovn-controller-vtep.at |   6 +-
 tests/ovn-northd.at  | 129 -
 tests/ovn.at | 348 +++
 tests/ovs-macros.at  |  20 +-
 4 files changed, 213 insertions(+), 290 deletions(-)

diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
index 8b4c180b1669..0d1693682616 100644
--- a/tests/ovn-controller-vtep.at
+++ b/tests/ovn-controller-vtep.at
@@ -181,7 +181,7 @@ OVN_CONTROLLER_VTEP_START
 AT_CHECK([vtep-ctl add-ls lswitch0 -- bind-ls br-vtep p0 100 lswitch0 -- 
bind-ls br-vtep p1 300 lswitch0])
 # adds logical switch port in ovn-nb database, and sets the type and options.
 OVN_NB_ADD_VTEP_PORT([br-test], [br-vtep_lswitch0], [br-vtep], [lswitch0])
-check ovn-sbctl wait-until Port_Binding br-vtep_lswitch0 chassis!='[[]]'
+wait_row_count Port_Binding 1 logical_port=br-vtep_lswitch0 chassis!='[[]]'
 # should see one binding, associated to chassis of 'br-vtep'.
 chassis_uuid=$(ovn-sbctl --columns=_uuid list Chassis br-vtep | cut -d ':' -f2 
| tr -d ' ')
 AT_CHECK_UNQUOTED([ovn-sbctl --columns=chassis list Port_Binding 
br-vtep_lswitch0 | cut -d ':' -f2 | tr -d ' '], [0], [dnl
@@ -192,7 +192,7 @@ ${chassis_uuid}
 AT_CHECK([vtep-ctl add-ls lswitch1 -- bind-ls br-vtep p0 200 lswitch1])
 # adds logical switch port in ovn-nb database for lswitch1.
 OVN_NB_ADD_VTEP_PORT([br-test], [br-vtep_lswitch1], [br-vtep], [lswitch1])
-check ovn-sbctl wait-until Port_Binding br-vtep_lswitch1 chassis!='[[]]'
+wait_row_count Port_Binding 1 logical_port=br-vtep_lswitch1 chassis!='[[]]'
 # This is allowed, but not recommended, to have two vlan_bindings (to 
different vtep logical switches)
 # from one vtep gateway physical port in one ovn-nb logical swithch.
 AT_CHECK_UNQUOTED([ovn-sbctl --columns=chassis list Port_Binding | cut -d ':' 
-f2 | tr -d ' ' | sort], [0], [dnl
@@ -203,7 +203,7 @@ ${chassis_uuid}
 
 # adds another logical switch port in ovn-nb database for lswitch0.
 OVN_NB_ADD_VTEP_PORT([br-test], [br-vtep_lswitch0_dup], [br-vtep], [lswitch0])
-check ovn-sbctl wait-until Port_Binding br-vtep_lswitch0_dup chassis!='[[]]'
+wait_row_count Port_Binding 1 logical_port=br-vtep_lswitch0_dup chassis!='[[]]'
 # it is not allowed to have more than one ovn-nb logical port for the same
 # vtep logical switch on a vtep gateway chassis, so should still see only
 # two port_binding entries bound.
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 78b1ff728af3..972ff5c626a3 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -1078,7 +1078,7 @@ health_check @hc | uuidfilt], [0], [<0>
 
 wait_row_count Service_Monitor 0
 
-# create logical switches and ports
+AS_BOX([create logical switches and ports])
 ovn-nbctl ls-add sw0
 ovn-nbctl --wait=sb lsp-add sw0 sw0-p1 -- lsp-set-addresses sw0-p1 \
 "00:00:00:00:00:03 10.0.0.3"
@@ -1105,7 +1105,7 @@ OVS_WAIT_FOR_OUTPUT(
   (ls_in_stateful ), priority=120  , match=(ct.new && ip4.dst == 10.0.0.10 
&& tcp.dst == 80), action=(ct_lb(backends=10.0.0.3:80,20.0.0.3:80);)
 ])
 
-# Delete the Load_Balancer_Health_Check
+AS_BOX([Delete the Load_Balancer_Health_Check])
 ovn-nbctl --wait=sb clear load_balancer . health_check
 wait_row_count Service_Monitor 0
 
@@ -1115,7 +1115,7 @@ OVS_WAIT_FOR_OUTPUT(
 [  (ls_in_stateful ), priority=120  , match=(ct.new && ip4.dst == 
10.0.0.10 && tcp.dst == 80), action=(ct_lb(backends=10.0.0.3:80,20.0.0.3:80);)
 ])
 
-# Create the Load_Balancer_Health_Check again.
+AS_BOX([Create the Load_Balancer_Health_Check again.])
 ovn-nbctl --wait=sb -- --id=@hc create \
 Load_Balancer_Health_Check vip="10.0.0.10\:80" -- add Load_Balancer . \
 health_check @hc
@@ -1127,7 +1127,7 @@ AT_CHECK([cat lflows.txt | sed 's/table=..//'], [0], [dnl
   (ls_in_stateful ), priority=120  , match=(ct.new && ip4.dst == 10.0.0.10 
&& tcp.dst == 80), action=(ct_lb(backends=10.0.0.3:80,20.0.0.3:80);)
 ])
 
-# Get the uuid of both the service_monitor
+AS_BOX([Get the uuid of both the service_monitor])
 sm_sw0_p1=$(fetch_column Service_Monitor _uuid logical_port=sw0-p1)
 sm_sw1_p1=$(fetch_column Service_Monitor _uuid logical_port=sw1-p1)
 
@@ -1137,7 +1137,7 @@ OVS_WAIT_FOR_OUTPUT(
 [  (ls_in_stateful ), priority=120  , match=(ct.new && ip4.dst == 
10.0.0.10 && tcp.dst == 80), action=(ct_lb(backends=10.0.0.3:80,20.0.0.3:80);)
 ])
 
-# Set the service monitor for sw1-p1 to offline
+AS_BOX([Set the service monitor for sw1-p1 to offline])
 check ovn-sbctl set service_monitor sw1-p1 status=offline
 wait_row_count Service_Monitor 1 logical_port=sw1-p1 status=offline
 check ovn-nbctl --wait=sb sync
@@ -1148,7 +1148,7 @@ OVS_WAIT_FOR_OUTPUT(
 [  (ls_in_stateful ), priority=120  , match=(ct.new && ip4.dst == 
10.0.0.10 && tcp.dst == 80), action=(ct_lb(backends=10.0.0.3:80);)
 ])
 
-# Set the service monitor for sw0-p1 to offline
+AS_BOX([Set the service monitor for sw0-p1 to offline])
 

[ovs-dev] [PATCH ovn v7 1/5] Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog

2020-11-18 Thread Ben Pfaff
From: Leonid Ryzhyk 

Export `ddlog_warn` and `ddlog_err` functions that are just wrappers
around `VLOG_WARN` and `VLOG_ERR`.  This is not ideal because the
functions are exported by `ovn_util.c` and the resulting log messages use
`ovn_util` as module name.  More importantly, these functions do not do
log rate limiting.

Signed-off-by: Leonid Ryzhyk 
Signed-off-by: Ben Pfaff 
---
 TODO.rst   |  6 ++
 lib/ovn-util.c | 15 +++
 lib/ovn-util.h |  5 +
 3 files changed, 26 insertions(+)

diff --git a/TODO.rst b/TODO.rst
index c15815539f4f..ecfe62870fb0 100644
--- a/TODO.rst
+++ b/TODO.rst
@@ -153,6 +153,12 @@ OVN To-do List
   hashtable lookup in parse_port_group() which can be avoided when we are sure
   that the Southbound DB uses the new format.
 
+* ovn-northd-ddlog: Calls to warn() and err() from DDlog code would be
+  better refactored to use the Warning[] relation (and introduce an
+  Error[] relation once we want to issue some errors that way).  This
+  would be easier with some improvements in DDlog to more easily
+  output to multiple relations from a single production.
+
 * IP Multicast Relay
 
   * When connecting bridged logical switches (localnet) to logical routers
diff --git a/lib/ovn-util.c b/lib/ovn-util.c
index 18aac8da34ca..7da22705db6c 100644
--- a/lib/ovn-util.c
+++ b/lib/ovn-util.c
@@ -713,3 +713,18 @@ ip_address_and_port_from_lb_key(const char *key, char 
**ip_address,
 *addr_family = ss.ss_family;
 return true;
 }
+
+#ifdef DDLOG
+/* Callbacks used by the ddlog northd code to print warnings and errors. */
+void
+ddlog_warn(const char *msg)
+{
+VLOG_WARN("%s", msg);
+}
+
+void
+ddlog_err(const char *msg)
+{
+VLOG_ERR("%s", msg);
+}
+#endif
diff --git a/lib/ovn-util.h b/lib/ovn-util.h
index 3496673b2641..2b31423a4589 100644
--- a/lib/ovn-util.h
+++ b/lib/ovn-util.h
@@ -221,4 +221,9 @@ char *str_tolower(const char *orig);
 bool ip_address_and_port_from_lb_key(const char *key, char **ip_address,
  uint16_t *port, int *addr_family);
 
+#ifdef DDLOG
+void ddlog_warn(const char *msg);
+void ddlog_err(const char *msg);
+#endif
+
 #endif
-- 
2.26.2

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


[ovs-dev] [PATCH ovn v7 0/5] Add DDlog implementation of ovn-northd

2020-11-18 Thread Ben Pfaff
v1->v2:
  - Applied several patches.
  - New commit to add documentation for the system-userspace testsuite.
  - New patches to improve the testsuite a couple of ways.
  - Revised "Prepare for multiple northd types" to fix system-userspace
testsuite.
  - Updated DDlog implementation of northd to match latest master.
  - Updated copyright notices in DDlog implementation.

v2->v3:
  - Applied documentation patch.
  - Added some test improvements to fix reported problems.
  - Really updated copyright notices (didn't commit, last time).
  - Correctly skip ddlog tests when ddlog not compiled.

v3->v4:
  - Fix dependencies for parallel build.
  - Fix spelling error in documentation.
  - Use --wait=sb, not --wait=hv, when no chassis are running.
  - Fixed IGMP and MLD tests by porting commit 9d2e8d32fb98
("ofctrl.c: Fix duplicated flow handling in I-P while merging
opposite changes."), which I had missed before.

v4.1->v5:
  - Drop patch for ACL log meters (this was included in v4.1 by mistake).
  - In addition to waiting for database, also wait for ports to come up.
  - New patch to support more arguments to wait_for_row_count that waiting
for ports indirectly needed.
  - Port commit c29221d9322a ("Allow VLAN traffic when LS:vlan-passthru=true").
  - Port commit 36a8745de859 ("Add support for DHCP options 28 (Broadcast 
Address)")
  - Add patch to improve "ARP/ND request broadcast limiting" test.

v5->v6:
  - Applied and dropped patch for "test a == b".
  - Applied and dropped patch to allow more args to wait_for_row_count().
  - Applied and dropped ARP/ND broadcast test improvement patch.
  - Fix whitespace in patch to export ddlog_warn() and ddlog_err().

v6->v7:
  - Fixed "make dist" (thanks to Numan for reporting this.)
  - Fix probe interval setting (thanks to Numan again).
  - Small amount of improvement of OVN DDlog code (use lambdas in more places).
  - Fine-tuning of ovn-northd-ddlog code for jsonrpc session usage.
  - Fix newline issues in tests reported by Dumitru.
  - Add ack from Dumitru.

Ben Pfaff (3):
  tests: Prepare for multiple northd types.
  tests: Eliminate most "sleep" calls.
  tests: Improve debuggability of tests.

Leonid Ryzhyk (2):
  Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog
  ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.

 Documentation/automake.mk |2 +
 Documentation/intro/install/general.rst   |   31 +-
 Documentation/topics/debugging-ddlog.rst  |  280 +
 Documentation/topics/index.rst|1 +
 Documentation/tutorials/ddlog-new-feature.rst |  362 +
 Documentation/tutorials/index.rst |1 +
 NEWS  |6 +
 TODO.rst  |6 +
 acinclude.m4  |   43 +
 configure.ac  |5 +
 lib/ovn-util.c|   15 +
 lib/ovn-util.h|5 +
 m4/ovn.m4 |   16 +
 northd/.gitignore |4 +
 northd/automake.mk|  104 +
 northd/helpers.dl |   89 +
 northd/ipam.dl|  506 ++
 northd/lrouter.dl |  715 ++
 northd/lswitch.dl |  643 ++
 northd/multicast.dl   |  259 +
 northd/ovn-nb.dlopts  |   13 +
 northd/ovn-northd-ddlog.c | 1749 
 northd/ovn-sb.dlopts  |   28 +
 northd/ovn.dl |  384 +
 northd/ovn.rs |  857 ++
 northd/ovn.toml   |2 +
 northd/ovn_northd.dl  | 7483 +
 northd/ovsdb2ddlog2c  |  127 +
 tests/atlocal.in  |7 +
 tests/ovn-controller-vtep.at  |6 +-
 tests/ovn-ic.at   |   11 +-
 tests/ovn-macros.at   |  114 +-
 tests/ovn-northd.at   |  387 +-
 tests/ovn.at  |  887 +-
 tests/ovs-macros.at   |   43 +-
 tests/system-ovn.at   |  122 +-
 tutorial/ovs-sandbox  |   24 +-
 utilities/checkpatch.py   |2 +-
 utilities/ovn-ctl |   20 +-
 39 files changed, 14791 insertions(+), 568 deletions(-)
 create mode 100644 Documentation/topics/debugging-ddlog.rst
 create mode 100644 Documentation/tutorials/ddlog-new-feature.rst
 create mode 100644 northd/helpers.dl
 create mode 100644 northd/ipam.dl
 create mode 100644 northd/lrouter.dl
 create mode 100644 northd/lswitch.dl
 create mode 100644 northd/multicast.dl
 create mode 100644 northd/ovn-nb.dlopts
 create mode 100644 

Re: [ovs-dev] [PATCH] Allow to create tunnel ports with the same config

2020-11-18 Thread Ben Pfaff
On Wed, Nov 18, 2020 at 10:35:01PM -0500, Ihar Hrachyshka wrote:
> It's a legal setup where tunnel ports with the same config are created
> on different bridges served by Open vSwitch. Specifically, multiple
> OVN controllers may emulate multiple chassis running on the same
> physical host, in which case they may need to create separate tunnel
> ports to connect to the same remote chassis on their respective
> bridges.
> 
> Signed-off-by: Ihar Hrachyshka 

That makes sense for sending packets, but which one is supposed to
receive a packet when one arrives for that tunnel?
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn v5 5/8] tests: Eliminate most "sleep" calls.

2020-11-18 Thread Ben Pfaff
On Thu, Nov 12, 2020 at 12:25:24PM +0100, Dumitru Ceara wrote:
> On 11/12/20 2:45 AM, Ben Pfaff wrote:
> > Many of these could be replaced by "ovn-nbctl sync".  Some weren't
> > really needed at all because they were adjacent to something that itself
> > called sync or otherwise used --wait.  Some were more appropriately
> > done with explicit waits for what was really needed.
> > 
> > I left some "sleep"s.  Some were because they were "negative" sleeps:
> > they were giving time for something to happen that should *not* happen
> > (in other words, if you wait for it to happen, you'll wait forever,
> > unless there's a bug).  Some were because I didn't know how to properly
> > wait for what they were waiting for, or because I didn't understand
> > the circumstances deeply enough.
> > 
> > Signed-off-by: Ben Pfaff 
> > ---
> 
> There are still tests that occasionally fail when I run the suite with
> "-j20".
> 
> I'm pretty sure they're all related to the "--wait=hv sync" bug [0].
> 
> If I patch OVS to include the following IDL changes:
> -
> https://patchwork.ozlabs.org/project/openvswitch/patch/20201110121811.2205350-1-i.maxim...@ovn.org/
> -
> https://patchwork.ozlabs.org/project/openvswitch/patch/1605018868-30691-1-git-send-email-dce...@redhat.com/
> 
> And if I patch OVN with the following commit which depends on the OVS
> patches:
> https://github.com/dceara/ovn/commit/c4926fbb386a3fa83c99618b6b12bcb4466fd1d6
> 
> Then the tests pass (or at least I'm not hitting this specific race
> condition anymore).
> 
> Would it be possible to have a look at the OVS IDL patches above?  Once
> those are merged I can cleanup and post the OVN patch.

I see that the first two above were applied.  I sent a question about
the third one (the OVN patch).

Thanks so much for helping me out with this!
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] Referral - Credit Card Processing Fee Change (15 U.S. Code 1693o 2)

2020-11-18 Thread Amber Gauwain
Paying more than $500/month in Visa/MasterCard Credit Card Processing Fees?
Give me  3 minutes to explain your alternative.  

1) How much of your profit margin is 'spent' on fees every month? Tired of 
paying?

Your processor isn't telling you about all the available options.  
Why don't they offer you zero-fee processing? They can't. 
Why? Their equipment is old.  Their system is rigid.  And you keep paying. 
Use the new laws - you can demand zero-fee cash discount processing. 


2) Here's how it works.  (Thanks to US Law: 15 U. S.  Code § 1693o– 2):

You Get: Unlimited Flat-Fee Processing for only $24. 99 per month. 
  - Your business gets unlimited credit card processing.  
  - Same flat fee each month - unlimited transactions. 
  - We cover equipment fees - you start off with a free terminal - no rental 
fees. 
  - No surprises - only our 'No Contract Policy'

 Click To Reply To This Email - Send us a name & phone number. 




October  2020 Promotion:

3) Our October Promotion - First-Come-First-Serve:

Email us today - and here' s what we' re offering:

Free Equipment (No Rental-Fees on Terminals). 
Only 30-Day Commitment Needed. 
No Cancellation Fees. 
Try Without Obligation. 

 What steps do I need to take?

1) Email us a name/number. 
2) Don't cancel your current processor. 
3) Place our new terminal right next to your old one. 
4) Try us out.  Risk free.  No obligation. 
5) Not happy? We'll come get our equipment. 


Click to send  a quick email:  I'm interested. 

Best,
Anne




(Image of our most popular equipment & processing terminals. )




To  Unsubscribe  you  must  click the Unsubscribe link here. 
This is an automated system -  emails or replies  with  " stop" or " remove" do 
not work. 
Your request will be  handled  promptly but please allow 1-3 days  for complete 
removal. 

You may also  write to the address below:
8 The Green STE 8 - Dover, DE 19901





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


Re: [ovs-dev] [PATCH ovn v2] ovn-controller: Fix nb_cfg update with monitor_cond_change in flight.

2020-11-18 Thread Ben Pfaff
On Tue, Nov 17, 2020 at 05:50:20PM +0100, Dumitru Ceara wrote:
> It is not correct for ovn-controller to pass the current SB_Global.nb_cfg
> value to ofctrl_put() if there are pending changes to conditional
> monitoring clauses (local or in flight).  It might be that after the
> monitor condition is acked by the SB, records that were added to the SB
> before SB_Global.nb_cfg was set are now sent as updates to
> ovn-controller.  These should be first installed in OVS before
> ovn-controller reports that it caught up with the current
> SB_Global.nb_cfg value.
> 
> Also, ofctrl_put should not advance cur_cfg if there are flow updates in
> flight.
> 
> Fixes: ca278d98a4f5 ("ovn-controller: Initial use of incremental engine - 
> quiet mode.")
> Signed-off-by: Dumitru Ceara 
> 
> ---
> v2:
> - use new IDL *set_condition() return value.
> - fix ofctrl_put to not advance cur_cfg if there are flow updates in
>   flight.

ovn-controller has changed (advanced?) to the point that I have trouble
understanding the code now.  I'm going to assume that you understand it
pretty well, but please allow me to ask a question here.  Will this
always manage to come up to date with some version of the sb, or is
there a chance that it never will report a consistent value if the sb
keeps changing quickly?  I wasn't able to figure that out with a quick
look.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn v5 2/8] tests: Prepare for multiple northd types.

2020-11-18 Thread Ben Pfaff
On Thu, Nov 12, 2020 at 09:45:02AM +0100, Dumitru Ceara wrote:
> Except the two minor comments above, the rest looks good to me:
> 
> Acked-by: Dumitru Ceara 

Thanks, those will be fixed for v6, and I've added your ack.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn v5 8/8] ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.

2020-11-18 Thread Ben Pfaff
On Thu, Nov 12, 2020 at 05:15:45PM -0500, Flavio Fernandes wrote:
> Sorry for making more work for you but
> Could we also do something for the "make sandbox" target, where
> we could have the ovn_start function optionally use ovn-northd-ddlog  ?
> Something like:
> 
> make sandbox --ddlog

That is there already, use:
make sandbox SANDBOXFLAGS=--ddlog
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn v5 8/8] ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.

2020-11-18 Thread Ben Pfaff
Can you explain further?  I guess you must be saying that there is a
dependency problem in v5, but I don't see the issue yet.

On Thu, Nov 12, 2020 at 05:35:48PM -0500, Flavio Fernandes wrote:
> Hm..
> 
> Could it be that you inadvertently remove this change in V5 ?
> 
> 
> diff --git a/northd/automake.mk b/northd/automake.mk
> index 2717f59c5f3a..157b5d0df487 100644
> --- a/northd/automake.mk
> +++ b/northd/automake.mk
> @@ -22,8 +22,7 @@ bin_PROGRAMS += northd/ovn-northd-ddlog
> northd_ovn_northd_ddlog_SOURCES = \
>   northd/ovn-northd-ddlog.c \
>   northd/ovn-northd-ddlog-sb.inc \
> - northd/ovn-northd-ddlog-nb.inc \
> - northd/ovn_northd_ddlog/ddlog.h
> + northd/ovn-northd-ddlog-nb.inc
> northd_ovn_northd_ddlog_LDADD = \
>   northd/ovn_northd_ddlog/target/release/libovn_northd_ddlog.la 
>  \
>   lib/libovn.la  \
> @@ -46,6 +45,7 @@ BUILT_SOURCES += \
>   northd/ovn-northd-ddlog-sb.inc \
>   northd/ovn-northd-ddlog-nb.inc
> 
> +northd/ovn-northd-ddlog.$(OBJEXT): northd/ovn_northd_ddlog/ddlog.h
> northd/ovn_northd_ddlog/ddlog.h: northd/ddlog.stamp
> 
> CARGO_VERBOSE = $(cargo_verbose_$(V))
> 
> 
> -- flaviof
> 
> 
> 
> > On Nov 11, 2020, at 8:45 PM, Ben Pfaff  wrote:
> > 
> > From: Leonid Ryzhyk 
> > 
> > This implementation is incremental, meaning that it only recalculates
> > what is needed for the southbound database when northbound changes
> > occur.  It is expected to scale better than the C implementation,
> > for large deployments.  (This may take testing and tuning to be
> > effective.)
> > 
> > There are three tests that I'm having mysterious trouble getting
> > to work with DDlog.  For now, I've marked the testsuite to skip
> > them unless RUN_ANYWAY=yes is set in the environment.
> > 
> > Signed-off-by: Leonid Ryzhyk 
> > Co-authored-by: Justin Pettit 
> > Signed-off-by: Justin Pettit 
> > Co-authored-by: Ben Pfaff 
> > Signed-off-by: Ben Pfaff 
> > ---
> 


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


Re: [ovs-dev] Order

2020-11-18 Thread heisaiboyakumeru

I've invited you to fill out the following form:
Re: Order

To fill it out, visit:
https://docs.google.com/forms/d/e/1FAIpQLSdHKME52pOBKY4jFVW587totG-ZzKRT8P8yZZ-abPmsGaCvug/viewform?vc=0c=0w=1flr=0usp=mail_form_link

Ive invited you to fill out a form:

Google Forms: Create and analyze surveys.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] Update tutorial for newer versions of Faucet and Open vSwitch.

2020-11-18 Thread Brad Cowie

Hi Ilya,

Sorry for the late reply, this email got lost in my inbox.

Yes this patch is still good to go and happy for it to be merged.

Thanks,
Brad

On 10/09/20 12:39 am, Ilya Maximets wrote:

On 9/12/18 1:53 AM, Brad Cowie wrote:

Newer versions of Faucet use a dynamic OpenFlow pipeline based on what
features are enabled in the configuration file. Update log output, flow
table dumps and explanations to be consistent with newer Faucet versions.

Remove mentions of bugs that we have since fixed in Faucet since the
tutorial was originally written.

Adds documentation on changes to Open vSwitch commands to recommend
using a version that is compatible with the features of the tutorial.

Reported-by: Matthias Ableidinger 
Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2018-August/047180.html
Signed-off-by: Brad Cowie 
---


Hi.  I'm looking through old patches after the patchwork cleanup and
this one seems to be never applied.  I do not have any experience with
Faucet, but the patch looks ok and it's still applicable.

Brad, Ben, if it still valid I could apply it.  What do you think?

Best regards, Ilya Maximets.


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


Re: [ovs-dev] [PATCH v12 ovn] Allow to run multiple controllers on the same machine

2020-11-18 Thread Ihar Hrachyshka
Note: this patch requires
https://patchwork.ozlabs.org/project/openvswitch/patch/20201119033501.798597-1-ihrac...@redhat.com/
to allow OVN controller to complete tunnel port creation for multiple
virtual colocated chassis to connect to a remote chassis.

On Wed, Nov 18, 2020 at 10:21 PM Ihar Hrachyshka  wrote:
>
> User stories:
> 1) NFV: an admin wants to run two separate instances of OVN controller
>using the same database but configuring ports on different bridges.
>Some of these bridges may use DPDK while others may not.
>
> 2) Parallel OVN instances: an admin wants to run two separate
>instances of OVN controller using different databases. The
>instances are completely independent and serve different consumers.
>For example, the same machine runs both OpenStack and OpenShift
>stacks, each running its own separate OVN stack.
>
> To serve these use cases, several features should be added to
> ovn-controller:
>
> - use different database configuration for multiple controllers;
> - customize chassis name used by controller.
>
> =
>
> For each of the following database configuration options, their
> extended chassis specific counterparts are introduced:
>
> external_ids:hostname
> external_ids:ovn-bridge
> external_ids:ovn-bridge-datapath-type
> external_ids:ovn-bridge-mappings
> external_ids:ovn-chassis-mac-mappings
> external_ids:ovn-cms-options
> external_ids:ovn-encap-csum
> external_ids:ovn-encap-ip
> external_ids:ovn-encap-type
> external_ids:ovn-is-interconn
> external_ids:ovn-monitor-all
> external_ids:ovn-openflow-probe-interval
> external_ids:ovn-remote
> external_ids:ovn-remote-probe-interval
>
> For example,
>
> external_ids:ovn-bridge -> external_ids:ovn-bridge-=
> external_ids:ovn-encap-ip -> external_ids:ovn-encap-ip-=
> external_ids:ovn-remote -> external_ids:ovn-remote-=
>
> Priority wise,  specific options take precedence.
>
> =
>
> For system-id,
>
> You can now pass intended chassis name via CLI argument:
>
>   $ ovn-controller ... -n 
>
> Alternatively, you can configure a chassis name by putting it into the
> ${ovn_sysconfdir}/system-id-override file before running the
> controller.
>
> The latter option may be more useful in container environment where
> the same image may be reused for multiple controller instances, where
> ovs_sysconfigdir/ovn/system-id-override is a volume mounted into this
> generic image. The override file is read once on startup. If you want
> to apply a new chassis name to a controller instance, restart it to
> reread the file.
>
> Priority wise, this is the order in which different means to configure
> the chassis name are used:
>
> - ovn-controller ... -n  CLI argument.
> - ${ovs_sysconfdir}/ovn/system-id-override file;
> - external_ids:system-id= ovsdb option;
>
> =
>
> Concurrent chassis running on the same host may inadvertantly remove
> patch ports that belong to their peer chassis. To avoid that, patch
> ports are now tagged in external-ids:ovn-chassis-id with the
> appropriate chassis name, and only patch ports that belong to the
> chassis are touched when cleaning up. Also, now only tunnels on the
> active integration bridge are being cleaned up.
>
> Note that external-ids:ovn-chassis-id key is already used for tunnel
> ports to identify the remote tunnel endpoint. We can reuse the same
> key for patch ports because the key usage is not overlapping.
>
> Alternatively, we could introduce a new key with a similar but
> different name. This would simplify code changes needed but would
> arguably introduce even more confusion. Since the key name is not
> entirely self-descriptive for tunnel ports (a better name would be
> e.g. ovn-remote-chassis or ovn-peer-chassis), the ideal scenario would
> be to rename the key for tunnel endpoints but reuse it for patch
> ports. This would involve additional migration steps and is probably
> not worth the hassle.
>
> =
>
> This patch expands tunnel port name to allow for long similar chassis
> names used on the same host. It also renames tunnel endpoints as
> follows to allow the same endpoints on different bridges:
>
> ovn--  >  ovn---
>
> =
>
> Note: this patch assumes that each chassis has its own unique IP.
> Future work may consider adding support to specify custom port numbers
> for tunneling that would allow to reuse the same IP address for
> multiple chassis running on the same host. This work is out of scope
> for this patch.
>
> Signed-off-by: Ihar Hrachyshka 
>
> ---
>
> v1: initial implementation.
> v2: fixed test case to check ports are claimed by proper chassis.
> v2: added NEWS entry.
> v2: fixed some compiler warnings.
> v2: moved file_system_id declaration inside a function that uses it.
> v2: removed unneeded binding.h #include.
> v2: docs: better explanation of alternatives to select chassis name.
> v3: reverted priority order for chassis configuration: first CLI, then
> system-id file, then ovsdb.
> v4: introduce helpers to extract 

[ovs-dev] [PATCH] Allow to create tunnel ports with the same config

2020-11-18 Thread Ihar Hrachyshka
It's a legal setup where tunnel ports with the same config are created
on different bridges served by Open vSwitch. Specifically, multiple
OVN controllers may emulate multiple chassis running on the same
physical host, in which case they may need to create separate tunnel
ports to connect to the same remote chassis on their respective
bridges.

Signed-off-by: Ihar Hrachyshka 
---
 ofproto/tunnel.c | 19 ++-
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c
index 3455ed233..fc45d40f9 100644
--- a/ofproto/tunnel.c
+++ b/ofproto/tunnel.c
@@ -148,11 +148,11 @@ ofproto_tunnel_init(void)
 
 static bool
 tnl_port_add__(const struct ofport_dpif *ofport, const struct netdev *netdev,
-   odp_port_t odp_port, bool warn, bool native_tnl, const char 
name[])
+   odp_port_t odp_port, bool warn OVS_UNUSED, bool native_tnl,
+   const char name[])
 OVS_REQ_WRLOCK(rwlock)
 {
 const struct netdev_tunnel_config *cfg;
-struct tnl_port *existing_port;
 struct tnl_port *tnl_port;
 struct hmap **map;
 
@@ -174,21 +174,6 @@ tnl_port_add__(const struct ofport_dpif *ofport, const 
struct netdev *netdev,
 tnl_port->match.pt_mode = netdev_get_pt_mode(netdev);
 
 map = tnl_match_map(_port->match);
-existing_port = tnl_find_exact(_port->match, *map);
-if (existing_port) {
-if (warn) {
-struct ds ds = DS_EMPTY_INITIALIZER;
-tnl_match_fmt(_port->match, );
-VLOG_WARN("%s: attempting to add tunnel port with same config as "
-  "port '%s' (%s)", tnl_port_get_name(tnl_port),
-  tnl_port_get_name(existing_port), ds_cstr());
-ds_destroy();
-}
-netdev_close(tnl_port->netdev);
-free(tnl_port);
-return false;
-}
-
 hmap_insert(ofport_map, _port->ofport_node, hash_pointer(ofport, 0));
 
 if (!*map) {
-- 
2.28.0

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


Re: [ovs-dev] [PATCH v11 ovn] Allow to run multiple controllers on the same machine

2020-11-18 Thread Ihar Hrachyshka
On Tue, Nov 10, 2020 at 9:31 PM Ihar Hrachyshka  wrote:
>
> On Tue, Nov 10, 2020 at 10:25 AM Numan Siddique  wrote:
> >
> > "
> >
> > On Tue, Nov 3, 2020 at 4:45 AM Ihar Hrachyshka  wrote:
> > >
> > > User stories:
> > > 1) NFV: an admin wants to run two separate instances of OVN controller
> > >using the same database but configuring ports on different bridges.
> > >Some of these bridges may use DPDK while others may not.
> > >
> > > 2) Parallel OVN instances: an admin wants to run two separate
> > >instances of OVN controller using different databases. The
> > >instances are completely independent and serve different consumers.
> > >For example, the same machine runs both OpenStack and OpenShift
> > >stacks, each running its own separate OVN stack.
> > >
> > > To serve these use cases, several features should be added to
> > > ovn-controller:
> > >
> > > - use different database configuration for multiple controllers;
> > > - customize chassis name used by controller.
> > >
> > > =
> > >
> > > For each of the following database configuration options, their
> > > extended chassis specific counterparts are introduced:
> > >
> > > external_ids:hostname
> > > external_ids:ovn-bridge
> > > external_ids:ovn-bridge-datapath-type
> > > external_ids:ovn-bridge-mappings
> > > external_ids:ovn-chassis-mac-mappings
> > > external_ids:ovn-cms-options
> > > external_ids:ovn-encap-csum
> > > external_ids:ovn-encap-ip
> > > external_ids:ovn-encap-type
> > > external_ids:ovn-is-interconn
> > > external_ids:ovn-monitor-all
> > > external_ids:ovn-openflow-probe-interval
> > > external_ids:ovn-remote
> > > external_ids:ovn-remote-probe-interval
> > >
> > > For example,
> > >
> > > external_ids:ovn-bridge -> external_ids:ovn-bridge-=
> > > external_ids:ovn-encap-ip -> external_ids:ovn-encap-ip-=
> > > external_ids:ovn-remote -> external_ids:ovn-remote-=
> > >
> > > Priority wise,  specific options take precedence.
> > >
> > > =
> > >
> > > For system-id,
> > >
> > > You can now pass intended chassis name via CLI argument:
> > >
> > >   $ ovn-controller ... -n 
> > >
> > > Alternatively, you can configure a chassis name by putting it into the
> > > ${ovn_sysconfdir}/system-id-override file before running the
> > > controller.
> > >
> > > The latter option may be more useful in container environment where
> > > the same image may be reused for multiple controller instances, where
> > > ovs_sysconfigdir/ovn/system-id-override is a volume mounted into this
> > > generic image. The override file is read once on startup. If you want
> > > to apply a new chassis name to a controller instance, restart it to
> > > reread the file.
> > >
> > > Priority wise, this is the order in which different means to configure
> > > the chassis name are used:
> > >
> > > - ovn-controller ... -n  CLI argument.
> > > - ${ovs_sysconfdir}/ovn/system-id-override file;
> > > - external_ids:system-id= ovsdb option;
> > >
> > > =
> > >
> > > Concurrent chassis running on the same host may inadvertantly remove
> > > patch ports that belong to their peer chassis. To avoid that, patch
> > > ports are now tagged in external-ids:ovn-chassis-id with the
> > > appropriate chassis name, and only patch ports that belong to the
> > > chassis are touched when cleaning up. Also, now only tunnels on the
> > > active integration bridge are being cleaned up.
> > >
> > > Note that external-ids:ovn-chassis-id key is already used for tunnel
> > > ports to identify the remote tunnel endpoint. We can reuse the same
> > > key for patch ports because the key usage is not overlapping.
> > >
> > > Alternatively, we could introduce a new key with a similar but
> > > different name. This would simplify code changes needed but would
> > > arguably introduce even more confusion. Since the key name is not
> > > entirely self-descriptive for tunnel ports (a better name would be
> > > e.g. ovn-remote-chassis or ovn-peer-chassis), the ideal scenario would
> > > be to rename the key for tunnel endpoints but reuse it for patch
> > > ports. This would involve additional migration steps and is probably
> > > not worth the hassle.
> > >
> > > =
> > >
> > > This patch also expands tunnel port name to allow for long similar
> > > chassis names used on the same host.
> > >
> > > =
> > >
> > > Note: this patch assumes that each chassis has its own unique IP.
> > > Future work may consider adding support to specify custom port numbers
> > > for tunneling that would allow to reuse the same IP address for
> > > multiple chassis running on the same host. This work is out of scope
> > > for this patch.
> > >
> > > Signed-off-by: Ihar Hrachyshka 
> > >
> > > ---
> > >
> > > v1: initial implementation.
> > > v2: fixed test case to check ports are claimed by proper chassis.
> > > v2: added NEWS entry.
> > > v2: fixed some compiler warnings.
> > > v2: moved file_system_id declaration inside a function that uses it.
> > > v2: removed unneeded binding.h #include.

[ovs-dev] [PATCH v12 ovn] Allow to run multiple controllers on the same machine

2020-11-18 Thread Ihar Hrachyshka
User stories:
1) NFV: an admin wants to run two separate instances of OVN controller
   using the same database but configuring ports on different bridges.
   Some of these bridges may use DPDK while others may not.

2) Parallel OVN instances: an admin wants to run two separate
   instances of OVN controller using different databases. The
   instances are completely independent and serve different consumers.
   For example, the same machine runs both OpenStack and OpenShift
   stacks, each running its own separate OVN stack.

To serve these use cases, several features should be added to
ovn-controller:

- use different database configuration for multiple controllers;
- customize chassis name used by controller.

=

For each of the following database configuration options, their
extended chassis specific counterparts are introduced:

external_ids:hostname
external_ids:ovn-bridge
external_ids:ovn-bridge-datapath-type
external_ids:ovn-bridge-mappings
external_ids:ovn-chassis-mac-mappings
external_ids:ovn-cms-options
external_ids:ovn-encap-csum
external_ids:ovn-encap-ip
external_ids:ovn-encap-type
external_ids:ovn-is-interconn
external_ids:ovn-monitor-all
external_ids:ovn-openflow-probe-interval
external_ids:ovn-remote
external_ids:ovn-remote-probe-interval

For example,

external_ids:ovn-bridge -> external_ids:ovn-bridge-=
external_ids:ovn-encap-ip -> external_ids:ovn-encap-ip-=
external_ids:ovn-remote -> external_ids:ovn-remote-=

Priority wise,  specific options take precedence.

=

For system-id,

You can now pass intended chassis name via CLI argument:

  $ ovn-controller ... -n 

Alternatively, you can configure a chassis name by putting it into the
${ovn_sysconfdir}/system-id-override file before running the
controller.

The latter option may be more useful in container environment where
the same image may be reused for multiple controller instances, where
ovs_sysconfigdir/ovn/system-id-override is a volume mounted into this
generic image. The override file is read once on startup. If you want
to apply a new chassis name to a controller instance, restart it to
reread the file.

Priority wise, this is the order in which different means to configure
the chassis name are used:

- ovn-controller ... -n  CLI argument.
- ${ovs_sysconfdir}/ovn/system-id-override file;
- external_ids:system-id= ovsdb option;

=

Concurrent chassis running on the same host may inadvertantly remove
patch ports that belong to their peer chassis. To avoid that, patch
ports are now tagged in external-ids:ovn-chassis-id with the
appropriate chassis name, and only patch ports that belong to the
chassis are touched when cleaning up. Also, now only tunnels on the
active integration bridge are being cleaned up.

Note that external-ids:ovn-chassis-id key is already used for tunnel
ports to identify the remote tunnel endpoint. We can reuse the same
key for patch ports because the key usage is not overlapping.

Alternatively, we could introduce a new key with a similar but
different name. This would simplify code changes needed but would
arguably introduce even more confusion. Since the key name is not
entirely self-descriptive for tunnel ports (a better name would be
e.g. ovn-remote-chassis or ovn-peer-chassis), the ideal scenario would
be to rename the key for tunnel endpoints but reuse it for patch
ports. This would involve additional migration steps and is probably
not worth the hassle.

=

This patch expands tunnel port name to allow for long similar chassis
names used on the same host. It also renames tunnel endpoints as
follows to allow the same endpoints on different bridges:

ovn--  >  ovn---

=

Note: this patch assumes that each chassis has its own unique IP.
Future work may consider adding support to specify custom port numbers
for tunneling that would allow to reuse the same IP address for
multiple chassis running on the same host. This work is out of scope
for this patch.

Signed-off-by: Ihar Hrachyshka 

---

v1: initial implementation.
v2: fixed test case to check ports are claimed by proper chassis.
v2: added NEWS entry.
v2: fixed some compiler warnings.
v2: moved file_system_id declaration inside a function that uses it.
v2: removed unneeded binding.h #include.
v2: docs: better explanation of alternatives to select chassis name.
v3: reverted priority order for chassis configuration: first CLI, then
system-id file, then ovsdb.
v4: introduce helpers to extract external-ids (per-chassis or global).
v4: introduce per-chassis config options for all keys.
v4: introduce -M (--concurrent) CLI argument to avoid patch ports
removed by concurrent chassis.
v5: rebased.
v6: switched from -M (--concurrent) to external-ids:ovn-is-concurrent.
v6: with ovn-is-concurrent=true, also avoid removing unknown tunnel
endpoints.
v7: don't clean up tunnel endpoints from other bridges.
v7: don't clean up patch ports that don't belong to the chassis.
v7: remove ovn-is-concurrent that is no longer needed.
v7: 

Re: [ovs-dev] Referral - Credit Card Processing - Unlimited Flat Fee Processing - Free Equipment

2020-11-18 Thread Darla Brancanto
Paying more than $500/month in Visa/MasterCard Credit Card Processing Fees?
Give me  3 minutes to explain your alternative.  

1) How much of your profit margin is 'spent' on fees every month? Tired of 
paying?

Your processor isn't telling you about all the available options.  
Why don't they offer you zero-fee processing? They can't. 
Why? Their equipment is old.  Their system is rigid.  And you keep paying. 
Use the new laws - you can demand zero-fee cash discount processing. 


2) Here's how it works.  (Thanks to US Law: 15 U. S.  Code § 1693o– 2):

You Get: Unlimited Flat-Fee Processing for only $24. 99 per month. 
  - Your business gets unlimited credit card processing.  
  - Same flat fee each month - unlimited transactions. 
  - We cover equipment fees - you start off with a free terminal - no rental 
fees. 
  - No surprises - only our 'No Contract Policy'

 Click To Reply To This Email - Send us a name & phone number. 




October  2020 Promotion:

3) Our October Promotion - First-Come-First-Serve:

Email us today - and here' s what we' re offering:

Free Equipment (No Rental-Fees on Terminals). 
Only 30-Day Commitment Needed. 
No Cancellation Fees. 
Try Without Obligation. 

 What steps do I need to take?

1) Email us a name/number. 
2) Don't cancel your current processor. 
3) Place our new terminal right next to your old one. 
4) Try us out.  Risk free.  No obligation. 
5) Not happy? We'll come get our equipment. 


Click to send  a quick email:  I'm interested. 

Best,
Anne




(Image of our most popular equipment & processing terminals. )




To  Unsubscribe  you  must  click the Unsubscribe link here. 
This is an automated system -  emails or replies  with  " stop" or " remove" do 
not work. 
Your request will be  handled  promptly but please allow 1-3 days  for complete 
removal. 

You may also  write to the address below:
8 The Green STE 8 - Dover, DE 19901





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


Re: [ovs-dev] [PATCH] jsonrpc: Avoid disconnecting prematurely due to long poll intervals.

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Ben Pfaff, 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: Line is 80 characters long (recommended limit is 79)
#118 FILE: lib/reconnect.c:568:
long long int expiration = fsm->state_entered + fsm->probe_interval;

Lines checked: 151, 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] Update scripts to support RHEL 7.9

2020-11-18 Thread Gregory Rose
Thanks again Guru!

From: Guru Shetty 
Sent: Wednesday, November 18, 2020 2:32 PM
To: Greg Rose 
Cc: ovs dev ; Gregory Rose 
Subject: Re: [ovs-dev] [PATCH] Update scripts to support RHEL 7.9



On Tue, 17 Nov 2020 at 13:32, Greg Rose 
mailto:gvrose8...@gmail.com>> wrote:
From: Greg Rose mailto:ro...@vmware.com>>

Add support for RHEL7.9 GA release with kernel 3.10.0-1160

Signed-off-by: Greg Rose mailto:gvrose8...@gmail.com>>
---
Thank you. I applied this to master.

 
rhel/openvswitch-kmod-fedora.spec.in
  | 6 --
 rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 6 ++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git 
a/rhel/openvswitch-kmod-fedora.spec.in
 
b/rhel/openvswitch-kmod-fedora.spec.in
index 15eec6d4c..bdaeadbba 100644
--- 
a/rhel/openvswitch-kmod-fedora.spec.in
+++ 
b/rhel/openvswitch-kmod-fedora.spec.in
@@ -19,6 +19,7 @@
 #   - 3.10.0 major revision 1062 (RHEL 7.7)
 #   - 3.10.0 major revision 1101 (RHEL 7.8 Beta)
 #   - 3.10.0 major revision 1127 (RHEL 7.8 GA)
+#   - 3.10.0 major revision  (RHEL 7.9 GA)
 # By default, build against the current running kernel version
 #%define kernel 3.1.5-1.fc16.x86_64
 #define kernel %{kernel_source}
@@ -98,8 +99,9 @@ if grep -qs "suse" /etc/os-release; then
 elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
  { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
[ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ] || \
-   [ "$major_rev" = "1101" ] || [ "$major_rev" = "1127" ] ; }; then
-# For RHEL 7.2, 7.4, 7.6, 7.7, and 7.8
+   [ "$major_rev" = "1101" ] || [ "$major_rev" = "1127" ] || \
+   [ "$major_rev" = "1160" ] ; }; then
+# For RHEL 7.2, 7.4, 7.6, 7.7, 7.8 and 7.9
 if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
 %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
 fi
diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh 
b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
index c70e135cd..9bf25a46b 100644
--- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
+++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
@@ -21,6 +21,7 @@
 #   - 3.10.0 major revision 1062 (RHEL 7.7)
 #   - 3.10.0 major revision 1101 (RHEL 7.8 Beta)
 #   - 3.10.0 major revision 1127 (RHEL 7.8 GA)
+#   - 3.10.0 major revision 1160 (RHEL 7.9)
 #   - 4.4.x,  x >= 73   (SLES 12 SP3)
 #   - 4.12.x, x >= 14   (SLES 12 SP4).
 # It is packaged in the openvswitch kmod RPM and run in the post-install
@@ -118,6 +119,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = 
"10" ]; then
 comp_ver=10
 ver_offset=4
 installed_ver="$minor_rev"
+elif [ "$major_rev" = "1160" ]; then
+#echo "rhel79"
+comp_ver=10
+ver_offset=4
+installed_ver="$minor_rev"
 fi
 elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
 if [ "$mainline_patch" -ge "73" ]; then
--
2.17.1

___
dev mailing list

[ovs-dev] ovs-vswitchd with DPDK crashed when guest VM restarts network service

2020-11-18 Thread Alex Yeh (ayeh) via dev
Hi,
   We are seeing a ovs-vswitchd service crash with segfault in the 
librte_vhost library when a DPDK application within a guest VM is stopped.

   We are using OVS 2.11.1 on CentOS 7.6 (3.10.0-1062 Linux kernel) 
with DPDK 18.11.2.

   We are using OVS-DPDK on the host and the guest VM is running a 
DPDK application. With some traffic, if the application service within the VM 
is restarted, then OVS crashes.

   This crash is not seen if the guest VM is restarted (instead of 
stopping the application within the VM).

   The crash trackback (attached below) points to the 
rte_memcpy_generic() function in rte_memcpy.h. It looks like the crash occurs 
when vhost is trying to dequeue the packets from the guest VM (as the 
application in the guest VM has stopped and the huge pages are returned to the 
guest kernel).

   We have tried enabling iommu in ovs by setting
"other_config:vhost-iommu-support=true" and enabling iommu in qemu using the 
following configuration in the guest domain XML:



   With iommu enabled ovs-vswitchd still crashes when guest VM 
restarts the network service.

   Is this a known problem? Anyone else seen a crash like this?  
How can we protect the ovs-vswitchd from crashing when a guest VM restarts the 
network application or service?

Thanks
Alex


Log:
Oct 7 19:54:16 Branch81-Bravo kernel: [2245909.596635] pmd16[25721]: segfault 
at 7f4d1d733000 ip 7f4d2ae5d066 sp 7f4d1ce65618 error 4 in 
librte_vhost.so.4[7f4d2ae52000+1a000]
Oct 7 19:54:19 Branch81-Bravo systemd[1]: ovs-vswitchd.service: main process 
exited, code=killed, status=11/SEGV

Environment:
CentOs 7.6.1810
openvswitch-2.11.1-1.el7.centos.x86_64
openvswitch-kmod-2.11.1-1.el7.centos.x86_64
dpdk-18.11-2.el7.centos.x86_64
3.10.0-1062.4.1.el7.x86_64
qemu-kvm-ev-2.12.0-18.el7.centos_6.1.1

Core dump trace:
(gdb) bt
#-1 0x7205602e in rte_memcpy_generic (dst=,
src=0x7fffcef3607c, n=)
at /usr/src/debug/dpdk-18.11/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:793
Backtrace stopped: Cannot access memory at address 0x720558f0

(gdb) list *0x7205602e
0x7205602e is in rte_memcpy_generic 
(/usr/src/debug/dpdk-18.11/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:793).
788 }
789
790 /**
791 * For copy with unaligned load
792 */
793 MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);
794
795 /**
796 * Copy whatever left
797 */

(gdb) list *0x7205c192
0x7205c192 is in rte_vhost_dequeue_burst 
(/usr/src/debug/dpdk-18.11/lib/librte_vhost/virtio_net.c:1192).
1187 * In zero copy mode, one mbuf can only reference data
1188 * for one or partial of one desc buff.
1189 */
1190 mbuf_avail = cpy_len;
1191 } else {
1192 if (likely(cpy_len > MAX_BATCH_LEN ||
1193 vq->batch_copy_nb_elems >= vq->size ||
1194 (hdr && cur == m))) {
1195 rte_memcpy(rte_pktmbuf_mtod_offset(cur, void *,
1196 mbuf_offset),
(gdb)

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


[ovs-dev] Errores comunes al utilizar la herramienta

2020-11-18 Thread Robot en Whatsapp Business
Webinar en Vivo: 
Cómo aumentar tus ventas con Whatsapp Business - 05 de Diciembre 
Whatsapp robot: cómo configurarlo para incrementar tus ventas - 12 de Diciembre
 - Horario de 10:00 a 14:00 Hrs.-

BUEN FIN: 3 x 2 en todos nuestros cursos. Promoción válida durante noviembre y 
diciembre 2020 así como enero 2021

Aprenderá a crear contenido de valor con el objetivo de generar alto impacto a 
través de la aplicación más utilizada del mundo.El participante aprenderá a 
descargar, configurar, redactar
y aplicar un robot automatizado, en la aplicación Whatsapp Business, para 
optimizar su proceso de ventas.

Objetivos Específicos:

- WhatsApp cómo poderosa herramienta de ventas. 
- Errores comunes al utilizar WhatsApp cómo herramienta de marketing. 
- Atención al cliente como estrategia de fidelización. 
- Robot en Whatsapp Business.
* Tipos de robot. 
* Guion y contenido.
*Configuración de la herramienta Whatsapp Business.

Para mayor información, responder sobre este correo con la palabra Whatsapp + 
los siguientes datos:

NOMBRE:
TELÉFONO:
EMPRESA:
CORREO ALTERNO: 

Para información inmediata llamar al:
(+52) 55 15 54 66 30 - (+52) 55 30 16 70 85
O puede enviarnos un mensaje vía whatsapp

Innova Learn México - innovalearn. mx - Mérida, Yucatán, México


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


Re: [ovs-dev] ovsdb-idl conditional monitoring change bug

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Ben Pfaff, 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 Ben Pfaff  needs to sign off.
Lines checked: 41, 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


[ovs-dev] [PATCH] jsonrpc: Avoid disconnecting prematurely due to long poll intervals.

2020-11-18 Thread Ben Pfaff
Open vSwitch has a few different jsonrpc-based protocols that depend on
jsonrpc_session to make sure that the connection is up and working.
In turn, jsonrpc_session uses the "reconnect" state machine to send
probes if nothing is received.  This works fine in normal circumstances.
In unusual circumstances, though, it can happen that the program is
busy and doesn't even try to receive anything for a long time.  Then the
timer can time out without a good reason; if it had tried to receive
something, it would have.

There's a solution that the clients of jsonrpc_session could adopt.
Instead of first calling jsonrpc_session_run(), which is what calls into
"reconnect" to deal with timing out, and then calling into
jsonrpc_session_recv(), which is what tries to receive something, they
could use the opposite order.  That would make sure that the timeout
was always based on a recent attempt to receive something.  Great.

The actual code in OVS that uses jsonrpc_session, though, tends to use
the opposite order, and there are enough users and this is a subtle
enough issue that it could get flipped back around even if we fixed it
now.  So this commit takes a different approach.  Instead of fixing
this in the users of jsonrpc_session, we fix it in the users of
reconnect: make them tell when they've tried to receive something (or
disable this particular feature).

This commit fixes the problem that way.  It's kind of hard to reproduce
but I'm pretty sure that I've seen it a number of times in testing.

Signed-off-by: Ben Pfaff 
---
 lib/jsonrpc.c  |  5 -
 lib/reconnect.c| 25 +++--
 lib/reconnect.h|  1 +
 tests/test-reconnect.c |  1 +
 4 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c
index ecbc939fe7f9..b3de8c3a8b93 100644
--- a/lib/jsonrpc.c
+++ b/lib/jsonrpc.c
@@ -1112,13 +1112,16 @@ jsonrpc_session_recv(struct jsonrpc_session *s)
 
 received_bytes = jsonrpc_get_received_bytes(s->rpc);
 jsonrpc_recv(s->rpc, );
+
+long long int now = time_msec();
+reconnect_try_receive(s->reconnect, now);
 if (received_bytes != jsonrpc_get_received_bytes(s->rpc)) {
 /* Data was successfully received.
  *
  * Previously we only counted receiving a full message as activity,
  * but with large messages or a slow connection that policy could
  * time out the session mid-message. */
-reconnect_activity(s->reconnect, time_msec());
+reconnect_activity(s->reconnect, now);
 }
 
 if (msg) {
diff --git a/lib/reconnect.c b/lib/reconnect.c
index c89abab8894a..57d879ce43a1 100644
--- a/lib/reconnect.c
+++ b/lib/reconnect.c
@@ -61,6 +61,7 @@ struct reconnect {
 long long int last_activity;
 long long int last_connected;
 long long int last_disconnected;
+long long int last_receive_attempt;
 unsigned int max_tries;
 unsigned int backoff_free_tries;
 
@@ -109,6 +110,7 @@ reconnect_create(long long int now)
 fsm->last_activity = now;
 fsm->last_connected = LLONG_MAX;
 fsm->last_disconnected = LLONG_MAX;
+fsm->last_receive_attempt = now;
 fsm->max_tries = UINT_MAX;
 fsm->creation_time = now;
 
@@ -501,6 +503,19 @@ reconnect_activity(struct reconnect *fsm, long long int 
now)
 fsm->last_activity = now;
 }
 
+/* Tell 'fsm' that some attempt to receive data on the connection was made at
+ * 'now'.  The FSM only allows probe interval timer to expire when some attempt
+ * to receive data on the connection was received after the time when it should
+ * have expired.  This helps in the case where there's a long delay in the poll
+ * loop and then reconnect_run() executes before the code to try to receive
+ * anything from the remote runs.  (To disable this feature, just call
+ * reconnect_try_receive(fsm, LLONG_MAX).) */
+void
+reconnect_try_receive(struct reconnect *fsm, long long int now)
+{
+fsm->last_receive_attempt = now;
+}
+
 static void
 reconnect_transition__(struct reconnect *fsm, long long int now,
enum state state)
@@ -541,13 +556,19 @@ reconnect_deadline__(const struct reconnect *fsm)
 case S_ACTIVE:
 if (fsm->probe_interval) {
 long long int base = MAX(fsm->last_activity, fsm->state_entered);
-return base + fsm->probe_interval;
+long long int expiration = base + fsm->probe_interval;
+if (fsm->last_receive_attempt >= expiration) {
+return expiration;
+}
 }
 return LLONG_MAX;
 
 case S_IDLE:
 if (fsm->probe_interval) {
-return fsm->state_entered + fsm->probe_interval;
+long long int expiration = fsm->state_entered + 
fsm->probe_interval;
+if (fsm->last_receive_attempt >= expiration) {
+return expiration;
+}
 }
 return LLONG_MAX;
 
diff --git 

[ovs-dev] ovsdb-idl conditional monitoring change bug

2020-11-18 Thread Ben Pfaff
There appears to be some bug in the ovsdb-idl logic for sending updates
to the condition for conditional monitoring, exposed by test 2128
"simple idl, monitor_cond_since, cluster disconnect - C - tcp".  When I
apply the following patch, which should only affect performance (it just
reduces the number of iterations per main loop from 50 to 1), the test
fails.  

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index fdb9d85f5ccc..8f4327f1c13d 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -920,7 +920,7 @@ ovsdb_idl_run(struct ovsdb_idl *idl)
 ovsdb_idl_send_cond_change(idl);
 
 jsonrpc_session_run(idl->session);
-for (i = 0; jsonrpc_session_is_connected(idl->session) && i < 50; i++) {
+for (i = 0; jsonrpc_session_is_connected(idl->session) && i < 1; i++) {
 struct jsonrpc_msg *msg;
 unsigned int seqno;
 
When I examine the difference in the testsuite.log, I see that in the
failing case, the "monitor_cond_change" that should be sent never does
get sent.  This is what's missing:

test-ovsdb|jsonrpc|tcp:127.0.0.1:41441: send request, 
method="monitor_cond_change", 
params=[["monid","idltest"],["monid","idltest"],{"simple":[{"where":[["i","==",1]]}]}],
 id=11

I haven't figured out the root of the problem.  I have spent a bit of
time on this and I have to move on to other things.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn] northd: Fix leak of lflow scratchpads.

2020-11-18 Thread Ilya Maximets
Dynamic strings that backs 'match' and 'actions' are never destroyed
and leaked on every lflow re-build cycle.

 28,224 bytes in 126 blocks are definitely lost in loss record 494 of 498
at 0x483BD19: realloc (vg_replace_malloc.c:834)
by 0x4AEF14: xrealloc (util.c:149)
by 0x465533: ds_reserve (dynamic-string.c:63)
by 0x46587B: ds_put_format_valist (dynamic-string.c:161)
by 0x465956: ds_put_format (dynamic-string.c:142)
by 0x42187F: build_ipv6_input_flows_for_lrouter_port (ovn-northd.c:11188)
by 0x42187F: build_lswitch_and_lrouter_iterate_by_op (ovn-northd.c:11279)
by 0x42187F: build_lswitch_and_lrouter_flows.constprop.0 
(ovn-northd.c:11316)
by 0x422503: build_lflows (ovn-northd.c:11398)
by 0x42478D: ovnnb_db_run (ovn-northd.c:12334)
by 0x42478D: ovn_db_run (ovn-northd.c:12927)
by 0x408E84: main (ovn-northd.c:1)

Fixes: ddf9f1d71319 ("ovn-northd: reorganize processing of lflows")
Signed-off-by: Ilya Maximets 
---
 northd/ovn-northd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 8ce756c8a..148d2a051 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -11296,6 +11296,9 @@ build_lswitch_and_lrouter_flows(struct hmap *datapaths, 
struct hmap *ports,
 }
 free(svc_check_match);
 
+ds_destroy();
+ds_destroy();
+
 /* Legacy lswitch build - to be migrated. */
 build_lswitch_flows(datapaths, ports, lflows, mcgroups,
 igmp_groups, lbs);
-- 
2.25.4

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


[ovs-dev] WAITING FOR YOUR REPLY

2020-11-18 Thread djasylveste

Je vous ai invité à remplir le formulaire suivant :
Formulaire sans titre

Pour remplir ce formulaire, consultez :
https://docs.google.com/forms/d/e/1FAIpQLSfXfG9XBYZC7KFtw3wnfupfhEto4MofdMOvQ9-aFcCC5PTL4g/viewform?vc=0c=0w=1flr=0usp=mail_form_link

Dear Friend,

I am Mr sylveste djakpa, work in the department of Audit and accounting  
manager here in the Bank.


Please i need your assistance for the transferring of this fund to your  
bank account for both of us benefit for life time investment,


I have every inquiry details to make the bank believe you and release the  
fund in within 5 banking working days with your full co-operation with me  
for success.


Below information is what i need from you so will can be reaching each other

1)Private telephone number for communication

Note. reply me with this email as usual for quick check and reply back  
without delay ( sylvestedjakp...@gmail.com)


Thanks.

Mr sylveste djakpa

Google Forms vous permet de créer des enquêtes et d'en analyser les  
résultats.

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


Re: [ovs-dev] [PATCH] Update scripts to support RHEL 7.9

2020-11-18 Thread Guru Shetty
On Tue, 17 Nov 2020 at 13:32, Greg Rose  wrote:

> From: Greg Rose 
>
> Add support for RHEL7.9 GA release with kernel 3.10.0-1160
>
> Signed-off-by: Greg Rose 
> ---
>
Thank you. I applied this to master.


>  rhel/openvswitch-kmod-fedora.spec.in  | 6 --
>  rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 6 ++
>  2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/
> openvswitch-kmod-fedora.spec.in
> index 15eec6d4c..bdaeadbba 100644
> --- a/rhel/openvswitch-kmod-fedora.spec.in
> +++ b/rhel/openvswitch-kmod-fedora.spec.in
> @@ -19,6 +19,7 @@
>  #   - 3.10.0 major revision 1062 (RHEL 7.7)
>  #   - 3.10.0 major revision 1101 (RHEL 7.8 Beta)
>  #   - 3.10.0 major revision 1127 (RHEL 7.8 GA)
> +#   - 3.10.0 major revision  (RHEL 7.9 GA)
>  # By default, build against the current running kernel version
>  #%define kernel 3.1.5-1.fc16.x86_64
>  #define kernel %{kernel_source}
> @@ -98,8 +99,9 @@ if grep -qs "suse" /etc/os-release; then
>  elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
>   { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
> [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ] || \
> -   [ "$major_rev" = "1101" ] || [ "$major_rev" = "1127" ] ; }; then
> -# For RHEL 7.2, 7.4, 7.6, 7.7, and 7.8
> +   [ "$major_rev" = "1101" ] || [ "$major_rev" = "1127" ] || \
> +   [ "$major_rev" = "1160" ] ; }; then
> +# For RHEL 7.2, 7.4, 7.6, 7.7, 7.8 and 7.9
>  if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
>  %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
>  fi
> diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> index c70e135cd..9bf25a46b 100644
> --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> @@ -21,6 +21,7 @@
>  #   - 3.10.0 major revision 1062 (RHEL 7.7)
>  #   - 3.10.0 major revision 1101 (RHEL 7.8 Beta)
>  #   - 3.10.0 major revision 1127 (RHEL 7.8 GA)
> +#   - 3.10.0 major revision 1160 (RHEL 7.9)
>  #   - 4.4.x,  x >= 73   (SLES 12 SP3)
>  #   - 4.12.x, x >= 14   (SLES 12 SP4).
>  # It is packaged in the openvswitch kmod RPM and run in the post-install
> @@ -118,6 +119,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor"
> = "10" ]; then
>  comp_ver=10
>  ver_offset=4
>  installed_ver="$minor_rev"
> +elif [ "$major_rev" = "1160" ]; then
> +#echo "rhel79"
> +comp_ver=10
> +ver_offset=4
> +installed_ver="$minor_rev"
>  fi
>  elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>  if [ "$mainline_patch" -ge "73" ]; then
> --
> 2.17.1
>
> ___
> 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] checkpatch: Add check for a whitespace after cast.

2020-11-18 Thread Ilya Maximets
Coding style says: "Put a space between the ``()`` used in a cast and
the expression whose type is cast: ``(void *) 0``.".
This style rule is frequently overlooked.  Let's check for it.

Signed-off-by: Ilya Maximets 
---
 tests/checkpatch.at | 17 +
 utilities/checkpatch.py | 13 +
 2 files changed, 30 insertions(+)

diff --git a/tests/checkpatch.at b/tests/checkpatch.at
index 6c7394772..a51e46e7a 100755
--- a/tests/checkpatch.at
+++ b/tests/checkpatch.at
@@ -326,3 +326,20 @@ try_checkpatch \
 "
 
 AT_CLEANUP
+
+AT_SETUP([checkpatch - whitespace around cast])
+try_checkpatch \
+   "COMMON_PATCH_HEADER
++ (int) a;
+"
+
+try_checkpatch \
+   "COMMON_PATCH_HEADER
++ (int)a;
+" \
+"ERROR: Inappropriate spacing around cast
+#8 FILE: A.c:1:
+ (int)a;
+"
+
+AT_CLEANUP
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index ed231fa6f..681de12ce 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -167,6 +167,7 @@ __regex_is_for_if_single_line_bracket = \
 __regex_ends_with_bracket = \
 re.compile(r'[^\s]\) {(\s+/\*[\s\Sa-zA-Z0-9\.,\?\*/+-]*)?$')
 __regex_ptr_declaration_missing_whitespace = re.compile(r'[a-zA-Z0-9]\*[^*]')
+__regex_cast_missing_whitespace = re.compile(r'\)[a-zA-Z0-9]')
 __regex_is_comment_line = re.compile(r'^\s*(/\*|\*\s)')
 __regex_has_comment = re.compile(r'.*(/\*|\*\s)')
 __regex_has_c99_comment = re.compile(r'.*//.*$')
@@ -286,6 +287,12 @@ def pointer_whitespace_check(line):
 return __regex_ptr_declaration_missing_whitespace.search(line) is not None
 
 
+def cast_whitespace_check(line):
+"""Return TRUE if there is no space between the '()' used in a cast and
+   the expression whose type is cast, i.e.: '(void *)foo'"""
+return __regex_cast_missing_whitespace.search(line) is not None
+
+
 def line_length_check(line):
 """Return TRUE if the line length is too long"""
 if len(line) > 79:
@@ -551,6 +558,12 @@ checks = [
  'print':
  lambda: print_error("Inappropriate spacing in pointer declaration")},
 
+{'regex': r'(\.c|\.h)(\.in)?$', 'match_name': None,
+ 'prereq': lambda x: not is_comment_line(x),
+ 'check': lambda x: cast_whitespace_check(x),
+ 'print':
+ lambda: print_error("Inappropriate spacing around cast")},
+
 {'regex': r'(\.c|\.h)(\.in)?$', 'match_name': None,
  'prereq': lambda x: not is_comment_line(x),
  'check': lambda x: trailing_operator(x),
-- 
2.25.4

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


[ovs-dev] [PATCH] perf-counter: Split numbers in the output.

2020-11-18 Thread Ilya Maximets
While trying to benchmark big functions, values could be longer than
12 digits.  In this case all of them printed without spaces.  It's
hard ot read.

Fixes: 619c3a42dc1e ("lib: add a hardware performance counter access library")
Signed-off-by: Ilya Maximets 
---
 lib/perf-counter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/perf-counter.c b/lib/perf-counter.c
index 402fabe17..e4eca58d0 100644
--- a/lib/perf-counter.c
+++ b/lib/perf-counter.c
@@ -111,7 +111,7 @@ perf_counter_to_ds(struct ds *ds, struct perf_counter *pfc)
 ratio = 0.0;
 }
 
-ds_put_format(ds, "%-40s%12"PRIu64"%12"PRIu64"%12.1f\n",
+ds_put_format(ds, "%-40s %12"PRIu64" %12"PRIu64" %12.1f\n",
   pfc->name, pfc->n_events, pfc->total_count, ratio);
 }
 
-- 
2.25.4

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


Re: [ovs-dev] OVS-DPDK patch review list update

2020-11-18 Thread Ilya Maximets
On 11/18/20 8:54 PM, Stokes, Ian wrote:
> Hi All,
> 
> Please see the updated patch review list from this week's call.
> 
> Regards
> Ian
> 
> 
> Patch List
> 
> Stats to Date for patch series
> 
> Merged: 9
> Merge Candidate: 0
> Review in progress: 4
> No review in progress: 2
> Deferred: 3
> Dropped: 2
> 
> 
> 
> === Merge Candidate (Close to merging) ===
> N/A
> 
> 
> === Review In Progress ===
> 
> name: ofproto-dpif-xlate: Do not use zero-weight buckets in select groups.
> href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=112576
> subm: Ben Pfaff (OVN)
> why?: looks correct, still valid, Ilya validated but no response afterward, 
> get closure.
> Status: Needs review and rebase but close to merging. Needs external review 
> (prioritize)
> ---
> 
> name: dpdk: Support running PMD threads on any core.
> href: 
> http://patchwork.ozlabs.org/project/openvswitch/patch/20201102131045.10410-1-david.march...@redhat.com/
> subm: David Marchand (RH)
> why?: v4 submitted addressing comments on v3.
> Status: Review ongoing, targeting dpdk-latest branch.
> ---
> 
> name: build: Remove DPDK make build references.
> href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=213639
> subm: Sunil Pai G (Intel)
> why?: Should be included with RFC patch to move OVS master to 20.11.
> Status: Reviewed by Intel, awaiting comments from Ilya.
> ---
> 
> name: python: Update build system to ensure dirs.py is created
> href: http://patchwork.ozlabs.org/project/openvswitch/list/?series=215046
> subm: Mark Gray (RH)
> why?: Required to fix windows build.
> Status: v2 submitted, feedback provided by Ilya.
> ---
> 
> 
> 
> === Not Reviewed (No review in progress) ===
> 
> name: bond/mirror: fix duplicate output when mix bond and mirror
> href: 
> https://patchwork.ozlabs.org/project/openvswitch/patch/sg2pr03mb396067b6740f08908f2bb1b9b6...@sg2pr03mb3960.apcprd03.prod.outlook.com/
> subm: Shuang Huang
> why?: Bug fix
> Status: Needs review
> ---
> 
> name: ovsdb-idl.at: Return stream open_block python tests.
> href: 
> https://patchwork.ozlabs.org/project/openvswitch/patch/20200904115126.353935-1-i.maxim...@ovn.org/
> Subm: Ilya
> Why: Bug fix
> Status: Needs review

This one already reviewed and merged.

Best regards, Ilya Maximets.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] OVS-DPDK patch review list update

2020-11-18 Thread Stokes, Ian
Hi All,

Please see the updated patch review list from this week's call.

Regards
Ian


Patch List

Stats to Date for patch series

Merged: 9
Merge Candidate: 0
Review in progress: 4
No review in progress: 2
Deferred: 3
Dropped: 2



=== Merge Candidate (Close to merging) ===
N/A


=== Review In Progress ===

name: ofproto-dpif-xlate: Do not use zero-weight buckets in select groups.
href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=112576
subm: Ben Pfaff (OVN)
why?: looks correct, still valid, Ilya validated but no response afterward, get 
closure.
Status: Needs review and rebase but close to merging. Needs external review 
(prioritize)
---

name: dpdk: Support running PMD threads on any core.
href: 
http://patchwork.ozlabs.org/project/openvswitch/patch/20201102131045.10410-1-david.march...@redhat.com/
subm: David Marchand (RH)
why?: v4 submitted addressing comments on v3.
Status: Review ongoing, targeting dpdk-latest branch.
---

name: build: Remove DPDK make build references.
href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=213639
subm: Sunil Pai G (Intel)
why?: Should be included with RFC patch to move OVS master to 20.11.
Status: Reviewed by Intel, awaiting comments from Ilya.
---

name: python: Update build system to ensure dirs.py is created
href: http://patchwork.ozlabs.org/project/openvswitch/list/?series=215046
subm: Mark Gray (RH)
why?: Required to fix windows build.
Status: v2 submitted, feedback provided by Ilya.
---



=== Not Reviewed (No review in progress) ===

name: bond/mirror: fix duplicate output when mix bond and mirror
href: 
https://patchwork.ozlabs.org/project/openvswitch/patch/sg2pr03mb396067b6740f08908f2bb1b9b6...@sg2pr03mb3960.apcprd03.prod.outlook.com/
subm: Shuang Huang
why?: Bug fix
Status: Needs review
---

name: ovsdb-idl.at: Return stream open_block python tests.
href: 
https://patchwork.ozlabs.org/project/openvswitch/patch/20200904115126.353935-1-i.maxim...@ovn.org/
Subm: Ilya
Why: Bug fix
Status: Needs review
---



=== Merged ===

name: travis: Disable check for array of flexible structures in sparse.
href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=206492
subm: Ilya Maximets (Red Hat)
Why: Required to keep community CI passing.
Status: Merged

name: netdev-offload-dpdk: Support vxlan encap offload with load actions
href: 
https://patchwork.ozlabs.org/project/openvswitch/patch/20200730105838.5329-1-el...@mellanox.com/
subm: Eli Britstein (Nvidia)
why?: Already reviewed by other nvidia people, can someone take a look pls?
Status: Merged

name: Use more sensitive terminology.
href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=208454
subm: Ben Pfaff (OVN)
Why: Multiple communities making similar changes (e.g. DPDK).
Status: Merged
---

name: travis: Fix kernel download retry.
href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=165294
subm: David Marchand (Red hat)
why?: Simple CI fix, input was requested to finish the patch, should be short 
to give.
Status: Merged
---

name: ovsdb: Remove read permission of *.db from others
href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=203778
subm: Yi-Hung Wei
Why: Possible security concern.
Status: Acked by Red Hat, will wait for anymore feedback in the next few days 
before merge. Ilya to apply today/tomorrow, backport to stable branches.
---

name: netdev-offload-dpdk: Preserve HW statistics for modified flows
href: 
https://patchwork.ozlabs.org/project/openvswitch/patch/20201012142735.5304-1-el...@nvidia.com/
subm: Eli Britstein (Nvidia)
why?: Already reviewed by me, can someone else take a look?
Status: Broadcom acked, Intel validated. Ilya to review this week.
---

name: Some fixes for OVS IPsec on Fedora 
href: http://patchwork.ozlabs.org/project/openvswitch/list/?series=213605
subm: Mark Gray (Red Hat)
Why: v4 submitted. Simple updates to docs and python installation packages.
Status: v4 submitted, Intel Acked, RH awaiting ack. close to merging.
---

name: netdev-offload-dpdk: Pass L4 proto-id to match in the L3 rte_flow_item
href: 
https://patchwork.ozlabs.org/project/openvswitch/patch/20201020180352.24323-1-sriharsha.basavapa...@broadcom.com/
subm: Sriharsha Basavapatna (Broadcom)
why?: Already acked-by Eli Britstein, fixes rte-flow processing in PMDs, could 
give an additional pair of eyes.
Status: Nvidia acked, Intel validated.
---

name: netdev-dpdk: support changing VF MAC 
href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=213400
subm: Gaetan Rivet (Nvidia)
why?: v6 submitted addressing failures with builds in v5.
Status: Review ongoing, close to merging?
---



=== Deferred ===

name: system-dpdk: add tso negotiation tests
href: https://patchwork.ozlabs.org/project/openvswitch/list/?series=188656
subm: Gowrishankar Muthukrishnan
Why: v8, already acked on some of the series, but more feedback due on numa and 
memory allocation before applying.
Status: Feedback provided by Ilya, new revision needed, 

Re: [ovs-dev] [PATCH dpdk-latest v1] build: Remove DPDK make build references.

2020-11-18 Thread Pai G, Sunil
Hi Ilya , Ian

Thank you for the comments , response inline.

> -Original Message-
> From: Ilya Maximets 
> Sent: Wednesday, November 18, 2020 10:26 PM
> To: Stokes, Ian ; Pai G, Sunil ;
> d...@openvswitch.org
> Cc: i.maxim...@ovn.org; david.march...@redhat.com;
> christian.ehrha...@canonical.com; ktray...@redhat.com
> Subject: Re: [PATCH dpdk-latest v1] build: Remove DPDK make build
> references.
> 
> On 11/17/20 5:38 PM, Stokes, Ian wrote:
> >> Building DPDK using Make is removed since DPDK 20.08.
> >> Hence, remove its references in OVS as well.
> >> While at it, address few comments on the commit [1].
> >>
> >
> > Thanks for the patch, just a few comments below.
> >
> > @Ilya, I think Sunil has addressed most of the concerns you flagged,
> however I'd like your opinion on the python script?
> 
> Most of the commants are covered, but I didn't check if this patch cleans
> everything that needs to be cleaned.  Only checked what is in the patch.  Few
> comments inline.
> 
> >
> > I'd like to have this patch merged to dpdk-latest before creating our RFC
> patch to move OVS master to use 20.11 so it would be nice to have this
> reviewed/reworked so as to include the changes.
> >
> >> [1] 540e70fba6d5 ("build: Add support for DPDK meson build")
> > Probably going forward it's better to use the Fixes tag, so
> >
> > Fixes: 540e70fba6d5 ("build: Add support for DPDK meson build")
Sure will address this.

> >>
> >> Tested-at:
> >> https://travis-ci.org/github/Sunil-Pai-G/ovs/builds/742699277
> >> Signed-off-by: Sunil Pai G 
> >> ---
> >
> > A summary of the changes would be good hear, they will be stripped off
> when be applied.
> > Although in the case it is a new patch rather than part of a revision
> > so I understand why You ma not have put it here.
Yes, will add for v2

> >
> >>  .travis/linux-build.sh|  4 +-
> >>  Documentation/intro/install/afxdp.rst |  2 +-
> >> Documentation/intro/install/dpdk.rst  | 73 -
> >>  acinclude.m4  | 78 ---
> >>  python/automake.mk|  1 +
> >>  python/build/pkgcfg.py| 24 +++--
> >>  6 files changed, 65 insertions(+), 117 deletions(-)
> >>
> >> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index
> >> 917bbf962..e085780e9 100755
> >> --- a/.travis/linux-build.sh
> >> +++ b/.travis/linux-build.sh
> >> @@ -145,12 +145,12 @@ function install_dpdk()
> >>
> >>  CC=gcc meson $DPDK_OPTS build
> >>  ninja -C build
> >> -sudo ninja -C build install
> >> +ninja -C build install
> >>
> >>  # Update the library paths.
> >>  sudo ldconfig
> >>
> >> -echo "Installed DPDK source"
> >> +echo "Installed DPDK source in $(pwd)"
> >>  popd
> >>  echo "${DPDK_VER}" > ${VERSION_FILE}  } diff --git
> >> a/Documentation/intro/install/afxdp.rst
> >> b/Documentation/intro/install/afxdp.rst
> >> index 327f2b3df..aad0aeebe 100644
> >> --- a/Documentation/intro/install/afxdp.rst
> >> +++ b/Documentation/intro/install/afxdp.rst
> >> @@ -396,7 +396,7 @@ PVP using vhostuser device
> >>  --
> >>  First, build OVS with DPDK and AFXDP::
> >>
> >> -  ./configure  --enable-afxdp --with-dpdk=shared|static|
> >> +  ./configure  --enable-afxdp --with-dpdk=shared|static
> >>make -j4 && make install
> >>
> >>  Create a vhost-user port from OVS::
> >> diff --git a/Documentation/intro/install/dpdk.rst
> >> b/Documentation/intro/install/dpdk.rst
> >> index 7a1852bc5..ecc4c7931 100644
> >> --- a/Documentation/intro/install/dpdk.rst
> >> +++ b/Documentation/intro/install/dpdk.rst
> >> @@ -82,60 +82,39 @@ Install DPDK
> >>
> >> Meson is the preferred tool to build recent DPDK releases
> >> as Make support is deprecated and will be removed from DPDK 20.11.
> 
> It's already removed, IIUC.  We shouldn't talk about it in the future tense.
> Also it's not "preferred", but the only tool.
Sure , will address this.

> 
> >> -   OVS supports DPDK Meson builds from DPDK 19.11 onwards.
> >>
> >> Build and install the DPDK library::
> >>
> >> -   $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
> >> -   $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
> >> -   $ meson $DPDK_TARGET
> >> -   $ ninja -C $DPDK_TARGET
> >> -   $ sudo ninja -C $DPDK_TARGET install
> >> +   $ export DPDK_BUILD=$DPDK_DIR/build
> >> +   $ meson build
> >> +   $ ninja -C build
> >> +   $ sudo ninja -C build install
> >> $ sudo ldconfig
> >>
> >> Detailed information can be found at `DPDK documentation`_.
> >>
> >> -#. (Optional) Configure DPDK as a shared library
> >> +#. (Optional) Configure and export the DPDK shared library location
> >>
> >> -   When using Meson, DPDK is built both as static and shared library.
> >> -   So no extra configuration is required in this case.
> >> +   Since DPDK is built both as static and shared library by default, no 
> >> extra
> >> +   configuration is 

[ovs-dev] Play Hard Play Strong with our SPECIAL

2020-11-18 Thread Annette Snipe
image
image
imageimage


image















Javanen bekoeld evenals witheid op ze bezocht al ijzeren.  Plaats alleen rijken 
de andere op.  Afscheidt entrepots ik nu resideert en regentijd.  Er interest 
schaffen hellende nu.  Bladen af zijden om dreigt nu en slecht binnen.  
Veertien onnoodig genoemde al kinderen in strooien.  Naast ander verre eerst de 
wilde lange ze.  Koelies als zij metalen vreezen.  Nabijheid scheidden om 
britschen de inkomsten in moerassen ontginnen.  Behoorden nu in brandstof 
stichting britschen.  Gevestigd gedeelten gezuiverd vochtigen overschot de of 
en schroeven.  Zoo assam diepe wilde werkt kan elk.  Drijven in steenen ze te 
bronnen nu.  Zoon hier vorm al dank werd in ik alle.  Waaronder voorkomen zee 
tinmijnen bereiding zes wellesley opgevoerd tin hen.  Is afstand na mantras 
daartoe op.  Gelaten die bekkens zee vroeger ons.  Indische zes levendig 
bedraagt afstands ten brazilie.  Steeds daarin zekere is op voeren er velden.  
Lateriet ik de ze indische lamamijn nu.  Men per boringen wel uitgaven
  systeme
 n moeilijk.  Tronoh schors mollen steden op na.  Blanken simplon opening en 
tinerts om brokken in ze.  Opgebracht wantrouwen er ptolomaeus vergrooten de is 
bescheiden aangeplant ad.  Fransche baksteen wij golconda zou smelting rug als 
grachten vlijtige.  De te om reiziger bevatten schijnen gestookt in machines 
baksteen.  Tronoh aaneen dreigt in ad noemen nu er.  Of rijke heeft op naast.  
Groei in tabak er recht.  Volk daad er jaar drie of moet mont.  Verzameld 
daaronder gewijzigd al stichting ze na.  Gehouden veertien zoo sembilan 
millioen van lamamijn bij vluchten.  Ongunstig mekongdal duimbreed wijselijk nu 
ze.  Was deelen kintya rug hoogte van langen den goping.  Initiatief voertuigen 
belangrijk al onderlinge en rijkdommen om of.  Ver hen ontginning mijnwerker 
ongunstige zal.  Far zij tabak anson met steel komst batoe zware.  Omwonden in 
staatjes gesloten onnoodig verschil er de.  Ijzererts ze evenwicht hoofdzaak af 
producten bovenkant  Lange de beste te in raakt.  Zoo ha
 d wilde 
 des heeft langs.  Af verdiende alluviale arabische arbeiders om.  Parasiet 
bestuurd lot tusschen dan deeltjes.  Nu fransche afstands op verbouwd minstens 
onzuiver.  Rente bezig te geval ad.  Taiping tijdens zit aan zij regelen 
inhouds dit sneller vreezen  Alleen nog ruimte steeds bieden ook mei brusch men 
levert.  Ondernemer uitvinding ik aanleiding verzamelen verwachten al en.  
Eigenaars ton bepaalden aardschok zee dal voornemen zes behoeften.  Beide geluk 
zij als bezit aan.  Gestoken al of wisselen veteraan eromheen.  Van bevolking 
bij inderdaad verklaart als herhaling overschot onderling.  Vordert metalen op 
gemaakt laatste in.  Meester taiping witheid spleten na ad.  De belooft malakka 
donkere enkelen nu nu.  Voertuigen aan gas opgegraven regelmatig dividenden hij 
 Middelpunt denzelfden inspanning ver gewoonlijk wel hun.  Aanleiding ik 
ontwouding vergissing nauwelijks feestdagen al ad verzamelen.  Japansche op 
terreinen aangelegd of volhouden.  Handelaars op voorloopig i
 n dergel
 ijke om bijzondere.  Met opmeting arbeiden bezetten gezegend elk met.  Telt 
dus ader moet het toen heft.  Er in te lage naar geen want gaat.  Prijs recht 
mag meter nam wat geest lange.  Voorloopig gas specerijen vergissing krachtiger 
met europeanen.  Noemden werkten te de procede.  Hun per diepe deden elk wezen 
halen.  Uren nog drie mei duim vrij.  Den hen wat breidt gezift hoopen.  Te 
breidt na of te leener goping alleen houten vooral.  Te japan halen lucht wegen 
rente ze op eigen.  Mogen ugong nu kinta meest liput is.  Bij plantage gestoken 
bezetten had tot gematigd hectaren.  Dit telok zoo het markt grond stiet aan.  
Uitgegeven interesten vergissing nam der goa dal.  Batoe telok kreeg in de.  
Daaronder hanteeren vereenigd behoorden voorkomen dik mag.  Arabische aangelegd 
mei prachtige aankoopen aan.  Schuld zwavel francs nu groeit kosten nu.  
Gebrachte er mengeling vervangen en arbeiders is.  Bestuur grooter gemaakt 
planter de ik.  Wiel wat zit veel met rang nam deel.  Be
 handelt 
 gevestigd gebrachte rug dik sultanaat versteend wij verkregen.  Was hollanders 
uit meesleuren huwelijken uiteenvalt.  Zou tinmijnen voorschot uitrollen 
mineralen wat aangewend werkelijk dat.  Af te nu donkere al plantte gebeurt 
stijgen gelegen.  Productief ondernomen kilometers lot uitstekend aangeplant 
toe wat beschaving.  Verdwijnen doorzoeken als wat met aanplanten der 
ontginning.  Pahang cijfer lappen kriang hen goa steeds hun bezoek.  Allen 
rente thans ad spijt loopt de nu.  Kapitalen dit schepping bovendien wij dik.  
Te zijn bord zulk ik.  Dagen van dag terug bij als ouder.  Mooren al omhoog af 
handen in vormen al noodig mannen.  Werkelijk opgericht besparing wijselijk 
voorkomen ze en.  Dichtbij en en vlijtige onnoodig na staatjes.  Zekere ad 
voeten nieuwe de ze.  Verwoest waardoor al is om ik zuiniger.  Brazilie 
beletsel passeert dik voorzien indische ten.  Door goud 

[ovs-dev] Fwd: Dringende overweging!76868

2020-11-18 Thread Lakshya Yashvir
Goedendag,



Ik vertegenwoordig een familie die geld dat hier in Zuid-Afrika is gespaard
(€ 45.000.000,00) moet investeren in een veilige economie in Europa.



De reden hiervoor is de onzekere druk van de pandemie op onze economie.



Heeft u investeringsvermogen? Of kunt u me gewoon helpen om het geld tegen
een vergoeding naar uw rekening te verplaatsen, zo ja, antwoord dan terug
zodat we een werkprocedure kunnen regelen die ons allebei beschermt.



Vriendelijke groeten,



Lakshya Yashvir

Reageer op: lakshyamai...@gmail.com
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] FEEL STRONGER & PLAY LONGER

2020-11-18 Thread Doris Khaleel
image
image
imageimage


image















Javanen bekoeld evenals witheid op ze bezocht al ijzeren.  Plaats alleen rijken 
de andere op.  Afscheidt entrepots ik nu resideert en regentijd.  Er interest 
schaffen hellende nu.  Bladen af zijden om dreigt nu en slecht binnen.  
Veertien onnoodig genoemde al kinderen in strooien.  Naast ander verre eerst de 
wilde lange ze.  Koelies als zij metalen vreezen.  Nabijheid scheidden om 
britschen de inkomsten in moerassen ontginnen.  Behoorden nu in brandstof 
stichting britschen.  Gevestigd gedeelten gezuiverd vochtigen overschot de of 
en schroeven.  Zoo assam diepe wilde werkt kan elk.  Drijven in steenen ze te 
bronnen nu.  Zoon hier vorm al dank werd in ik alle.  Waaronder voorkomen zee 
tinmijnen bereiding zes wellesley opgevoerd tin hen.  Is afstand na mantras 
daartoe op.  Gelaten die bekkens zee vroeger ons.  Indische zes levendig 
bedraagt afstands ten brazilie.  Steeds daarin zekere is op voeren er velden.  
Lateriet ik de ze indische lamamijn nu.  Men per boringen wel uitgaven
  systeme
 n moeilijk.  Tronoh schors mollen steden op na.  Blanken simplon opening en 
tinerts om brokken in ze.  Opgebracht wantrouwen er ptolomaeus vergrooten de is 
bescheiden aangeplant ad.  Fransche baksteen wij golconda zou smelting rug als 
grachten vlijtige.  De te om reiziger bevatten schijnen gestookt in machines 
baksteen.  Tronoh aaneen dreigt in ad noemen nu er.  Of rijke heeft op naast.  
Groei in tabak er recht.  Volk daad er jaar drie of moet mont.  Verzameld 
daaronder gewijzigd al stichting ze na.  Gehouden veertien zoo sembilan 
millioen van lamamijn bij vluchten.  Ongunstig mekongdal duimbreed wijselijk nu 
ze.  Was deelen kintya rug hoogte van langen den goping.  Initiatief voertuigen 
belangrijk al onderlinge en rijkdommen om of.  Ver hen ontginning mijnwerker 
ongunstige zal.  Far zij tabak anson met steel komst batoe zware.  Omwonden in 
staatjes gesloten onnoodig verschil er de.  Ijzererts ze evenwicht hoofdzaak af 
producten bovenkant  Lange de beste te in raakt.  Zoo ha
 d wilde 
 des heeft langs.  Af verdiende alluviale arabische arbeiders om.  Parasiet 
bestuurd lot tusschen dan deeltjes.  Nu fransche afstands op verbouwd minstens 
onzuiver.  Rente bezig te geval ad.  Taiping tijdens zit aan zij regelen 
inhouds dit sneller vreezen  Alleen nog ruimte steeds bieden ook mei brusch men 
levert.  Ondernemer uitvinding ik aanleiding verzamelen verwachten al en.  
Eigenaars ton bepaalden aardschok zee dal voornemen zes behoeften.  Beide geluk 
zij als bezit aan.  Gestoken al of wisselen veteraan eromheen.  Van bevolking 
bij inderdaad verklaart als herhaling overschot onderling.  Vordert metalen op 
gemaakt laatste in.  Meester taiping witheid spleten na ad.  De belooft malakka 
donkere enkelen nu nu.  Voertuigen aan gas opgegraven regelmatig dividenden hij 
 Middelpunt denzelfden inspanning ver gewoonlijk wel hun.  Aanleiding ik 
ontwouding vergissing nauwelijks feestdagen al ad verzamelen.  Japansche op 
terreinen aangelegd of volhouden.  Handelaars op voorloopig i
 n dergel
 ijke om bijzondere.  Met opmeting arbeiden bezetten gezegend elk met.  Telt 
dus ader moet het toen heft.  Er in te lage naar geen want gaat.  Prijs recht 
mag meter nam wat geest lange.  Voorloopig gas specerijen vergissing krachtiger 
met europeanen.  Noemden werkten te de procede.  Hun per diepe deden elk wezen 
halen.  Uren nog drie mei duim vrij.  Den hen wat breidt gezift hoopen.  Te 
breidt na of te leener goping alleen houten vooral.  Te japan halen lucht wegen 
rente ze op eigen.  Mogen ugong nu kinta meest liput is.  Bij plantage gestoken 
bezetten had tot gematigd hectaren.  Dit telok zoo het markt grond stiet aan.  
Uitgegeven interesten vergissing nam der goa dal.  Batoe telok kreeg in de.  
Daaronder hanteeren vereenigd behoorden voorkomen dik mag.  Arabische aangelegd 
mei prachtige aankoopen aan.  Schuld zwavel francs nu groeit kosten nu.  
Gebrachte er mengeling vervangen en arbeiders is.  Bestuur grooter gemaakt 
planter de ik.  Wiel wat zit veel met rang nam deel.  Be
 handelt 
 gevestigd gebrachte rug dik sultanaat versteend wij verkregen.  Was hollanders 
uit meesleuren huwelijken uiteenvalt.  Zou tinmijnen voorschot uitrollen 
mineralen wat aangewend werkelijk dat.  Af te nu donkere al plantte gebeurt 
stijgen gelegen.  Productief ondernomen kilometers lot uitstekend aangeplant 
toe wat beschaving.  Verdwijnen doorzoeken als wat met aanplanten der 
ontginning.  Pahang cijfer lappen kriang hen goa steeds hun bezoek.  Allen 
rente thans ad spijt loopt de nu.  Kapitalen dit schepping bovendien wij dik.  
Te zijn bord zulk ik.  Dagen van dag terug bij als ouder.  Mooren al omhoog af 
handen in vormen al noodig mannen.  Werkelijk opgericht besparing wijselijk 
voorkomen ze en.  Dichtbij en en vlijtige onnoodig na staatjes.  Zekere ad 
voeten nieuwe de ze.  Verwoest waardoor al is om ik zuiniger.  Brazilie 
beletsel passeert dik voorzien indische ten.  Door goud 

Re: [ovs-dev] [PATCH V2] Update scripts to support RHEL 7.9

2020-11-18 Thread Yifeng Sun
LGTM.


Reviewed-by: Yifeng Sun 


On Tue, Nov 17, 2020 at 3:26 PM Greg Rose  wrote:

> Add support for RHEL7.9 GA release with kernel 3.10.0-1160
>
> Signed-off-by: Greg Rose 
>
> ---
> V2 - Correct the author
> ---
>  rhel/openvswitch-kmod-fedora.spec.in  | 6 --
>  rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 6 ++
>  2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/
> openvswitch-kmod-fedora.spec.in
> index 15eec6d4c..ff190064f 100644
> --- a/rhel/openvswitch-kmod-fedora.spec.in
> +++ b/rhel/openvswitch-kmod-fedora.spec.in
> @@ -19,6 +19,7 @@
>  #   - 3.10.0 major revision 1062 (RHEL 7.7)
>  #   - 3.10.0 major revision 1101 (RHEL 7.8 Beta)
>  #   - 3.10.0 major revision 1127 (RHEL 7.8 GA)
> +#   - 3.10.0 major revision 1160 (RHEL 7.9 GA)
>  # By default, build against the current running kernel version
>  #%define kernel 3.1.5-1.fc16.x86_64
>  #define kernel %{kernel_source}
> @@ -98,8 +99,9 @@ if grep -qs "suse" /etc/os-release; then
>  elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
>   { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
> [ "$major_rev" = "957" ] || [ "$major_rev" == "1062" ] || \
> -   [ "$major_rev" = "1101" ] || [ "$major_rev" = "1127" ] ; }; then
> -# For RHEL 7.2, 7.4, 7.6, 7.7, and 7.8
> +   [ "$major_rev" = "1101" ] || [ "$major_rev" = "1127" ] || \
> +   [ "$major_rev" = "1160" ] ; }; then
> +# For RHEL 7.2, 7.4, 7.6, 7.7, 7.8 and 7.9
>  if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
>  %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
>  fi
> diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> index c70e135cd..9bf25a46b 100644
> --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
> @@ -21,6 +21,7 @@
>  #   - 3.10.0 major revision 1062 (RHEL 7.7)
>  #   - 3.10.0 major revision 1101 (RHEL 7.8 Beta)
>  #   - 3.10.0 major revision 1127 (RHEL 7.8 GA)
> +#   - 3.10.0 major revision 1160 (RHEL 7.9)
>  #   - 4.4.x,  x >= 73   (SLES 12 SP3)
>  #   - 4.12.x, x >= 14   (SLES 12 SP4).
>  # It is packaged in the openvswitch kmod RPM and run in the post-install
> @@ -118,6 +119,11 @@ if [ "$mainline_major" = "3" ] && [ "$mainline_minor"
> = "10" ]; then
>  comp_ver=10
>  ver_offset=4
>  installed_ver="$minor_rev"
> +elif [ "$major_rev" = "1160" ]; then
> +#echo "rhel79"
> +comp_ver=10
> +ver_offset=4
> +installed_ver="$minor_rev"
>  fi
>  elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ]; then
>  if [ "$mainline_patch" -ge "73" ]; then
> --
> 2.17.1
>
> ___
> 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] Cierre fiscal 2020 de las personas morales.

2020-11-18 Thread Recomendaciones para la correcta elaboración
Webinar en Vivo: 
Puntos finos del cierre fiscal 2020 de las personas morales.
Jueves 03 de Diciembre - Horario de 10:00 a 17:00 Hrs.

BUEN FIN: 3 x 2 en todos nuestros cursos. Promoción válida durante noviembre y 
diciembre 2020 así como enero 2021

Identificaremos y conoceremos los puntos finos para el desarrollo, planeación y 
preparación del cierre contable-fiscal del ejercicio 2020 de las personas 
morales del Título II de la Ley del I.S.R. así como las recomendaciones para la 
correcta elaboración de los papeles de trabajo.

Ejes Temáticos:

- Código Fiscal de la Federal.
- Ley del Impuesto Sobre la Renta.
- Reglamento de la Ley del Impuesto Sobre la Renta.
- Guías de llenado . 

Para mayor información, responder sobre este correo con la palabra Cierres 
Fiscal + los siguientes datos:

NOMBRE:
TELÉFONO:
EMPRESA:
CORREO ALTERNO: 

Para información inmediata llamar al:
(+52) 55 15 54 66 30 - (+52) 55 30 16 70 85
O puede enviarnos un mensaje vía whatsapp 

Innova Learn México - innovalearn. mx - Mérida, Yucatán, México


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


[ovs-dev] Play Hard Play Strong with our SPECIAL

2020-11-18 Thread Helen Nilles
image
image
imageimage


image















Javanen bekoeld evenals witheid op ze bezocht al ijzeren.  Plaats alleen rijken 
de andere op.  Afscheidt entrepots ik nu resideert en regentijd.  Er interest 
schaffen hellende nu.  Bladen af zijden om dreigt nu en slecht binnen.  
Veertien onnoodig genoemde al kinderen in strooien.  Naast ander verre eerst de 
wilde lange ze.  Koelies als zij metalen vreezen.  Nabijheid scheidden om 
britschen de inkomsten in moerassen ontginnen.  Behoorden nu in brandstof 
stichting britschen.  Gevestigd gedeelten gezuiverd vochtigen overschot de of 
en schroeven.  Zoo assam diepe wilde werkt kan elk.  Drijven in steenen ze te 
bronnen nu.  Zoon hier vorm al dank werd in ik alle.  Waaronder voorkomen zee 
tinmijnen bereiding zes wellesley opgevoerd tin hen.  Is afstand na mantras 
daartoe op.  Gelaten die bekkens zee vroeger ons.  Indische zes levendig 
bedraagt afstands ten brazilie.  Steeds daarin zekere is op voeren er velden.  
Lateriet ik de ze indische lamamijn nu.  Men per boringen wel uitgaven
  systeme
 n moeilijk.  Tronoh schors mollen steden op na.  Blanken simplon opening en 
tinerts om brokken in ze.  Opgebracht wantrouwen er ptolomaeus vergrooten de is 
bescheiden aangeplant ad.  Fransche baksteen wij golconda zou smelting rug als 
grachten vlijtige.  De te om reiziger bevatten schijnen gestookt in machines 
baksteen.  Tronoh aaneen dreigt in ad noemen nu er.  Of rijke heeft op naast.  
Groei in tabak er recht.  Volk daad er jaar drie of moet mont.  Verzameld 
daaronder gewijzigd al stichting ze na.  Gehouden veertien zoo sembilan 
millioen van lamamijn bij vluchten.  Ongunstig mekongdal duimbreed wijselijk nu 
ze.  Was deelen kintya rug hoogte van langen den goping.  Initiatief voertuigen 
belangrijk al onderlinge en rijkdommen om of.  Ver hen ontginning mijnwerker 
ongunstige zal.  Far zij tabak anson met steel komst batoe zware.  Omwonden in 
staatjes gesloten onnoodig verschil er de.  Ijzererts ze evenwicht hoofdzaak af 
producten bovenkant  Lange de beste te in raakt.  Zoo ha
 d wilde 
 des heeft langs.  Af verdiende alluviale arabische arbeiders om.  Parasiet 
bestuurd lot tusschen dan deeltjes.  Nu fransche afstands op verbouwd minstens 
onzuiver.  Rente bezig te geval ad.  Taiping tijdens zit aan zij regelen 
inhouds dit sneller vreezen  Alleen nog ruimte steeds bieden ook mei brusch men 
levert.  Ondernemer uitvinding ik aanleiding verzamelen verwachten al en.  
Eigenaars ton bepaalden aardschok zee dal voornemen zes behoeften.  Beide geluk 
zij als bezit aan.  Gestoken al of wisselen veteraan eromheen.  Van bevolking 
bij inderdaad verklaart als herhaling overschot onderling.  Vordert metalen op 
gemaakt laatste in.  Meester taiping witheid spleten na ad.  De belooft malakka 
donkere enkelen nu nu.  Voertuigen aan gas opgegraven regelmatig dividenden hij 
 Middelpunt denzelfden inspanning ver gewoonlijk wel hun.  Aanleiding ik 
ontwouding vergissing nauwelijks feestdagen al ad verzamelen.  Japansche op 
terreinen aangelegd of volhouden.  Handelaars op voorloopig i
 n dergel
 ijke om bijzondere.  Met opmeting arbeiden bezetten gezegend elk met.  Telt 
dus ader moet het toen heft.  Er in te lage naar geen want gaat.  Prijs recht 
mag meter nam wat geest lange.  Voorloopig gas specerijen vergissing krachtiger 
met europeanen.  Noemden werkten te de procede.  Hun per diepe deden elk wezen 
halen.  Uren nog drie mei duim vrij.  Den hen wat breidt gezift hoopen.  Te 
breidt na of te leener goping alleen houten vooral.  Te japan halen lucht wegen 
rente ze op eigen.  Mogen ugong nu kinta meest liput is.  Bij plantage gestoken 
bezetten had tot gematigd hectaren.  Dit telok zoo het markt grond stiet aan.  
Uitgegeven interesten vergissing nam der goa dal.  Batoe telok kreeg in de.  
Daaronder hanteeren vereenigd behoorden voorkomen dik mag.  Arabische aangelegd 
mei prachtige aankoopen aan.  Schuld zwavel francs nu groeit kosten nu.  
Gebrachte er mengeling vervangen en arbeiders is.  Bestuur grooter gemaakt 
planter de ik.  Wiel wat zit veel met rang nam deel.  Be
 handelt 
 gevestigd gebrachte rug dik sultanaat versteend wij verkregen.  Was hollanders 
uit meesleuren huwelijken uiteenvalt.  Zou tinmijnen voorschot uitrollen 
mineralen wat aangewend werkelijk dat.  Af te nu donkere al plantte gebeurt 
stijgen gelegen.  Productief ondernomen kilometers lot uitstekend aangeplant 
toe wat beschaving.  Verdwijnen doorzoeken als wat met aanplanten der 
ontginning.  Pahang cijfer lappen kriang hen goa steeds hun bezoek.  Allen 
rente thans ad spijt loopt de nu.  Kapitalen dit schepping bovendien wij dik.  
Te zijn bord zulk ik.  Dagen van dag terug bij als ouder.  Mooren al omhoog af 
handen in vormen al noodig mannen.  Werkelijk opgericht besparing wijselijk 
voorkomen ze en.  Dichtbij en en vlijtige onnoodig na staatjes.  Zekere ad 
voeten nieuwe de ze.  Verwoest waardoor al is om ik zuiniger.  Brazilie 
beletsel passeert dik voorzien indische ten.  Door goud 

Re: [ovs-dev] [PATCH v3 09/10] dpif-netdev: enable ISA optimized DPIF and miniflow extract

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, 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.


build:
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -std=gnu++11  -g -O2 -o 
include/openvswitch/libcxxtest.la  include/openvswitch/cxxtest.lo  -lpthread 
-lrt -lm  -lunbound
libtool: link: rm -fr  include/openvswitch/.libs/libcxxtest.a 
include/openvswitch/.libs/libcxxtest.la
libtool: link: ar cru include/openvswitch/.libs/libcxxtest.a  
include/openvswitch/cxxtest.o
libtool: link: ranlib include/openvswitch/.libs/libcxxtest.a
libtool: link: ( cd "include/openvswitch/.libs" && rm -f "libcxxtest.la" && ln 
-s "../libcxxtest.la" "libcxxtest.la" )
depbase=`echo utilities/ovs-appctl.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I.-I ./include -I ./include -I ./lib -I 
./lib-Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith 
-Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast 
-Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror   -g 
-O2 -DHAVE_LD_AVX512_GOOD -MT utilities/ovs-appctl.o -MD -MP -MF $depbase.Tpo 
-c -o utilities/ovs-appctl.o utilities/ovs-appctl.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ./libtool  --tag=CC   --mode=link gcc -std=gnu99 -Wstrict-prototypes 
-Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security 
-Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align 
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror   -g 
-O2 -DHAVE_LD_AVX512_GOOD -o utilities/ovs-appctl utilities/ovs-appctl.o 
lib/libopenvswitch.la -lpthread -lrt -lm  -lunbound
libtool: link: gcc -std=gnu99 -Wstrict-prototypes -Wall -Wextra 
-Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum 
-Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes 
-Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers 
-fno-strict-aliasing -Wshadow -Werror -Werror -g -O2 -DHAVE_LD_AVX512_GOOD -o 
utilities/ovs-appctl utilities/ovs-appctl.o  lib/.libs/libopenvswitch.a -lssl 
-lcrypto -lcap-ng -lpthread -lrt -lm -lunbound
depbase=`echo utilities/ovs-testcontroller.o | sed 
's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I.-I ./include -I ./include -I ./lib -I 
./lib-Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith 
-Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast 
-Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror   -g 
-O2 -DHAVE_LD_AVX512_GOOD -MT utilities/ovs-testcontroller.o -MD -MP -MF 
$depbase.Tpo -c -o utilities/ovs-testcontroller.o 
utilities/ovs-testcontroller.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ./libtool  --tag=CC   --mode=link gcc -std=gnu99 -Wstrict-prototypes 
-Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security 
-Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align 
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror   -g 
-O2 -DHAVE_LD_AVX512_GOOD -o utilities/ovs-testcontroller 
utilities/ovs-testcontroller.o lib/libopenvswitch.la -lssl -lcrypto   -lpthread 
-lrt -lm  -lunbound
libtool: link: gcc -std=gnu99 -Wstrict-prototypes -Wall -Wextra 
-Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum 
-Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes 
-Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers 
-fno-strict-aliasing -Wshadow -Werror -Werror -g -O2 -DHAVE_LD_AVX512_GOOD -o 
utilities/ovs-testcontroller utilities/ovs-testcontroller.o  
lib/.libs/libopenvswitch.a -lcap-ng -lssl -lcrypto -lpthread -lrt -lm -lunbound
lib/.libs/libopenvswitch.a(dpif-netdev.o): In function 
`dpif_miniflow_extract_template_add':
/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace/lib/dpif-netdev.c:1006:
 undefined reference to `miniflow_extract_avx512_probe'
/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace/lib/dpif-netdev.c:1022:
 undefined reference to `miniflow_extract_avx512_insert'
/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace/lib/dpif-netdev.c:1066:
 undefined reference to `miniflow_extract_avx512_study'
collect2: error: ld returned 1 exit status
make[2]: *** [utilities/ovs-testcontroller] Error 1
make[2]: Leaving directory 
`/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace'
make: *** [all] Error 2


Please check this out.  

Re: [ovs-dev] [PATCH v3 07/10] dpif-netdev: Add command to switch dpif implementation

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, 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: Cian Ferriter 
Lines checked: 433, 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 v3 06/10] dpif-avx512: Add ISA implementation of dpif

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, 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: Cian Ferriter 
Lines checked: 454, 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 v3 03/10] dpif-netdev: Refactor to multiple header files

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, 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: Cian Ferriter 
ERROR: Improper whitespace around control block
#230 FILE: lib/dpif-netdev-private-dfc.h:111:
#define EMC_FOR_EACH_POS_WITH_HASH(EMC, CURRENT_ENTRY, HASH) \

ERROR: Improper whitespace around control block
#346 FILE: lib/dpif-netdev-private-dfc.h:227:
EMC_FOR_EACH_POS_WITH_HASH(cache, current_entry, key->hash) {

ERROR: Improper whitespace around control block
#464 FILE: lib/dpif-netdev-private-dpcls.h:95:
#define NETDEV_FLOW_KEY_FOR_EACH_IN_FLOWMAP(VALUE, KEY, FLOWMAP)   \

ERROR: Inappropriate bracing around statement
#465 FILE: lib/dpif-netdev-private-dpcls.h:96:
MINIFLOW_FOR_EACH_IN_FLOWMAP (VALUE, &(KEY)->mf, FLOWMAP)

Lines checked: 1600, Warnings: 1, Errors: 4


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 v3 01/10] dpdk: Cache result of CPU ISA checks

2020-11-18 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, 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: Cian Ferriter 
Lines checked: 63, 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 dpdk-latest v1] build: Remove DPDK make build references.

2020-11-18 Thread Ilya Maximets
On 11/17/20 5:38 PM, Stokes, Ian wrote:
>> Building DPDK using Make is removed since DPDK 20.08.
>> Hence, remove its references in OVS as well.
>> While at it, address few comments on the commit [1].
>>
> 
> Thanks for the patch, just a few comments below.
> 
> @Ilya, I think Sunil has addressed most of the concerns you flagged, however 
> I'd like your opinion on the python script?

Most of the commants are covered, but I didn't check if this patch
cleans everything that needs to be cleaned.  Only checked what is
in the patch.  Few comments inline.

> 
> I'd like to have this patch merged to dpdk-latest before creating our RFC 
> patch to move OVS master to use 20.11 so it would be nice to have this 
> reviewed/reworked so as to include the changes.
> 
>> [1] 540e70fba6d5 ("build: Add support for DPDK meson build")
> Probably going forward it's better to use the Fixes tag, so
> 
> Fixes: 540e70fba6d5 ("build: Add support for DPDK meson build")
>>
>> Tested-at: https://travis-ci.org/github/Sunil-Pai-G/ovs/builds/742699277
>> Signed-off-by: Sunil Pai G 
>> ---
> 
> A summary of the changes would be good hear, they will be stripped off when 
> be applied.
> Although in the case it is a new patch rather than part of a revision so I 
> understand why
> You ma not have put it here.
> 
>>  .travis/linux-build.sh|  4 +-
>>  Documentation/intro/install/afxdp.rst |  2 +-
>>  Documentation/intro/install/dpdk.rst  | 73 -
>>  acinclude.m4  | 78 ---
>>  python/automake.mk|  1 +
>>  python/build/pkgcfg.py| 24 +++--
>>  6 files changed, 65 insertions(+), 117 deletions(-)
>>
>> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
>> index 917bbf962..e085780e9 100755
>> --- a/.travis/linux-build.sh
>> +++ b/.travis/linux-build.sh
>> @@ -145,12 +145,12 @@ function install_dpdk()
>>
>>  CC=gcc meson $DPDK_OPTS build
>>  ninja -C build
>> -sudo ninja -C build install
>> +ninja -C build install
>>
>>  # Update the library paths.
>>  sudo ldconfig
>>
>> -echo "Installed DPDK source"
>> +echo "Installed DPDK source in $(pwd)"
>>  popd
>>  echo "${DPDK_VER}" > ${VERSION_FILE}
>>  }
>> diff --git a/Documentation/intro/install/afxdp.rst
>> b/Documentation/intro/install/afxdp.rst
>> index 327f2b3df..aad0aeebe 100644
>> --- a/Documentation/intro/install/afxdp.rst
>> +++ b/Documentation/intro/install/afxdp.rst
>> @@ -396,7 +396,7 @@ PVP using vhostuser device
>>  --
>>  First, build OVS with DPDK and AFXDP::
>>
>> -  ./configure  --enable-afxdp --with-dpdk=shared|static|
>> +  ./configure  --enable-afxdp --with-dpdk=shared|static
>>make -j4 && make install
>>
>>  Create a vhost-user port from OVS::
>> diff --git a/Documentation/intro/install/dpdk.rst
>> b/Documentation/intro/install/dpdk.rst
>> index 7a1852bc5..ecc4c7931 100644
>> --- a/Documentation/intro/install/dpdk.rst
>> +++ b/Documentation/intro/install/dpdk.rst
>> @@ -82,60 +82,39 @@ Install DPDK
>>
>> Meson is the preferred tool to build recent DPDK releases
>> as Make support is deprecated and will be removed from DPDK 20.11.

It's already removed, IIUC.  We shouldn't talk about it in the future tense.
Also it's not "preferred", but the only tool.

>> -   OVS supports DPDK Meson builds from DPDK 19.11 onwards.
>>
>> Build and install the DPDK library::
>>
>> -   $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
>> -   $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
>> -   $ meson $DPDK_TARGET
>> -   $ ninja -C $DPDK_TARGET
>> -   $ sudo ninja -C $DPDK_TARGET install
>> +   $ export DPDK_BUILD=$DPDK_DIR/build
>> +   $ meson build
>> +   $ ninja -C build
>> +   $ sudo ninja -C build install
>> $ sudo ldconfig
>>
>> Detailed information can be found at `DPDK documentation`_.
>>
>> -#. (Optional) Configure DPDK as a shared library
>> +#. (Optional) Configure and export the DPDK shared library location
>>
>> -   When using Meson, DPDK is built both as static and shared library.
>> -   So no extra configuration is required in this case.
>> +   Since DPDK is built both as static and shared library by default, no 
>> extra
>> +   configuration is required for the build.
>>
>> -   In case of Make, DPDK can be built as either a static library or a shared
>> -   library.  By default, it is configured for the former. If you wish to use
>> -   the latter, set
>> -   ``CONFIG_RTE_BUILD_SHARED_LIB=y`` in
>> ``$DPDK_DIR/config/common_base``.
>> +   Exporting the path to library is not necessary if the DPDK libraries are
>> +   system installed. For libraries installed using a prefix
>> +   (assuming $DPDK_INSTALL in the below case), export the path to this
>> +   library and also update the $PKG_CONFIG_PATH for use before building 
>> OVS::
>> +
>> +  $ export $DPDK_LIB=$DPDK_INSTALL/lib/x86_64-linux-gnu
>> +  $ export 

[ovs-dev] [PATCH v3 08/10] dpif-netdev/dpcls: Refactor function names to dpcls

2020-11-18 Thread Harry van Haaren
This commit refactors the function names from netdev_*
namespace to the dpcls_* namespace, as they are only used
by dpcls code. With the name change, it becomes more obvious
that the functions belong to dpcls functionality, and in the
dpif-netdev-private-dpcls.h header file.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev-private-dpcls.h |  6 ++
 lib/dpif-netdev.c   | 21 ++---
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/lib/dpif-netdev-private-dpcls.h b/lib/dpif-netdev-private-dpcls.h
index 5bc579bba..e66cae3f4 100644
--- a/lib/dpif-netdev-private-dpcls.h
+++ b/lib/dpif-netdev-private-dpcls.h
@@ -97,10 +97,8 @@ struct dpcls_subtable {
 
 /* Generates a mask for each bit set in the subtable's miniflow. */
 void
-netdev_flow_key_gen_masks(const struct netdev_flow_key *tbl,
-  uint64_t *mf_masks,
-  const uint32_t mf_bits_u0,
-  const uint32_t mf_bits_u1);
+dpcls_flow_key_gen_masks(const struct netdev_flow_key *tbl, uint64_t *mf_masks,
+ const uint32_t mf_bits_u0, const uint32_t mf_bits_u1);
 
 /* Matches a dpcls rule against the incoming packet in 'target' */
 bool dpcls_rule_matches_key(const struct dpcls_rule *rule,
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 7fd61b89d..211fc533b 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -8264,7 +8264,7 @@ dpcls_create_subtable(struct dpcls *cls, const struct 
netdev_flow_key *mask)
 subtable->mf_bits_set_unit0 = unit0;
 subtable->mf_bits_set_unit1 = unit1;
 subtable->mf_masks = xmalloc(sizeof(uint64_t) * (unit0 + unit1));
-netdev_flow_key_gen_masks(mask, subtable->mf_masks, unit0, unit1);
+dpcls_flow_key_gen_masks(mask, subtable->mf_masks, unit0, unit1);
 
 /* Get the preferred subtable search function for this (u0,u1) subtable.
  * The function is guaranteed to always return a valid implementation, and
@@ -8363,11 +8363,10 @@ dpcls_remove(struct dpcls *cls, struct dpcls_rule *rule)
 }
 }
 
-/* Inner loop for mask generation of a unit, see netdev_flow_key_gen_masks. */
+/* Inner loop for mask generation of a unit, see dpcls_flow_key_gen_masks. */
 static inline void
-netdev_flow_key_gen_mask_unit(uint64_t iter,
-  const uint64_t count,
-  uint64_t *mf_masks)
+dpcls_flow_key_gen_mask_unit(uint64_t iter, const uint64_t count,
+ uint64_t *mf_masks)
 {
 int i;
 for (i = 0; i < count; i++) {
@@ -8388,16 +8387,16 @@ netdev_flow_key_gen_mask_unit(uint64_t iter,
  * @param mf_bits_unit0 Number of bits set in unit0 of the miniflow
  */
 void
-netdev_flow_key_gen_masks(const struct netdev_flow_key *tbl,
-  uint64_t *mf_masks,
-  const uint32_t mf_bits_u0,
-  const uint32_t mf_bits_u1)
+dpcls_flow_key_gen_masks(const struct netdev_flow_key *tbl,
+ uint64_t *mf_masks,
+ const uint32_t mf_bits_u0,
+ const uint32_t mf_bits_u1)
 {
 uint64_t iter_u0 = tbl->mf.map.bits[0];
 uint64_t iter_u1 = tbl->mf.map.bits[1];
 
-netdev_flow_key_gen_mask_unit(iter_u0, mf_bits_u0, _masks[0]);
-netdev_flow_key_gen_mask_unit(iter_u1, mf_bits_u1, _masks[mf_bits_u0]);
+dpcls_flow_key_gen_mask_unit(iter_u0, mf_bits_u0, _masks[0]);
+dpcls_flow_key_gen_mask_unit(iter_u1, mf_bits_u1, _masks[mf_bits_u0]);
 }
 
 /* Returns true if 'target' satisfies 'key' in 'mask', that is, if each 1-bit
-- 
2.25.1

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


[ovs-dev] [PATCH v3 07/10] dpif-netdev: Add command to switch dpif implementation

2020-11-18 Thread Harry van Haaren
This commit adds a new command to allow the user to switch
the active DPIF implementation at runtime. A probe function
is executed before switching the DPIF implementation, to ensure
the CPU is capable of running the ISA required. For example, the
below code will switch to the AVX512 enabled DPIF assuming
that the runtime CPU is capable of running AVX512 instructions:

 $ ovs-appctl dpif-netdev/dpif-set dpif_avx512

A new configuration flag is added to allow selection of the
default DPIF. This is useful for running the unit-tests against
the available DPIF implementations, without modifying each unit test.

The design of the testing & validation for ISA optimized DPIF
implementations is based around the work already upstream for DPCLS.
Note however that a DPCLS lookup has no state or side-effects, allowing
the auto-validator implementation to perform multiple lookups and
provide consistent statistic counters.

The DPIF component does have state, so running two implementations in
parallel and comparing output is not a valid testing method, as there
are changes in DPIF statistic counters (side effects). As a result, the
DPIF is tested directly against the unit-tests.

Signed-off-by: Harry van Haaren 
Signed-off-by: Cian Ferriter 

---

v3:
- Reformat code to match OVS style
- Reformat comments to match OVS style
- Improve return values for dp_netdev_input_outer_avx512_probe(). Use
  errno values and return 0 on success.
- Remove "TODO: call the dpif selector impl here, int ret, out param for
  func ptr:"
- Remove "TODO make this register/selectable just like DPCLS"
---
 acinclude.m4 |  15 +
 configure.ac |   1 +
 lib/automake.mk  |   1 +
 lib/dpif-netdev-avx512.c |  14 +
 lib/dpif-netdev-private-dpif.c   | 104 +++
 lib/dpif-netdev-private-dpif.h   |  31 -
 lib/dpif-netdev-private-thread.h |  12 +---
 lib/dpif-netdev.c|  84 +++--
 8 files changed, 247 insertions(+), 15 deletions(-)
 create mode 100644 lib/dpif-netdev-private-dpif.c

diff --git a/acinclude.m4 b/acinclude.m4
index 1460289ca..9a7cb8df0 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -30,6 +30,21 @@ AC_DEFUN([OVS_CHECK_DPCLS_AUTOVALIDATOR], [
   fi
 ])
 
+dnl Set OVS DPIF default implementation at configure time for running the unit
+dnl tests on the whole codebase without modifying tests per DPIF impl
+AC_DEFUN([OVS_CHECK_DPIF_AVX512_DEFAULT], [
+  AC_ARG_ENABLE([dpif-default-avx512],
+[AC_HELP_STRING([--enable-dpif-default-avx512], [Enable DPIF 
AVX512 implementation as default.])],
+[dpifavx512=yes],[dpifavx512=no])
+  AC_MSG_CHECKING([whether DPIF AVX512 is default implementation])
+  if test "$dpifavx512" != yes; then
+AC_MSG_RESULT([no])
+  else
+OVS_CFLAGS="$OVS_CFLAGS -DDPIF_AVX512_DEFAULT"
+AC_MSG_RESULT([yes])
+  fi
+])
+
 dnl OVS_ENABLE_WERROR
 AC_DEFUN([OVS_ENABLE_WERROR],
   [AC_ARG_ENABLE(
diff --git a/configure.ac b/configure.ac
index 126a1d9d1..76b1e4fec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,6 +185,7 @@ OVS_ENABLE_WERROR
 OVS_ENABLE_SPARSE
 OVS_CTAGS_IDENTIFIERS
 OVS_CHECK_DPCLS_AUTOVALIDATOR
+OVS_CHECK_DPIF_AVX512_DEFAULT
 OVS_CHECK_BINUTILS_AVX512
 
 AC_ARG_VAR(KARCH, [Kernel Architecture String])
diff --git a/lib/automake.mk b/lib/automake.mk
index 650207940..2a41f7ab5 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -115,6 +115,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev.h \
lib/dpif-netdev-private-dfc.h \
lib/dpif-netdev-private-dpcls.h \
+   lib/dpif-netdev-private-dpif.c \
lib/dpif-netdev-private-dpif.h \
lib/dpif-netdev-private-flow.h \
lib/dpif-netdev-private-hwol.h \
diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c
index ff756a203..2dee909a3 100644
--- a/lib/dpif-netdev-avx512.c
+++ b/lib/dpif-netdev-avx512.c
@@ -19,6 +19,7 @@
 #if !defined(__CHECKER__)
 
 #include 
+#include 
 
 #include "dpif-netdev.h"
 #include "dpif-netdev-perf.h"
@@ -44,6 +45,19 @@ struct pkt_flow_meta {
 uint16_t tcp_flags;
 };
 
+int32_t
+dp_netdev_input_outer_avx512_probe(void)
+{
+int avx512f_available = dpdk_get_cpu_has_isa("x86_64", "avx512f");
+int bmi2_available = dpdk_get_cpu_has_isa("x86_64", "bmi2");
+
+if (!avx512f_available || !bmi2_available) {
+return -ENOTSUP;
+}
+
+return 0;
+}
+
 int32_t
 dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd,
  struct dp_packet_batch *packets,
diff --git a/lib/dpif-netdev-private-dpif.c b/lib/dpif-netdev-private-dpif.c
new file mode 100644
index 0..a27a1d752
--- /dev/null
+++ b/lib/dpif-netdev-private-dpif.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2020 Intel Corporation.
+ *
+ * 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 

[ovs-dev] [PATCH v3 06/10] dpif-avx512: Add ISA implementation of dpif

2020-11-18 Thread Harry van Haaren
This commit adds the AVX512 implementation of DPIF functionality,
specifically the dp_netdev_input_outer_avx512 function. This function
only handles outer (no re-circulations), and is optimized to use the
AVX512 ISA for packet batching and other DPIF work.

Sparse is not able to handle the AVX512 intrinsics, causing compile
time failures, so it is disabled for this file.

Signed-off-by: Harry van Haaren 
Signed-off-by: Cian Ferriter 

---

v2:
- Add BMI flag for _blsr_u64() instruction
- Add sparse avoidance to fix compilation with --enable-sparse

v3:
- Fix minor grammar mistake
- Fix lines which are too long
- Simplify how *keys is used in AVX512 dp_netdev_input()
- Fix C++ style comments
- Fix spacing after in some for statements
- Remove TODO which gets taken care of in next commit
- Move dpif_netdev_packet_get_rss_hash_orig_pkt() in refactor commit
  rather than here.
- Remove memset changes in fast_path_processing() and dpcls_lookup()
- Fix count_1bits() of miniflow bits
---
 lib/automake.mk  |   5 +-
 lib/dpif-netdev-avx512.c | 188 +++
 lib/dpif-netdev-private-dpif.h   |  32 ++
 lib/dpif-netdev-private-thread.h |   9 +-
 lib/dpif-netdev-private.h|  25 
 lib/dpif-netdev.c|  40 +--
 6 files changed, 284 insertions(+), 15 deletions(-)
 create mode 100644 lib/dpif-netdev-avx512.c
 create mode 100644 lib/dpif-netdev-private-dpif.h

diff --git a/lib/automake.mk b/lib/automake.mk
index eccfaf3e3..650207940 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -33,11 +33,13 @@ lib_libopenvswitchavx512_la_CFLAGS = \
-mavx512f \
-mavx512bw \
-mavx512dq \
+   -mbmi \
-mbmi2 \
-fPIC \
$(AM_CFLAGS)
 lib_libopenvswitchavx512_la_SOURCES = \
-   lib/dpif-netdev-lookup-avx512-gather.c
+   lib/dpif-netdev-lookup-avx512-gather.c \
+   lib/dpif-netdev-avx512.c
 lib_libopenvswitchavx512_la_LDFLAGS = \
-static
 endif
@@ -113,6 +115,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev.h \
lib/dpif-netdev-private-dfc.h \
lib/dpif-netdev-private-dpcls.h \
+   lib/dpif-netdev-private-dpif.h \
lib/dpif-netdev-private-flow.h \
lib/dpif-netdev-private-hwol.h \
lib/dpif-netdev-private-thread.h \
diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c
new file mode 100644
index 0..ff756a203
--- /dev/null
+++ b/lib/dpif-netdev-avx512.c
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2020 Intel.
+ *
+ * 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.
+ */
+
+#ifdef __x86_64__
+/* Sparse cannot handle the AVX512 instructions */
+#if !defined(__CHECKER__)
+
+#include 
+
+#include "dpif-netdev.h"
+#include "dpif-netdev-perf.h"
+
+#include "dpif-netdev-private.h"
+#include "dpif-netdev-private-dpcls.h"
+#include "dpif-netdev-private-flow.h"
+#include "dpif-netdev-private-thread.h"
+
+#include "dp-packet.h"
+#include "netdev.h"
+
+#include "immintrin.h"
+
+
+/* Structure to contain per-packet metadata that must be attributed to the
+ * dp netdev flow. This is unfortunate to have to track per packet, however
+ * it's a bit awkward to maintain them in a performant way. This structure
+ * helps to keep two variables on a single cache line per packet.
+ */
+struct pkt_flow_meta {
+uint16_t bytes;
+uint16_t tcp_flags;
+};
+
+int32_t
+dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd,
+ struct dp_packet_batch *packets,
+ odp_port_t in_port)
+{
+OVS_ALIGNED_VAR(CACHE_LINE_SIZE)
+struct netdev_flow_key keys[NETDEV_MAX_BURST];
+OVS_ALIGNED_VAR(CACHE_LINE_SIZE)
+struct netdev_flow_key *key_ptrs[NETDEV_MAX_BURST];
+OVS_ALIGNED_VAR(CACHE_LINE_SIZE)
+struct pkt_flow_meta pkt_meta[NETDEV_MAX_BURST];
+
+for (int i = 0; i < NETDEV_MAX_BURST; i++) {
+ key_ptrs[i] = [i];
+}
+
+/* Stores the computed output: a rule pointer for each packet */
+struct dpcls_rule *rules[NETDEV_MAX_BURST];
+for (uint32_t i = 0; i < NETDEV_MAX_BURST; i += 8) {
+_mm512_storeu_si512([i], _mm512_setzero_si512());
+}
+
+/* Prefetch each packet's metadata */
+const size_t batch_size = dp_packet_batch_size(packets);
+for (int i = 0; i < batch_size; i++) {
+struct dp_packet *packet = packets->packets[i];
+OVS_PREFETCH(dp_packet_data(packet));
+

[ovs-dev] [PATCH v3 09/10] dpif-netdev: enable ISA optimized DPIF and miniflow extract

2020-11-18 Thread Harry van Haaren
This commit refactors the way in which the DPIF component can
call the miniflow-extract function. It creates flexibility in
the DPIF component by adding a function pointer at the pmd level.

A new miniflow extract implementation is created which allows the
AVX-512 SIMD instructions to perform the packet matching and building
of the miniflow data-structure.

All AVX-512 capable CPUs will be able to run the miniflow
extract, however CPUs that support the AVX-512 Vector Bit
Manipulation Instructions (VBMI) will benefit more as the
native byte permute instruction gives extra performance.

Signed-off-by: Harry van Haaren 
---
 lib/automake.mk   |   2 +
 lib/dpif-netdev-avx512-extract.h  | 435 ++
 lib/dpif-netdev-avx512.c  |  16 +-
 lib/dpif-netdev-private-extract.h |  52 
 lib/dpif-netdev-private-flow.h|   1 +
 lib/dpif-netdev-private-thread.h  |   9 +
 lib/dpif-netdev.c |  93 +++
 7 files changed, 605 insertions(+), 3 deletions(-)
 create mode 100644 lib/dpif-netdev-avx512-extract.h
 create mode 100644 lib/dpif-netdev-private-extract.h

diff --git a/lib/automake.mk b/lib/automake.mk
index 2a41f7ab5..e5f75ce35 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -107,6 +107,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dp-packet.h \
lib/dp-packet.c \
lib/dpdk.h \
+   lib/dpif-netdev-avx512-extract.h \
lib/dpif-netdev-lookup.h \
lib/dpif-netdev-lookup.c \
lib/dpif-netdev-lookup-autovalidator.c \
@@ -117,6 +118,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev-private-dpcls.h \
lib/dpif-netdev-private-dpif.c \
lib/dpif-netdev-private-dpif.h \
+   lib/dpif-netdev-private-extract.h \
lib/dpif-netdev-private-flow.h \
lib/dpif-netdev-private-hwol.h \
lib/dpif-netdev-private-thread.h \
diff --git a/lib/dpif-netdev-avx512-extract.h b/lib/dpif-netdev-avx512-extract.h
new file mode 100644
index 0..c264ac067
--- /dev/null
+++ b/lib/dpif-netdev-avx512-extract.h
@@ -0,0 +1,435 @@
+/*
+ * Copyright (c) 2020 Intel.
+ *
+ * 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.
+ */
+
+#include "flow.h"
+#include "dpif-netdev-private-thread.h"
+
+
+/* This file contains optimized implementations of miniflow_extract()
+ * for specific common traffic patterns. The optimizations allow for
+ * quick probing of a specific packet type, and if a match with a specific
+ * type is found, a shuffle like proceedure builds up the required miniflow
+ */
+
+#define MAX_PATTERN_COUNT (8)
+#define MAX_PATTERN_SIZE (128)
+#define MAX_SHUFFLE_COUNT (MAX_PATTERN_SIZE / 64)
+
+/* A structure to represent each matched on packet pattern */
+struct __attribute__((aligned(MAX_PATTERN_SIZE))) packet_pattern {
+uint8_t mask[MAX_PATTERN_SIZE];
+uint8_t data[MAX_PATTERN_SIZE];
+};
+
+/* Improvement: create this sttruct in dp-packet.h, and reuse-here. That would
+ * avoid the requirement of the packed attribute.
+ */
+struct __attribute__((packed)) packet_offsets {
+uint8_t l2_pad_size;
+uint16_t l2_5_ofs;
+uint16_t l3_ofs;
+uint16_t l4_ofs;
+};
+
+/* Structure to represent the data-movement from pattern to miniflow. */
+struct packet_pattern_shuffle {
+uint64_t kmasks[MAX_SHUFFLE_COUNT];
+struct packet_offsets offsets;
+uint8_t shuffle[MAX_PATTERN_SIZE];
+};
+
+/* structure that represents all per-thread pattern data. */
+struct packet_pattern_cache {
+/* Minimum packet len for this pattern index to be a valid candidate. */
+uint8_t min_len[MAX_PATTERN_COUNT];
+
+/* Number of active patterns to match against. */
+uint8_t active_pattern_count;
+
+/* The mask and compare data itself. */
+struct packet_pattern patterns[MAX_PATTERN_COUNT];
+
+/* Miniflow bits that need to be set for each pattern. */
+struct miniflow miniflow_bits[MAX_PATTERN_COUNT];
+
+/* Structure to represent the data-movement from pattern to miniflow. */
+struct packet_pattern_shuffle shuffles[MAX_PATTERN_COUNT];
+
+};
+
+/* Single copy of control-path owned patterns. The contents of this struct will
+ * be updated when the user runs a miniflow-pattern-add command. The contents
+ * of this struct are only read in the datapath during the "study" phase, and
+ * copied into a thread-local memory for the PMD threads for datapath usage.
+ */
+static struct packet_pattern_cache patterns_control_path;
+
+/* Generator for EtherType 

[ovs-dev] [PATCH v3 10/10] dpif-netdev: enable scalar datapath with optimized miniflow extract

2020-11-18 Thread Harry van Haaren
This commit enables the scalar datapath to utilize the SIMD accelerated
packet parsing for the parsing of the outer packet.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev.c | 46 ++
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 88db883a9..74c2da98a 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -6782,27 +6782,41 @@ dfc_processing(struct dp_netdev_pmd_thread *pmd,
 pkt_metadata_init(>md, port_no);
 }
 
-if ((*recirc_depth_get() == 0) &&
-dp_packet_has_flow_mark(packet, )) {
-flow = mark_to_flow_find(pmd, mark);
-if (OVS_LIKELY(flow)) {
-tcp_flags = parse_tcp_flags(packet);
-if (OVS_LIKELY(batch_enable)) {
-dp_netdev_queue_batches(packet, flow, tcp_flags, batches,
-n_batches);
-} else {
-/* Flow batching should be performed only after fast-path
- * processing is also completed for packets with emc miss
- * or else it will result in reordering of packets with
- * same datapath flows. */
-packet_enqueue_to_flow_map(packet, flow, tcp_flags,
-   flow_map, map_cnt++);
+/* Outer classification checks only */
+uint32_t miniflow_extract_done = 0;
+if (*recirc_depth_get() == 0) {
+/* Check if packet has hardware flow mark */
+if (dp_packet_has_flow_mark(packet, )) {
+flow = mark_to_flow_find(pmd, mark);
+if (OVS_LIKELY(flow)) {
+tcp_flags = parse_tcp_flags(packet);
+if (OVS_LIKELY(batch_enable)) {
+dp_netdev_queue_batches(packet, flow, tcp_flags,
+batches, n_batches);
+} else {
+/* Flow batching should be performed only after fast-
+ * path processing is also completed for packets with
+ * emc miss or else it will result in reordering of
+ * packets with same datapath flows.
+ */
+packet_enqueue_to_flow_map(packet, flow, tcp_flags,
+   flow_map, map_cnt++);
+}
 }
 continue;
 }
+
+/* Use optimized outer miniflow extract if available */
+if (pmd->miniflow_extract_opt) {
+miniflow_extract_done = pmd->miniflow_extract_opt(pmd, packet,
+  >mf);
+}
+}
+
+if (!miniflow_extract_done) {
+miniflow_extract(packet, >mf);
 }
 
-miniflow_extract(packet, >mf);
 key->len = 0; /* Not computed yet. */
 key->hash =
 (md_is_valid == false)
-- 
2.25.1

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


[ovs-dev] [PATCH v3 03/10] dpif-netdev: Refactor to multiple header files

2020-11-18 Thread Harry van Haaren
Split the very large file dpif-netdev.c and the datastructures
it contains into multiple header files. Each header file is
responsible for the datastructures of that component.

This logical split allows better reuse and modularity of the code,
and reduces the very large file dpif-netdev.c to be more managable.

Due to dependencies between components, it is not possible to
move component in smaller granularities than this patch.

To explain the dependencies better, eg:

DPCLS has no deps (from dpif-netdev.c file)
FLOW depends on DPCLS (struct dpcls_rule)
DFC depends on DPCLS (netdev_flow_key) and FLOW (netdev_flow_key)
THREAD depends on DFC (struct dfc_cache)

DFC_PROC depends on THREAD (struct pmd_thread)

DPCLS lookup.h/c require only DPCLS
DPCLS implementations require only dpif-netdev-lookup.h.
- This change was made in 2.12 release with function pointers
- This commit only refactors the name to "private-dpcls.h"

Signed-off-by: Harry van Haaren 
Signed-off-by: Cian Ferriter 

---

v2:
- fix copyright header typos
- fix compliation issues around static/inline when moved to header file

v3:
- Move dpif_netdev_packet_get_rss_hash_orig_pkt() in this commit rather
  than "add ISA" commit
- Move struct dp_netdev_flow and related code directly from
  lib/dpif-netdev.c to lib/dpif-netdev-private-flow.h
---
 lib/automake.mk|   4 +
 lib/dpif-netdev-lookup-autovalidator.c |   1 -
 lib/dpif-netdev-lookup-avx512-gather.c |   1 -
 lib/dpif-netdev-lookup-generic.c   |   1 -
 lib/dpif-netdev-lookup.h   |   2 +-
 lib/dpif-netdev-private-dfc.h  | 244 
 lib/dpif-netdev-private-dpcls.h| 129 +++
 lib/dpif-netdev-private-flow.h | 154 
 lib/dpif-netdev-private-thread.h   | 206 ++
 lib/dpif-netdev-private.h  | 100 +
 lib/dpif-netdev.c  | 511 +
 11 files changed, 752 insertions(+), 601 deletions(-)
 create mode 100644 lib/dpif-netdev-private-dfc.h
 create mode 100644 lib/dpif-netdev-private-dpcls.h
 create mode 100644 lib/dpif-netdev-private-flow.h
 create mode 100644 lib/dpif-netdev-private-thread.h

diff --git a/lib/automake.mk b/lib/automake.mk
index 380a67228..22a281fcc 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -111,6 +111,10 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev-lookup-generic.c \
lib/dpif-netdev.c \
lib/dpif-netdev.h \
+   lib/dpif-netdev-private-dfc.h \
+   lib/dpif-netdev-private-dpcls.h \
+   lib/dpif-netdev-private-flow.h \
+   lib/dpif-netdev-private-thread.h \
lib/dpif-netdev-private.h \
lib/dpif-netdev-perf.c \
lib/dpif-netdev-perf.h \
diff --git a/lib/dpif-netdev-lookup-autovalidator.c 
b/lib/dpif-netdev-lookup-autovalidator.c
index 97b59fdd0..475e1ab1e 100644
--- a/lib/dpif-netdev-lookup-autovalidator.c
+++ b/lib/dpif-netdev-lookup-autovalidator.c
@@ -17,7 +17,6 @@
 #include 
 #include "dpif-netdev.h"
 #include "dpif-netdev-lookup.h"
-#include "dpif-netdev-private.h"
 #include "openvswitch/vlog.h"
 
 VLOG_DEFINE_THIS_MODULE(dpif_lookup_autovalidator);
diff --git a/lib/dpif-netdev-lookup-avx512-gather.c 
b/lib/dpif-netdev-lookup-avx512-gather.c
index 5e3634249..8fc1cdfa5 100644
--- a/lib/dpif-netdev-lookup-avx512-gather.c
+++ b/lib/dpif-netdev-lookup-avx512-gather.c
@@ -21,7 +21,6 @@
 
 #include "dpif-netdev.h"
 #include "dpif-netdev-lookup.h"
-#include "dpif-netdev-private.h"
 #include "cmap.h"
 #include "flow.h"
 #include "pvector.h"
diff --git a/lib/dpif-netdev-lookup-generic.c b/lib/dpif-netdev-lookup-generic.c
index b1a0cfc36..e3b6be4b6 100644
--- a/lib/dpif-netdev-lookup-generic.c
+++ b/lib/dpif-netdev-lookup-generic.c
@@ -17,7 +17,6 @@
 
 #include 
 #include "dpif-netdev.h"
-#include "dpif-netdev-private.h"
 #include "dpif-netdev-lookup.h"
 
 #include "bitmap.h"
diff --git a/lib/dpif-netdev-lookup.h b/lib/dpif-netdev-lookup.h
index bd72aa29b..59f51faa0 100644
--- a/lib/dpif-netdev-lookup.h
+++ b/lib/dpif-netdev-lookup.h
@@ -19,7 +19,7 @@
 
 #include 
 #include "dpif-netdev.h"
-#include "dpif-netdev-private.h"
+#include "dpif-netdev-private-dpcls.h"
 
 /* Function to perform a probe for the subtable bit fingerprint.
  * Returns NULL if not valid, or a valid function pointer to call for this
diff --git a/lib/dpif-netdev-private-dfc.h b/lib/dpif-netdev-private-dfc.h
new file mode 100644
index 0..8f6a4899e
--- /dev/null
+++ b/lib/dpif-netdev-private-dfc.h
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
+ * Copyright (c) 2019, 2020 Intel Corporation.
+ *
+ * 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 

[ovs-dev] [PATCH v3 02/10] dpif-netdev: Move pmd_try_optimize function in file

2020-11-18 Thread Harry van Haaren
This commit moves the pmd_try_optimize function to a more
appropriate location in the file - currently it sits in the
DPCLS section, which is not its correct home.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev.c | 146 +++---
 1 file changed, 73 insertions(+), 73 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 300861ca5..13f77c2ec 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -6064,6 +6064,79 @@ reload:
 return NULL;
 }
 
+static inline void
+dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd,
+   struct polled_queue *poll_list, int poll_cnt)
+{
+struct dpcls *cls;
+uint64_t tot_idle = 0, tot_proc = 0;
+unsigned int pmd_load = 0;
+
+if (pmd->ctx.now > pmd->rxq_next_cycle_store) {
+uint64_t curr_tsc;
+struct pmd_auto_lb *pmd_alb = >dp->pmd_alb;
+if (pmd_alb->is_enabled && !pmd->isolated
+&& (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] >=
+   pmd->prev_stats[PMD_CYCLES_ITER_IDLE])
+&& (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY] >=
+pmd->prev_stats[PMD_CYCLES_ITER_BUSY]))
+{
+tot_idle = pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] -
+   pmd->prev_stats[PMD_CYCLES_ITER_IDLE];
+tot_proc = pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY] -
+   pmd->prev_stats[PMD_CYCLES_ITER_BUSY];
+
+if (tot_proc) {
+pmd_load = ((tot_proc * 100) / (tot_idle + tot_proc));
+}
+
+if (pmd_load >= ALB_PMD_LOAD_THRESHOLD) {
+atomic_count_inc(>pmd_overloaded);
+} else {
+atomic_count_set(>pmd_overloaded, 0);
+}
+}
+
+pmd->prev_stats[PMD_CYCLES_ITER_IDLE] =
+pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE];
+pmd->prev_stats[PMD_CYCLES_ITER_BUSY] =
+pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY];
+
+/* Get the cycles that were used to process each queue and store. */
+for (unsigned i = 0; i < poll_cnt; i++) {
+uint64_t rxq_cyc_curr = dp_netdev_rxq_get_cycles(poll_list[i].rxq,
+RXQ_CYCLES_PROC_CURR);
+dp_netdev_rxq_set_intrvl_cycles(poll_list[i].rxq, rxq_cyc_curr);
+dp_netdev_rxq_set_cycles(poll_list[i].rxq, RXQ_CYCLES_PROC_CURR,
+ 0);
+}
+curr_tsc = cycles_counter_update(>perf_stats);
+if (pmd->intrvl_tsc_prev) {
+/* There is a prev timestamp, store a new intrvl cycle count. */
+atomic_store_relaxed(>intrvl_cycles,
+ curr_tsc - pmd->intrvl_tsc_prev);
+}
+pmd->intrvl_tsc_prev = curr_tsc;
+/* Start new measuring interval */
+pmd->rxq_next_cycle_store = pmd->ctx.now + PMD_RXQ_INTERVAL_LEN;
+}
+
+if (pmd->ctx.now > pmd->next_optimization) {
+/* Try to obtain the flow lock to block out revalidator threads.
+ * If not possible, just try next time. */
+if (!ovs_mutex_trylock(>flow_mutex)) {
+/* Optimize each classifier */
+CMAP_FOR_EACH (cls, node, >classifiers) {
+dpcls_sort_subtable_vector(cls);
+}
+ovs_mutex_unlock(>flow_mutex);
+/* Start new measuring interval */
+pmd->next_optimization = pmd->ctx.now
+ + DPCLS_OPTIMIZATION_INTERVAL;
+}
+}
+}
+
 static void
 dp_netdev_disable_upcall(struct dp_netdev *dp)
 OVS_ACQUIRES(dp->upcall_rwlock)
@@ -8699,79 +8772,6 @@ dpcls_sort_subtable_vector(struct dpcls *cls)
 pvector_publish(pvec);
 }
 
-static inline void
-dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd,
-   struct polled_queue *poll_list, int poll_cnt)
-{
-struct dpcls *cls;
-uint64_t tot_idle = 0, tot_proc = 0;
-unsigned int pmd_load = 0;
-
-if (pmd->ctx.now > pmd->rxq_next_cycle_store) {
-uint64_t curr_tsc;
-struct pmd_auto_lb *pmd_alb = >dp->pmd_alb;
-if (pmd_alb->is_enabled && !pmd->isolated
-&& (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] >=
-   pmd->prev_stats[PMD_CYCLES_ITER_IDLE])
-&& (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY] >=
-pmd->prev_stats[PMD_CYCLES_ITER_BUSY]))
-{
-tot_idle = pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] -
-   pmd->prev_stats[PMD_CYCLES_ITER_IDLE];
-tot_proc = pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY] -
-   pmd->prev_stats[PMD_CYCLES_ITER_BUSY];
-
-if (tot_proc) {
-

[ovs-dev] [PATCH v3 04/10] dpif-netdev: Split hwol out to own header file

2020-11-18 Thread Harry van Haaren
This commit moves the datapath lookup functions required for
hardware offload to a seperate file. This allows other DPIF
implementations to access the lookup functions, encouraging
code reuse.

Signed-off-by: Harry van Haaren 

---

v2: Fixed copyright header
---
 lib/automake.mk|  1 +
 lib/dpif-netdev-private-hwol.h | 63 ++
 lib/dpif-netdev.c  | 39 ++---
 3 files changed, 67 insertions(+), 36 deletions(-)
 create mode 100644 lib/dpif-netdev-private-hwol.h

diff --git a/lib/automake.mk b/lib/automake.mk
index 22a281fcc..eccfaf3e3 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -114,6 +114,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev-private-dfc.h \
lib/dpif-netdev-private-dpcls.h \
lib/dpif-netdev-private-flow.h \
+   lib/dpif-netdev-private-hwol.h \
lib/dpif-netdev-private-thread.h \
lib/dpif-netdev-private.h \
lib/dpif-netdev-perf.c \
diff --git a/lib/dpif-netdev-private-hwol.h b/lib/dpif-netdev-private-hwol.h
new file mode 100644
index 0..447010ab8
--- /dev/null
+++ b/lib/dpif-netdev-private-hwol.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
+ * Copyright (c) 2020 Intel Corporation.
+ *
+ * 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.
+ */
+
+#ifndef DPIF_NETDEV_PRIVATE_HWOL_H
+#define DPIF_NETDEV_PRIVATE_HWOL_H 1
+
+#include "dpif-netdev-private-flow.h"
+
+#define MAX_FLOW_MARK   (UINT32_MAX - 1)
+#define INVALID_FLOW_MARK   0
+/* Zero flow mark is used to indicate the HW to remove the mark. A packet
+ * marked with zero mark is received in SW without a mark at all, so it
+ * cannot be used as a valid mark.
+ */
+
+struct megaflow_to_mark_data {
+const struct cmap_node node;
+ovs_u128 mega_ufid;
+uint32_t mark;
+};
+
+struct flow_mark {
+struct cmap megaflow_to_mark;
+struct cmap mark_to_flow;
+struct id_pool *pool;
+};
+
+/* allocated in dpif-netdev.c */
+extern struct flow_mark flow_mark;
+
+static inline struct dp_netdev_flow *
+mark_to_flow_find(const struct dp_netdev_pmd_thread *pmd,
+  const uint32_t mark)
+{
+struct dp_netdev_flow *flow;
+
+CMAP_FOR_EACH_WITH_HASH (flow, mark_node, hash_int(mark, 0),
+ _mark.mark_to_flow) {
+if (flow->mark == mark && flow->pmd_id == pmd->core_id &&
+flow->dead == false) {
+return flow;
+}
+}
+
+return NULL;
+}
+
+
+#endif /* dpif-netdev-private-hwol.h */
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 94714c896..109fbd6a1 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -84,6 +84,8 @@
 #include "util.h"
 #include "uuid.h"
 
+#include "dpif-netdev-private-hwol.h"
+
 VLOG_DEFINE_THIS_MODULE(dpif_netdev);
 
 /* Auto Load Balancing Defaults */
@@ -1949,26 +1951,8 @@ dp_netdev_pmd_find_dpcls(struct dp_netdev_pmd_thread 
*pmd,
 return cls;
 }
 
-#define MAX_FLOW_MARK   (UINT32_MAX - 1)
-#define INVALID_FLOW_MARK   0
-/* Zero flow mark is used to indicate the HW to remove the mark. A packet
- * marked with zero mark is received in SW without a mark at all, so it
- * cannot be used as a valid mark.
- */
-
-struct megaflow_to_mark_data {
-const struct cmap_node node;
-ovs_u128 mega_ufid;
-uint32_t mark;
-};
-
-struct flow_mark {
-struct cmap megaflow_to_mark;
-struct cmap mark_to_flow;
-struct id_pool *pool;
-};
 
-static struct flow_mark flow_mark = {
+struct flow_mark flow_mark = {
 .megaflow_to_mark = CMAP_INITIALIZER,
 .mark_to_flow = CMAP_INITIALIZER,
 };
@@ -2137,23 +2121,6 @@ flow_mark_flush(struct dp_netdev_pmd_thread *pmd)
 }
 }
 
-static struct dp_netdev_flow *
-mark_to_flow_find(const struct dp_netdev_pmd_thread *pmd,
-  const uint32_t mark)
-{
-struct dp_netdev_flow *flow;
-
-CMAP_FOR_EACH_WITH_HASH (flow, mark_node, hash_int(mark, 0),
- _mark.mark_to_flow) {
-if (flow->mark == mark && flow->pmd_id == pmd->core_id &&
-flow->dead == false) {
-return flow;
-}
-}
-
-return NULL;
-}
-
 static struct dp_flow_offload_item *
 dp_netdev_alloc_flow_offload(struct dp_netdev_pmd_thread *pmd,
  struct dp_netdev_flow *flow,
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org

[ovs-dev] [PATCH v3 05/10] dpif-netdev: Add function pointer for netdev input

2020-11-18 Thread Harry van Haaren
This commit adds a function pointer to the pmd thread data structure,
giving the pmd thread flexibility in its dpif-input function choice.
This allows choosing of the implementation based on ISA capabilities
of the runtime CPU, leading to optimizations and higher performance.

Signed-off-by: Harry van Haaren 

---

v3:
- Fix minor typo
---
 lib/dpif-netdev-private-thread.h | 10 ++
 lib/dpif-netdev.c|  7 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/lib/dpif-netdev-private-thread.h b/lib/dpif-netdev-private-thread.h
index a5b3ae360..ecd6aa977 100644
--- a/lib/dpif-netdev-private-thread.h
+++ b/lib/dpif-netdev-private-thread.h
@@ -47,6 +47,13 @@ struct dp_netdev_pmd_thread_ctx {
 uint32_t emc_insert_min;
 };
 
+/* Forward declaration for typedef */
+struct dp_netdev_pmd_thread;
+
+typedef void (*dp_netdev_input_func)(struct dp_netdev_pmd_thread *pmd,
+ struct dp_packet_batch *packets,
+ odp_port_t port_no);
+
 /* PMD: Poll modes drivers.  PMD accesses devices via polling to eliminate
  * the performance overhead of interrupt processing.  Therefore netdev can
  * not implement rx-wait for these devices.  dpif-netdev needs to poll
@@ -101,6 +108,9 @@ struct dp_netdev_pmd_thread {
 /* Current context of the PMD thread. */
 struct dp_netdev_pmd_thread_ctx ctx;
 
+/* Function pointer to call for dp_netdev_input() functionality */
+dp_netdev_input_func netdev_input_func;
+
 struct seq *reload_seq;
 uint64_t last_reload_seq;
 
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 109fbd6a1..e76a5b131 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -4185,8 +4185,9 @@ dp_netdev_process_rxq_port(struct dp_netdev_pmd_thread 
*pmd,
 }
 }
 }
+
 /* Process packet batch. */
-dp_netdev_input(pmd, , port_no);
+pmd->netdev_input_func(pmd, , port_no);
 
 /* Assign processing cycles to rx queue. */
 cycles = cycle_timer_stop(>perf_stats, );
@@ -6043,6 +6044,10 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread 
*pmd, struct dp_netdev *dp,
 hmap_init(>tnl_port_cache);
 hmap_init(>send_port_cache);
 cmap_init(>tx_bonds);
+
+/* Initialize the DPIF function pointer to the default scalar version */
+pmd->netdev_input_func = dp_netdev_input;
+
 /* init the 'flow_cache' since there is no
  * actual thread created for NON_PMD_CORE_ID. */
 if (core_id == NON_PMD_CORE_ID) {
-- 
2.25.1

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


[ovs-dev] [PATCH v3 00/10] DPIF & MFEX Refactor and AVX512 SIMD optimization

2020-11-18 Thread Harry van Haaren
v3 update Summary:
(Cian Ferriter helping with rebases, review and code cleanups)
- Split out partially related changes (these will be sent separately)
--- netdev output action optimization
--- avx512 dpcls 16-block support optimization
- Squash commit which moves netdev struct flow into the refactor commit:
--- Squash dpif-netdev: move netdev flow struct to header
--- Into dpif-netdev: Refactor to multiple header files
- Implement Miniflow extract for AVX-512 DPIF
--- A generic method of matching patterns and packets is implemented,
providing traffic-pattern specific miniflow-extract acceleration.
--- The patterns today are hard-coded, however in a future patchset it
is intended to make these runtime configurable, allowing users to
optimize the SIMD miniflow extract for active traffic types.
- Notes:
--- 32 bit builds will be fixed in next release by adding flexible
miniflow extract optimization selection.
--- AVX-512 VBMI ISA is not yet supported in OVS due to requiring the
DPDK 20.11 update for RTE_CPUFLAG_*. Once on a newer DPDK this will
be added.

v2 updates:
- Includes DPIF command switching at runtime
- Includes AVX512 DPIF implementation
- Includes some partially related changes (can be split out of set?)
--- netdev output action optimization
--- avx512 dpcls 16-block support optimization

Hi OVS Community,

This patchset is a v3 for making the DPIF and miniflow extract (MFEX)
components of the userspace datapath more flexible. The same approach
as has been previously used for DPCLS is used here, where a function
pointer allows selection of an implementation at runtime.

The flexibility from the above changes enables ISA optimized
implementations of the DPIF and MFEX of the datapath. As these
ISA optimized implementations also require access to EMC/SMC/HWOL
features, these have been split out to seperate header files.

The file splitting also improves maintainability, as dpif_netdev.c
has ~9000 LOC, and very hard to modify due to many structs defined
locally in the .c file, ruling out re-usability in other .c files.

Questions welcomed! Regards, -Harry



Harry van Haaren (10):
  dpdk: Cache result of CPU ISA checks
  dpif-netdev: Move pmd_try_optimize function in file
  dpif-netdev: Refactor to multiple header files
  dpif-netdev: Split hwol out to own header file
  dpif-netdev: Add function pointer for netdev input
  dpif-avx512: Add ISA implementation of dpif
  dpif-netdev: Add command to switch dpif implementation
  dpif-netdev/dpcls: Refactor function names to dpcls
  dpif-netdev: enable ISA optimized DPIF and miniflow extract
  dpif-netdev: enable scalar datapath with optimized miniflow extract

 acinclude.m4   |  15 +
 configure.ac   |   1 +
 lib/automake.mk|  13 +-
 lib/dpdk.c |  26 +-
 lib/dpif-netdev-avx512-extract.h   | 435 +++
 lib/dpif-netdev-avx512.c   | 212 ++
 lib/dpif-netdev-lookup-autovalidator.c |   1 -
 lib/dpif-netdev-lookup-avx512-gather.c |   1 -
 lib/dpif-netdev-lookup-generic.c   |   1 -
 lib/dpif-netdev-lookup.h   |   2 +-
 lib/dpif-netdev-private-dfc.h  | 244 ++
 lib/dpif-netdev-private-dpcls.h| 127 
 lib/dpif-netdev-private-dpif.c | 104 +++
 lib/dpif-netdev-private-dpif.h |  61 ++
 lib/dpif-netdev-private-extract.h  |  52 ++
 lib/dpif-netdev-private-flow.h | 155 
 lib/dpif-netdev-private-hwol.h |  63 ++
 lib/dpif-netdev-private-thread.h   | 220 ++
 lib/dpif-netdev-private.h  | 123 +---
 lib/dpif-netdev.c  | 979 -
 20 files changed, 2082 insertions(+), 753 deletions(-)
 create mode 100644 lib/dpif-netdev-avx512-extract.h
 create mode 100644 lib/dpif-netdev-avx512.c
 create mode 100644 lib/dpif-netdev-private-dfc.h
 create mode 100644 lib/dpif-netdev-private-dpcls.h
 create mode 100644 lib/dpif-netdev-private-dpif.c
 create mode 100644 lib/dpif-netdev-private-dpif.h
 create mode 100644 lib/dpif-netdev-private-extract.h
 create mode 100644 lib/dpif-netdev-private-flow.h
 create mode 100644 lib/dpif-netdev-private-hwol.h
 create mode 100644 lib/dpif-netdev-private-thread.h

-- 
2.25.1

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


[ovs-dev] [PATCH v3 01/10] dpdk: Cache result of CPU ISA checks

2020-11-18 Thread Harry van Haaren
As a small optimization, this patch caches the result of a CPU ISA
check from DPDK. Particularly in the case of running the DPCLS
autovalidator (which repeatedly probes subtables) this reduces
the amount of CPU ISA lookups from the DPDK level.

By caching them at the OVS/dpdk.c level, the ISA checks remain
runtime for the CPU where they are executed, but subsequent checks
for the same ISA feature become much cheaper.

Signed-off-by: Harry van Haaren 
Signed-off-by: Cian Ferriter 

---

In theory it is also possible to do the caching of the supported
ISA at the usage site (aka, the DPCLS subtable search implementation)
however that would cause a lot of code-duplication. By caching in
the lower level, we get almost all the benefit with no code duplication.

v3:
- Add braces for single line if statements
- Change wording of comment
---
 lib/dpdk.c | 26 ++
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/lib/dpdk.c b/lib/dpdk.c
index 2f235a742..ae14d1730 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -614,13 +614,31 @@ print_dpdk_version(void)
 puts(rte_version());
 }
 
+/* Avoid calling rte_cpu_get_flag_enabled() excessively, by caching the
+ * result of the call for each CPU flag in a static variable. To avoid
+ * allocating large numbers of static variables, use a uint8 as a bitfield.
+ * Note the macro must only return if the ISA check is done and available.
+ */
+#define ISA_CHECK_DONE_BIT (1 << 0)
+#define ISA_AVAILABLE_BIT  (1 << 1)
+
 #define CHECK_CPU_FEATURE(feature, name_str, RTE_CPUFLAG)   \
 do {\
 if (strncmp(feature, name_str, strlen(name_str)) == 0) {\
-int has_isa = rte_cpu_get_flag_enabled(RTE_CPUFLAG);\
-VLOG_DBG("CPU flag %s, available %s\n", name_str,   \
-  has_isa ? "yes" : "no");  \
-return true;\
+static uint8_t isa_check_##RTE_CPUFLAG; \
+int check = isa_check_##RTE_CPUFLAG & ISA_CHECK_DONE_BIT;   \
+if (OVS_UNLIKELY(!check)) { \
+int has_isa = rte_cpu_get_flag_enabled(RTE_CPUFLAG);\
+VLOG_DBG("CPU flag %s, available %s\n", \
+ name_str, has_isa ? "yes" : "no"); \
+isa_check_##RTE_CPUFLAG = ISA_CHECK_DONE_BIT;   \
+if (has_isa) {  \
+isa_check_##RTE_CPUFLAG |= ISA_AVAILABLE_BIT;   \
+}   \
+}   \
+if (isa_check_##RTE_CPUFLAG & ISA_AVAILABLE_BIT) {  \
+return true;\
+}   \
 }   \
 } while (0)
 
-- 
2.25.1

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


Re: [ovs-dev] [PATCH v2] python: Update build system to ensure dirs.py is created

2020-11-18 Thread Ilya Maximets
On 11/17/20 7:02 PM, Mark Gray wrote:
> Update build system to ensure dirs.py is created when it is a
> dependency for a build target. Also, update setup.py to
> check for that dependency.
> 
> Signed-off-by: Mark Gray 
> ---
> 
> v2: Added v2 tag
> 
>  lib/automake.mk   |  2 +-
>  python/automake.mk| 24 
>  python/ovs/.gitignore |  2 +-
>  python/setup.py   |  9 +
>  tests/automake.mk |  2 +-
>  vtep/automake.mk  |  2 +-
>  6 files changed, 25 insertions(+), 16 deletions(-)
> 
> diff --git a/lib/automake.mk b/lib/automake.mk
> index 8eeb6c3f676c..fad6ffb40cef 100644
> --- a/lib/automake.mk
> +++ b/lib/automake.mk
> @@ -629,7 +629,7 @@ EXTRA_DIST += build-aux/extract-ofp-msgs
>  # _server IDL
>  OVSIDL_BUILT += lib/ovsdb-server-idl.c lib/ovsdb-server-idl.h 
> lib/ovsdb-server-idl.ovsidl
>  EXTRA_DIST += lib/ovsdb-server-idl.ann
> -lib/ovsdb-server-idl.ovsidl: ovsdb/_server.ovsschema lib/ovsdb-server-idl.ann
> +lib/ovsdb-server-idl.ovsidl: ovsdb/_server.ovsschema 
> lib/ovsdb-server-idl.ann python/ovs/dirs.py

What about dependency for lib/vswitch-idl.ovsidl and tests/idltest.ovsidl?
I think it's better to add dependency directly for ovsdb/ovsdb-idlc.in or
at least to $(OVSIDL_BUILT) target and not fix every single case.

>   $(AM_V_GEN)$(OVSDB_IDLC) annotate $(srcdir)/ovsdb/_server.ovsschema 
> $(srcdir)/lib/ovsdb-server-idl.ann > $@.tmp && mv $@.tmp $@
>  
>  INSTALL_DATA_LOCAL += lib-install-data-local
> diff --git a/python/automake.mk b/python/automake.mk
> index c4382ec60928..767512f1757f 100644
> --- a/python/automake.mk
> +++ b/python/automake.mk
> @@ -74,12 +74,12 @@ ovs-install-data-local:
>   $(MKDIR_P) python/ovs
>   sed \
>   -e '/^##/d' \
> --e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
> --e 's,[@]RUNDIR[@],$(RUNDIR),g' \
> --e 's,[@]LOGDIR[@],$(LOGDIR),g' \
> --e 's,[@]bindir[@],$(bindir),g' \
> --e 's,[@]sysconfdir[@],$(sysconfdir),g' \
> --e 's,[@]DBDIR[@],$(DBDIR),g' \
> + -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
> + -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
> + -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
> + -e 's,[@]bindir[@],$(bindir),g' \
> + -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
> + -e 's,[@]DBDIR[@],$(DBDIR),g' \
>   < $(srcdir)/python/ovs/dirs.py.template \
>   > python/ovs/dirs.py.tmp
>   $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/python/ovs
> @@ -107,12 +107,12 @@ ALL_LOCAL += $(srcdir)/python/ovs/dirs.py
>  $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template
>   $(AM_V_GEN)sed \
>   -e '/^##/d' \
> --e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
> --e 's,[@]RUNDIR[@],$(RUNDIR),g' \
> --e 's,[@]LOGDIR[@],$(LOGDIR),g' \
> --e 's,[@]bindir[@],$(bindir),g' \
> --e 's,[@]sysconfdir[@],$(sysconfdir),g' \
> --e 's,[@]DBDIR[@],$(sysconfdir)/openvswitch,g' \
> + -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
> + -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
> + -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
> + -e 's,[@]bindir[@],$(bindir),g' \
> + -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
> + -e 's,[@]DBDIR[@],$(sysconfdir)/openvswitch,g' \
>   < $? > $@.tmp && \
>   mv $@.tmp $@
>  EXTRA_DIST += python/ovs/dirs.py.template
> diff --git a/python/ovs/.gitignore b/python/ovs/.gitignore
> index 51030beca437..8bbcd824f472 100644
> --- a/python/ovs/.gitignore
> +++ b/python/ovs/.gitignore
> @@ -1,2 +1,2 @@
>  version.py
> -dir.py
> +dirs.py
> diff --git a/python/setup.py b/python/setup.py
> index b7252800c1c1..d385d8372239 100644
> --- a/python/setup.py
> +++ b/python/setup.py
> @@ -30,6 +30,15 @@ except IOError:
>file=sys.stderr)
>  sys.exit(-1)
>  
> +try:
> +# Try to open generated ovs/dirs.py. However, in this case we
> +# don't need to exec()
> +open("ovs/dirs.py")
> +except IOError:
> +print("Ensure dirs.py is created by running make python/ovs/dirs.py",
> +  file=sys.stderr)
> +sys.exit(-1)
> +
>  ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError)
>  if sys.platform == 'win32':
>  ext_errors += (IOError, ValueError)
> diff --git a/tests/automake.mk b/tests/automake.mk
> index 677b99a6b487..3faa7395a157 100644
> --- a/tests/automake.mk
> +++ b/tests/automake.mk
> @@ -431,7 +431,7 @@ tests_test_lib_LDADD = lib/libopenvswitch.la
>  OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
>  IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
>  EXTRA_DIST += $(IDLTEST_IDL_FILES) tests/idltest2.ovsschema
> -tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
> +tests/idltest.ovsidl: $(IDLTEST_IDL_FILES) python/ovs/dirs.py
>   $(AM_V_GEN)$(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) 

[ovs-dev] [PATCH ovn v3] Provide the option to pin ovn-controller and ovn-northd to a specific version.

2020-11-18 Thread numans
From: Numan Siddique 

OVN recommends updating/upgrading ovn-controllers first and then
ovn-northd and OVN DB ovsdb-servers.  This is to ensure that any
new functionality specified by the database or logical flows created
by ovn-northd is understood by ovn-controller.

However certain deployments may upgrade ovn-northd services first and
then ovn-controllers.  In a large scal deployment, this can result in
downtime during upgrades as old ovn-controllers may not understand
new logical flows or new actions added by ovn-northd.

Even upgrading ovn-controllers first can result in ovn-controllers
rejecting some of the logical flows if an existing OVN action is
changed.  One such example is ct_commit action which recently was updated
to take new arguments.

To avoid such downtimes during upgrades, this patch adds the
functionality of pinning ovn-controller and ovn-northd to a specific
version.  An internal OVN version is generated and this version is stored
by ovn-northd in the Southbound SB_Global table's
options:northd_internal_version.

When ovn-controller notices that the internal version has changed, it
stops handling the database changes - both Southbound and OVS. All the
existing OF flows are preserved.  When ovn-controller is upgraded to the
same version as ovn-northd services, it will process the database
changes.

This feature is made optional and disabled by default.  A CMS can
enable it by configuring the OVS local database with the option -
ovn-match-northd-version=true.

Signed-off-by: Numan Siddique 
---

v2 -> v3
-
  * Addressed the review comments from Dumitru.
  * Added comments in actions.h and submitting-patches.rst about the
changes that needs to be done when existing actions are updated.

v1 -> v2

  * Added test cases and missing documentation.
  * Renamed the ovsdb option from ignore_northd_verison
to ovn-pin-to-northd.
  * Added NEWS item.


 .../contributing/submitting-patches.rst   |  12 ++
 NEWS  |   3 +
 controller/ovn-controller.8.xml   |  11 ++
 controller/ovn-controller.c   |  52 ++-
 include/ovn/actions.h |   4 +
 lib/ovn-util.c|  17 ++
 lib/ovn-util.h|   4 +
 northd/ovn-northd.c   |  18 ++-
 tests/ovn.at  | 147 ++
 9 files changed, 263 insertions(+), 5 deletions(-)

diff --git a/Documentation/internals/contributing/submitting-patches.rst 
b/Documentation/internals/contributing/submitting-patches.rst
index 0a9de58669..31a3ca747b 100644
--- a/Documentation/internals/contributing/submitting-patches.rst
+++ b/Documentation/internals/contributing/submitting-patches.rst
@@ -397,6 +397,18 @@ Remember to follow-up and actually remove the feature from 
OVN codebase once
 deprecation grace period has expired and users had opportunity to use at least
 one OVN release that would have informed them about feature deprecation!
 
+OVN upgrades
+
+
+If the patch introduces any new OVN actions or updates existing OVN actions,
+then make sure to check the function ovn_get_internal_version() in
+lib/ovn-util.c and increment the macro - OVN_INTERNAL_MINOR_VER.
+
+Adding new OVN actions or changing existing OVN actions can have datapath
+disruptions during OVN upgrades. To minimize disruptions, OVN supports
+version matching between ovn-northd and ovn-controller and it is important
+to update the internal OVN version when the patch introduces such changes.
+
 Comments
 
 
diff --git a/NEWS b/NEWS
index 6010230679..bb95724b36 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,9 @@ Post-v20.09.0
  server.
- Support other_config:vlan-passthru=true to allow VLAN tagged incoming
  traffic.
+   - Support version pinning between ovn-northd and ovn-controller as an
+ option. If the option is enabled and the versions don't match,
+ ovn-controller will not process any DB changes.
 
 OVN v20.09.0 - 28 Sep 2020
 --
diff --git a/controller/ovn-controller.8.xml b/controller/ovn-controller.8.xml
index 16bc47b205..b5c0800f0b 100644
--- a/controller/ovn-controller.8.xml
+++ b/controller/ovn-controller.8.xml
@@ -233,6 +233,17 @@
 The boolean flag indicates if the chassis is used as an
 interconnection gateway.
   
+
+  external_ids:ovn-match-northd-version
+  
+The boolean flag indicates if ovn-controller needs to
+check ovn-northd version. If this
+flag is set to true and the ovn-northd's version (reported
+in the Southbound database) doesn't match with the
+ovn-controller's internal version, then it will stop
+processing the southbound and local Open vSwitch database changes.
+The default value is considered false if this option is not defined.
+  
 
 
 
diff --git a/controller/ovn-controller.c 

Re: [ovs-dev] [PATCH ovn v2] Provide the option to pin ovn-controller and ovn-northd to a specific version.

2020-11-18 Thread Numan Siddique
On Wed, Nov 18, 2020 at 6:52 PM Dumitru Ceara  wrote:
>
> On 11/18/20 2:08 PM, Numan Siddique wrote:
> > On Wed, Nov 18, 2020 at 5:23 PM Dumitru Ceara  wrote:
> >>
> >> On 11/17/20 12:57 PM, num...@ovn.org wrote:
> >>> From: Numan Siddique 
> >>>
> >>> OVN recommends updating/upgrading ovn-controllers first and then
> >>> ovn-northd and OVN DB ovsdb-servers.  This is to ensure that any
> >>> new functionality specified by the database or logical flows created
> >>> by ovn-northd is understood by ovn-controller.
> >>>
> >>> However certain deployments may upgrade ovn-northd services first and
> >>> then ovn-controllers.  In a large scal deployment, this can result in
> >>> downtime during upgrades as old ovn-controllers may not understand
> >>> new logical flows or new actions added by ovn-northd.
> >>>
> >>> Even with upgrading ovn-controllers first, can result in ovn-controllers
> >>> rejecting some of the logical flows if an existing OVN action is
> >>> changed.  One such example is ct_commit action which recently was updated
> >>> to take new arguments.
> >>>
> >>> To avoid such downtimes during upgrades, this patch adds the
> >>> functionality of pinning ovn-controller and ovn-northd to a specific
> >>> version. An internal OVN version is generated and this version is stored
> >>> by ovn-northd in the Southbound SB_Global table's
> >>> options:northd_internal_version.
> >>>
> >>> When ovn-controller notices that the internal version has changed, it
> >>> stops handling the database changes - both Southbound and OVS. All the
> >>> existing OF flows are preserved.  When ovn-controller is upgraded to the
> >>> same version as ovn-northd services, it will process the database
> >>> changes.
> >>>
> >>> This feature is made optional and disabled by default. Any CMS can
> >>> enable it by configuring the OVS local database with the option -
> >>> ovn-pin-to-northd=false.
> >>>
> >>> Signed-off-by: Numan Siddique 
> >>> ---
> >>
> >> Hi Numan,
> >>
> >> Next to Flavio's comments I have some too.
> >>
> >
> > Thanks Flavio and Dumitru for the reviews.
> >
> >
> >>>
> >>> v1 -> v2
> >>> 
> >>>   * Added test cases and missing documentation.
> >>>   * Renamed the ovsdb option from ignore_northd_verison
> >>> to ovn-pin-to-northd.
> >>>   * Added NEWS item.
> >>>
> >>>  NEWS|   3 +
> >>>  controller/ovn-controller.8.xml |  11 +++
> >>>  controller/ovn-controller.c |  58 -
> >>>  lib/ovn-util.c  |  17 
> >>>  lib/ovn-util.h  |   4 +
> >>>  northd/ovn-northd.c |  18 +++-
> >>>  tests/ovn.at| 147 
> >>>  7 files changed, 251 insertions(+), 7 deletions(-)
> >>>
> >>> diff --git a/NEWS b/NEWS
> >>> index 6010230679..bb95724b36 100644
> >>> --- a/NEWS
> >>> +++ b/NEWS
> >>> @@ -8,6 +8,9 @@ Post-v20.09.0
> >>>   server.
> >>> - Support other_config:vlan-passthru=true to allow VLAN tagged 
> >>> incoming
> >>>   traffic.
> >>> +   - Support version pinning between ovn-northd and ovn-controller as an
> >>> + option. If the option is enabled and the versions don't match,
> >>> + ovn-controller will not process any DB changes.
> >>>
> >>>  OVN v20.09.0 - 28 Sep 2020
> >>>  --
> >>> diff --git a/controller/ovn-controller.8.xml 
> >>> b/controller/ovn-controller.8.xml
> >>> index 16bc47b205..357edd1f5c 100644
> >>> --- a/controller/ovn-controller.8.xml
> >>> +++ b/controller/ovn-controller.8.xml
> >>> @@ -233,6 +233,17 @@
> >>>  The boolean flag indicates if the chassis is used as an
> >>>  interconnection gateway.
> >>>
> >>> +
> >>> +  external_ids:ovn-pin-to-northd
> >>
> >> This still seems misleading to me.  We don't actually pin to a northd
> >> version, we pin to an OVN internal version.  What if we call it
> >> "ovn-pin-to-version"?
> >
> > It's true that we pin to the OVN internal version, but my idea is that
> > ovn-northd writes
> > its internal version to SB_Global. And ovn-controller reads the northd
> > version and compares
> > with its own version.
> >
> > Few other points
> >   - I think ovn-pin-to-northd (or ovn-pin-to-northd-version) makes
> > sense from a CMS point of view.
> >   - CMS doesn't need to know about the internal version mechanism used.
> >   - In production deployments when northd services are updated first,
> > ovn-northd will update its new
> > internal version to SB_Global.
> >   - And the idea of this patch is to pin the controller to the same
> > northd version.
>
> So I guess this translates to "make ovn-controller reject SB contents if
> they were created by the wrong northd version".
>
> >
> > So I'd prefer to call it ovn-pin-to-northd.
> >
>
> With that in mind, and considering your explanation, what about
> "ovn-match-northd-version"?

Sounds better. Thanks.

>
> >
> >>
> >>> +  
> >>> +The boolean flag indicates if ovn-controller needs 
> >>> to
> 

Re: [ovs-dev] [PATCH ovn v2] Provide the option to pin ovn-controller and ovn-northd to a specific version.

2020-11-18 Thread Dumitru Ceara
On 11/18/20 2:08 PM, Numan Siddique wrote:
> On Wed, Nov 18, 2020 at 5:23 PM Dumitru Ceara  wrote:
>>
>> On 11/17/20 12:57 PM, num...@ovn.org wrote:
>>> From: Numan Siddique 
>>>
>>> OVN recommends updating/upgrading ovn-controllers first and then
>>> ovn-northd and OVN DB ovsdb-servers.  This is to ensure that any
>>> new functionality specified by the database or logical flows created
>>> by ovn-northd is understood by ovn-controller.
>>>
>>> However certain deployments may upgrade ovn-northd services first and
>>> then ovn-controllers.  In a large scal deployment, this can result in
>>> downtime during upgrades as old ovn-controllers may not understand
>>> new logical flows or new actions added by ovn-northd.
>>>
>>> Even with upgrading ovn-controllers first, can result in ovn-controllers
>>> rejecting some of the logical flows if an existing OVN action is
>>> changed.  One such example is ct_commit action which recently was updated
>>> to take new arguments.
>>>
>>> To avoid such downtimes during upgrades, this patch adds the
>>> functionality of pinning ovn-controller and ovn-northd to a specific
>>> version. An internal OVN version is generated and this version is stored
>>> by ovn-northd in the Southbound SB_Global table's
>>> options:northd_internal_version.
>>>
>>> When ovn-controller notices that the internal version has changed, it
>>> stops handling the database changes - both Southbound and OVS. All the
>>> existing OF flows are preserved.  When ovn-controller is upgraded to the
>>> same version as ovn-northd services, it will process the database
>>> changes.
>>>
>>> This feature is made optional and disabled by default. Any CMS can
>>> enable it by configuring the OVS local database with the option -
>>> ovn-pin-to-northd=false.
>>>
>>> Signed-off-by: Numan Siddique 
>>> ---
>>
>> Hi Numan,
>>
>> Next to Flavio's comments I have some too.
>>
> 
> Thanks Flavio and Dumitru for the reviews.
> 
> 
>>>
>>> v1 -> v2
>>> 
>>>   * Added test cases and missing documentation.
>>>   * Renamed the ovsdb option from ignore_northd_verison
>>> to ovn-pin-to-northd.
>>>   * Added NEWS item.
>>>
>>>  NEWS|   3 +
>>>  controller/ovn-controller.8.xml |  11 +++
>>>  controller/ovn-controller.c |  58 -
>>>  lib/ovn-util.c  |  17 
>>>  lib/ovn-util.h  |   4 +
>>>  northd/ovn-northd.c |  18 +++-
>>>  tests/ovn.at| 147 
>>>  7 files changed, 251 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/NEWS b/NEWS
>>> index 6010230679..bb95724b36 100644
>>> --- a/NEWS
>>> +++ b/NEWS
>>> @@ -8,6 +8,9 @@ Post-v20.09.0
>>>   server.
>>> - Support other_config:vlan-passthru=true to allow VLAN tagged incoming
>>>   traffic.
>>> +   - Support version pinning between ovn-northd and ovn-controller as an
>>> + option. If the option is enabled and the versions don't match,
>>> + ovn-controller will not process any DB changes.
>>>
>>>  OVN v20.09.0 - 28 Sep 2020
>>>  --
>>> diff --git a/controller/ovn-controller.8.xml 
>>> b/controller/ovn-controller.8.xml
>>> index 16bc47b205..357edd1f5c 100644
>>> --- a/controller/ovn-controller.8.xml
>>> +++ b/controller/ovn-controller.8.xml
>>> @@ -233,6 +233,17 @@
>>>  The boolean flag indicates if the chassis is used as an
>>>  interconnection gateway.
>>>
>>> +
>>> +  external_ids:ovn-pin-to-northd
>>
>> This still seems misleading to me.  We don't actually pin to a northd
>> version, we pin to an OVN internal version.  What if we call it
>> "ovn-pin-to-version"?
> 
> It's true that we pin to the OVN internal version, but my idea is that
> ovn-northd writes
> its internal version to SB_Global. And ovn-controller reads the northd
> version and compares
> with its own version.
> 
> Few other points
>   - I think ovn-pin-to-northd (or ovn-pin-to-northd-version) makes
> sense from a CMS point of view.
>   - CMS doesn't need to know about the internal version mechanism used.
>   - In production deployments when northd services are updated first,
> ovn-northd will update its new
> internal version to SB_Global.
>   - And the idea of this patch is to pin the controller to the same
> northd version.

So I guess this translates to "make ovn-controller reject SB contents if
they were created by the wrong northd version".

> 
> So I'd prefer to call it ovn-pin-to-northd.
> 

With that in mind, and considering your explanation, what about
"ovn-match-northd-version"?

> 
>>
>>> +  
>>> +The boolean flag indicates if ovn-controller needs to
>>> +be pinned to the exact ovn-northd version. If this
>>> +flag is set to true and the ovn-northd's version 
>>> (reported
>>> +in the Southbound database) doesn't match with the
>>> +ovn-controller's internal version, then it will stop
>>> +processing the Southbound and local Open vSwitch 

Re: [ovs-dev] [PATCH ovn v2] Provide the option to pin ovn-controller and ovn-northd to a specific version.

2020-11-18 Thread Numan Siddique
On Wed, Nov 18, 2020 at 5:23 PM Dumitru Ceara  wrote:
>
> On 11/17/20 12:57 PM, num...@ovn.org wrote:
> > From: Numan Siddique 
> >
> > OVN recommends updating/upgrading ovn-controllers first and then
> > ovn-northd and OVN DB ovsdb-servers.  This is to ensure that any
> > new functionality specified by the database or logical flows created
> > by ovn-northd is understood by ovn-controller.
> >
> > However certain deployments may upgrade ovn-northd services first and
> > then ovn-controllers.  In a large scal deployment, this can result in
> > downtime during upgrades as old ovn-controllers may not understand
> > new logical flows or new actions added by ovn-northd.
> >
> > Even with upgrading ovn-controllers first, can result in ovn-controllers
> > rejecting some of the logical flows if an existing OVN action is
> > changed.  One such example is ct_commit action which recently was updated
> > to take new arguments.
> >
> > To avoid such downtimes during upgrades, this patch adds the
> > functionality of pinning ovn-controller and ovn-northd to a specific
> > version. An internal OVN version is generated and this version is stored
> > by ovn-northd in the Southbound SB_Global table's
> > options:northd_internal_version.
> >
> > When ovn-controller notices that the internal version has changed, it
> > stops handling the database changes - both Southbound and OVS. All the
> > existing OF flows are preserved.  When ovn-controller is upgraded to the
> > same version as ovn-northd services, it will process the database
> > changes.
> >
> > This feature is made optional and disabled by default. Any CMS can
> > enable it by configuring the OVS local database with the option -
> > ovn-pin-to-northd=false.
> >
> > Signed-off-by: Numan Siddique 
> > ---
>
> Hi Numan,
>
> Next to Flavio's comments I have some too.
>

Thanks Flavio and Dumitru for the reviews.


> >
> > v1 -> v2
> > 
> >   * Added test cases and missing documentation.
> >   * Renamed the ovsdb option from ignore_northd_verison
> > to ovn-pin-to-northd.
> >   * Added NEWS item.
> >
> >  NEWS|   3 +
> >  controller/ovn-controller.8.xml |  11 +++
> >  controller/ovn-controller.c |  58 -
> >  lib/ovn-util.c  |  17 
> >  lib/ovn-util.h  |   4 +
> >  northd/ovn-northd.c |  18 +++-
> >  tests/ovn.at| 147 
> >  7 files changed, 251 insertions(+), 7 deletions(-)
> >
> > diff --git a/NEWS b/NEWS
> > index 6010230679..bb95724b36 100644
> > --- a/NEWS
> > +++ b/NEWS
> > @@ -8,6 +8,9 @@ Post-v20.09.0
> >   server.
> > - Support other_config:vlan-passthru=true to allow VLAN tagged incoming
> >   traffic.
> > +   - Support version pinning between ovn-northd and ovn-controller as an
> > + option. If the option is enabled and the versions don't match,
> > + ovn-controller will not process any DB changes.
> >
> >  OVN v20.09.0 - 28 Sep 2020
> >  --
> > diff --git a/controller/ovn-controller.8.xml 
> > b/controller/ovn-controller.8.xml
> > index 16bc47b205..357edd1f5c 100644
> > --- a/controller/ovn-controller.8.xml
> > +++ b/controller/ovn-controller.8.xml
> > @@ -233,6 +233,17 @@
> >  The boolean flag indicates if the chassis is used as an
> >  interconnection gateway.
> >
> > +
> > +  external_ids:ovn-pin-to-northd
>
> This still seems misleading to me.  We don't actually pin to a northd
> version, we pin to an OVN internal version.  What if we call it
> "ovn-pin-to-version"?

It's true that we pin to the OVN internal version, but my idea is that
ovn-northd writes
its internal version to SB_Global. And ovn-controller reads the northd
version and compares
with its own version.

Few other points
  - I think ovn-pin-to-northd (or ovn-pin-to-northd-version) makes
sense from a CMS point of view.
  - CMS doesn't need to know about the internal version mechanism used.
  - In production deployments when northd services are updated first,
ovn-northd will update its new
internal version to SB_Global.
  - And the idea of this patch is to pin the controller to the same
northd version.

So I'd prefer to call it ovn-pin-to-northd.


>
> > +  
> > +The boolean flag indicates if ovn-controller needs to
> > +be pinned to the exact ovn-northd version. If this
> > +flag is set to true and the ovn-northd's version 
> > (reported
> > +in the Southbound database) doesn't match with the
> > +ovn-controller's internal version, then it will stop
> > +processing the Southbound and local Open vSwitch database changes.
> > +The default value is considered false if this option is not 
> > defined.
> > +  
> >  
> >
> >  
> > diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> > index a06cae3ccb..a7344ea9c4 100644
> > --- a/controller/ovn-controller.c
> > +++ 

[ovs-dev] [PATCH ovn v2] ovn-controller: Propagate nb_cfg to the local OVS DB.

2020-11-18 Thread Dumitru Ceara
The NB.NB_Global.nb_cfg value gets propagated to
Chassis_Private.nb_cfg (and then to NB.NB_Global.hv_cfg) as soon as
ovn-controller has finished installing OVS flows corresponding to
the NB DB state.

However, if the CMS runs monitoring applications on the chassis itself,
in order to detect that the NB changes have been applied, it has to
connect to the NB/SB database.  In a scaled deployment this additional
connection might induce performance issues.

In order to avoid that we now (also) propagate nb_cfg to the local OVS
DB, in the record corresponding to the integration bridge in table
Bridge, as external_id "ovn-nb-cfg".

Signed-off-by: Dumitru Ceara 
---
V2:
- Addressed Numan's comments:
  - Update ovn-controller doc.
  - Store the seqno in OVS..external_ids:ovn-nb-cfg.
- Update NEWS.
---
 NEWS|  2 ++
 controller/ovn-controller.8.xml | 12 ++
 controller/ovn-controller.c | 51 ++---
 tests/ovn-controller.at | 21 +
 4 files changed, 73 insertions(+), 13 deletions(-)

diff --git a/NEWS b/NEWS
index 6010230..a681573 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ Post-v20.09.0
  server.
- Support other_config:vlan-passthru=true to allow VLAN tagged incoming
  traffic.
+   - Propagate currently processed SB_Global.nb_cfg in ovn-controller to the
+ local OVS DB integration bridge external_ids:ovn-nb-cfg.
 
 OVN v20.09.0 - 28 Sep 2020
 --
diff --git a/controller/ovn-controller.8.xml b/controller/ovn-controller.8.xml
index 16bc47b..0d57355 100644
--- a/controller/ovn-controller.8.xml
+++ b/controller/ovn-controller.8.xml
@@ -378,6 +378,18 @@
   logical patch port that it implements.
 
   
+
+  
+external-ids:ovn-nb-cfg in the Bridge table
+  
+
+  
+
+  This key represents the last known
+  OVN_Southbound.SB_Global.nb_cfg value for which all
+  flows have been successfully installed in OVS.
+
+  
 
 
 OVN Southbound Database Usage
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 25de0c7..70a193b 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -85,6 +85,8 @@ static unixctl_cb_func debug_delay_nb_cfg_report;
 
 #define CONTROLLER_LOOP_STOPWATCH_NAME "ovn-controller-flow-generation"
 
+#define OVS_NB_CFG_NAME "ovn-nb-cfg"
+
 static char *parse_options(int argc, char *argv[]);
 OVS_NO_RETURN static void usage(void);
 
@@ -792,6 +794,40 @@ get_nb_cfg(const struct sbrec_sb_global_table 
*sb_global_table)
 return sb ? sb->nb_cfg : 0;
 }
 
+/* Propagates the local cfg seqno, 'cur_cfg', to the chassis_private record
+ * and to the local OVS DB.
+ */
+static void
+store_nb_cfg(struct ovsdb_idl_txn *sb_txn, struct ovsdb_idl_txn *ovs_txn,
+ const struct sbrec_chassis_private *chassis,
+ const struct ovsrec_bridge *br_int,
+ unsigned int delay_nb_cfg_report,
+ int64_t cur_cfg)
+{
+if (!cur_cfg) {
+return;
+}
+
+if (sb_txn && chassis && cur_cfg != chassis->nb_cfg) {
+sbrec_chassis_private_set_nb_cfg(chassis, cur_cfg);
+sbrec_chassis_private_set_nb_cfg_timestamp(chassis, time_wall_msec());
+
+if (delay_nb_cfg_report) {
+VLOG_INFO("Sleep for %u sec", delay_nb_cfg_report);
+xsleep(delay_nb_cfg_report);
+}
+}
+
+if (ovs_txn && br_int &&
+cur_cfg != smap_get_ullong(_int->external_ids,
+   OVS_NB_CFG_NAME, 0)) {
+char *cur_cfg_str = xasprintf("%"PRId64, cur_cfg);
+ovsrec_bridge_update_external_ids_setkey(br_int, OVS_NB_CFG_NAME,
+ cur_cfg_str);
+free(cur_cfg_str);
+}
+}
+
 static const char *
 get_transport_zones(const struct ovsrec_open_vswitch_table *ovs_table)
 {
@@ -2692,19 +2728,8 @@ main(int argc, char *argv[])
 engine_set_force_recompute(false);
 }
 
-if (ovnsb_idl_txn && chassis_private) {
-int64_t cur_cfg = ofctrl_get_cur_cfg();
-if (cur_cfg && cur_cfg != chassis_private->nb_cfg) {
-sbrec_chassis_private_set_nb_cfg(chassis_private, cur_cfg);
-sbrec_chassis_private_set_nb_cfg_timestamp(
-chassis_private, time_wall_msec());
-if (delay_nb_cfg_report) {
-VLOG_INFO("Sleep for %u sec", delay_nb_cfg_report);
-xsleep(delay_nb_cfg_report);
-}
-}
-}
-
+store_nb_cfg(ovnsb_idl_txn, ovs_idl_txn, chassis_private,
+ br_int, delay_nb_cfg_report, ofctrl_get_cur_cfg());
 
 if (pending_pkt.conn) {
 struct ed_type_addr_sets *as_data =
diff --git a/tests/ovn-controller.at 

Re: [ovs-dev] [PATCH ovn v2] Provide the option to pin ovn-controller and ovn-northd to a specific version.

2020-11-18 Thread Dumitru Ceara
On 11/17/20 12:57 PM, num...@ovn.org wrote:
> From: Numan Siddique 
> 
> OVN recommends updating/upgrading ovn-controllers first and then
> ovn-northd and OVN DB ovsdb-servers.  This is to ensure that any
> new functionality specified by the database or logical flows created
> by ovn-northd is understood by ovn-controller.
> 
> However certain deployments may upgrade ovn-northd services first and
> then ovn-controllers.  In a large scal deployment, this can result in
> downtime during upgrades as old ovn-controllers may not understand
> new logical flows or new actions added by ovn-northd.
> 
> Even with upgrading ovn-controllers first, can result in ovn-controllers
> rejecting some of the logical flows if an existing OVN action is
> changed.  One such example is ct_commit action which recently was updated
> to take new arguments.
> 
> To avoid such downtimes during upgrades, this patch adds the
> functionality of pinning ovn-controller and ovn-northd to a specific
> version. An internal OVN version is generated and this version is stored
> by ovn-northd in the Southbound SB_Global table's
> options:northd_internal_version.
> 
> When ovn-controller notices that the internal version has changed, it
> stops handling the database changes - both Southbound and OVS. All the
> existing OF flows are preserved.  When ovn-controller is upgraded to the
> same version as ovn-northd services, it will process the database
> changes.
> 
> This feature is made optional and disabled by default. Any CMS can
> enable it by configuring the OVS local database with the option -
> ovn-pin-to-northd=false.
> 
> Signed-off-by: Numan Siddique 
> ---

Hi Numan,

Next to Flavio's comments I have some too.

> 
> v1 -> v2
> 
>   * Added test cases and missing documentation.
>   * Renamed the ovsdb option from ignore_northd_verison
> to ovn-pin-to-northd.
>   * Added NEWS item.
> 
>  NEWS|   3 +
>  controller/ovn-controller.8.xml |  11 +++
>  controller/ovn-controller.c |  58 -
>  lib/ovn-util.c  |  17 
>  lib/ovn-util.h  |   4 +
>  northd/ovn-northd.c |  18 +++-
>  tests/ovn.at| 147 
>  7 files changed, 251 insertions(+), 7 deletions(-)
> 
> diff --git a/NEWS b/NEWS
> index 6010230679..bb95724b36 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -8,6 +8,9 @@ Post-v20.09.0
>   server.
> - Support other_config:vlan-passthru=true to allow VLAN tagged incoming
>   traffic.
> +   - Support version pinning between ovn-northd and ovn-controller as an
> + option. If the option is enabled and the versions don't match,
> + ovn-controller will not process any DB changes.
>  
>  OVN v20.09.0 - 28 Sep 2020
>  --
> diff --git a/controller/ovn-controller.8.xml b/controller/ovn-controller.8.xml
> index 16bc47b205..357edd1f5c 100644
> --- a/controller/ovn-controller.8.xml
> +++ b/controller/ovn-controller.8.xml
> @@ -233,6 +233,17 @@
>  The boolean flag indicates if the chassis is used as an
>  interconnection gateway.
>
> +
> +  external_ids:ovn-pin-to-northd

This still seems misleading to me.  We don't actually pin to a northd
version, we pin to an OVN internal version.  What if we call it
"ovn-pin-to-version"?

> +  
> +The boolean flag indicates if ovn-controller needs to
> +be pinned to the exact ovn-northd version. If this
> +flag is set to true and the ovn-northd's version 
> (reported
> +in the Southbound database) doesn't match with the
> +ovn-controller's internal version, then it will stop
> +processing the Southbound and local Open vSwitch database changes.
> +The default value is considered false if this option is not defined.
> +  
>  
>  
>  
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index a06cae3ccb..a7344ea9c4 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -2136,6 +2136,37 @@ struct ovn_controller_exit_args {
>  bool *restart;
>  };
>  
> +static bool
> +pin_to_northd(struct ovsdb_idl *ovs_idl)
> +{
> +const struct ovsrec_open_vswitch *cfg = 
> ovsrec_open_vswitch_first(ovs_idl);
> +return !cfg ? false : smap_get_bool(>external_ids,
> +"ovn-pin-to-northd", false);
> +}
> +
> +/* Returns false if the northd internal version and ovn-controller internal
> + * version doesn't match.
> + */
> +static bool
> +check_northd_version(const struct sbrec_sb_global *sb, const char 
> *my_version)
> +{
> +if (!sb) {
> +return false;
> +}
> +
> +const char *northd_version =
> +smap_get_def(>options, "northd_internal_version", "");
> +
> +bool mismatch = strcmp(northd_version, my_version);
> +if (mismatch) {
> +static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1);
> +VLOG_WARN_RL(, 

Re: [ovs-dev] [PATCH ovn v5 7/7] sbctl: Add Load Balancer support for vflows option.

2020-11-18 Thread Dumitru Ceara
On 11/17/20 3:28 PM, num...@ovn.org wrote:
> From: Numan Siddique 
> 
> Signed-off-by: Numan Siddique 
> ---

Acked-by: Dumitru Ceara 

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


Re: [ovs-dev] [PATCH ovn v5 6/7] ovn-detrace: Add SB Load Balancer cookier handler.

2020-11-18 Thread Dumitru Ceara
On 11/17/20 3:28 PM, num...@ovn.org wrote:
> From: Numan Siddique 
> 
> Signed-off-by: Numan Siddique 
> ---

Acked-by: Dumitru Ceara 

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


Re: [ovs-dev] [PATCH ovn v5 5/7] northd: Make use of new hairpin actions.

2020-11-18 Thread Dumitru Ceara
On 11/17/20 3:28 PM, num...@ovn.org wrote:
> From: Numan Siddique 
> 
> This patch makes use of the new hairpin OVN actions - chk_lb_hairpin, 
> chk_lb_hairpin_reply
> and ct_snat_to_vip.
> 
> Suppose there are 'm' load balancers associated to a logical switch and each 
> load balancer
> has 'n' VIPs and each VIP has 'p' backends then ovn-northd adds (m * ((n * p) 
> + n))
> hairpin logical flows. After this patch, ovn-northd adds just 5 hairpin 
> logical flows.
> 
> With this patch number of hairpin related OF flows on a chassis are almost 
> the same as before,
> but in a large scale deployment, this reduces memory consumption and load on 
> ovn-northd and
> SB DB ovsdb-servers.
> 
> Signed-off-by: Numan Siddique 
> ---
>  northd/ovn-northd.8.xml |  65 +++-
>  northd/ovn-northd.c | 160 +---
>  tests/ovn-northd.at |  28 +++
>  tests/ovn.at|   2 +-
>  4 files changed, 116 insertions(+), 139 deletions(-)
> 
> diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
> index b37cecd381..8c0a4a98f5 100644
> --- a/northd/ovn-northd.8.xml
> +++ b/northd/ovn-northd.8.xml
> @@ -718,24 +718,55 @@
>  Ingress Table 12: Pre-Hairpin
>  
>
> -For all configured load balancer VIPs a priority-2 flow that
> -matches on traffic that needs to be hairpinned, i.e., after load
> -balancing the destination IP matches the source IP, which sets
> -reg0[6] = 1  and executes ct_snat(VIP)
> -to force replies to these packets to come back through OVN.
> +If the logical switch has load balancer(s) configured, then a
> +priorirty-100 flow is added with the match
> +ip  ct.trk ct.dnat to check if the
> +packet needs to be hairpinned ( if after load balancing the 
> destination

Nit: s/( if/(if/

> +IP matches the source IP) or not by executing the action
> +reg0[6] = chk_lb_hairpin(); and advances the packet to
> +the next table.
> +  
> +
> +  
> +If the logical switch has load balancer(s) configured, then a
> +priorirty-90 flow is added with the match ip to check if
> +the packet is a reply for a hairpinned connection or not by executing
> +the action reg0[6] = chk_lb_hairpin_reply(); and 
> advances
> +the packet to the next table.
>
> +
>
> -For all configured load balancer VIPs a priority-1 flow that
> -matches on replies to hairpinned traffic, i.e., destination IP is 
> VIP,
> -source IP is the backend IP and source L4 port is backend port, which
> -sets reg0[6] = 1  and executes ct_snat;.
> +A priority-0 flow that simply moves traffic to the next table.
>
> +
> +
> +Ingress Table 13: Nat-Hairpin
> +
> +  
> + If the logical switch has load balancer(s) configured, then a
> + priorirty-100 flow is added with the match
> + ip  (ct.new || ct.est)  ct.trk 
> + ct.dnat  reg0[6] == 1 which hairpins the traffic by
> + NATting source IP to the load balancer VIP by executing the action
> + ct_snat_to_vip and advances the packet to the next 
> table.
> +  
> +
> +  
> + If the logical switch has load balancer(s) configured, then a
> + priorirty-90 flow is added with the match
> + ip  reg0[6] == 1 which matches on the replies
> + of hairpinned traffic ( i.e., destination IP is VIP,

Nit: s/( i.e./(i.e./

Otherwise, this patch looks good to me, thanks!

Acked-by: Dumitru Ceara 

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


Re: [ovs-dev] [PATCH ovn v5 4/7] actions: Add new actions chk_lb_hairpin, chk_lb_hairpin_reply and ct_snat_to_vip.

2020-11-18 Thread Dumitru Ceara
On 11/17/20 3:28 PM, num...@ovn.org wrote:
> From: Numan Siddique 
> 
> The action - chk_lb_hairpin checks if the packet destined to a load balancer 
> VIP
> is to be hairpinned back to the same destination and if so, sets the 
> destination register
> bit to 1.
> 
> The action - chk_lb_hairpin_reply checks if the packet is a reply of the 
> hairpinned
> packet. If so, it sets the destination register bit to 1.
> 
> The action ct_snat_to_vip snats the source IP to the load balancer VIP if 
> chk_lb_hairpin()
> returned true.
> 
> These actions will be used in the upcoming patch by ovn-northd in the hairpin 
> logical flows.
> This helps in reducing lots of hairpin logical flows.
> 
> Signed-off-by: Numan Siddique 
> ---

Looks good to me, thanks!

Acked-by: Dumitru Ceara 

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


Re: [ovs-dev] [PATCH ovn v5 3/7] controller: Add load balancer hairpin OF flows.

2020-11-18 Thread Dumitru Ceara
On 11/17/20 3:28 PM, num...@ovn.org wrote:
> From: Numan Siddique 
> 
> Presently to handle the load balancer hairpin traffic (the traffic destined 
> to the
> load balancer VIP is dnatted to the backend which originated the traffic), 
> ovn-northd
> adds a lot of logical flows to check this scenario. This patch attempts to 
> reduce the
> these logical flows. Each ovn-controller will read the load balancers from
> the newly added southbound Load_Balancer table and adds the load balancer 
> hairpin OF
> flows in the table 68, 69 and 70. If suppose a below load balancer is 
> configured
> 
> 10.0.0.10:80 = 10.0.0.4:8080, 10.0.0.5:8090, then the below flows are added
> 
> table=68, ip.src = 10.0.0.4,ip.dst=10.0.0.4,tcp.dst=8080 
> actions=load:1->NXM_NX_REG10[7]
> table=68, ip.src = 10.0.0.5,ip.dst=10.0.0.5,tcp.dst=8090 
> actions=load:1->NXM_NX_REG10[7]
> table=69, ip.src = 10.0.0.4,ip.dst=10.0.0.10,tcp.src=8080 
> actions=load:1->NXM_NX_REG10[7]
> table=69, ip.src = 10.0.0.5,ip.dst=10.0.0.10,tcp.src=8090 
> actions=load:1->NXM_NX_REG10[7]
> table=70, ct.trk && ct.dnat && ct.nw_dst == 10.0.0.10. actions=ct(commit, 
> zone=reg12, nat(src=10.0.0.5))
> 
> Upcoming patch will add OVN actions which does the lookup in these tables to 
> handle the
> hairpin traffic.
> 
> Signed-off-by: Numan Siddique 
> ---
>  controller/lflow.c   | 231 +
>  controller/lflow.h   |   6 +-
>  controller/ovn-controller.c  |  27 +-
>  include/ovn/logical-fields.h |   3 +
>  tests/ovn.at | 469 +++
>  5 files changed, 734 insertions(+), 2 deletions(-)
> 
> diff --git a/controller/lflow.c b/controller/lflow.c
> index f631679c3f..5469860e1f 100644
> --- a/controller/lflow.c
> +++ b/controller/lflow.c
> @@ -26,6 +26,7 @@
>  #include "ovn-controller.h"
>  #include "ovn/actions.h"
>  #include "ovn/expr.h"
> +#include "lib/lb.h"
>  #include "lib/ovn-l7.h"
>  #include "lib/ovn-sb-idl.h"
>  #include "lib/extend-table.h"
> @@ -1138,6 +1139,191 @@ add_neighbor_flows(struct ovsdb_idl_index 
> *sbrec_port_binding_by_name,
>  }
>  }
>  
> +static void
> +add_lb_vip_hairpin_flows(struct ovn_controller_lb *lb,
> + struct ovn_lb_vip *lb_vip,
> + struct ovn_lb_backend *lb_backend,
> + uint8_t lb_proto,
> + struct ovn_desired_flow_table *flow_table)
> +{
> +uint64_t stub[1024 / 8];
> +struct ofpbuf ofpacts = OFPBUF_STUB_INITIALIZER(stub);
> +
> +uint8_t value = 1;
> +put_load(, sizeof value, MFF_LOG_FLAGS,
> + MLF_LOOKUP_LB_HAIRPIN_BIT, 1, );
> +
> +struct match hairpin_match = MATCH_CATCHALL_INITIALIZER;
> +struct match hairpin_reply_match = MATCH_CATCHALL_INITIALIZER;
> +
> +if (IN6_IS_ADDR_V4MAPPED(_vip->vip)) {
> +ovs_be32 ip4 = in6_addr_get_mapped_ipv4(_backend->ip);
> +
> +match_set_dl_type(_match, htons(ETH_TYPE_IP));
> +match_set_nw_src(_match, ip4);
> +match_set_nw_dst(_match, ip4);
> +
> +match_set_dl_type(_reply_match,
> +  htons(ETH_TYPE_IP));
> +match_set_nw_src(_reply_match, ip4);
> +match_set_nw_dst(_reply_match,
> + in6_addr_get_mapped_ipv4(_vip->vip));
> +} else {
> +match_set_dl_type(_match, htons(ETH_TYPE_IPV6));
> +match_set_ipv6_src(_match, _backend->ip);
> +match_set_ipv6_dst(_match, _backend->ip);
> +
> +match_set_dl_type(_reply_match,
> +  htons(ETH_TYPE_IPV6));
> +match_set_ipv6_src(_reply_match, _backend->ip);
> +match_set_ipv6_dst(_reply_match, _vip->vip);
> +}
> +
> +if (lb_backend->port) {
> +match_set_nw_proto(_match, lb_proto);
> +match_set_tp_dst(_match, htons(lb_backend->port));
> +
> +match_set_nw_proto(_reply_match, lb_proto);
> +match_set_tp_src(_reply_match,
> +htons(lb_backend->port));

Nit: indent.

Otherwise, this patch looks good to me, thanks!

Acked-by: Dumitru Ceara 

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