Re: [ovs-dev] [PATCH ovn 2/2] ovn-ic: Route advertisement.

2020-02-09 Thread 0-day Robot
Bleep bloop.  Greetings Han Zhou, 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 84 characters long (recommended limit is 79)
#53 FILE: Documentation/tutorials/ovn-interconnection.rst:196:
$ ovn-nbctl set NB_Global . options:ic-route-ad=true 
options:ic-route-learn=true

WARNING: Line lacks whitespace around operator
#620 FILE: ic/ovn-ic.c:1263:
prefix_s = xasprintf(IP_FMT"/%d",

WARNING: Line is 80 characters long (recommended limit is 79)
#872 FILE: ovn-ic-sb.ovsschema:94:
 "refTable": "Availability_Zone"}}},

WARNING: Line is 81 characters long (recommended limit is 79)
#934 FILE: ovn-nb.xml:137:
  

WARNING: Line is 81 characters long (recommended limit is 79)
#971 FILE: ovn-nb.xml:174:
   database.  Default is 
false.

WARNING: Line is 81 characters long (recommended limit is 79)
#976 FILE: ovn-nb.xml:179:
   database.  Default is 
false.

WARNING: Line is 81 characters long (recommended limit is 79)
#981 FILE: ovn-nb.xml:184:
   database.  Default is 
false.

WARNING: Line is 81 characters long (recommended limit is 79)
#988 FILE: ovn-nb.xml:191:
   database.  Default is 
false.

WARNING: Line is 81 characters long (recommended limit is 79)
#994 FILE: ovn-nb.xml:197:
  A string value contains a list of CIDRs delimited by ",".  A route 
will

WARNING: Line is 82 characters long (recommended limit is 79)
#995 FILE: ovn-nb.xml:198:
  not be advertised or learned if the route's prefix belongs to any of 
the

WARNING: Line is 87 characters long (recommended limit is 79)
#1010 FILE: ovn-nb.xml:2428:
  will be set to the uuid of the row in 

Lines checked: 1195, Warnings: 11, 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] Makefile.am: Fix dist-hook-git target.

2020-02-09 Thread Numan Siddique
On Sun, Feb 9, 2020 at 5:03 AM Ben Pfaff  wrote:
>
> This was broken and always printed an error.
>
> Signed-off-by: Ben Pfaff 

Acked-by: Numan Siddique 

Numan

> ---
>  Makefile.am | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 1054ec21e64d..490a276085bb 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -225,19 +225,19 @@ dist-hook-git: distfiles
>   (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \
> grep -v '\.gitattributes$$' | \
> LC_ALL=C sort -u > all-gitfiles; \
> - LC_ALL=C comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; 
> \
> + LC_ALL=C comm -1 -3 distfiles all-gitfiles > missing-distfiles; \
>   if test -s missing-distfiles; then \
> echo "The following files are in git but not the distribution:"; \
> cat missing-distfiles; \
> exit 1; \
>   fi; \
> - if LC_ALL=C grep '\.gitignore$$' all-distfiles; then \
> + if LC_ALL=C grep '\.gitignore$$' distfiles; then \
> echo "See above for list of files that are distributed but"; \
> echo "should not be."; \
> exit 1; \
>   fi \
> fi
> -CLEANFILES += all-distfiles all-gitfiles missing-distfiles
> +CLEANFILES += distfiles all-gitfiles missing-distfiles
>  # The following is based on commands for the Automake "distdir" target.
>  distfiles: Makefile
> @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/&/g'`; \
> --
> 2.24.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 ovn 1/2] ovn-northd.c: Move struct v46_ip and related functions to utils.

2020-02-09 Thread Han Zhou
The struct and functions will be reused by other modules.

Signed-off-by: Han Zhou 
---
 lib/ovn-util.c  | 28 
 lib/ovn-util.h  | 12 
 northd/ovn-northd.c | 37 -
 3 files changed, 40 insertions(+), 37 deletions(-)

