Re: [ovs-dev] [PATCH] kbuild: Include external modules compile flags

2020-02-21 Thread Gregory Rose


On 2/21/2020 10:07 AM, Gregory Rose wrote:


On 2/21/2020 9:43 AM, David Ahern wrote:

On 2/5/20 3:48 PM, Gregory Rose wrote:

I found a way to make this work on the openvswitch out of tree kernel
module.  KCFLAGS
doesn't work because it is added at the end of the gcc command line and
we need to
add a '-include ' directive so that the include file comes
*before* all other include
files.  I fix this by inserting the '-include ' command line
option to the beginning
of our own Kbuild NOSTDINC variable.

Hi Greg:

Thanks for chasing this down. Are you going to commit the change to ovs
master?


Hi David,

I have a patch set ready to go to add support for kernels all the way 
up to 5.5
however OVS is broken on kernels from 5.2 on up.  All of our netlink 
nested

messages are failing with -EINVAL return from nla_parse_nested(). I am
looking into why this is occurring .  There were some changes around
use of the netlink policy and I think the issues I'm seeing might be 
related.

Specifically the policy field from the genl_ops structure was removed and
I think that might be the problem.

When I have a resolution for that issue I'll be posting my patches. 
I'll keep

you in the loop.



David,

I need to do some further backporting of these patches:

56738f4 netlink: add strict parsing for future attributes
3de6440 netlink: re-add parse/validate functions in strict mode
8cb0817 netlink: make validation more configurable for future strictness
6f455f5 netlink: add NLA_MIN_LEN
f6ad55a Merge branch 'nla_nest_start'

I already backported some of that code in my patch series, just
to get it to compile for one thing, but I've obviously missed
something.

Just FYI.

- Greg

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


[ovs-dev] [PATCH] docs: Update conntrack established state description

2020-02-21 Thread Yi-Hung Wei
Patch a867c010ee91 ("conntrack: Fix conntrack new state") fixes
the userspace conntrack behavior.  This patch updates the
corresponding conntrack state description.

Fixes: a867c010ee91 ("conntrack: Fix conntrack new state")
Reported-by: Roni Bar Yanai 
Signed-off-by: Yi-Hung Wei 
---
Please backports to branch 2.13.

---
 lib/meta-flow.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/meta-flow.xml b/lib/meta-flow.xml
index 90b405c73750..2f9c5ee16342 100644
--- a/lib/meta-flow.xml
+++ b/lib/meta-flow.xml
@@ -2566,8 +2566,8 @@ actions=clone(load:0->NXM_OF_IN_PORT[],output:123)
 
 est (0x02)
 
-  Part of an existing connection.  Set to 1 if this is a committed
-  connection.
+  Part of an existing connection.  Set to 1 if packets of a committed
+  connection have been seen by conntrack from both directions.
 
 
 rel (0x04)
-- 
2.7.4

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


[ovs-dev] [PATCH] netdev-afxdp: Add interrupt mode using poll syscall.

2020-02-21 Thread William Tu
The patch adds a new option 'use-intr' to enable afxdp interrupt
mode.  At receive path, add a poll() syscall so that when there
is no packet arrived, the pmd thread will be blocked and this
saves some CPU time for other processes. This avoids burning the
CPU to always 100% when there is no traffic. Disabled by default.

Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/653613549
Signed-off-by: William Tu 
---
 NEWS   |  3 +++
 lib/netdev-afxdp.c | 45 -
 lib/netdev-linux-private.h |  2 ++
 vswitchd/vswitch.xml   | 12 
 4 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index f62ef1f47ea8..d91002a76fff 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ Post-v2.13.0
- OpenFlow:
  * The OpenFlow ofp_desc/serial_num may now be configured by setting the
value of other-config:dp-sn in the Bridge table.
+   - AF_XDP:
+ * New option 'use-intr' for netdev-afxdp to save CPU cycles by enabling
+   interrupt mode. Disabled by default.
 
 
 v2.13.0 - 14 Feb 2020
diff --git a/lib/netdev-afxdp.c b/lib/netdev-afxdp.c
index 482400d8d135..7b60acde1b02 100644
--- a/lib/netdev-afxdp.c
+++ b/lib/netdev-afxdp.c
@@ -604,6 +604,7 @@ netdev_afxdp_set_config(struct netdev *netdev, const struct 
smap *args,
 enum afxdp_mode xdp_mode;
 bool need_wakeup;
 int new_n_rxq;
+bool use_intr;
 
 ovs_mutex_lock(&dev->mutex);
 new_n_rxq = MAX(smap_get_int(args, "n_rxq", NR_QUEUE), 1);
@@ -637,12 +638,16 @@ netdev_afxdp_set_config(struct netdev *netdev, const 
struct smap *args,
 }
 #endif
 
+use_intr = smap_get_bool(args, "use-intr", false);
+
 if (dev->requested_n_rxq != new_n_rxq
 || dev->requested_xdp_mode != xdp_mode
-|| dev->requested_need_wakeup != need_wakeup) {
+|| dev->requested_need_wakeup != need_wakeup
+|| dev->requested_use_intr != use_intr) {
 dev->requested_n_rxq = new_n_rxq;
 dev->requested_xdp_mode = xdp_mode;
 dev->requested_need_wakeup = need_wakeup;
+dev->requested_use_intr = use_intr;
 netdev_request_reconfigure(netdev);
 }
 ovs_mutex_unlock(&dev->mutex);
@@ -661,6 +666,8 @@ netdev_afxdp_get_config(const struct netdev *netdev, struct 
smap *args)
 xdp_modes[dev->xdp_mode_in_use].name);
 smap_add_format(args, "use-need-wakeup", "%s",
 dev->use_need_wakeup ? "true" : "false");
