Re: [ovs-dev] [PATCH v2 2/8] netdev-linux: initialize netns as invalid.

2017-12-04 Thread Flavio Leitner
On Fri, 1 Dec 2017 13:15:06 -0800
Ben Pfaff  wrote:

> On Thu, Nov 09, 2017 at 03:31:01PM -0200, Flavio Leitner wrote:
> > A port might be already in another netns, so initialize it
> > as invalid to force a state update.
> > 
> > Signed-off-by: Flavio Leitner   
> 
> This doesn't build for me:
> ../lib/netdev-linux.c:793:32: error: no member named 'netns' in 'struct 
> netdev_linux'

Yeah, it should have been after patch 3/8.
Based on your comments for the other patch, I think we don't need
this as a separate patch if I improve the documentation in the
sources.

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


Re: [ovs-dev] [PATCH v2 2/8] netdev-linux: initialize netns as invalid.

2017-12-01 Thread Ben Pfaff
On Thu, Nov 09, 2017 at 03:31:01PM -0200, Flavio Leitner wrote:
> A port might be already in another netns, so initialize it
> as invalid to force a state update.
> 
> Signed-off-by: Flavio Leitner 

This doesn't build for me:
../lib/netdev-linux.c:793:32: error: no member named 'netns' in 'struct 
netdev_linux'

Thanks,

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


[ovs-dev] [PATCH v2 2/8] netdev-linux: initialize netns as invalid.

2017-11-09 Thread Flavio Leitner
A port might be already in another netns, so initialize it
as invalid to force a state update.

Signed-off-by: Flavio Leitner 
---
 lib/netdev-linux.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 184822816..c31334ce1 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -788,6 +788,10 @@ netdev_linux_common_construct(struct netdev *netdev_)
 return EINVAL;
 }
 
+/* The device could be in the same network namespace or in another one.
+ * Initialize as invalid to force a state update. */
+netns_set_invalid(>netns);
+
 ovs_mutex_init(>mutex);
 return 0;
 }
-- 
2.13.6

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