diff --git a/lib/ovn-util.c b/lib/ovn-util.c
index ba643c5..df18fda 100644
--- a/lib/ovn-util.c
+++ b/lib/ovn-util.c
@@ -521,3 +521,31 @@ ovn_chassis_redirect_name(const char *port_name)
 {
 return xasprintf("cr-%s", port_name);
 }
+
+bool
+ip46_parse_cidr(const char *str, struct v46_ip *prefix, unsigned int *plen)
+{
+memset(prefix, 0, sizeof *prefix);
+
+char *error = ip_parse_cidr(str, &prefix->ipv4, plen);
+if (!error) {
+prefix->family = AF_INET;
+return true;
+}
+free(error);
+error = ipv6_parse_cidr(str, &prefix->ipv6, plen);
+if (!error) {
+prefix->family = AF_INET6;
+return true;
+}
+free(error);
+return false;
+}
+
+bool
+ip46_equals(const struct v46_ip *addr1, const struct v46_ip *addr2)
+{
+return (addr1->family == addr2->family &&
+(addr1->family == AF_INET ? addr1->ipv4 == addr2->ipv4 :
+ IN6_ARE_ADDR_EQUAL(&addr1->ipv6, &addr2->ipv6)));
+}
diff --git a/lib/ovn-util.h b/lib/ovn-util.h
index d0a2645..4ece077 100644
--- a/lib/ovn-util.h
+++ b/lib/ovn-util.h
@@ -105,4 +105,16 @@ uint32_t ovn_allocate_tnlid(struct hmap *set, const char 
*name, uint32_t min,
 uint32_t max, uint32_t *hint);
 
 char *ovn_chassis_redirect_name(const char *port_name);
+
+/* An IPv4 or IPv6 address */
+struct v46_ip {
+int family;
+union {
+ovs_be32 ipv4;
+struct in6_addr ipv6;
+};
+};
+bool ip46_parse_cidr(const char *str, struct v46_ip *prefix,
+ unsigned int *plen);
+bool ip46_equals(const struct v46_ip *addr1, const struct v46_ip *addr2);
 #endif
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 815c727..8a4e63c 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -72,15 +72,6 @@ struct northd_state {
 bool paused;
 };
 
-/* An IPv4 or IPv6 address */
-struct v46_ip {
-int family;
-union {
-ovs_be32 ipv4;
-struct in6_addr ipv6;
-};
-};
-
 static const char *ovnnb_db;
 static const char *ovnsb_db;
 static const char *unixctl_path;
@@ -6927,34 +6918,6 @@ build_routing_policy_flow(struct hmap *lflows, struct 
ovn_datapath *od,
 ds_destroy(&actions);
 }
 