+smap_add_format(args, "use-intr", "%s",
+dev->use_intr ? "true" : "false");
 ovs_mutex_unlock(&dev->mutex);
 return 0;
 }
@@ -696,6 +703,7 @@ netdev_afxdp_reconfigure(struct netdev *netdev)
 if (netdev->n_rxq == dev->requested_n_rxq
 && dev->xdp_mode == dev->requested_xdp_mode
 && dev->use_need_wakeup == dev->requested_need_wakeup
+&& dev->use_intr == dev->requested_use_intr
 && dev->xsks) {
 goto out;
 }
@@ -713,6 +721,7 @@ netdev_afxdp_reconfigure(struct netdev *netdev)
 VLOG_ERR("setrlimit(RLIMIT_MEMLOCK) failed: %s", ovs_strerror(errno));
 }
 dev->use_need_wakeup = dev->requested_need_wakeup;
+dev->use_intr = dev->requested_use_intr;
 
 err = xsk_configure_all(netdev);
 if (err) {
@@ -815,6 +824,32 @@ prepare_fill_queue(struct xsk_socket_info *xsk_info)
 xsk_info->available_rx += BATCH_SIZE;
 }
 
+static int
+enable_intr_mode(int fd, struct netdev *netdev)
+{
+struct pollfd fds[1];
+int ret;
+
+memset(fds, 0, sizeof fds);
+fds[0].fd = fd;
+fds[0].events = POLLIN;
+
+ret = poll(fds, 1, 1);
+if (OVS_UNLIKELY(ret == 0)) {
+/* Timeout. */
+ovsrcu_quiesce_start();
+return EAGAIN;
+}
+if (OVS_UNLIKELY(ret < 0)) {
+VLOG_WARN_RL(&rl, "%s: error polling rx fd: %s.",
+ netdev_get_name(netdev),
+ ovs_strerror(errno));
+return EAGAIN;
+}
+
+return 0;
+}
+
 int
 netdev_afxdp_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet_batch *batch,
   int *qfill)
