Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-26 Thread Ben Pfaff
Thank you. I applied this to master, adding the following NEWS entry: - FreeBSD is now a supported platform, thanks to code contributions from Gaetano Catalli, Ed Maste, and Giuseppe Lettieri. On Wed, Jul 25, 2012 at 11:21:07PM +0200, Giuseppe Lettieri wrote: > here is the new revision

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-25 Thread Ben Pfaff
On Wed, Jul 25, 2012 at 01:38:51PM -0400, Ed Maste wrote: > > This looks good to me, thanks. I'll assume that you'll fold this into > > your larger patch when it's ready. > > Yes, I just wanted to offer this part up for comment first (and also > because git-format-patch shows it as a delete and a

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-25 Thread Ed Maste
> This looks good to me, thanks. I'll assume that you'll fold this into > your larger patch when it's ready. Yes, I just wanted to offer this part up for comment first (and also because git-format-patch shows it as a delete and add so the changes themselves are not as obvious). > BSD make is sup

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-25 Thread Ben Pfaff
On Wed, Jul 25, 2012 at 11:12:37AM -0400, Ed Maste wrote: > > Do you want to add an INSTALL.FreeBSD or similar file at top level? > > Feel free to copy any applicable text from INSTALL.Linux. Or, if you > > think it's better, please feel free to edit INSTALL.Linux to include > > FreeBSD instructio

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-25 Thread Ed Maste
> Do you want to add an INSTALL.FreeBSD or similar file at top level? > Feel free to copy any applicable text from INSTALL.Linux. Or, if you > think it's better, please feel free to edit INSTALL.Linux to include > FreeBSD instructions also, and then we can rename it to just INSTALL. The combinati

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-24 Thread Ben Pfaff
On Tue, Jul 24, 2012 at 04:11:15PM +0200, Giuseppe Lettieri wrote: > Il 19/07/2012 20:20, Ed Maste ha scritto: > >>It would be a good idea to update netdev_bsd_send() to fix the issue > >>>mentioned by the comment: > >>> > >>> /* XXX should support sending even if 'ethertype' was > >>> NETDEV_

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-24 Thread Giuseppe Lettieri
Il 19/07/2012 20:20, Ed Maste ha scritto: It would be a good idea to update netdev_bsd_send() to fix the issue >mentioned by the comment: > > /* XXX should support sending even if 'ethertype' was NETDEV_ETH_TYPE_NONE. > */ > >because according to commit 76c308b50d (netdev-linux: Support

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-19 Thread Ben Pfaff
On Thu, Jul 19, 2012 at 02:20:08PM -0400, Ed Maste wrote: > > It's a little sad that the pcap architecture means that we have to do > > an extra copy of the packet. > > Yes. With more significant changes to the overall netdev datapath we > could eventually eliminate these copies, but for now we'r

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-19 Thread Ed Maste
> The PCAP_SNAPLEN of 1024 surprises me. Wouldn't you want at least > 1500, so that you can capture full Ethernet frames? (Maybe 1514 or > 1518? I don't know whether the snaplen includes the Ethernet and VLAN > headers.) Yes, this appears to be an oversight. 1518 is probably reasonable. > In

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-16 Thread Ben Pfaff
On Mon, Jul 16, 2012 at 10:27:53AM -0400, Ed Maste wrote: > > In FreeBSD, do you intend to add the equivalent filter rules > > automatically somewhere? Or to document that it is necessary and that > > the administrator should do so by hand? If the former, then let's > > figure out a good mechanis

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-16 Thread Ed Maste
> In FreeBSD, do you intend to add the equivalent filter rules > automatically somewhere? Or to document that it is necessary and that > the administrator should do so by hand? If the former, then let's > figure out a good mechanism to hook in. Perhaps we should add a pair > of "netdev" function

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-12 Thread Ben Pfaff
On Thu, Jul 12, 2012 at 08:07:08PM +0200, Giuseppe Lettieri wrote: > On 10/07/2012 18:08, Ben Pfaff wrote: > >On Tue, Jul 10, 2012 at 09:23:05AM -0400, Ed Maste wrote: > It isn't clear to me though why the Linux userspace mode does not behave > the same way though. I had a (very) brief loo

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-12 Thread Giuseppe Lettieri
On 10/07/2012 18:08, Ben Pfaff wrote: On Tue, Jul 10, 2012 at 09:23:05AM -0400, Ed Maste wrote: It isn't clear to me though why the Linux userspace mode does not behave the same way though. I had a (very) brief look at the way PF_PACKET is handled in Linux and it seemed like the packet would st

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-12 Thread Ben Pfaff
On Wed, Jul 11, 2012 at 10:36:20AM +0200, Giuseppe Lettieri wrote: > > Do you want to add an INSTALL.FreeBSD or similar file at top level? > > Feel free to copy any applicable text from INSTALL.Linux. Or, if you > > think it's better, please feel free to edit INSTALL.Linux to include > > FreeBSD i

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-11 Thread Giuseppe Lettieri
Thanks Ben, all of your comments look sensible and useful to me. I add some reply below. Il 11/07/2012 01:59, Ben Pfaff ha scritto: > Thanks. > > Would you mind updating NOTICE and debian/copyright.in to mention the > license on the new contribution? > Sure. > Do you want to add an INSTALL.Fre

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-10 Thread Ben Pfaff
On Tue, Jul 10, 2012 at 03:22:00PM +0200, Giuseppe Lettieri wrote: > here is a new version of the FreeBSD porting patch, signed-off by Catalli. > > W.r.t. the previous patch, I only replaced a printf with a VLOG_WARN_RL > and declared a COVERAGE counter (as suggest by Ben below), and removed > som

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-10 Thread Ben Pfaff
On Tue, Jul 10, 2012 at 09:23:05AM -0400, Ed Maste wrote: > >> It isn't clear to me though why the Linux userspace mode does not behave > >> the same way though. I had a (very) brief look at the way PF_PACKET is > >> handled in Linux and it seemed like the packet would still be passed up > >> the

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-10 Thread Ed Maste
>> It isn't clear to me though why the Linux userspace mode does not behave >> the same way though. I had a (very) brief look at the way PF_PACKET is >> handled in Linux and it seemed like the packet would still be passed up >> the stack -- there must be something else that I'm missing. > > Linux

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-10 Thread Giuseppe Lettieri
Hi, here is a new version of the FreeBSD porting patch, signed-off by Catalli. W.r.t. the previous patch, I only replaced a printf with a VLOG_WARN_RL and declared a COVERAGE counter (as suggest by Ben below), and removed some trailing white space to make git-apply happy. Regards, Giuseppe Il

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-09 Thread Ben Pfaff
On Fri, Jul 06, 2012 at 09:51:12PM -0400, Ed Maste wrote: > A packet received by em0 is intercepted by BPF and delivered to Open > vSwitch via libpcap. Open vSwitch delivers it to the tap device, and > the stack then gets copies from both em0 and br0. This can be addressed > by a firewall rule to

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-06 Thread Ed Maste
On 6 July 2012 08:59, Giuseppe Lettieri wrote: > Hi, > > the attached patch implements new netdev classes for "system" and "tap" > devices in FreeBSD, by using the libpcap library. With this patch (and > some firewall rules) the user-level datapath of Open vSwitch can be made > to work on FreeBSD.

Re: [ovs-dev] [PATCH] netdev implementation for FreeBSD

2012-07-06 Thread Ben Pfaff
On Fri, Jul 06, 2012 at 02:59:05PM +0200, Giuseppe Lettieri wrote: > the attached patch implements new netdev classes for "system" and "tap" > devices in FreeBSD, by using the libpcap library. With this patch (and > some firewall rules) the user-level datapath of Open vSwitch can be made > to work