-static bool
-ip46_parse_cidr(const char *str, struct v46_ip *prefix, unsigned int *plen)
-{
-memset(prefix, 0, sizeof *prefix);
-
-char *error = ip_parse_cidr(str, &prefix->ipv4, plen);
-if (!error) {
-prefix->family = AF_INET;
-return true;
-}
-free(error);
-error = ipv6_parse_cidr(str, &prefix->ipv6, plen);
-if (!error) {
-prefix->family = AF_INET6;
-return true;
-}
-free(error);
-return false;
-}
-
-static bool
-ip46_equals(const struct v46_ip *addr1, const struct v46_ip *addr2)
-{
-return (addr1->family == addr2->family &&
-(addr1->family == AF_INET ? addr1->ipv4 == addr2->ipv4 :
- IN6_ARE_ADDR_EQUAL(&addr1->ipv6, &addr2->ipv6)));
-}
-
 struct parsed_route {
 struct ovs_list list_node;
 struct v46_ip prefix;
-- 
2.1.0

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


[ovs-dev] [PATCH ovn 2/2] ovn-ic: Route advertisement.

2020-02-09 Thread Han Zhou
Support automatical route advertisement and learning for OVN
interconnection.  Static routes and directly connected subnets
can be automatically advertised to avoid manual configuration
across AZs.  This feature is disabled by default, and can be
enabled at each AZ level by:

ovn-nbctl set NB_Global . options:ic-route-ad=true \
  options:ic-route-learn=true

More options are available. See ovn-nb(5).

Signed-off-by: Han Zhou 
---
 Documentation/tutorials/ovn-interconnection.rst |  28 +-
 TODO.rst|   2 -
 ic/ovn-ic.c | 686 
 ovn-architecture.7.xml  |  11 +
 ovn-ic-sb.ovsschema |  13 +-
 ovn-ic-sb.xml   |  32 ++
 ovn-nb.xml  |  74 +++
 tests/ovn-ic.at | 117 
 tests/ovn.at|  11 +-
 utilities/ovn-nbctl.c   |   4 +
 10 files changed, 967 insertions(+), 11 deletions(-)

diff --git a/Documentation/tutorials/ovn-interconnection.rst 
b/Documentation/tutorials/ovn-interconnection.rst
index 2f9d6d7..bb08006 100644
--- a/Documentation/tutorials/ovn-interconnection.rst
+++ b/Documentation/tutorials/ovn-interconnection.rst
@@ -180,9 +180,35 @@ In ovn-east, add below route ::
 
 $ ovn-nbctl lr-route-add lr1 10.0.2.0/24 169.254.100.2
 
-In ovs-west, add below route ::
+In ovn-west, add below route ::
 
 $ ovn-nbctl lr-route-add lr2 10.0.1.0/24 169.254.100.1
 
 Now the traffic should be able to go through between the workloads through
 tunnels crossing gateway nodes of ovn-east and ovn-west.
+
+Route Advertisement
+---
+
+Alternatively, you can avoid the above manual static route configuration by
+enabling route advertisement and learning on each OVN deployment ::
+
+$ ovn-nbctl set NB_Global . options:ic-route-ad=true 
options:ic-route-learn=true
+
+With this setting, the above routes will be automatically learned and
+configured in Northbound DB in each deployment.  For example, in ovn-east, you
+will see the route ::
+
+$ ovn-nbctl lr-route-list lr1
+IPv4 Routes
+ 10.0.2.0/24 169.254.100.2 dst-ip (learned)
+
+In ovn-west you will see ::
+
+$ ovn-nbctl lr-route-list lr2
+IPv4 Routes
+ 10.0.1.0/24 169.254.100.1 dst-ip (learned)
+
+Static routes configured in the routers can be advertised and learned as well.
+For more details of router advertisement and its configure options, please
+see ovn-nb(5).
diff --git a/TODO.rst b/TODO.rst
index fbab508..809d1c9 100644
--- a/TODO.rst
+++ b/TODO.rst
@@ -149,5 +149,3 @@ OVN To-do List
 * OVN Interconnection
 
   * Packaging for RHEL, Debian, etc.
-
-  * Route advertisement between edge routers.
diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c
index 25ca3f7..1166956 100644
--- a/ic/ovn-ic.c
+++ b/ic/ovn-ic.c
@@ -61,6 +61,7 @@ struct ic_context {
 struct ovsdb_idl_txn *ovninb_txn;
 struct ovsdb_idl_txn *ovnisb_txn;
 struct ovsdb_idl_index *nbrec_ls_by_name;
+struct ovsdb_idl_index *nbrec_port_by_name;
 struct ovsdb_idl_index *sbrec_chassis_by_name;
 struct ovsdb_idl_index *sbrec_port_binding_by_name;
 struct ovsdb_idl_index *icsbrec_port_binding_by_ts;
@@ -517,6 +518,45 @@ sync_lsp_tnl_key(const struct nbrec_logical_switch_port 
*lsp,
 
 }
 
+static bool
+get_router_uuid_by_sb_pb(struct ic_context *ctx,
+ const struct sbrec_port_binding *sb_pb,
+ struct uuid *router_uuid)
+{
+const struct sbrec_port_binding *router_pb = find_peer_port(ctx, sb_pb);
+if (!router_pb || !router_pb->datapath) {
+return NULL;
+}
+
+return smap_get_uuid(&router_pb->datapath->external_ids, "logical-router",
+ router_uuid);
+}
+
+static void
+update_isb_pb_external_ids(struct ic_context *ctx,
+   const struct sbrec_port_binding *sb_pb,
+   const struct icsbrec_port_binding *isb_pb)
+{
+struct uuid lr_uuid;
+if (!get_router_uuid_by_sb_pb(ctx, sb_pb, &lr_uuid)) {
+static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
+VLOG_WARN_RL(&rl, "Can't get router uuid for transit switch port %s.",
+ isb_pb->logical_port);
+return;
+}
+
+struct uuid current_lr_uuid;
+if (smap_get_uuid(&isb_pb->external_ids, "router-id", ¤t_lr_uuid) &&
+uuid_equals(&lr_uuid, ¤t_lr_uuid)) {
+return;
+}
+
+char *uuid_s = xasprintf(UUID_FMT, UUID_ARGS(&lr_uuid));
+icsbrec_port_binding_update_external_ids_setkey(isb_pb, "router-id",
+uuid_s);
+free(uuid_s);
+}
+
 /* For each local port:
  *   - Sync from NB to ISB.
  *   - Sync gateway from SB to ISB.
@@ -554,6 +594,9 @@ sync_local_port(struc

Re: [ovs-dev] Question Regarding ovs_packet_cmd_execute in Kernel Datapath

2020-02-09 Thread Pravin Shelar
On Fri, Feb 7, 2020 at 1:18 AM Dincer Beken  wrote:
>
> Just repeating last mail with fixed indentations (mail was in wrong format):
>
>
> Hello Ben, Pravin,
>
>
> Thank you for your consideration.
>
>
> >> It is also simpler to fix the stats issue using this approach.
>
>
> >There's no stats issue.  Userspace just counts the number of packets it
> >sent and adds them in.
>
>
>
> Regarding the stats issue. In case of LTE Broadcast, I have tight 
> synchronization periods (from 80ms down to 10ms in 5G) in which I need to set 
> the elapsed #octets and the packet number, as well as the timestamp into the 
> header. Since I do not wan't to make
>  an upcall with each packet, I am using the stats of the kernel flows. Since 
> OVS_PACKET_CMD_EXECUTE does remove the flow directly after use, I am missing 
> the stats of the first packet. Therefore I wanted to know, if there is a 
> specific reason why OVS_PACKET_CMD_EXECUTE
>  has to always use temporary kernel flows.
>
>
> >> >
> >> > On Thu, Feb 06, 2020 at 11:36:19AM -0800, Pravin Shelar wrote:
> >> > > Another option would be to add new command that install and execute
> >> > > packet in same netlink msg. That would save us a netlink msg to handle
> >> > > a miss-call.  what do you think about it?
> >> >
> >> > When I experimented with that in the past, I found that it didn't have a
> >> > noticeable impact on performance.
> >> >
> >> Reduced number of msgs sent here would help in certain situations.
>
>
> >That is plausible, but it didn't help when I measured it previously.
>
>
> If we add a distinct message for packet execution with checking a flow, ex.: 
> OVS_PACKET_CMD_EXECUTE_2, if there is is no flow found, should the packet be 
> dropped? I assume that you probably would like the userplane (altough we are 
> talking here about the a dpif-netlink
>  adapter), to be loosely coupled from the kernel datapath state (such that 
> the userplane does not always has to %100 know if a kernel flow has been 
> purged or not). So  this would be an unnecessary risk. Well if we add the 
> temporary flow creation, would not
>  OVS_PACKET_CMD_EXECUTE be redundant?
>
I am not in favor of checking of flow in OVS_PACKET_CMD_EXECUTE for
same issue that you have mentioned. It involves flow lookup, the flow
might not exist in datapath, so we need handle that case. On the other
hand it is much straightforward in OVS_FLOW_CMD_NEW. As Ben has
mentioned OVS_FLOW_ATTR_PACKET attr can be used for passing packet
data. After executing the actions for packet we can update the stats
for newly added flow.

>
> > If it did help, then I don't think we'd need a new command, we could
> > just add a OVS_FLOW_ATTR_PACKET to attach a packet to the existing
> > OVS_FLOW_CMD_NEW or OVS_FLOW_CMD_SET commands.
>
>
> I guess that we only need to check in handle_upcalls, if the 
> should_install_flow is positive, install the flow and append the packet, and 
> only if not, create an DPIF_OP_EXECUTE netlink message. This looks helpful. I 
> did not work with OVS_FLOW_CMD_SET yet, but
>  this should be likewise I assume.
>
> Regards,
>
> Dincer
>
>
>
> 
>
> Von: Ben Pfaff 
>
> Gesendet: Donnerstag, 6. Februar 2020 22:55
>
> An: Pravin Shelar 
>
> Cc: Dincer Beken ; ovs-dev@openvswitch.org 
> ; Andreas Eberlein 
>
> Betreff: Re: [ovs-dev] Question Regarding ovs_packet_cmd_execute in Kernel 
> Datapath
>
>
>
> On Thu, Feb 06, 2020 at 01:32:12PM -0800, Pravin Shelar wrote:
>
> > On Thu, Feb 6, 2020 at 12:18 PM Ben Pfaff  wrote:
>
> > >
>
> > > On Thu, Feb 06, 2020 at 11:36:19AM -0800, Pravin Shelar wrote:
>
> > > > Another option would be to add new command that install and execute
>
> > > > packet in same netlink msg. That would save us a netlink msg to handle
>
> > > > a miss-call.  what do you think about it?
>
> > >
>
> > > When I experimented with that in the past, I found that it didn't have a
>
> > > noticeable impact on performance.
>
> > >
>
> > Reduced number of msgs sent here would help in certain situations.
>
>
>
> That is plausible, but it didn't help when I measured it previously.
>
>
>
> > It is also simpler to fix the stats issue using this approach.
>
>
>
> There's no stats issue.  Userspace just counts the number of packets it
>
> sent and adds them in.
>
> ___
>
> 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] Invitation

2020-02-09 Thread Valentin
 
Reconversion professionnelle
un nouveau métier pour une nouvelle vie

image 0

Hypnose médicale, hypnose thérapeutique, cette nouvelle 
façon de soulager et rétablir l'harmonie des personnes en 
passant par l'inconscient, intéresse les professionnels des 
thérapies alternatives, les professionnels de santé qui 
l'utilisent désormais au quotidien dans les établissements 
de soins, mais également les particuliers désireux d'en 
savoir plus sur ces techniques de soins et de mieux-être innovantes et 
très efficaces.

Que se passe-t-il lorsque nous sommes sous hypnose ? Est-ce naturel ?  Peut-on 
prendre le contrôle d'une personne ?  Pourquoi parfois avez-vous du 
mal à  vous contrôler vous-même ? Comment fonctionne 
l'inconscient ?

L'hypnose thérapeutique vient travailler sur votre inconscient avec 
différentes techniques  comme l'utilisation de votre imaginaire ou 
encore vient effectuer des contournements de votre esprit critique. Le but 
étant d'atteindre votre « moi profond » pour obtenir un changement 
dans vos habitudes. (Par exemple : l'arrêt du tabac, 
l'amincissement,  la confiance en soi, les phobies, les 
dépressions, etc).

INVITATION soirée découverte

Ensemble, nous échangerons sur vos propres interrogations face à  
l’hypnose mais nous répondrons aussi aux questions les plus courantes.

Vous souhaitez assister gratuitement à l’une de nos sessions « 
Découverte de l’Hypnose »


Cliquez ICI pour vous inscrire

Nos stagiaires nous ont attribué une note de 4.8/5

"Notre Exigence, c'est aussi la Vôtre !"
Nous travaillons chaque jour pour que vous deveniez de véritables 
professionnels de l'Hypnose. C'est la vocation de notre école 
et nous veillons à ce que cet objectif soit atteint par tous." 

Docteur Valentina Kieffer
Présidente

 


 
Paris - Lyon - Lille - Marseille - Toulouse - Strasbourg - Nantes
 
 image 6
Si vous ne souhaitez plus recevoir de messages de notre part, cliquez LA

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


[ovs-dev] Partnership Memo - 08-02-2020

2020-02-09 Thread ad...@genoram.cf
Good Morning 

Let us partner in this deal of mutual benefit to both of us. 

Read the attachment for full details of the deal while I awaits your reply 
indicting your interest.

Thankyou.

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