Re: [ovs-dev] [PATCH] ovn-controller: Add unix reconnect command

2020-08-26 Thread Zhen Wang (SW-CLOUD)
Hi Han,

Thanks for reviewing my code.
Please my reply inline.

From: Han Zhou 
Date: Wednesday, August 26, 2020 at 4:55 PM
To: "Zhen Wang (SW-CLOUD)" 
Cc: ovs-dev , Han Zhou 
Subject: Re: [PATCH] ovn-controller: Add unix reconnect command

External email: Use caution opening links or attachments



On Thu, Aug 13, 2020 at 1:56 PM Zhen Wang 
mailto:zhew...@nvidia.com>> wrote:
>
> OVN SB in clustered mode, all the ovn-controller clients connect
> across all the nodes in a balanced state. When one raft node down and
> online. All the ovn-controller clients will not migirate back which
> cause RAFT DB clients unbalanced state.
> RAFT clients in an unbalanced state would trigger more stress to the SB.
> This commit introduce one unix command reconnect remote which let user
> trigger a force reconnect to desisred RAFT node which can adddress the
> problem.
> Note: this patch requires ovsdb-idl function ovsdb_idl_set_next_remote.

Thanks for the patch. Just a hint that for OVN patches please add keyword OVN 
in the email subject's [ ] section, which allows 0-day Robot to check the patch 
cleanly.
Please see my comments below.

Thanks for the information.
Will add the ovn subject for the v1 patch which address your comments.

>
> Reported-at:https://mail.openvswitch.org/pipermail/ovs-discuss/2020-August/050518.html
> Signed-off-by: Zhen Wang mailto:zhew...@nvidia.com>>
> ---
>  controller/ovn-controller.8.xml | 12 
>  controller/ovn-controller.c | 27 +++
>  2 files changed, 39 insertions(+)
>
> diff --git a/controller/ovn-controller.8.xml b/controller/ovn-controller.8.xml
> index 66877314c..66f521398 100644
> --- a/controller/ovn-controller.8.xml
> +++ b/controller/ovn-controller.8.xml
> @@ -507,6 +507,18 @@
>  local index so that it can interact with the southbound database 
> again.
>
>
> +
> +  reconnect
> +  
> +  
> +Trigger a force reconnect to one specific remote in Open_vSwitch 
> table
> +external_ids:ovn-remote.
> +  
> +  
> +This command is intended to use in the event of clustered SB DB has
> +unbalanced clients across the raft nodes.
> +  
> +  
>
>  
>
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index ea6a436c0..46ed90492 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -68,6 +68,7 @@
>  VLOG_DEFINE_THIS_MODULE(main);
>
>  static unixctl_cb_func ovn_controller_exit;
> +static unixctl_cb_func ovn_controller_reconnect;
>  static unixctl_cb_func ct_zone_list;
>  static unixctl_cb_func extend_table_list;
>  static unixctl_cb_func inject_pkt;
> @@ -2078,6 +2079,11 @@ struct ovn_controller_exit_args {
>  bool *restart;
>  };
>
> +struct ovn_controller_reconnect_args {
> +bool trigger;
> +char *ovn_remote;
> +};
> +
>  int
>  main(int argc, char *argv[])
>  {
> @@ -2085,6 +2091,7 @@ main(int argc, char *argv[])
>  bool exiting;
>  bool restart;
>  struct ovn_controller_exit_args exit_args = {&exiting, &restart};
> +struct ovn_controller_reconnect_args reconnect = {false, NULL};
>  int retval;
>
>  ovs_cmdl_proctitle_init(argc, argv);
> @@ -2103,6 +2110,8 @@ main(int argc, char *argv[])
>  }
>  unixctl_command_register("exit", "", 0, 1, ovn_controller_exit,
>   &exit_args);
> +unixctl_command_register("reconnect", "", 1, 1, ovn_controller_reconnect,
> + &reconnect);
>
>  daemonize_complete();
>
> @@ -2511,6 +2520,13 @@ main(int argc, char *argv[])
> sb_monitor_all);
>  }
>  }
> +if (reconnect.trigger && 
> ovsdb_idl_is_connected(ovnsb_idl_loop.idl)) {
> +VLOG_INFO("User triggered force reconnect to %s", 
> reconnect.ovn_remote);
> +ovsdb_idl_set_next_remote(ovnsb_idl_loop.idl, 
> reconnect.ovn_remote);
> +ovsdb_idl_force_reconnect(ovnsb_idl_loop.idl);
> +free(reconnect.ovn_remote);
> +reconnect.trigger = false;
> +}
>  }
>
>  }
> @@ -2674,6 +2690,7 @@ main(int argc, char *argv[])
>  ovsdb_idl_loop_destroy(&ovnsb_idl_loop);
>
>  free(ovs_remote);
> +free(reconnect.ovn_remote);
>  service_stop();
>
>  exit(retval);
> @@ -2780,6 +2797,16 @@ ovn_controller_exit(struct unixctl_conn *conn, int 
> argc,
>  unixctl_command_reply(conn, NULL);
>  }
>
> +static void
> +ovn_controller_reconnect(struct unixctl_conn *conn, int argc OVS_UNUSED,
> + const char *argv[], void *reconnect_args_)
> +{
> +struct ovn_controller_reconnect_args *reconnect_args = reconnect_args_;

It may be better to validate the args is part of the ovn-remote set in 
external-ids:ovn-remote.

Agree.
Will add new new field ovn-rem

Re: [ovs-dev] [PATCH] ovsdb-idl: Add function to set next_remote in jsonrpc session.

2020-08-26 Thread Han Zhou
On Thu, Aug 13, 2020 at 1:51 PM Zhen Wang  wrote:
>
> OVN SouthBound DB in clustered mode, when one raft node down and
> online. All the ovn-controller clients will not migirate back which
> cause RAFT DB clients unbalanced state.
>
> This function provides a way to set the IDL jsonrpc session next_remote.
> Which can let caller to set the next reconnect remote which can address
> the unbalance issue with reconnect operation.
>
> Notice that this function is not actually used anywhere in this patch.
> This will be used by OVN, though, since OVN is the primary user of
> clustered OVSDB.
>
> Reported-at:
https://mail.openvswitch.org/pipermail/ovs-discuss/2020-August/050518.html
> Signed-off-by: Zhen Wang 
> ---
>  lib/jsonrpc.c   | 12 
>  lib/jsonrpc.h   |  2 ++
>  lib/ovsdb-idl.c |  9 +
>  lib/ovsdb-idl.h |  1 +
>  4 files changed, 24 insertions(+)
>
> diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c
> index ecbc939fe..08971ee94 100644
> --- a/lib/jsonrpc.c
> +++ b/lib/jsonrpc.c
> @@ -1250,3 +1250,15 @@ jsonrpc_session_set_dscp(struct jsonrpc_session
*s, uint8_t dscp)
>  jsonrpc_session_force_reconnect(s);
>  }
>  }
> +
> +/* Sets the next remote offset for next jsonrpc session reconnect. */
> +void
> +jsonrpc_session_set_next_remote(struct jsonrpc_session *s, const char
*name)
> +{
> +for (size_t i = 0; i < s->remotes.n; i++) {
> +if (!strcmp(s->remotes.names[i], name)) {
> +s->next_remote = i;
> +break;
> +}
> +}
> +}
> diff --git a/lib/jsonrpc.h b/lib/jsonrpc.h
> index a44114e8d..f81d62047 100644
> --- a/lib/jsonrpc.h
> +++ b/lib/jsonrpc.h
> @@ -140,6 +140,8 @@ void jsonrpc_session_set_probe_interval(struct
jsonrpc_session *,
>  int probe_interval);
>  void jsonrpc_session_set_dscp(struct jsonrpc_session *,
>uint8_t dscp);
> +void jsonrpc_session_set_next_remote(struct jsonrpc_session *,
> +  const char *);
>  const char *jsonrpc_session_get_id(const struct jsonrpc_session *);
>
>  #endif /* jsonrpc.h */
> diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
> index d8f221ca6..82f09bbe7 100644
> --- a/lib/ovsdb-idl.c
> +++ b/lib/ovsdb-idl.c
> @@ -557,6 +557,15 @@ ovsdb_idl_set_remote(struct ovsdb_idl *idl, const
char *remote, bool retry)
>  }
>  }
>
> +/* Set next remote offset for ovsdb_idl jsonrpc session.*/
> +void
> +ovsdb_idl_set_next_remote(struct ovsdb_idl *idl, const char *remote)
> +{
> +if (idl->session) {
> +jsonrpc_session_set_next_remote(idl->session, remote);
> +}
> +}
> +
>  /* Set whether the order of remotes should be shuffled, when there
>   * are more than one remotes.  The setting doesn't take effect
>   * until the next time when ovsdb_idl_set_remote() is called. */
> diff --git a/lib/ovsdb-idl.h b/lib/ovsdb-idl.h
> index c56cd19b1..01bb9a409 100644
> --- a/lib/ovsdb-idl.h
> +++ b/lib/ovsdb-idl.h
> @@ -63,6 +63,7 @@ struct ovsdb_idl *ovsdb_idl_create(const char *remote,
>  struct ovsdb_idl *ovsdb_idl_create_unconnected(
>  const struct ovsdb_idl_class *, bool monitor_everything_by_default);
>  void ovsdb_idl_set_remote(struct ovsdb_idl *, const char *, bool);
> +void ovsdb_idl_set_next_remote(struct ovsdb_idl *, const char *);
>  void ovsdb_idl_set_shuffle_remotes(struct ovsdb_idl *, bool);
>  void ovsdb_idl_reset_min_index(struct ovsdb_idl *);
>  void ovsdb_idl_destroy(struct ovsdb_idl *);
> --
> 2.20.1
>

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


Re: [ovs-dev] [PATCH] ovn-controller: Add unix reconnect command

2020-08-26 Thread Han Zhou
On Thu, Aug 13, 2020 at 1:56 PM Zhen Wang  wrote:
>
> OVN SB in clustered mode, all the ovn-controller clients connect
> across all the nodes in a balanced state. When one raft node down and
> online. All the ovn-controller clients will not migirate back which
> cause RAFT DB clients unbalanced state.
> RAFT clients in an unbalanced state would trigger more stress to the SB.
> This commit introduce one unix command reconnect remote which let user
> trigger a force reconnect to desisred RAFT node which can adddress the
> problem.
> Note: this patch requires ovsdb-idl function ovsdb_idl_set_next_remote.

Thanks for the patch. Just a hint that for OVN patches please add keyword
OVN in the email subject's [ ] section, which allows 0-day Robot to check
the patch cleanly.
Please see my comments below.

>
> Reported-at:
https://mail.openvswitch.org/pipermail/ovs-discuss/2020-August/050518.html
> Signed-off-by: Zhen Wang 
> ---
>  controller/ovn-controller.8.xml | 12 
>  controller/ovn-controller.c | 27 +++
>  2 files changed, 39 insertions(+)
>
> diff --git a/controller/ovn-controller.8.xml
b/controller/ovn-controller.8.xml
> index 66877314c..66f521398 100644
> --- a/controller/ovn-controller.8.xml
> +++ b/controller/ovn-controller.8.xml
> @@ -507,6 +507,18 @@
>  local index so that it can interact with the southbound database
again.
>
>
> +
> +  reconnect
> +  
> +  
> +Trigger a force reconnect to one specific remote in Open_vSwitch
table
> +external_ids:ovn-remote.
> +  
> +  
> +This command is intended to use in the event of clustered SB DB
has
> +unbalanced clients across the raft nodes.
> +  
> +  
>
>  
>
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index ea6a436c0..46ed90492 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -68,6 +68,7 @@
>  VLOG_DEFINE_THIS_MODULE(main);
>
>  static unixctl_cb_func ovn_controller_exit;
> +static unixctl_cb_func ovn_controller_reconnect;
>  static unixctl_cb_func ct_zone_list;
>  static unixctl_cb_func extend_table_list;
>  static unixctl_cb_func inject_pkt;
> @@ -2078,6 +2079,11 @@ struct ovn_controller_exit_args {
>  bool *restart;
>  };
>
> +struct ovn_controller_reconnect_args {
> +bool trigger;
> +char *ovn_remote;
> +};
> +
>  int
>  main(int argc, char *argv[])
>  {
> @@ -2085,6 +2091,7 @@ main(int argc, char *argv[])
>  bool exiting;
>  bool restart;
>  struct ovn_controller_exit_args exit_args = {&exiting, &restart};
> +struct ovn_controller_reconnect_args reconnect = {false, NULL};
>  int retval;
>
>  ovs_cmdl_proctitle_init(argc, argv);
> @@ -2103,6 +2110,8 @@ main(int argc, char *argv[])
>  }
>  unixctl_command_register("exit", "", 0, 1, ovn_controller_exit,
>   &exit_args);
> +unixctl_command_register("reconnect", "", 1, 1,
ovn_controller_reconnect,
> + &reconnect);
>
>  daemonize_complete();
>
> @@ -2511,6 +2520,13 @@ main(int argc, char *argv[])
> sb_monitor_all);
>  }
>  }
> +if (reconnect.trigger &&
ovsdb_idl_is_connected(ovnsb_idl_loop.idl)) {
> +VLOG_INFO("User triggered force reconnect to
%s", reconnect.ovn_remote);
> +ovsdb_idl_set_next_remote(ovnsb_idl_loop.idl,
reconnect.ovn_remote);
> +ovsdb_idl_force_reconnect(ovnsb_idl_loop.idl);
> +free(reconnect.ovn_remote);
> +reconnect.trigger = false;
> +}
>  }
>
>  }
> @@ -2674,6 +2690,7 @@ main(int argc, char *argv[])
>  ovsdb_idl_loop_destroy(&ovnsb_idl_loop);
>
>  free(ovs_remote);
> +free(reconnect.ovn_remote);
>  service_stop();
>
>  exit(retval);
> @@ -2780,6 +2797,16 @@ ovn_controller_exit(struct unixctl_conn *conn, int
argc,
>  unixctl_command_reply(conn, NULL);
>  }
>
> +static void
> +ovn_controller_reconnect(struct unixctl_conn *conn, int argc OVS_UNUSED,
> + const char *argv[], void *reconnect_args_)
> +{
> +struct ovn_controller_reconnect_args *reconnect_args =
reconnect_args_;

It may be better to validate the args is part of the ovn-remote set in
external-ids:ovn-remote.

> +reconnect_args->trigger = true;
> +reconnect_args->ovn_remote = xstrdup(argv[1]);

Here can be memory leak if this command has been invoked before and
reconnect_args->ovn_remote was not NULL.

Thanks,
Han

> +unixctl_command_reply(conn, NULL);
> +}
> +
>  static void
>  ct_zone_list(struct unixctl_conn *conn, int argc OVS_UNUSED,
>   const char *argv[] OVS_UNUSED, void *ct_zones_)
> --
> 2.20.1
>
___
dev mailing list
d...@openvswitch.org

