Re: [ovs-dev] [PATCH 2/3] rtbsd: support RTM_IFANNOUNCE messages
On Tue, Jul 28, 2015 at 02:43:52PM -0300, Thadeu Lima de Souza Cascardo wrote: > On Tue, Jul 28, 2015 at 10:22:47AM -0700, Ben Pfaff wrote: > > On Tue, Jul 28, 2015 at 09:48:56AM -0300, Thadeu Lima de Souza Cascardo > > wrote: > > > On Mon, Jul 27, 2015 at 03:46:28PM -0700, Ben Pfaff wrote: > > > > On Mon, Jul 27, 2015 at 02:24:19PM -0300, Thadeu Lima de Souza Cascardo > > > > wrote: > > > > > When devices are created, they are announced using RTM_IFANNOUNCE > > > > > messages using > > > > > PF_ROUTE. > > > > > > > > > > Signed-off-by: Thadeu Lima de Souza Cascardo > > > > > > > > Do you know anyone who might be qualified to properly review this? It > > > > seems reasonable but I don't know this part of BSD at all. > > > > > > Maybe one of the guys who contributed some of the specific BSD code: > > > > > > Ed Maste contributed lib/route-table-bsd.c, and > > > Giuseppe Lettieri contributed lib/rtbsd.c. > > > > > > I am cc'ing them on this message, and bouncing the patch to them as well. > > > > > > What about the style? Is it OK to read using struct if_msghdr, then cast > > > to > > > struct if_announcemsghdr? From my tests, this works fine, the RAW socket > > > seems > > > to work like a DGRAM socket in this particular case. > > > > Doesn't the compiler complain about that without a cast? > > Good point. I thought there was a cast already there. Fixed. I was pointing > out > to the assumption that one message is larger than the other. I don't think > this > is a problem in this particular case. if_msghdr has a struct at the end, which > stores a lot of stats, and all the other earlier members of both if_msghdr and > if_announcemsghdr are of types that don't have different sizes on different > supported architectures, AFAIK. I know almost nothing about *BSD. This is a kind of undefined behavior that one can normally get away with. Let's give Ed and Giuseppe a day or two to take a look, and if we don't hear back from them then I'll consider this good enough. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 2/3] rtbsd: support RTM_IFANNOUNCE messages
On Tue, Jul 28, 2015 at 10:22:47AM -0700, Ben Pfaff wrote: > On Tue, Jul 28, 2015 at 09:48:56AM -0300, Thadeu Lima de Souza Cascardo wrote: > > On Mon, Jul 27, 2015 at 03:46:28PM -0700, Ben Pfaff wrote: > > > On Mon, Jul 27, 2015 at 02:24:19PM -0300, Thadeu Lima de Souza Cascardo > > > wrote: > > > > When devices are created, they are announced using RTM_IFANNOUNCE > > > > messages using > > > > PF_ROUTE. > > > > > > > > Signed-off-by: Thadeu Lima de Souza Cascardo > > > > > > Do you know anyone who might be qualified to properly review this? It > > > seems reasonable but I don't know this part of BSD at all. > > > > Maybe one of the guys who contributed some of the specific BSD code: > > > > Ed Maste contributed lib/route-table-bsd.c, and > > Giuseppe Lettieri contributed lib/rtbsd.c. > > > > I am cc'ing them on this message, and bouncing the patch to them as well. > > > > What about the style? Is it OK to read using struct if_msghdr, then cast to > > struct if_announcemsghdr? From my tests, this works fine, the RAW socket > > seems > > to work like a DGRAM socket in this particular case. > > Doesn't the compiler complain about that without a cast? Good point. I thought there was a cast already there. Fixed. I was pointing out to the assumption that one message is larger than the other. I don't think this is a problem in this particular case. if_msghdr has a struct at the end, which stores a lot of stats, and all the other earlier members of both if_msghdr and if_announcemsghdr are of types that don't have different sizes on different supported architectures, AFAIK. I know almost nothing about *BSD. Cascardo. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 2/3] rtbsd: support RTM_IFANNOUNCE messages
On Tue, Jul 28, 2015 at 09:48:56AM -0300, Thadeu Lima de Souza Cascardo wrote: > On Mon, Jul 27, 2015 at 03:46:28PM -0700, Ben Pfaff wrote: > > On Mon, Jul 27, 2015 at 02:24:19PM -0300, Thadeu Lima de Souza Cascardo > > wrote: > > > When devices are created, they are announced using RTM_IFANNOUNCE > > > messages using > > > PF_ROUTE. > > > > > > Signed-off-by: Thadeu Lima de Souza Cascardo > > > > Do you know anyone who might be qualified to properly review this? It > > seems reasonable but I don't know this part of BSD at all. > > Maybe one of the guys who contributed some of the specific BSD code: > > Ed Maste contributed lib/route-table-bsd.c, and > Giuseppe Lettieri contributed lib/rtbsd.c. > > I am cc'ing them on this message, and bouncing the patch to them as well. > > What about the style? Is it OK to read using struct if_msghdr, then cast to > struct if_announcemsghdr? From my tests, this works fine, the RAW socket seems > to work like a DGRAM socket in this particular case. Doesn't the compiler complain about that without a cast? ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 2/3] rtbsd: support RTM_IFANNOUNCE messages
On Mon, Jul 27, 2015 at 03:46:28PM -0700, Ben Pfaff wrote: > On Mon, Jul 27, 2015 at 02:24:19PM -0300, Thadeu Lima de Souza Cascardo wrote: > > When devices are created, they are announced using RTM_IFANNOUNCE messages > > using > > PF_ROUTE. > > > > Signed-off-by: Thadeu Lima de Souza Cascardo > > Do you know anyone who might be qualified to properly review this? It > seems reasonable but I don't know this part of BSD at all. Maybe one of the guys who contributed some of the specific BSD code: Ed Maste contributed lib/route-table-bsd.c, and Giuseppe Lettieri contributed lib/rtbsd.c. I am cc'ing them on this message, and bouncing the patch to them as well. What about the style? Is it OK to read using struct if_msghdr, then cast to struct if_announcemsghdr? From my tests, this works fine, the RAW socket seems to work like a DGRAM socket in this particular case. Cascardo. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 2/3] rtbsd: support RTM_IFANNOUNCE messages
On Mon, Jul 27, 2015 at 02:24:19PM -0300, Thadeu Lima de Souza Cascardo wrote: > When devices are created, they are announced using RTM_IFANNOUNCE messages > using > PF_ROUTE. > > Signed-off-by: Thadeu Lima de Souza Cascardo Do you know anyone who might be qualified to properly review this? It seems reasonable but I don't know this part of BSD at all. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev