On Thu, Nov 09, 2017 at 03:31:00PM -0200, Flavio Leitner wrote: > The netlink notification's ancillary data contains the network > namespace id (netnsid) needed to identify the device correctly. > (ifindex and netnsid). > > Signed-off-by: Flavio Leitner <[email protected]> > --- > > ChangeLog: > * V2 > - report and close unexpected file descriptors.
Thanks for working on improving OVS support for network namespaces. This work is long overdue (Jiri talked about it over two years ago at ovscon) and I am happy to see progress. netns.h uses a struct to represent a network namespace. I am not sure yet whether that is necessary. It seems like a network namespace is a lot like a process ID: I think that only 0...INT_MAX is actually used. If so, then I believe that we could use just an "int", with -1 and -2 to represent the "local" and "invalid" values. Then, wouldn't many of the operations be simply natural C operators? I admit that I don't understand the special cases for NETNS_INVALID; maybe the code should document the intended semantics for NETNS_INVALID in the comments. I think that the 'ns' parameter to nl_sock_recv() receives the network namespace from which the message was sent. It might be worth saying that in the function comment; just saying "the network namespace information" leaves the reader to guess. Thanks, Ben. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