Re: [ovs-dev] [PATCH ovn v2] ovn-northd: Support mixing stateless/stateful ACLs with Stateless_Filter.

2020-08-26 Thread Han Zhou
Hi Dumitru,

Please see my comments below.

Thanks,
Han

On Thu, Aug 20, 2020 at 4:19 AM Dumitru Ceara  wrote:
>
> A new table is added to OVN_Northbound: Stateless_Filter. Users can
> populate this table with records consisting of . These
> records generate logical flows in the PRE_ACL stages of the logical
> switch pipeline.
>
> Packets matching these flows will completely bypass connection tracking
> for ACL purposes. In specific scenarios CMSs can predetermine which
> traffic must be firewalled statefully or not, e.g., UDP vs TCP. However,
> until now, if at least one stateful ACL (allow-related) is configured
> on the switch, all traffic gets sent to connection tracking.
> This induces a hit in performance when forwarding packets that don't
> need stateful processing.
>
> New command line arguments are added to ovn-nbctl (stateless-filter-*)
> to allow the users to interact with the Stateless_Filter table.
>
> Signed-off-by: Dumitru Ceara 
> ---
> V2:
> - address Numan's comments:
>   - fix spacing in the logical flow match.
>   - add a new table to the NB DB instead of using a config option on the
> logical switch.
> - add ovn-nbctl CLI commands for the new table and also unit tests for
>   them.
> - reword the commit message.
> NOTE: checkpatch.py will complain about lines lacking whitespacec around
> operators in the ovn-nbctl help string but this is a false positive and
> should be ignored.
> ---
>  NEWS  |   3 +
>  northd/ovn-northd.8.xml   |  20 
>  northd/ovn-northd.c   | 146 ++-
>  ovn-nb.ovsschema  |  26 -
>  ovn-nb.xml|  57 -
>  tests/ovn-nbctl.at|  53 +
>  tests/ovn-northd.at   | 263
++
>  tests/system-common-macros.at |   8 ++
>  tests/system-ovn.at   | 113 ++
>  utilities/ovn-detrace.in  |  12 ++
>  utilities/ovn-nbctl.c | 213 --
>  11 files changed, 871 insertions(+), 43 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index a1ce4e8..eedd091 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -11,6 +11,9 @@ Post-v20.06.0
>   called Chassis_Private now contains the nb_cfg column which is
updated
>   by incrementing the value in the NB_Global table, CMSes relying on
>   this mechanism should update their code to use this new table.
> +   - Added support for bypassing connection tracking for ACL processing
for
> + specific types of traffic through the user supplied Stateless_Filter
> + configuration.
>
>  OVN v20.06.0
>  --
> diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
> index 989e364..1f89942 100644
> --- a/northd/ovn-northd.8.xml
> +++ b/northd/ovn-northd.8.xml
> @@ -322,6 +322,16 @@
>  
>
>  
> +  For each record in table Stateful_Filter in the
> +  OVN_Northbound database, a flow with
> +  priority + 1000 is added and sets reg0[7] =
1
> +  for traffic that matches the condition in the match
> +  column and advances to next table.  reg0[7] acts as a
hint
> +  for tables Pre-Stateful and ACL to avoid
> +  sending this traffic to the connection tracker.
> +
> +

It seems documentation is missing for the flows that uses reg0[7] in
Pre-Stateful and ACL stages.