@@ -827,6 +862,7 @@ netdev_afxdp_rxq_recv(struct netdev_rxq *rxq_, struct 
dp_packet_batch *batch,
 uint32_t idx_rx = 0;
 int qid = rxq_->queue_id;
 unsigned int rcvd, i;
+int ret;
 
 xsk_info = dev->xsks[qid];
 if (!xsk_info || !xsk_info->xsk) {
@@ -838,6 +874,13 @@ netdev_afxdp_rxq_recv(struct netdev_rxq *rxq_, struct 
dp_packet_batch *batch,
 umem = xsk_info->umem;
 rx->fd = xsk_socket__fd(xsk_info->xsk);
 
+if (OVS_UNLIKELY(dev->use_intr)) {
+ret = enable_intr_mode(rx->fd, netdev);
+if (ret > 0) {
+return ret;
+}
+}
+
 rcvd = xsk_ring_cons__peek(&xsk_info->rx, BATCH_SIZE, &idx_rx);
 if (!rcvd) {
 xsk_rx_wakeup_if_needed(umem, netdev, rx->fd);
diff --git a/lib/netdev-linux-private.h b/lib/netdev-linux-private.h
index c7c515f70700..a89eb36b5e3c 100644
--- a/lib/netdev-linu

Re: [ovs-dev] OVN 20.03.0 Release: Final call for patches

2020-02-21 Thread Han Zhou
On Fri, Feb 21, 2020 at 12:20 AM Dumitru Ceara  wrote:
>
> On 2/21/20 1:06 AM, Han Zhou wrote:
> > On Thu, Feb 20, 2020 at 11:54 AM Mark Michelson 
wrote:
> >>
> >> Hi everyone,
> >>
> >> We've had the OVN 20.03 branch created for a couple of weeks now, and
> >> we've seen some important issues found and fixed since then. Great job!
> >>
> >> As the branch becomes more stable, we look at the possibility of
> >> creating the 20.03.0 release. I think we can make it at the end of next
> >> week, 28 February.
> >>
> >> If there are any outstanding issues in the 20.03 branch that need
> >> addressing before the release of 20.03.0, please bring them up in reply
> >> to this thread. If you have patches that are targeted to 20.03.0 that
> >> have not been merged (or have been merged to master but have not been
> >> backported to 20.03) then please bring them up as well.
> >>
> >> Thanks,
> >> Mark Michelson
> >>
> >> ___
> >> dev mailing list
> >> d...@openvswitch.org
> >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> > Hi Mark,
> >
> > Requested by ovn-k8s team, the two patches need to be backported to
20.03:
> >
> > eb9a406 ovn-controller: Avoid adding neighbour flows for non-local
> > datapaths.
> > f896912 ovn-controller: Avoid creating patch port for non-local
datapaths.
>
> Hi Han, Mark,
>
> ++ for backporting to 20.03. It's quite possible that ovn-monitor-all
> will be enabled to avoid conditional monitoring in ovsdb-server and
> these patches definitely improve CPU usage in ovn-controller.
>
> Regards,
> Dumitru
>
OK, thanks for the feedback. I backported these 2 patches to 20.03.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn] ovn-northd: Fix use of uninitialized variables.

2020-02-21 Thread Mark Michelson

Looks good to me

Acked-by: Mark Michelson 

On 2/21/20 6:59 AM, Dumitru Ceara wrote:

Calls to ip_address_and_port_from_lb_key() could fail parsing the 'key'
argument and would return without setting *ip_address. The code in
ovn_lb_create() was passing an unitialized 'backend_ip' pointer and
using it unconditionally afterwards.

With CFLAGS="-O3" gcc reports this issue too:
$ ./configure CFLAGS="-O3" --enable-Werror [...]
$ make
[...]
northd/ovn-northd.c: In function ‘ovnnb_db_run.isra.65’:
northd/ovn-northd.c:3116:14: error: ‘backend_port’ may be used uninitialized in 
this function [-Werror=maybe-uninitialized]
  uint32_t hash = service_port;
   ^
northd/ovn-northd.c:3207:22: note: ‘backend_port’ was declared here
  uint16_t backend_port;
   ^
In file included from northd/ovn-northd.c:27:0:
/home/dceara/git-repos/ovs/lib/hash.h:342:5: error: ‘backend_ip’ may be used 
uninitialized in this function [-Werror=maybe-uninitialized]
  return hash_bytes(s, strlen(s), basis);
  ^
northd/ovn-northd.c:3206:19: note: ‘backend_ip’ was declared here
  char *backend_ip;

Fix ip_address_and_port_from_lb_key() and make it return true if parsing
was successful.

Signed-off-by: Dumitru Ceara 
---
  northd/ovn-northd.c | 37 +++--
  1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 721cb05..3aba048 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -2253,7 +2253,7 @@ join_logical_ports(struct northd_context *ctx,
  }
  }
  
-static void

+static bool
  ip_address_and_port_from_lb_key(const char *key, char **ip_address,
  uint16_t *port, int *addr_family);
  
@@ -2272,13 +2272,12 @@ get_router_load_balancer_ips(const struct ovn_datapath *od,
  
  SMAP_FOR_EACH (node, vips) {

  /* node->key contains IP:port or just IP. */
-char *ip_address = NULL;
+char *ip_address;
  uint16_t port;
  int addr_family;
  
-ip_address_and_port_from_lb_key(node->key, &ip_address, &port,

-&addr_family);
-if (!ip_address) {
+if (!ip_address_and_port_from_lb_key(node->key, &ip_address, &port,
+ &addr_family)) {
  continue;
  }
  
@@ -3156,13 +3155,12 @@ ovn_lb_create(struct northd_context *ctx, struct hmap *lbs,

  size_t n_vips = 0;
  
  SMAP_FOR_EACH (node, &nbrec_lb->vips) {

-char *vip = NULL;
+char *vip;
  uint16_t port;
  int addr_family;
  
-ip_address_and_port_from_lb_key(node->key, &vip, &port,

-&addr_family);
-if (!vip) {
+if (!ip_address_and_port_from_lb_key(node->key, &vip, &port,
+ &addr_family)) {
  continue;
  }
  
@@ -3206,10 +3204,9 @@ ovn_lb_create(struct northd_context *ctx, struct hmap *lbs,

  char *backend_ip;
  uint16_t backend_port;
  
-ip_address_and_port_from_lb_key(token, &backend_ip, &backend_port,

-&addr_family);
-
-if (!backend_ip) {
+if (!ip_address_and_port_from_lb_key(token, &backend_ip,
+ &backend_port,
+ &addr_family)) {
  continue;
  }
  
@@ -4682,8 +4679,10 @@ build_pre_acls(struct ovn_datapath *od, struct hmap *lflows)
  
  /* For a 'key' of the form "IP:port" or just "IP", sets 'port' and

   * 'ip_address'.  The caller must free() the memory allocated for
- * 'ip_address'. */
-static void
+ * 'ip_address'.
+ * Returns true if parsing of 'key' was successful, false otherwise.
+ */
+static bool
  ip_address_and_port_from_lb_key(const char *key, char **ip_address,
  uint16_t *port, int *addr_family)
  {
@@ -4692,16 +4691,18 @@ ip_address_and_port_from_lb_key(const char *key, char 
**ip_address,
  static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
  VLOG_WARN_RL(&rl, "bad ip address or port for load balancer key %s",
   key);
-return;
+*ip_address = NULL;
+*port = 0;
+*addr_family = 0;
+return false;
  }
  
  struct ds s = DS_EMPTY_INITIALIZER;

  ss_format_address_nobracks(&ss, &s);
  *ip_address = ds_steal_cstr(&s);
-
  *port = ss_get_port(&ss);
-
  *addr_family = ss.ss_family;
+return true;
  }
  
  /*




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


Re: [ovs-dev] [PATCH] kbuild: Include external modules compile flags

2020-02-21 Thread Gregory Rose


On 2/21/2020 9:43 AM, David Ahern wrote:

On 2/5/20 3:48 PM, Gregory Rose wrote:

I found a way to make this work on the openvswitch out of tree kernel
module.  KCFLAGS
doesn't work because it is added at the end of the gcc command line and
we need to
add a '-include ' directive so that the include file comes
*before* all other include
files.  I fix this by inserting the '-include ' command line
option to the beginning
of our own Kbuild NOSTDINC variable.

Hi Greg:

Thanks for chasing this down. Are you going to commit the change to ovs
master?


Hi David,

I have a patch set ready to go to add support for kernels all the way up 
to 5.5

however OVS is broken on kernels from 5.2 on up.  All of our netlink nested
messages are failing with -EINVAL return from nla_parse_nested().  I am
looking into why this is occurring .  There were some changes around
use of the netlink policy and I think the issues I'm seeing might be 
related.

Specifically the policy field from the genl_ops structure was removed and
I think that might be the problem.

When I have a resolution for that issue I'll be posting my patches. I'll 
keep

you in the loop.

Thanks,

- Greg



Thanks,
David



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


Re: [ovs-dev] [PATCH] kbuild: Include external modules compile flags

2020-02-21 Thread David Ahern
On 2/5/20 3:48 PM, Gregory Rose wrote:
> 
> I found a way to make this work on the openvswitch out of tree kernel
> module.  KCFLAGS
> doesn't work because it is added at the end of the gcc command line and
> we need to
> add a '-include ' directive so that the include file comes
> *before* all other include
> files.  I fix this by inserting the '-include ' command line
> option to the beginning
> of our own Kbuild NOSTDINC variable.

Hi Greg:

Thanks for chasing this down. Are you going to commit the change to ovs
master?

Thanks,
David

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


[ovs-dev] [PATCH ovn] manage ARP process locally in a DVR scenario

2020-02-21 Thread Lorenzo Bianconi
OVN currently performs L2 address resolution and IP buffering on the
gw node. If the system relies on FIPs, OVN will re-inject the buffered
IP packets on the gw node, while following packets will go though
the localnet port on the compute node resulting in a ToR switch
misconfiguration. This patch addresses the issue managing ARP
and IP buffering locally if FIPs are configured on the node

Signed-off-by: Lorenzo Bianconi 
---
 northd/ovn-northd.8.xml | 31 ++
 northd/ovn-northd.c | 48 -
 2 files changed, 78 insertions(+), 1 deletion(-)

diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
index a27dfa951..23b385377 100644
--- a/northd/ovn-northd.8.xml
+++ b/northd/ovn-northd.8.xml
@@ -2405,6 +2405,37 @@ output;
 
   
 
+  
+
+  For distributed logical routers where one of the logical router ports
+  specifies a redirect-chassis, a priority-400 logical
+  flow for each dnat_and_snat NAT rules configured.
+  These flows will allow to properly forward traffic to the external
+  connections if available and avoid sending it through the tunnel.
+  Assuming the following NAT rule has been configured:
+
+
+
+external_ip = A;
+external_mac = B;
+logical_ip = C;
+
+
+
+  the following action will be applied:
+
+
+
+ip.ttl--;
+reg0 = ip.dst;
+reg1 = A;
+eth.src = B;
+outport = router-port;
+next;
+
+
+  
+
   
 
   IPv4 routing table.  For each route to IPv4 network N with
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 721cb05ce..8cecc98ca 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -7338,6 +7338,42 @@ build_ecmp_route_flow(struct hmap *lflows, struct 
ovn_datapath *od,
 ds_destroy(&actions);
 }
 
+#define DROUTE_PRIO 400
+static void
+add_distributed_routes(struct hmap *lflows, struct ovn_datapath *od)
+{
+struct ds actions = DS_EMPTY_INITIALIZER;
+struct ds match = DS_EMPTY_INITIALIZER;
+
+if (!od->l3dgw_port || !od->nbr) {
+return;
+}
+
+for (size_t i = 0; i < od->nbr->n_nat; i++) {
+const struct nbrec_nat *nat = od->nbr->nat[i];
+
+if (strcmp(nat->type, "dnat_and_snat") ||
+!nat->external_mac  || !nat->external_ip) {
+continue;
+}
+
+bool is_ipv4 = strchr(nat->logical_ip, '.') ? true : false;
+ds_put_format(&match, "ip%s.src == %s && is_chassis_resident(\"%s\")",
+  is_ipv4 ? "4" : "6", nat->logical_ip,
+  nat->logical_port);
+char *prefix = is_ipv4 ? "" : "xx";
+ds_put_format(&actions, "outport = %s; eth.src = %s; "
+  "%sreg0 = ip%s.dst; %sreg1 = %s; next;",
+  od->l3dgw_port->json_key, nat->external_mac,
+  prefix, is_ipv4 ? "4" : "6",
+  prefix, nat->external_ip);
+ovn_lflow_add(lflows, od, S_ROUTER_IN_IP_ROUTING, DROUTE_PRIO,
+  ds_cstr(&match), ds_cstr(&actions));
+ds_clear(&match);
+ds_clear(&actions);
+}
+}
+
 static void
 add_route(struct hmap *lflows, const struct ovn_port *op,
   const char *lrp_addr_s, const char *network_s, int plen,
@@ -7359,6 +7395,9 @@ add_route(struct hmap *lflows, const struct ovn_port *op,
 }
 build_route_match(op_inport, network_s, plen, is_src_route, is_ipv4,
   &match, &priority);
+if (op->nbrp && !op->nbrp->n_gateway_chassis) {
+priority += DROUTE_PRIO;
+}
 
 struct ds actions = DS_EMPTY_INITIALIZER;
 ds_put_format(&actions, "ip.ttl--; "REG_ECMP_GROUP_ID" = 0; %sreg0 = ",
@@ -8927,7 +8966,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap 
*ports,
   nat->logical_ip,
   od->l3dgw_port->json_key);
 ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_GW_REDIRECT,
-100, ds_cstr(&match), "next;",
+200, ds_cstr(&match), "next;",
 &nat->header_);
 }
 
@@ -9208,6 +9247,13 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap 
*ports,
 ovn_lflow_add(lflows, od, S_ROUTER_IN_ND_RA_RESPONSE, 0, "1", "next;");
 }
 
+/* Logical router ingress table IP_ROUTING - IP routing for distributed
+ * logical router
+ */
+HMAP_FOR_EACH (od, key_node, datapaths) {
+add_distributed_routes(lflows, od);
+}
+
 /* Logical router ingress table IP_ROUTING & IP_ROUTING_ECMP: IP Routing.
  *
  * A packet that arrives at this table is an IP packet that should be
-- 
2.24.1

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


[ovs-dev] 注意:所有者のメールアドレス

2020-02-21 Thread vera nica via dev
注意:所有者のメールアドレス

このプログラムは、中国のスロバキアで詐欺の被害者のためにトーゴフォーレグナシンベ大統領によって開始されました。

あなたのメールアドレスとあなたの名前が発見され、あなたは被害者の一人として受取人の一人であり、あなたの総補償基金は300,000,000ドル(3,000米ドル)です。このお金は現在、組織振替部を通じて請求されます。

あなたがしなければならないのは、5営業日以内にあなたの資金の処理とリリースのためにロメトーゴ本部に連絡することです。
ただし、お支払いは銀行振り込みによりお客様の国の直接銀行口座に合計300,000.00ドルで送金されることにご注意ください。

メールアドレスのみを使用して支払いを送信することはできません。必要なことは、次の情報を弊社本社にご連絡ください。

あなたのフルネーム ……
銀行の詳細

注:登録に120ユーロを超えて送金しないでください。銀行口座への300,000,000ドルの送金を受け取るために支払う必要がある唯一の手数料です。

電子メールでお問い合わせください:(orabanktransferserv...@gmail.com)...

有難う御座います。
セルジュ・ヌグサン博士
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn] debian: Initial packaging for OVN

2020-02-21 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.


checkpatch:
WARNING: Unexpected sign-offs from developers who are not authors or co-authors 
or committers: Numan Siddique 
WARNING: Line is 102 characters long (recommended limit is 79)
#4919 FILE: debian/ovn-central.ovn-northd.service:11:
ExecStart=/usr/share/ovn/scripts/ovn-ctl start_northd --ovn-manage-ovsdb=no 
--no-monitor $OVN_CTL_OPTS

WARNING: Line is 89 characters long (recommended limit is 79)
#5233 FILE: debian/ovn-controller-vtep.service:9:
ExecStart=/usr/share/ovn/scripts/ovn-ctl start_controller_vtep --no-monitor 
$OVN_CTL_OPTS

WARNING: Line is 106 characters long (recommended limit is 79)
#5357 FILE: debian/ovn-host.ovn-controller.service:11:
ExecStart=/usr/share/ovn/scripts/ovn-ctl start_controller --ovn-manage-ovsdb=no 
--no-monitor $OVN_CTL_OPTS

WARNING: Line is 97 characters long (recommended limit is 79)
#5800 FILE: debian/watch:2:
http://www.openvswitch.org/download/ 
https://www.openvswitch.org/releases/openvswitch-(.*).tar.gz

Lines checked: 5803, Warnings: 5, 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] dpif-netdev: Enter quiescent state after each offloading operation.

2020-02-21 Thread Ilya Maximets
If the offloading queue is big and filled continuously, offloading
thread may have no chance to quiesce blocking rcu callbacks and
other threads waiting for synchronization.

Fix that by entering momentary quiescent state after each operation
since we're not holding any rcu-protected memory here.

Fixes: 02bb2824e51d ("dpif-netdev: do hw flow offload in a thread")
Reported-by: Eli Britstein 
Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2020-February/049768.html
Signed-off-by: Ilya Maximets 
---
 lib/dpif-netdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index d393aab5e..a798db45d 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -2512,6 +2512,7 @@ dp_netdev_flow_offload_main(void *data OVS_UNUSED)
 VLOG_DBG("%s to %s netdev flow\n",
  ret == 0 ? "succeed" : "failed", op);
 dp_netdev_free_flow_offload(offload);
+ovsrcu_quiesce();
 }
 
 return NULL;
-- 
2.24.1

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


Re: [ovs-dev] [PATCH ovn] ovn-northd: Fix use of uninitialized variables.

2020-02-21 Thread Dumitru Ceara
On 2/21/20 12:59 PM, Dumitru Ceara wrote:
> Calls to ip_address_and_port_from_lb_key() could fail parsing the 'key'
> argument and would return without setting *ip_address. The code in
> ovn_lb_create() was passing an unitialized 'backend_ip' pointer and
> using it unconditionally afterwards.
> 
> With CFLAGS="-O3" gcc reports this issue too:
> $ ./configure CFLAGS="-O3" --enable-Werror [...]
> $ make
> [...]
> northd/ovn-northd.c: In function ‘ovnnb_db_run.isra.65’:
> northd/ovn-northd.c:3116:14: error: ‘backend_port’ may be used uninitialized 
> in this function [-Werror=maybe-uninitialized]
>  uint32_t hash = service_port;
>   ^
> northd/ovn-northd.c:3207:22: note: ‘backend_port’ was declared here
>  uint16_t backend_port;
>   ^
> In file included from northd/ovn-northd.c:27:0:
> /home/dceara/git-repos/ovs/lib/hash.h:342:5: error: ‘backend_ip’ may be used 
> uninitialized in this function [-Werror=maybe-uninitialized]
>  return hash_bytes(s, strlen(s), basis);
>  ^
> northd/ovn-northd.c:3206:19: note: ‘backend_ip’ was declared here
>  char *backend_ip;
> 
> Fix ip_address_and_port_from_lb_key() and make it return true if parsing
> was successful.
> 
> Signed-off-by: Dumitru Ceara 
> ---
>  northd/ovn-northd.c | 37 +++--
>  1 file changed, 19 insertions(+), 18 deletions(-)
> 

Hi,

If possible, please backport this to branch 20.03 too.

Thanks,
Dumitru

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


[ovs-dev] [PATCH ovn] ovn-northd: Fix use of uninitialized variables.

2020-02-21 Thread Dumitru Ceara
Calls to ip_address_and_port_from_lb_key() could fail parsing the 'key'
argument and would return without setting *ip_address. The code in
ovn_lb_create() was passing an unitialized 'backend_ip' pointer and
using it unconditionally afterwards.

With CFLAGS="-O3" gcc reports this issue too:
$ ./configure CFLAGS="-O3" --enable-Werror [...]
$ make
[...]
northd/ovn-northd.c: In function ‘ovnnb_db_run.isra.65’:
northd/ovn-northd.c:3116:14: error: ‘backend_port’ may be used uninitialized in 
this function [-Werror=maybe-uninitialized]
 uint32_t hash = service_port;
  ^
northd/ovn-northd.c:3207:22: note: ‘backend_port’ was declared here
 uint16_t backend_port;
  ^
In file included from northd/ovn-northd.c:27:0:
/home/dceara/git-repos/ovs/lib/hash.h:342:5: error: ‘backend_ip’ may be used 
uninitialized in this function [-Werror=maybe-uninitialized]
 return hash_bytes(s, strlen(s), basis);
 ^
northd/ovn-northd.c:3206:19: note: ‘backend_ip’ was declared here
 char *backend_ip;

Fix ip_address_and_port_from_lb_key() and make it return true if parsing
was successful.

Signed-off-by: Dumitru Ceara 
---
 northd/ovn-northd.c | 37 +++--
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 721cb05..3aba048 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -2253,7 +2253,7 @@ join_logical_ports(struct northd_context *ctx,
 }
 }
 
-static void
+static bool
 ip_address_and_port_from_lb_key(const char *key, char **ip_address,
 uint16_t *port, int *addr_family);
 
@@ -2272,13 +2272,12 @@ get_router_load_balancer_ips(const struct ovn_datapath 
*od,
 
 SMAP_FOR_EACH (node, vips) {
 /* node->key contains IP:port or just IP. */
-char *ip_address = NULL;
+char *ip_address;
 uint16_t port;
 int addr_family;
 
-ip_address_and_port_from_lb_key(node->key, &ip_address, &port,
-&addr_family);
-if (!ip_address) {
+if (!ip_address_and_port_from_lb_key(node->key, &ip_address, &port,
+ &addr_family)) {
 continue;
 }
 
@@ -3156,13 +3155,12 @@ ovn_lb_create(struct northd_context *ctx, struct hmap 
*lbs,
 size_t n_vips = 0;
 
 SMAP_FOR_EACH (node, &nbrec_lb->vips) {
-char *vip = NULL;
+char *vip;
 uint16_t port;
 int addr_family;
 
-ip_address_and_port_from_lb_key(node->key, &vip, &port,
-&addr_family);
-if (!vip) {
+if (!ip_address_and_port_from_lb_key(node->key, &vip, &port,
+ &addr_family)) {
 continue;
 }
 
@@ -3206,10 +3204,9 @@ ovn_lb_create(struct northd_context *ctx, struct hmap 
*lbs,
 char *backend_ip;
 uint16_t backend_port;
 
-ip_address_and_port_from_lb_key(token, &backend_ip, &backend_port,
-&addr_family);
-
-if (!backend_ip) {
+if (!ip_address_and_port_from_lb_key(token, &backend_ip,
+ &backend_port,
+ &addr_family)) {
 continue;
 }
 
@@ -4682,8 +4679,10 @@ build_pre_acls(struct ovn_datapath *od, struct hmap 
*lflows)
 
 /* For a 'key' of the form "IP:port" or just "IP", sets 'port' and
  * 'ip_address'.  The caller must free() the memory allocated for
- * 'ip_address'. */
-static void
+ * 'ip_address'.
+ * Returns true if parsing of 'key' was successful, false otherwise.
+ */
+static bool
 ip_address_and_port_from_lb_key(const char *key, char **ip_address,
 uint16_t *port, int *addr_family)
 {
@@ -4692,16 +4691,18 @@ ip_address_and_port_from_lb_key(const char *key, char 
**ip_address,
 static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
 VLOG_WARN_RL(&rl, "bad ip address or port for load balancer key %s",
  key);
-return;
+*ip_address = NULL;
+*port = 0;
+*addr_family = 0;
+return false;
 }
 
 struct ds s = DS_EMPTY_INITIALIZER;
 ss_format_address_nobracks(&ss, &s);
 *ip_address = ds_steal_cstr(&s);
-
 *port = ss_get_port(&ss);
-
 *addr_family = ss.ss_family;
+return true;
 }
 
 /*
-- 
1.8.3.1

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


Re: [ovs-dev] [PATCH ovn v1] northd: Allow /64 after ipv6_prefix

2020-02-21 Thread Numan Siddique
On Fri, Feb 21, 2020 at 1:03 AM Russell Bryant  wrote:
>
> On Thu, Feb 20, 2020 at 10:46 AM Numan Siddique  wrote:
>
> > On Wed, Feb 19, 2020 at 9:27 PM Russell Bryant  wrote:
> > >
> > > We recently hit a bug in ovn-kubernetes, where I accidentally added
> > > /64 at the end of ipv6_prefix, to match the format we used for the
> > > subnet option for IPv4.  This was not allowed.
> > >
> > > This patch update ovn-northd to take the ipv6_prefix either with or
> > > without a trailing "/64".  It still enforces a /64 CIDR prefix length.
> > >
> > > A test case was updated to ensure that a prefix with "/64" is now
> > > accepted.
> > >
> > > Signed-off-by: Russell Bryant 
> >
> > With the below check patch warnings fixed
> >
> > Acked-by: Numan Siddique 
> >
> >
> Thanks!  I fixed the line length issues and pushed to master.

Hi Russell,
I applied this patch to branch-20.03.

Thanks
Numan

>
>
>
> > 
> > WARNING: Line is 82 characters long (recommended limit is 79)
> > #40 FILE: northd/ovn-northd.c:676:
> > VLOG_WARN_RL(&rl, "bad 'ipv6_prefix' %s: %s",
> > ipv6_prefix, error);
> >
> > WARNING: Line is 88 characters long (recommended limit is 79)
> > #48 FILE: northd/ovn-northd.c:684:
> > VLOG_WARN_RL(&rl, "bad 'ipv6_prefix' %s: must be
> > /64", ipv6_prefix);
> >
> > 
> >
> > Thanks
> > Numan
> >
> > > ---
> > >  northd/ovn-northd.c | 31 +--
> > >  tests/ovn.at|  4 +++-
> > >  2 files changed, 32 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> > > index 2580b4ec9..59d085aa9 100644
> > > --- a/northd/ovn-northd.c
> > > +++ b/northd/ovn-northd.c
> > > @@ -664,8 +664,35 @@ init_ipam_info_for_datapath(struct ovn_datapath *od)
> > >  const char *ipv6_prefix = smap_get(&od->nbs->other_config,
> > "ipv6_prefix");
> > >
> > >  if (ipv6_prefix) {
> > > -od->ipam_info.ipv6_prefix_set = ipv6_parse(
> > > -ipv6_prefix, &od->ipam_info.ipv6_prefix);
> > > +if (strstr(ipv6_prefix, "/")) {
> > > +/* If a prefix length was specified, it must be 64. */
> > > +struct in6_addr mask;
> > > +char *error
> > > += ipv6_parse_masked(ipv6_prefix,
> > > +&od->ipam_info.ipv6_prefix, &mask);
> > > +if (error) {
> > > +static struct vlog_rate_limit rl
> > > += VLOG_RATE_LIMIT_INIT(5, 1);
> > > +VLOG_WARN_RL(&rl, "bad 'ipv6_prefix' %s: %s",
> > ipv6_prefix, error);
> > > +free(error);
> > > +} else {
> > > +if (ipv6_count_cidr_bits(&mask) == 64) {
> > > +od->ipam_info.ipv6_prefix_set = true;
> > > +} else {
> > > +static struct vlog_rate_limit rl
> > > += VLOG_RATE_LIMIT_INIT(5, 1);
> > > +VLOG_WARN_RL(&rl, "bad 'ipv6_prefix' %s: must be
> > /64", ipv6_prefix);
> > > +}
> > > +}
> > > +} else {
> > > +od->ipam_info.ipv6_prefix_set = ipv6_parse(
> > > +ipv6_prefix, &od->ipam_info.ipv6_prefix);
> > > +if (!od->ipam_info.ipv6_prefix_set) {
> > > +static struct vlog_rate_limit rl
> > > += VLOG_RATE_LIMIT_INIT(5, 1);
> > > +VLOG_WARN_RL(&rl, "bad 'ipv6_prefix' %s", ipv6_prefix);
> > > +}
> > > +}
> > >  }
> > >
> > >  if (!subnet_str) {
> > > diff --git a/tests/ovn.at b/tests/ovn.at
> > > index 254645a3a..cbaa6d4a2 100644
> > > --- a/tests/ovn.at
> > > +++ b/tests/ovn.at
> > > @@ -12289,8 +12289,10 @@ ovn-nbctl set Logical_Switch ls1 \
> > >  other_config:subnet=10.1.0.0/24
> > other_config:ipv6_prefix="2001:db8:1::"
> > >  ovn-nbctl set Logical_Switch ls2 \
> > >  other_config:subnet=10.2.0.0/24
> > other_config:ipv6_prefix="2001:db8:2::"
> > > +
> > > +# A prefix length may be specified, but only if it is /64.
> > >  ovn-nbctl set Logical_Switch ls3 \
> > > -other_config:subnet=10.3.0.0/24
> > other_config:ipv6_prefix="2001:db8:3::"
> > > +other_config:subnet=10.3.0.0/24
> > other_config:ipv6_prefix="2001:db8:3::/64"
> > >
> > >  ovn-nbctl lsp-add ls1 lp1
> > >  ovn-nbctl lsp-add ls2 lp2
> > > --
> > > 2.24.1
> > >
> > > ___
> > > dev mailing list
> > > d...@openvswitch.org
> > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> > >
> >
> >
>
> --
> Russell Bryant
> ___
> 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] OVN 20.03.0 Release: Final call for patches

2020-02-21 Thread Numan Siddique
On Fri, Feb 21, 2020 at 1:50 PM Dumitru Ceara  wrote:
>
> On 2/21/20 1:06 AM, Han Zhou wrote:
> > On Thu, Feb 20, 2020 at 11:54 AM Mark Michelson  wrote:
> >>
> >> Hi everyone,
> >>
> >> We've had the OVN 20.03 branch created for a couple of weeks now, and
> >> we've seen some important issues found and fixed since then. Great job!
> >>
> >> As the branch becomes more stable, we look at the possibility of
> >> creating the 20.03.0 release. I think we can make it at the end of next
> >> week, 28 February.
> >>
> >> If there are any outstanding issues in the 20.03 branch that need
> >> addressing before the release of 20.03.0, please bring them up in reply
> >> to this thread. If you have patches that are targeted to 20.03.0 that
> >> have not been merged (or have been merged to master but have not been
> >> backported to 20.03) then please bring them up as well.
> >>
> >> Thanks,
> >> Mark Michelson
> >>
> >> ___
> >> dev mailing list
> >> d...@openvswitch.org
> >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> > Hi Mark,
> >
> > Requested by ovn-k8s team, the two patches need to be backported to 20.03:
> >
> > eb9a406 ovn-controller: Avoid adding neighbour flows for non-local
> > datapaths.
> > f896912 ovn-controller: Avoid creating patch port for non-local datapaths.
>
> Hi Han, Mark,
>
> ++ for backporting to 20.03. It's quite possible that ovn-monitor-all
> will be enabled to avoid conditional monitoring in ovsdb-server and
> these patches definitely improve CPU usage in ovn-controller.

Hi Mark,

I backported Russell's patch -"northd: Allow /64 after ipv6_prefix"  -
https://patchwork.ozlabs.org/patch/1240762/
to branch-20.03 as it's caused some issues with ovn-k8s.

Thanks
Numan

>
> Regards,
> Dumitru
>
> >
> > Please let me know if there is any concern.
> >
> > Thanks,
> > Han
> > ___
> > dev mailing list
> > d...@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] OVN 20.03.0 Release: Final call for patches

2020-02-21 Thread Dumitru Ceara
On 2/21/20 1:06 AM, Han Zhou wrote:
> On Thu, Feb 20, 2020 at 11:54 AM Mark Michelson  wrote:
>>
>> Hi everyone,
>>
>> We've had the OVN 20.03 branch created for a couple of weeks now, and
>> we've seen some important issues found and fixed since then. Great job!
>>
>> As the branch becomes more stable, we look at the possibility of
>> creating the 20.03.0 release. I think we can make it at the end of next
>> week, 28 February.
>>
>> If there are any outstanding issues in the 20.03 branch that need
>> addressing before the release of 20.03.0, please bring them up in reply
>> to this thread. If you have patches that are targeted to 20.03.0 that
>> have not been merged (or have been merged to master but have not been
>> backported to 20.03) then please bring them up as well.
>>
>> Thanks,
>> Mark Michelson
>>
>> ___
>> dev mailing list
>> d...@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 
> Hi Mark,
> 
> Requested by ovn-k8s team, the two patches need to be backported to 20.03:
> 
> eb9a406 ovn-controller: Avoid adding neighbour flows for non-local
> datapaths.
> f896912 ovn-controller: Avoid creating patch port for non-local datapaths.

Hi Han, Mark,

++ for backporting to 20.03. It's quite possible that ovn-monitor-all
will be enabled to avoid conditional monitoring in ovsdb-server and
these patches definitely improve CPU usage in ovn-controller.

Regards,
Dumitru

> 
> Please let me know if there is any concern.
> 
> Thanks,
> Han
> ___
> 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