Re: [ovs-dev] [PATCH] netlink-socket: Fix broken build on Windows

2018-04-03 Thread aserdean
> -Mesaj original-
> De la: ovs-dev-boun...@openvswitch.org  boun...@openvswitch.org> În numele Ben Pfaff
> Trimis: Monday, April 2, 2018 7:35 PM
> Către: Alin Gabriel Serdean <aserd...@ovn.org>
> Cc: d...@openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH] netlink-socket: Fix broken build on Windows
> 
> On Mon, Apr 02, 2018 at 02:24:36PM +0300, Alin Gabriel Serdean wrote:
> > Skip network namespace id check on windows since we lack support and
> > integration for their equivalent at the moment.
> >
> > Signed-off-by: Alin Gabriel Serdean <aserd...@ovn.org>
> 
> I find myself wondering whether this should be:
> 
> diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index
> f3cce9314ebb..5234ca314008 100644
> --- a/lib/netlink-socket.c
> +++ b/lib/netlink-socket.c
> @@ -747,6 +747,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf
> *buf, int *nsid, bool wait)
>   * namespace (no id). Latest kernels return a valid ID only if
>   * available or nothing. */
>  netnsid_set_local(nsid);
> +#ifndef _WIN32
>  cmsg = CMSG_FIRSTHDR();
>  while (cmsg != NULL) {
>  if (cmsg->cmsg_level == SOL_NETLINK @@ -771,6 +772,7 @@
> nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool
wait)
> 
>  cmsg = CMSG_NXTHDR(, cmsg);
>  }
> +#endif
>  }
> 
>  log_nlmsg(__func__, 0, buf->data, buf->size, sock->protocol);
> 
> so that *nsid gets initialized if nonnull.
> 
> Once you decided either way:
> 
> Acked-by: Ben Pfaff <b...@ovn.org>
Thanks for the suggestion Ben. You are right, I didn't notice the
initialization part.

I folded in the comments and applied it on master.

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


[ovs-dev] [PATCH] netlink-socket: Fix broken build on Windows

2018-04-02 Thread Alin Gabriel Serdean
Skip network namespace id check on windows since we lack support
and integration for their equivalent at the moment.

Signed-off-by: Alin Gabriel Serdean 
---
 lib/netlink-socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index f3cce9314..699456e21 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
@@ -738,7 +738,6 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, 
int *nsid, bool wait)
 COVERAGE_INC(netlink_recv_jumbo);
 ofpbuf_put(buf, tail, retval - buf->allocated);
 }
-#endif
 
 if (nsid) {
 /* The network namespace id from which the message was sent comes
@@ -772,6 +771,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, 
int *nsid, bool wait)
 cmsg = CMSG_NXTHDR(, cmsg);
 }
 }
+#endif
 
 log_nlmsg(__func__, 0, buf->data, buf->size, sock->protocol);
 COVERAGE_INC(netlink_received);
-- 
2.16.1.windows.1

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