> +
>This table also has a priority-110 flow with the match
>eth.dst == E for all logical switch
>datapaths to move traffic to the next table. Where E
> @@ -1383,6 +1393,16 @@ output;
>  
>
>  
> +  For each record in table Stateful_Filter in the
> +  OVN_Northbound database, a flow with
> +  priority + 1000 is added and sets reg0[7] =
1
> +  for traffic that matches the condition in the match
> +  column and advances to next table.  reg0[7] acts as a
hint
> +  for tables Pre-Stateful and ACL to avoid
> +  sending this traffic to the connection tracker.
> +
> +
> +
>This table also has a priority-110 flow with the match
>eth.src == E for all logical switch
>datapaths to move traffic to the next table. Where E
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 212de2f..b8f457b 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -211,6 +211,7 @@ enum ovn_stage {
>  #define REGBIT_DNS_LOOKUP_RESULT "reg0[4]"
>  #define REGBIT_ND_RA_OPTS_RESULT "reg0[5]"
>  #define REGBIT_HAIRPIN   "reg0[6]"
> +#define REGBIT_SKIP_ACL_CT   "reg0[7]"
>
>  /* Register definitions for switches and routers. */
>
> @@ -245,11 +246,11 @@ enum ovn_stage {
>   * OVS register usage:
>   *
>   * Logical Switch pipeline:
> - * +-+-+
> - * | R0  | REGBIT_{CONNTRACK/DHCP/DNS/HAIRPIN} |
> - * +-+-+
> - * | R1 - R9 |  UNUSED |
> - * +-+-+
> + * +--

[ovs-dev] Checking status of [PATCH v7] Bareudp Tunnel Support

2020-08-26 Thread Varghese, Martin (Nokia - IN/Bangalore)
Hi  Ben & Ilya,

Sorry to bother you.
I had sent the 7th version of bareudp patch to 
d...@openvswitch.org a while ago.
I didn't see any progress after that. Is there anything missing from my side.
Please let me know.

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


Re: [ovs-dev] [PATCH] meta-flow: fix a typo in "MPLS Bottom of Stack Field" paragraph

2020-08-26 Thread Ilya Maximets
On 8/6/20 9:32 PM, Gregory Rose wrote:
> 
> 
> On 8/6/2020 9:33 AM, Timothy Redaelli wrote:
>> In the ovs-fields.7 manual page, the "MPLS Bottom of Stack Field" paragraph
>> says:
>>   * When mpls_bos is 1, there is another MPLS label following this one,
>>     so the Ethertype passed to pop_mpls should be an MPLS Ethertype. [...]
>>
>>   * When mpls_bos is 0, this MPLS label is the last one, so the Ethertype
>>     passed to pop_mpls should be a non-MPLS Ethertype such as IPv4. [...]
>>
>> The values 0 and 1 have been swapped: when BOS is 1,
>> then no more label stack entries follows.
>>
>> Fixes: 96fee5e0a2a0 ("ovs-fields: New manpage to document Open vSwitch and 
>> OpenFlow fields.")
>> Cc: b...@ovn.org
>> Reported-at: https://bugzilla.redhat.com/1842032
>> Reported-by: Guillaume Nault 
>> Signed-off-by: Timothy Redaelli 
> 
> Thanks for fixing the documentation.
> 
> Acked-by: Greg Rose 

Thanks!

Applied to master and backported down to 2.10.

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


Re: [ovs-dev] [PATCH v2] ovs-dpctl-top: Skip "eth()" element

2020-08-26 Thread Ilya Maximets
On 8/7/20 4:38 PM, Flavio Leitner wrote:
> On Fri, Jun 19, 2020 at 03:53:52PM +0200, Timothy Redaelli wrote:
>> With commit efde188622ae ("odp-util: Print eth() for Ethernet flows if
>> packet_type is absent.") "eth()" is printed for Ethernet flows if packet_type
>> is absent, but this broke "ovs-dpctl-top" since it expects that every
>> element has a value.
>>
>> This commit skips the parsing of the empty "eth()" element.
>>
>> Fixes: efde188622ae ("odp-util: Print eth() for Ethernet flows if packet_type
>> is absent.")
>> Cc: b...@ovn.org
>> Signed-off-by: Timothy Redaelli 
>> ---
> 
> Works for me, thanks!
> Acked-by: Flavio Leitner 

Thanks!

Applied to master and backported down to 2.9.

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


Re: [ovs-dev] [PATCH] travis: Merge matrix entries.

2020-08-26 Thread Ilya Maximets
On 8/26/20 7:45 PM, Aaron Conole wrote:
> Ilya Maximets  writes:
> 
>> It's not possible to use 'matrix' twice.  This makes travis to use
>> the latest one dropping all the osx and arm64 jobs.
>>
>> Fixes: 00d3374d8d54 ("travis: Test build of debian packages.")
>> Signed-off-by: Ilya Maximets 
>> ---
> 
> Acked-by: Aaron Conole 
> 

Thanks!

Applied to master and down to 2.13.

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


Re: [ovs-dev] [PATCH] test-conntrack: Fix conntrack benchmark by clearing conntrack metadata.

2020-08-26 Thread Ilya Maximets
On 8/25/20 5:07 PM, Aaron Conole wrote:
> Ilya Maximets  writes:
> 
>> Packets in the benchmark must be treated as new packets, i.e. they
>> should not have conntrack metadata set.  Current code will set up
>> 'pkt->md.conn' after the first run and all subsequent calls will hit
>> the 'fast' processing that is intended for recirculated packets making
>> a false impression that current conntrack implementation is lightning
>> fast.
> 
> Oh no.
> 
>> Before the change:
>>   $ ./ovstest test-conntrack benchmark 4 33554432 32 1
>>   conntrack:   1059 ms
>>
>> After (correct):
>>   $ ./ovstest test-conntrack benchmark 4 33554432 32 1
>>   conntrack:  92785 ms
> 
> That's horrifying.
> 
>> Fixes: 594570ea1cde ("conntrack: Optimize recirculations.")
>> Signed-off-by: Ilya Maximets 
>> ---
> 
> Sadly:
> 
> Acked-by: Aaron Conole 
> 

Thanks!
Applied to master and backported down to 2.13.

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


Re: [ovs-dev] [PATCH] python: Fixup python shebangs to python3

2020-08-26 Thread Ilya Maximets
On 8/25/20 4:53 PM, Aaron Conole wrote:
> Greg Rose  writes:
> 
>> Builds on RHEL 8.2 systems are failing due to this issue.
>>
>> See [1] as to why this is necessary.
>>
>> I used the following command to identify files that need this fix:
>> find . -type f -executable | /usr/lib/rpm/redhat/brp-mangle-shebangs
>>
>> I also updated the copyright notices as needed.
>>
>> 1. 
>> https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error
>>
>> Signed-off-by: Greg Rose 
>> ---
>> V2 - restrict changes to python files and do not replace @PYTHON3@
>>  for .in files.
>> ---
> 
> Acked-by: Aaron Conole 

Thanks!  Applied to master and backported down to 2.13.

> 
> I think a few of these are not part of the flake8 checks, and they
> currently fail on my system if I manually run flake8 against them:
> 
>   ovsdb/dot2pic
>   ovsdb/ovsdb-doc
>   xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
>   xenserver/opt_xensource_libexec_interface-reconfigure
> 
> It's probably a good beginner project to go back through and address at
> least the ovsdb ones.  Just commenting so that we don't forget about it.

That is a good point.  Thanks.

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


Re: [ovs-dev] [PATCH ovn] Fix some words spell error

2020-08-26 Thread Han Zhou
On Wed, Aug 26, 2020 at 1:40 AM Yi Li  wrote:
>
> Signed-off-by: Yi Li 
> ---
>  AUTHORS.rst| 1 +
>  northd/ovn-northd.c| 2 +-
>  ovn-architecture.7.xml | 8 
>  ovn-nb.xml | 2 +-
>  4 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/AUTHORS.rst b/AUTHORS.rst
> index 2a642be2..a0ca9bb2 100644
> --- a/AUTHORS.rst
> +++ b/AUTHORS.rst
> @@ -389,6 +389,7 @@ Xiao Liang shaw.l...@gmail.com
>  xu rongxu.r...@zte.com.cn
>  YAMAMOTO Takashi   yamam...@midokura.com
>  Yasuhito Takamiya  yasuh...@gmail.com
> +Yi Li  y...@winhong.com
>  Yi-Hung Weiyihung@gmail.com
>  Yifeng Sun pkusunyif...@gmail.com
>  Yin Linli...@vmware.com
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 23312540..f2e3104b 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -11275,7 +11275,7 @@ sync_meters(struct northd_context *ctx)
>  struct dns_info {
>  struct hmap_node hmap_node;
>  const struct nbrec_dns *nb_dns; /* DNS record in the Northbound db.
*/
> -const struct sbrec_dns *sb_dns; /* DNS record in the Soutbound db. */
> +const struct sbrec_dns *sb_dns; /* DNS record in the Southbound db.
*/
>
>  /* Datapaths to which the DNS entry is associated with it. */
>  const struct sbrec_datapath_binding **sbs;
> diff --git a/ovn-architecture.7.xml b/ovn-architecture.7.xml
> index b1a46293..b81844f8 100644
> --- a/ovn-architecture.7.xml
> +++ b/ovn-architecture.7.xml
> @@ -815,7 +815,7 @@
>
>  The redirect-type option requires the administrator or
the
>  CMS to configure each participating chassis with a unique Ethernet
address
> -for the locgical router by setting
ovn-chassis-mac-mappings in
> +for the logical router by setting
ovn-chassis-mac-mappings in
>  the Open vSwitch database, for use by ovn-controller.
This
>  makes it more difficult to configure than
>  reside-on-redirect-chassis.
> @@ -1816,7 +1816,7 @@
>  owned IP addresses (i.e., IP addresses configured on the router
ports,
>  VIPs, NAT IPs) in a specific way and only forwards them to the
logical
>  router that owns the target IP address. This behavior is different
than
> -that of traditional swithces and implies that other routers/hosts
> +that of traditional switches and implies that other routers/hosts
>  connected to the logical switch will not learn the MAC/IP binding
from
>  the request packet.
>
> @@ -2462,7 +2462,7 @@
>
>Security
>
> -  Role-Based Access Controls for the Soutbound DB
> +  Role-Based Access Controls for the Southbound DB
>
>  In order to provide additional security against the possibility of
an OVN
>  chassis becoming compromised in such a way as to allow rogue
software to
> @@ -2521,7 +2521,7 @@
>  RBAC configuration for the OVN southbound database is maintained by
>  ovn-northd. With RBAC enabled, modifications are only permitted for
the
>  Chassis, Encap, Port_Binding,
and
> -MAC_Binding tables, and are resstricted as follows:
> +MAC_Binding tables, and are restricted as follows:
>
>
>  Chassis
> diff --git a/ovn-nb.xml b/ovn-nb.xml
> index 9f3621dc..1f2dbb9a 100644
> --- a/ovn-nb.xml
> +++ b/ovn-nb.xml
> @@ -2243,7 +2243,7 @@
>
>  This feature requires the administrator or the CMS to
configure
>  each participating chassis with a unique Ethernet address
for the
> -locgical router by setting
ovn-chassis-mac-mappings in
> +logical router by setting
ovn-chassis-mac-mappings in
>  the Open vSwitch database, for use by
ovn-controller.
>
>
> --
> 2.25.3
>
>
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Thanks for the fix. I applied it to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH net-next v3 3/3] net: openvswitch: remove unnused keep_flows

2020-08-26 Thread Pravin Shelar
On Mon, Aug 24, 2020 at 10:08 PM  wrote:
>
> From: Tonghao Zhang 
>
> keep_flows was introduced by [1], which used as flag to delete flows or not.
> When rehashing or expanding the table instance, we will not flush the flows.
> Now don't use it anymore, remove it.
>
> [1] - 
> https://github.com/openvswitch/ovs/commit/acd051f1761569205827dc9b037e15568a8d59f8
> Cc: Pravin B Shelar 
> Signed-off-by: Tonghao Zhang 

This patch looks good. But its fixing memory leak, I guess the patch
that removed dependedcy on keep_flows is in net-next. so we are good.

Acked-by: Pravin B Shelar 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH net-next v3 2/3] net: openvswitch: refactor flow free function

2020-08-26 Thread Pravin Shelar
On Mon, Aug 24, 2020 at 10:08 PM  wrote:
>
> From: Tonghao Zhang 
>
> Decrease table->count and ufid_count unconditionally,
> because we only don't use count or ufid_count to count
> when flushing the flows. To simplify the codes, we
> remove the "count" argument of table_instance_flow_free.
>
> To avoid a bug when deleting flows in the future, add
> WARN_ON in flush flows function.
>
> Cc: Pravin B Shelar 
> Signed-off-by: Tonghao Zhang 
Looks good.

Acked-by: Pravin B Shelar 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH net-next v2 1/3] net: openvswitch: improve coding style

2020-08-26 Thread Pravin Shelar
On Mon, Aug 24, 2020 at 12:37 AM  wrote:
>
> From: Tonghao Zhang 
>
> Not change the logic, just improve coding style.
>
> Cc: Pravin B Shelar 
> Signed-off-by: Tonghao Zhang 

Acked-by: Pravin B Shelar 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] Dev, Limited Edition - Vote Biden Harris 2020 Election T-Shirt Collection!

2020-08-26 Thread sieunhan618n

Vote Biden Harris 2020 Election T-Shirt




Presidential Election 2020 gift Ideas for Men Women and Youths.
Vice President Joe Biden and Kamala Harris are the perfect candidates to  
stand against Donald Trump and the Republican policies. Wear this to a  
political rally, campaigning and on debate night. Vote Uncle Joe and  
Senator Kamala Harris in the 2020 election.
This makes the perfect political gift for the Liberal, Progressives,  
Democratic men and women. The US needs leadership and who better than two  
experienced politicians. Senator Kamala Harris is the number one contender  
for Bidens Vice President in 2020.


==

100% Printed in the USA - Ship Worldwide
Limited Edition and Only Available for few days. They will never be sold  
again or in stores. Don't delay, they will sell out!




View More Designs Here



CLICK HERE TO UNSUBSCRIBE





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


Re: [ovs-dev] [PATCH] travis: Merge matrix entries.

2020-08-26 Thread Aaron Conole
Ilya Maximets  writes:

> It's not possible to use 'matrix' twice.  This makes travis to use
> the latest one dropping all the osx and arm64 jobs.
>
> Fixes: 00d3374d8d54 ("travis: Test build of debian packages.")
> Signed-off-by: Ilya Maximets 
> ---

Acked-by: Aaron Conole 

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


[ovs-dev] [PATCH v4 ovn] Add VXLAN support for non-VTEP datapath bindings

2020-08-26 Thread Ihar Hrachyshka
Because of limited space in VXLAN VNI to pass over all three of -
datapath id, ingress port, egress port - the implementation ignores
ingress; and splits the remaining 24 bits of VNI into two chunks, 12
bits each - one for datapath and one for egress port.

Limitations: because ingress port is not passed, ACLs that rely on it
won't work with VXLAN; reduced number of networks and ports per
network (max 4096 for both).

NB consumers may use NB_Global options:max_tunid to determine maximum
capacity for logical switches supported by the setup.

Renamed MLF_RCV_FROM_VXLAN_BIT into MLF_RCV_FROM_VTEP_BIT to reflect
the new use case.

Added test scenarios that ping through VXLAN tunnel between two
hypervisors added. Also max_tunid is validated.

Changes:
- v2: run several dvr connectivity tests with vxlan tunnels.
- v2: update ovn-architecture.7 documentation.
- v3: added is_vxlan helper.
- v4: reduce max tunid when vxlan is enabled in cluster.
- v4: added options:max_tunid key for NB_Global.

Signed-off-by: Ihar Hrachyshka 
---
 controller/physical.c|   84 ++-
 include/ovn/logical-fields.h |   12 +-
 lib/ovn-util.h   |5 +
 northd/ovn-northd.c  |   78 ++-
 ovn-architecture.7.xml   |  103 +++-
 ovn-nb.xml   |5 +
 tests/ovn-macros.at  |4 +-
 tests/ovn.at | 1083 +-
 8 files changed, 728 insertions(+), 646 deletions(-)

diff --git a/controller/physical.c b/controller/physical.c
index 535c77730..1eacafbfb 100644
--- a/controller/physical.c
+++ b/controller/physical.c
@@ -180,7 +180,8 @@ static void
 put_encapsulation(enum mf_field_id mff_ovn_geneve,
   const struct chassis_tunnel *tun,
   const struct sbrec_datapath_binding *datapath,
-  uint16_t outport, struct ofpbuf *ofpacts)
+  uint16_t outport, bool is_ramp_switch,
+  struct ofpbuf *ofpacts)
 {
 if (tun->type == GENEVE) {
 put_load(datapath->tunnel_key, MFF_TUN_ID, 0, 24, ofpacts);
@@ -191,7 +192,10 @@ put_encapsulation(enum mf_field_id mff_ovn_geneve,
  MFF_TUN_ID, 0, 64, ofpacts);
 put_move(MFF_LOG_INPORT, 0, MFF_TUN_ID, 40, 15, ofpacts);
 } else if (tun->type == VXLAN) {
-put_load(datapath->tunnel_key, MFF_TUN_ID, 0, 24, ofpacts);
+uint64_t vni = (is_ramp_switch?
+datapath->tunnel_key :
+datapath->tunnel_key | ((uint64_t) outport << 12));
+put_load(vni, MFF_TUN_ID, 0, 24, ofpacts);
 } else {
 OVS_NOT_REACHED();
 }
@@ -323,8 +327,9 @@ put_remote_port_redirect_overlay(const struct
 if (!rem_tun) {
 return;
 }
-put_encapsulation(mff_ovn_geneve, tun, binding->datapath,
-  port_key, ofpacts_p);
+put_encapsulation(mff_ovn_geneve, tun, binding->datapath, port_key,
+  !strcmp(binding->type, "vtep"),
+  ofpacts_p);
 /* Output to tunnel. */
 ofpact_put_OUTPUT(ofpacts_p)->port = rem_tun->ofport;
 } else {
@@ -360,8 +365,9 @@ put_remote_port_redirect_overlay(const struct
 return;
 }
 
-put_encapsulation(mff_ovn_geneve, tun, binding->datapath,
-  port_key, ofpacts_p);
+put_encapsulation(mff_ovn_geneve, tun, binding->datapath, port_key,
+  !strcmp(binding->type, "vtep"),
+  ofpacts_p);
 
 /* Output to tunnels with active/backup */
 struct ofpact_bundle *bundle = ofpact_put_BUNDLE(ofpacts_p);
@@ -1370,7 +1376,7 @@ consider_mc_group(enum mf_field_id mff_ovn_geneve,
 
 if (!prev || tun->type != prev->type) {
 put_encapsulation(mff_ovn_geneve, tun, mc->datapath,
-  mc->tunnel_key, &remote_ofpacts);
+  mc->tunnel_key, true, &remote_ofpacts);
 prev = tun;
 }
 ofpact_put_OUTPUT(&remote_ofpacts)->port = tun->ofport;
@@ -1450,6 +1456,7 @@ void
 physical_run(struct physical_ctx *p_ctx,
  struct ovn_desired_flow_table *flow_table)
 {
+
 if (!hc_uuid) {
 hc_uuid = xmalloc(sizeof(struct uuid));
 uuid_generate(hc_uuid);
@@ -1615,11 +1622,12 @@ physical_run(struct physical_ctx *p_ctx,
  * Process packets that arrive from a remote hypervisor (by matching
  * on tunnel in_port). */
 
-/* Add flows for Geneve and STT encapsulations.  These
- * encapsulations have metadata about the ingress and egress logical
- * ports.  We set MFF_LOG_DATAPATH, MFF_LOG_INPORT, and
- * MFF_LOG_OUTPORT from the tunnel key data, then resubmit to table
- * 33 to handle packets to the local hypervisor. */
+/* Add flows for Geneve, STT and VXLAN encapsulations.  Geneve and STT
+ * encapsulations have metadata about the ingress and egress logical 

[ovs-dev] [PATCH] travis: Merge matrix entries.

2020-08-26 Thread Ilya Maximets
It's not possible to use 'matrix' twice.  This makes travis to use
the latest one dropping all the osx and arm64 jobs.

Fixes: 00d3374d8d54 ("travis: Test build of debian packages.")
Signed-off-by: Ilya Maximets 
---
 .travis.yml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index b5eaaaea2..43e6a75cc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -66,9 +66,6 @@ matrix:
 - arch: arm64
   compiler: clang
   env: OPTS="--disable-ssl"
-
-matrix:
-  include:
 - env: DEB_PACKAGE=1
   addons:
 apt:
-- 
2.25.4

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


Re: [ovs-dev] [PATCH v2] dpif-netdev: add parameters to configure autolb

2020-08-26 Thread Kevin Traynor
Hi Christophe,

Thanks for sending the patch. Few comments below.

On 13/08/2020 10:07, cfont...@redhat.com wrote:
> From: Christophe Fontaine 
> 
> ALB_ACCEPTABLE_IMPROVEMENT and ALB_PMD_LOAD_THRESHOLD default values
> can be overriden with "pmd-auto-lb-acc-improvement" and 
> "pmd-auto-lb-threshold".
> 
> Default values may not be suitable for all use cases, and we may want to
> experiment a more (or less) aggressive rebalance, either on the threshold
> (ie CPU usage which triggers a rebalance) or on the acceptable improvement
> (ie if the new queue assignation will be applied or discarded).
> 
> $ ovs-vsctl set open_vswitch . other_config:pmd-auto-lb-acc-improvement=20
> $ ovs-vsctl set open_vswitch . other_config:pmd-auto-lb-threshold=70
> 

Naming is hard. Trying to think what is a good name for a user not
familiar with the internals...

How about something like,
pmd-auto-lb-variance/pmd-auto-lb-improvement/pmd-auto-lb-var-improvement
and pmd-auto-lb-cpu. Just suggestions, there could be better names.

> Signed-off-by: Christophe Fontaine 
> ---
>  lib/dpif-netdev.c| 12 ++--
>  vswitchd/vswitch.xml | 28 +++-
>  2 files changed, 37 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index 02df8f11e..b981706b5 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -300,6 +300,8 @@ struct pmd_auto_lb {
>  bool is_enabled;/* Current status of Auto load balancing. */
>  uint64_t rebalance_intvl;
>  uint64_t rebalance_poll_timer;
> +uint64_t rebalance_acc_improvement;

> +uint64_t rebalance_threshold;

afaict, this one is being accessed in main and pmd threads and should be
type atomic.

>  };
>  
>  /* Datapath based on the network device interface from netdev.h.
> @@ -4346,6 +4348,12 @@ dpif_netdev_set_config(struct dpif *dpif, const struct 
> smap *other_config)
>  pmd_alb->rebalance_intvl = rebalance_intvl;
>  }
>  
> +pmd_alb->rebalance_acc_improvement = smap_get_int(other_config,
> +"pmd-auto-lb-acc-improvement", ALB_ACCEPTABLE_IMPROVEMENT);
> +
> +pmd_alb->rebalance_threshold = smap_get_int(other_config,
> +"pmd-auto-lb-threshold", ALB_PMD_LOAD_THRESHOLD);

You could check if these have increased (see other args above) and if
so, clear the pmd_overloaded for each pmd (like in
https://github.com/openvswitch/ovs/blob/master/lib/dpif-netdev.c#L5657).

Otherwise, overloads by the old threshold may have already been recorded
and contribute towards a rebalance happening. OTOH, you could argue that
they were legitimate when they were recorded and should stay.

> +
>  set_pmd_auto_lb(dp);

set_pmd_auto_lib() prints the rebalance interval when it is enabled, I
think the two new parameters should be printed too now.

>  return 0;
>  }
> @@ -5674,7 +5682,7 @@ pmd_rebalance_dry_run(struct dp_netdev *dp)
>  improvement =
>  ((curr_variance - new_variance) * 100) / curr_variance;
>  }
> -if (improvement < ALB_ACCEPTABLE_IMPROVEMENT) {
> +if (improvement < dp->pmd_alb.rebalance_acc_improvement) {
>  ret = false;
>  }
>  }

Now that the user is setting the variance % improvement required it
makes sense to add some debug so they can see %'s rather than just the
variance values.

> @@ -8724,7 +8732,7 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread 
> *pmd,
>  pmd_load = ((tot_proc * 100) / (tot_idle + tot_proc));
>  }
>  
> -if (pmd_load >= ALB_PMD_LOAD_THRESHOLD) {
> +if (pmd_load >= pmd_alb->rebalance_threshold) {
>  atomic_count_inc(&pmd->pmd_overloaded);
>  } else {
>  atomic_count_set(&pmd->pmd_overloaded, 0);
> diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
> index 81c84927f..53f9be591 100644
> --- a/vswitchd/vswitch.xml
> +++ b/vswitchd/vswitch.xml
> @@ -654,7 +654,7 @@
>  
>   Configures PMD Auto Load Balancing that allows automatic assignment 
> of
>   RX queues to PMDs if any of PMDs is overloaded (i.e. processing 
> cycles
> - > 95%).
> + > other_config:pmd-auto-lb-threshold).

We can't say overloaded as it may be a lowish value now. It's not worded
great in the first place as CPU is not the only consideration. Could be
something like "...if CPU thresholds are exceeded and there is an
imbalance between PMDs."

>  
>  
>   It uses current scheme of cycle based assignment of RX queues that
> @@ -690,6 +690,32 @@
>   once in few hours or a day or a week.
>  
>
> +   +  type='{"type": "integer",
> + "minInteger": 0, "maxInteger": 100}'>
> +
> + Specifies the threshold defining when a PMD is overloaded.
> + When this threshold is reached, it will trigger a request to
> + rebalance the different queues

Re: [ovs-dev] Checking status of [PATCH v7] Bareudp Tunnel Support

2020-08-26 Thread Varghese, Martin (Nokia - IN/Bangalore)
Hi Ilya,

No Problem. Thanks

Regards,
Martin

-Original Message-
From: Ilya Maximets  
Sent: Wednesday, August 26, 2020 8:34 PM
To: Varghese, Martin (Nokia - IN/Bangalore) ; Ben 
Pfaff ; Ilya Maximets 
Cc: d...@openvswitch.org; Greg Rose 
Subject: Re: Checking status of [PATCH v7] Bareudp Tunnel Support

On 8/26/20 2:44 PM, Varghese, Martin (Nokia - IN/Bangalore) wrote:
> Hi  Ben & Ilya,
> 
> Sorry to bother you.
> 
> I had sent the 7^th version of bareudp patch to d...@openvswitch.org 
>  a while ago.
> I didn’t see any progress after that. Is there anything missing from my side.
> Please let me know.

Hi.  Sorry for delays.
It was a pretty busy time due to release preparation.
I hope that we'll get back to normal reviews somewhere soon.

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


Re: [ovs-dev] [PATCH v2] travis: Test build of debian packages.

2020-08-26 Thread Ilya Maximets
On 8/21/20 2:51 PM, Aaron Conole wrote:
> Ilya Maximets  writes:
> 
>> We had a lot of issues with debian packaging lately.  This job will
>> check build and installation of debian packages to avoid most of such
>> issues in the future.
>>
>> Installing only minimal set of tools, most of dependencies will be
>> installed according to package description, this way we will check if
>> we have all required dependencies listed.
>>
>> Not trying to install openvswitch-ipsec package as there is an issue
>> that python from the pyenv for some reason doesn't see ovs packages
>> installed from python3-openvswitch, i.e. ipsec service is not able to
>> start.
>>
>> Tests are skipped because they are tested in many other scenarios.
>> No need to waste time.
>>
>> Signed-off-by: Ilya Maximets 
>> ---
> 
> Acked-by: Aaron Conole 

Thanks!
Applied to master, 2.14 and 2.13.

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


Re: [ovs-dev] Checking status of [PATCH v7] Bareudp Tunnel Support

2020-08-26 Thread Ilya Maximets
On 8/26/20 2:44 PM, Varghese, Martin (Nokia - IN/Bangalore) wrote:
> Hi  Ben & Ilya,
> 
> Sorry to bother you.
> 
> I had sent the 7^th version of bareudp patch to d...@openvswitch.org 
>  a while ago.
> I didn’t see any progress after that. Is there anything missing from my side.
> Please let me know.

Hi.  Sorry for delays.
It was a pretty busy time due to release preparation.
I hope that we'll get back to normal reviews somewhere soon.

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


Re: [ovs-dev] [PATCH branch-2.13 0/3] Backport debian fixes to branch-2.13

2020-08-26 Thread Ilya Maximets
On 8/25/20 5:55 PM, Aaron Conole wrote:
> Reported at: https://github.com/openvswitch/ovs-issues/issues/194
> 
> Ansis Atteka (2):
>   debian: Add python3-sphinx to ovs build dependencies
>   debian: Fix broken build after some man pages became generated from
> RST
> 
> Roi Dayan (1):
>   debian: Fix package dependencies
> 
>  debian/control | 5 +++--
>  debian/openvswitch-common.manpages | 6 +++---
>  debian/openvswitch-switch.manpages | 6 +++---
>  debian/openvswitch-test.manpages   | 2 +-
>  4 files changed, 10 insertions(+), 9 deletions(-)
> 

Thanks!

Applied to branch-2.13.

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


Re: [ovs-dev] [PATCH] Fix ovn-controller crash when a lport of type 'virtual' is deleted.

2020-08-26 Thread Numan Siddique
On Wed, Aug 26, 2020 at 6:28 PM Mark Michelson  wrote:

> Acked-by: Mark Michelson 
>
> Is this bug severe enough that a 20.06.3 release is necessary?
>

Thanks Mark. I applied this patch to master and branch-20.06.

I think this is definitely a severe bug. The issue is seen when virtual
ports are used.
Currently openstack neutron uses it. But I think it's not too urgent that
we should immediately
release 20.06.3. I would suggest to wait for a week or two before releasing
20.06.3.

Thanks
Numan


>
> On 8/26/20 7:41 AM, num...@ovn.org wrote:
> > From: Numan Siddique 
> >
> > The below bt is seen when a lport of type 'virtual' is deleted.
> >
> > (gdb) bt
> > 0x1470c0708655 in __strlen_avx2 () from /lib64/libc.so.6
> > 0x563340037449 in hash_string (basis=0, s=s@entry=0x0) at
> lib/hash.h:342
> > hash_name (name=name@entry=0x0) at lib/shash.c:28
> > 0x563340037a76 in shash_find (sh=0x5633407bb260, name=0x0) at
> lib/shash.c:231
> > 0x563340037b7d in shash_find_data (sh=,
> name=) at lib/shash.c:245
> > 0x56333ff71151 in local_binding_find (name=,
> local_bindings=) at controller/binding.h:108
> > get_lbinding_for_lport (b_ctx_out=0x7fff616745b0, lport_type= out>, pb=0x56334314d630) at controller/binding.c:1960
> > handle_deleted_vif_lport (b_ctx_in=0x7fff61674600,
> b_ctx_in=0x7fff61674600, b_ctx_out=0x7fff616745b0, lport_type= out>, pb=0x56334314d630) at controller/binding.c:1979
> > binding_handle_port_binding_changes (b_ctx_in=b_ctx_in@entry=0x7fff61674600,
> b_ctx_out=b_ctx_out@entry=0x7fff616745b0) at controller/binding.c:2087
> > 0x56333ff8e208 in runtime_data_sb_port_binding_handler
> (node=0x7fff616759f0, data=0x5633407bb240) at
> controller/ovn-controller.c:1325
> > 0x56333ffa6de3 in engine_compute (recompute_allowed=,
> node=) at lib/inc-proc-eng.c:306
> > ...
> > ...
> >
> > Fixes: 354bdba51ab("ovn-controller: I-P for SB port binding and OVS
> interface in runtime_data.")
> > Signed-off-by: Numan Siddique 
> > ---
> >   controller/binding.c | 12 
> >   tests/ovn.at | 11 +++
> >   2 files changed, 19 insertions(+), 4 deletions(-)
> >
> > diff --git a/controller/binding.c b/controller/binding.c
> > index 880fbb13b..3c102dc7f 100644
> > --- a/controller/binding.c
> > +++ b/controller/binding.c
> > @@ -1957,11 +1957,15 @@ get_lbinding_for_lport(const struct
> sbrec_port_binding *pb,
> >   struct local_binding *parent_lbinding = NULL;
> >
> >   if (lport_type == LP_VIRTUAL) {
> > -parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
> > - pb->virtual_parent);
> > +if (pb->virtual_parent) {
> > +parent_lbinding =
> local_binding_find(b_ctx_out->local_bindings,
> > + pb->virtual_parent);
> > +}
> >   } else {
> > -parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
> > - pb->parent_port);
> > +if (pb->parent_port) {
> > +parent_lbinding =
> local_binding_find(b_ctx_out->local_bindings,
> > + pb->parent_port);
> > +}
> >   }
> >
> >   return parent_lbinding
> > diff --git a/tests/ovn.at b/tests/ovn.at
> > index 8aabdf307..c4edbd9e1 100644
> > --- a/tests/ovn.at
> > +++ b/tests/ovn.at
> > @@ -16125,6 +16125,17 @@ ovn-nbctl lsp-set-addresses sw1-lr0
> 00:00:00:00:ff:02
> >   ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1
> >
> >   OVN_POPULATE_ARP
> > +
> > +# Delete sw0-vir and add again.
> > +ovn-nbctl lsp-del sw0-vir
> > +
> > +ovn-nbctl lsp-add sw0 sw0-vir
> > +ovn-nbctl lsp-set-addresses sw0-vir "50:54:00:00:00:10 10.0.0.10"
> > +ovn-nbctl lsp-set-port-security sw0-vir "50:54:00:00:00:10 10.0.0.10"
> > +ovn-nbctl lsp-set-type sw0-vir virtual
> > +ovn-nbctl set logical_switch_port sw0-vir options:virtual-ip=10.0.0.10
> > +ovn-nbctl set logical_switch_port sw0-vir
> options:virtual-parents=sw0-p1,sw0-p2,sw0-p3
> > +
> >   ovn-nbctl --wait=hv sync
> >
> >   # Check that logical flows are added for sw0-vir in lsp_in_arp_rsp
> pipeline
> >
>
> ___
> 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] From Joyce Davis

2020-08-26 Thread SFC Joyce Davis




--
Hello dear,  I am very sorry to intrude your privacy with my message,but 
if you don't mind, i will like to inform you, that i am in need of your 
assistance for the relocation of $USD2.5 Million Dollars currently in my 
custody. I am Sergeant First Class Joyce Davis, a US army currently 
serving in Bagram Afghanistan, where this sum is actually in my 
possession. Should i hear from you again, i will be oblige to give you 
more details about this operation, be we can proceed further. Here's my 
E-mail: (joyce.davis...@gmail.com) you as well add me on skype at 
joyce.davis942

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


Re: [ovs-dev] [PATCH] Fix ovn-controller crash when a lport of type 'virtual' is deleted.

2020-08-26 Thread Mark Michelson

Acked-by: Mark Michelson 

Is this bug severe enough that a 20.06.3 release is necessary?

On 8/26/20 7:41 AM, num...@ovn.org wrote:

From: Numan Siddique 

The below bt is seen when a lport of type 'virtual' is deleted.

(gdb) bt
0x1470c0708655 in __strlen_avx2 () from /lib64/libc.so.6
0x563340037449 in hash_string (basis=0, s=s@entry=0x0) at lib/hash.h:342
hash_name (name=name@entry=0x0) at lib/shash.c:28
0x563340037a76 in shash_find (sh=0x5633407bb260, name=0x0) at 
lib/shash.c:231
0x563340037b7d in shash_find_data (sh=, name=) at lib/shash.c:245
0x56333ff71151 in local_binding_find (name=, 
local_bindings=) at controller/binding.h:108
get_lbinding_for_lport (b_ctx_out=0x7fff616745b0, lport_type=, 
pb=0x56334314d630) at controller/binding.c:1960
handle_deleted_vif_lport (b_ctx_in=0x7fff61674600, b_ctx_in=0x7fff61674600, 
b_ctx_out=0x7fff616745b0, lport_type=, pb=0x56334314d630) at 
controller/binding.c:1979
binding_handle_port_binding_changes (b_ctx_in=b_ctx_in@entry=0x7fff61674600, 
b_ctx_out=b_ctx_out@entry=0x7fff616745b0) at controller/binding.c:2087
0x56333ff8e208 in runtime_data_sb_port_binding_handler 
(node=0x7fff616759f0, data=0x5633407bb240) at controller/ovn-controller.c:1325
0x56333ffa6de3 in engine_compute (recompute_allowed=, 
node=) at lib/inc-proc-eng.c:306
...
...

Fixes: 354bdba51ab("ovn-controller: I-P for SB port binding and OVS interface in 
runtime_data.")
Signed-off-by: Numan Siddique 
---
  controller/binding.c | 12 
  tests/ovn.at | 11 +++
  2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/controller/binding.c b/controller/binding.c
index 880fbb13b..3c102dc7f 100644
--- a/controller/binding.c
+++ b/controller/binding.c
@@ -1957,11 +1957,15 @@ get_lbinding_for_lport(const struct sbrec_port_binding 
*pb,
  struct local_binding *parent_lbinding = NULL;
  
  if (lport_type == LP_VIRTUAL) {

-parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
- pb->virtual_parent);
+if (pb->virtual_parent) {
+parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
+ pb->virtual_parent);
+}
  } else {
-parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
- pb->parent_port);
+if (pb->parent_port) {
+parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
+ pb->parent_port);
+}
  }
  
  return parent_lbinding

diff --git a/tests/ovn.at b/tests/ovn.at
index 8aabdf307..c4edbd9e1 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -16125,6 +16125,17 @@ ovn-nbctl lsp-set-addresses sw1-lr0 00:00:00:00:ff:02
  ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1
  
  OVN_POPULATE_ARP

+
+# Delete sw0-vir and add again.
+ovn-nbctl lsp-del sw0-vir
+
+ovn-nbctl lsp-add sw0 sw0-vir
+ovn-nbctl lsp-set-addresses sw0-vir "50:54:00:00:00:10 10.0.0.10"
+ovn-nbctl lsp-set-port-security sw0-vir "50:54:00:00:00:10 10.0.0.10"
+ovn-nbctl lsp-set-type sw0-vir virtual
+ovn-nbctl set logical_switch_port sw0-vir options:virtual-ip=10.0.0.10
+ovn-nbctl set logical_switch_port sw0-vir 
options:virtual-parents=sw0-p1,sw0-p2,sw0-p3
+
  ovn-nbctl --wait=hv sync
  
  # Check that logical flows are added for sw0-vir in lsp_in_arp_rsp pipeline




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


[ovs-dev] Reply if you are interested.

2020-08-26 Thread info
Dearest Beloved,

I am Fabio Antonio, A Portuguese national, I was browsing and I saw your 
e-mail, So i decided to write you if your e-mail is real, I have been diagnosed 
with esophageal cancer. It has defiled all forms of medical treatment , and 
right now I have only about a few months to live. I am very rich, but was never 
generous; I have given most of my assets to my immediate family members.

I have decided to give alms to charity organizations. I cannot do this myself 
anymore because of my health. I once asked members of my family to give some 
money to charity organizations, they refused and kept the money. I have a huge 
cash deposit of Eighteen Million dollars with a security firm in America. I 
will want you to help me collect this deposit and dispatch it to charity 
organizations. You will take out 20% of these funds for your assistance.

I will like you to acknowledge the receipt of this e-mail as soon as possible 
and treats with absolute confidentiality and sincerity.

Fabio Antonio

-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Re: [ovs-dev] [PATCH] checkpatch: Ignore macro definitions of FOR_EACH

2020-08-26 Thread Ilya Maximets
On 8/25/20 5:42 PM, Aaron Conole wrote:
> Aaron Conole  writes:
> 
>> When defining a FOR_EACH macro, checkpatch freaks out and generates a
>> control block whitespace error.  Create an exception so that it doesn't
>> generate errors for this case.
>>
>> Reported-at: 
>> https://mail.openvswitch.org/pipermail/ovs-dev/2020-August/373509.html
>> Reported-by: Toshiaki Makita 
>> Signed-off-by: Aaron Conole 
>> ---
> 
> Ping.  Any comments?
> 
>> diff --git a/tests/checkpatch.at b/tests/checkpatch.at
>> index 6c73947722..042090a0f6 100755
>> --- a/tests/checkpatch.at
>> +++ b/tests/checkpatch.at
>> @@ -284,6 +284,11 @@ try_checkpatch \
>>  + for (init; condition; increment) { \\
>>  "
>>  
>> +try_checkpatch \
>> +   "COMMON_PATCH_HEADER
>> ++#define SOME_FOR_EACH(a, b, c) /* Foo. */
>> +   "
>> +
>>  AT_CLEANUP
>>  
>>  
>> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
>> index 7f1d21a40e..abe76ff3ba 100755
>> --- a/utilities/checkpatch.py
>> +++ b/utilities/checkpatch.py
>> @@ -156,6 +156,8 @@ __regex_leading_with_whitespace_at_all = 
>> re.compile(r'^\s+')
>>  __regex_leading_with_spaces = re.compile(r'^ +[\S]+')
>>  __regex_trailing_whitespace = re.compile(r'[^\S]+$')
>>  __regex_single_line_feed = re.compile(r'^\f$')
>> +__regex_hash_define_for_each = re.compile(
>> +r'#define [_A-Z]+FOR_*EACH[_A-Z0-9]*\(')
>>  __regex_for_if_missing_whitespace = re.compile(r' +(%s)[\(]'
>> % __parenthesized_constructs)
>>  __regex_for_if_too_much_whitespace = re.compile(r' +(%s)  +[\(]'
>> @@ -245,6 +247,10 @@ def if_and_for_whitespace_checks(line):
>>  """
>>  if skip_block_whitespace_check:
>>  return True
>> +
>> +if (__regex_hash_define_for_each.search(line) is not None):

Maybe this 'if' should return only if __regex_for_if_missing_whitespace ?
i.e. if mising_whitespace and not define_for_each: return False;

'missing_whitespace' check could be removed from the next 'if' condition
in this case.

>> +return True
>> +
>>  if (__regex_for_if_missing_whitespace.search(line) is not None or
>>  __regex_for_if_too_much_whitespace.search(line) is not None or
>>  __regex_for_if_parens_whitespace.search(line)):
>> ---
>>
>> ___
>> dev mailing list
>> d...@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 

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


Re: [ovs-dev] [PATCH] Fix ovn-controller crash when a lport of type 'virtual' is deleted.

2020-08-26 Thread 0-day Robot
Bleep bloop.  Greetings Numan Siddique, 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.


git-am:
error: sha1 information is lacking or useless (controller/binding.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 Fix ovn-controller crash when a lport of type 'virtual' is 
deleted.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


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] Fix ovn-controller crash when a lport of type 'virtual' is deleted.

2020-08-26 Thread numans
From: Numan Siddique 

The below bt is seen when a lport of type 'virtual' is deleted.

(gdb) bt
0x1470c0708655 in __strlen_avx2 () from /lib64/libc.so.6
0x563340037449 in hash_string (basis=0, s=s@entry=0x0) at lib/hash.h:342
hash_name (name=name@entry=0x0) at lib/shash.c:28
0x563340037a76 in shash_find (sh=0x5633407bb260, name=0x0) at 
lib/shash.c:231
0x563340037b7d in shash_find_data (sh=, name=) at lib/shash.c:245
0x56333ff71151 in local_binding_find (name=, 
local_bindings=) at controller/binding.h:108
get_lbinding_for_lport (b_ctx_out=0x7fff616745b0, lport_type=, 
pb=0x56334314d630) at controller/binding.c:1960
handle_deleted_vif_lport (b_ctx_in=0x7fff61674600, b_ctx_in=0x7fff61674600, 
b_ctx_out=0x7fff616745b0, lport_type=, pb=0x56334314d630) at 
controller/binding.c:1979
binding_handle_port_binding_changes (b_ctx_in=b_ctx_in@entry=0x7fff61674600, 
b_ctx_out=b_ctx_out@entry=0x7fff616745b0) at controller/binding.c:2087
0x56333ff8e208 in runtime_data_sb_port_binding_handler 
(node=0x7fff616759f0, data=0x5633407bb240) at controller/ovn-controller.c:1325
0x56333ffa6de3 in engine_compute (recompute_allowed=, 
node=) at lib/inc-proc-eng.c:306
...
...

Fixes: 354bdba51ab("ovn-controller: I-P for SB port binding and OVS interface 
in runtime_data.")
Signed-off-by: Numan Siddique 
---
 controller/binding.c | 12 
 tests/ovn.at | 11 +++
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/controller/binding.c b/controller/binding.c
index 880fbb13b..3c102dc7f 100644
--- a/controller/binding.c
+++ b/controller/binding.c
@@ -1957,11 +1957,15 @@ get_lbinding_for_lport(const struct sbrec_port_binding 
*pb,
 struct local_binding *parent_lbinding = NULL;
 
 if (lport_type == LP_VIRTUAL) {
-parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
- pb->virtual_parent);
+if (pb->virtual_parent) {
+parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
+ pb->virtual_parent);
+}
 } else {
-parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
- pb->parent_port);
+if (pb->parent_port) {
+parent_lbinding = local_binding_find(b_ctx_out->local_bindings,
+ pb->parent_port);
+}
 }
 
 return parent_lbinding
diff --git a/tests/ovn.at b/tests/ovn.at
index 8aabdf307..c4edbd9e1 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -16125,6 +16125,17 @@ ovn-nbctl lsp-set-addresses sw1-lr0 00:00:00:00:ff:02
 ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1
 
 OVN_POPULATE_ARP
+
+# Delete sw0-vir and add again.
+ovn-nbctl lsp-del sw0-vir
+
+ovn-nbctl lsp-add sw0 sw0-vir
+ovn-nbctl lsp-set-addresses sw0-vir "50:54:00:00:00:10 10.0.0.10"
+ovn-nbctl lsp-set-port-security sw0-vir "50:54:00:00:00:10 10.0.0.10"
+ovn-nbctl lsp-set-type sw0-vir virtual
+ovn-nbctl set logical_switch_port sw0-vir options:virtual-ip=10.0.0.10
+ovn-nbctl set logical_switch_port sw0-vir 
options:virtual-parents=sw0-p1,sw0-p2,sw0-p3
+
 ovn-nbctl --wait=hv sync
 
 # Check that logical flows are added for sw0-vir in lsp_in_arp_rsp pipeline
-- 
2.26.2

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


[ovs-dev] My sincere apology for invading into your privacy for this proposal

2020-08-26 Thread Sr Agueda Aloisio
 My sincere apology for invading into your privacy  for this proposal

  My Name is Sr Agueda Aloisio I am from Portugal I have been diagnosed
with cancer.

  It has defiled all forms of medical treatment, and right now I have only
about a few months to live, according to medical experts.

I have not particularly lived my life so well, as I never really cared for
anyone (not even myself) but my business. Though I am very rich, I was
never generous; I was always hostile to People and only focused on my
business as that was the only thing I cared for. But now I regret all
this as I now know that there is more to life than just wanting to have or
make all the money in the world.

I believe when God gives me a second chance to come to this world I would
live my life a different way from how I have lived it.

my chances of survival is not up to %5 according to Doctor but i am not
afraid because I know the will of God will be done.

  I would want to have a Personal and Trustworthy Relationship with you, as
I intend and willing to empower the change of ownership for the transfer
of my Deposits to your personal possession for further Investment and
Charity Disbursement to the Less Privilege and Homeless
My wife run away with my wealth and got married to my personal attorney.

I will send you the photos of me in the hospital, including my ex-raw scan,
Thank you for your due consideration. God be with you .

More details and things that i need to explain and send to you regarding
this charity project cannot be sent here and i can only send via email,
that is the reason why i said you should contact me on my email.

I may Not return here to communicate with you, but i will be waiting for
your feedback on my email. carmanllapoint...@gmail.com

Yours Brother.

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


[ovs-dev] [PATCH ovn] Introduce DHCPDECLINE msg support to OVN DHCP server

2020-08-26 Thread Lorenzo Bianconi
According to the RFC2131 (https://tools.ietf.org/html/rfc2131), if the
server server receives a DHCPDECLINE message, the client has discovered
through some other means that the suggested network address is already
in use. The server SHOULD notify the local system administrator of a
possible configuration problem.

Signed-off-by: Lorenzo Bianconi 
---
 controller/pinctrl.c |  6 ++
 lib/ovn-l7.h |  1 +
 tests/ovn.at | 13 +
 3 files changed, 20 insertions(+)

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index f72ab70e1..4adfe1809 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -1889,6 +1889,12 @@ pinctrl_handle_put_dhcp_opts(
 
 break;
 }
+case OVN_DHCP_MSG_DECLINE:
+if (request_ip == *offer_ip) {
+VLOG_INFO("DHCPDECLINE from "ETH_ADDR_FMT ", "IP_FMT" duplicated",
+  ETH_ADDR_ARGS(in_flow->dl_src), IP_ARGS(*offer_ip));
+}
+goto exit;
 default: {
 static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
 VLOG_WARN_RL(&rl, "Invalid DHCP message type: %d", *in_dhcp_msg_type);
diff --git a/lib/ovn-l7.h b/lib/ovn-l7.h
index 9acfbe075..18c59896d 100644
--- a/lib/ovn-l7.h
+++ b/lib/ovn-l7.h
@@ -180,6 +180,7 @@ struct dhcp_opt6_header {
 };
 
 /* These are not defined in ovs/lib/dhcp.h, hence defining here. */
+#define OVN_DHCP_MSG_DECLINE4
 #define OVN_DHCP_MSG_RELEASE7
 #define OVN_DHCP_MSG_INFORM 8
 
diff --git a/tests/ovn.at b/tests/ovn.at
index 8aabdf307..9dc310224 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -5332,6 +5332,10 @@ test_dhcp() {
 reply_dst_ip=${offer_ip}
 fi
 
+if test "$dhcp_type" == "04"; then
+ciaddr=$offer_ip
+fi
+
 local 
request=${src_mac}08004510${ip_len}8011${src_ip}${dst_ip}
 # udp header and dhcp header
 request=${request}00440043${udp_len}
@@ -5897,6 +5901,15 @@ AT_CHECK([cat 2.packets | cut -c -48], [0], [expout])
 cat 2.expected | cut -c 53- > expout
 AT_CHECK([cat 2.packets | cut -c 53-], [0], [expout])
 
+# test DHCPDECLINE
+offer_ip=`ip_to_hex 10 0 0 4`
+server_ip=`ip_to_hex 10 0 0 1`
+ciaddr=`ip_to_hex 0 0 0 0`
+request_ip=0
+expected_dhcp_opts=""
+test_dhcp 1 f001 04 0 $ciaddr $offer_ip $request_ip 0 ff11 
$server_ip 02 $expected_dhcp_opts
+AT_CHECK([fgrep -iq 'DHCPDECLINE from f0:00:00:00:00:01, 10.0.0.4 duplicated' 
hv1/ovn-controller.log], [0], [])
+
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
-- 
2.26.2

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


[ovs-dev] [PATCH ovn] Fix some words spell error

2020-08-26 Thread Yi Li
Signed-off-by: Yi Li 
---
 AUTHORS.rst| 1 +
 northd/ovn-northd.c| 2 +-
 ovn-architecture.7.xml | 8 
 ovn-nb.xml | 2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/AUTHORS.rst b/AUTHORS.rst
index 2a642be2..a0ca9bb2 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -389,6 +389,7 @@ Xiao Liang shaw.l...@gmail.com
 xu rongxu.r...@zte.com.cn
 YAMAMOTO Takashi   yamam...@midokura.com
 Yasuhito Takamiya  yasuh...@gmail.com
+Yi Li  y...@winhong.com
 Yi-Hung Weiyihung@gmail.com
 Yifeng Sun pkusunyif...@gmail.com
 Yin Linli...@vmware.com
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 23312540..f2e3104b 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -11275,7 +11275,7 @@ sync_meters(struct northd_context *ctx)
 struct dns_info {
 struct hmap_node hmap_node;
 const struct nbrec_dns *nb_dns; /* DNS record in the Northbound db. */
-const struct sbrec_dns *sb_dns; /* DNS record in the Soutbound db. */
+const struct sbrec_dns *sb_dns; /* DNS record in the Southbound db. */
 
 /* Datapaths to which the DNS entry is associated with it. */
 const struct sbrec_datapath_binding **sbs;
diff --git a/ovn-architecture.7.xml b/ovn-architecture.7.xml
index b1a46293..b81844f8 100644
--- a/ovn-architecture.7.xml
+++ b/ovn-architecture.7.xml
@@ -815,7 +815,7 @@
   
 The redirect-type option requires the administrator or the
 CMS to configure each participating chassis with a unique Ethernet address
-for the locgical router by setting ovn-chassis-mac-mappings in
+for the logical router by setting ovn-chassis-mac-mappings in
 the Open vSwitch database, for use by ovn-controller.  This
 makes it more difficult to configure than
 reside-on-redirect-chassis.
@@ -1816,7 +1816,7 @@
 owned IP addresses (i.e., IP addresses configured on the router ports,
 VIPs, NAT IPs) in a specific way and only forwards them to the logical
 router that owns the target IP address. This behavior is different than
-that of traditional swithces and implies that other routers/hosts
+that of traditional switches and implies that other routers/hosts
 connected to the logical switch will not learn the MAC/IP binding from
 the request packet.
   
@@ -2462,7 +2462,7 @@
 
   Security
 
-  Role-Based Access Controls for the Soutbound DB
+  Role-Based Access Controls for the Southbound DB
   
 In order to provide additional security against the possibility of an OVN
 chassis becoming compromised in such a way as to allow rogue software to
@@ -2521,7 +2521,7 @@
 RBAC configuration for the OVN southbound database is maintained by
 ovn-northd. With RBAC enabled, modifications are only permitted for the
 Chassis, Encap, Port_Binding, and
-MAC_Binding tables, and are resstricted as follows:
+MAC_Binding tables, and are restricted as follows:
   
   
 Chassis
diff --git a/ovn-nb.xml b/ovn-nb.xml
index 9f3621dc..1f2dbb9a 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -2243,7 +2243,7 @@
   
 This feature requires the administrator or the CMS to configure
 each participating chassis with a unique Ethernet address for the
-locgical router by setting ovn-chassis-mac-mappings in
+logical router by setting ovn-chassis-mac-mappings in
 the Open vSwitch database, for use by ovn-controller.
   
 
-- 
2.25.3



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


Re: [ovs-dev] [PATCH net-next v3 0/3] net: openvswitch: improve codes

2020-08-26 Thread Pravin Shelar
On Tue, Aug 25, 2020 at 9:37 AM David Miller  wrote:
>
> From: xiangxia.m@gmail.com
> Date: Tue, 25 Aug 2020 13:06:33 +0800
>
> > From: Tonghao Zhang 
> >
> > This series patches are not bug fix, just improve codes.
>
> Pravin, please review this patch series.
>
Sorry for delay. I will have a look tomorrow morning PST.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev