Re: [ovs-dev] [PATCH] daemon: Avoid the link() syscall.

2012-11-16 Thread Ethan Jackson
Yeah I was surprised you hadn't mentioned it, so I tested it pretty thoroughly. I'm confident that it works. This stuff is tricky though so we'll see how it goes. Thanks for the review, I'll push this soon. Ethan On Fri, Nov 16, 2012 at 8:40 PM, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 05

[ovs-dev] COCA COLA UK November Draw

2012-11-16 Thread COCA-COLA EMAIL AWARD
You just won 750,000 pounds in COCA COLA UK November Draw. To Receive your Prize, Send: Name,Address,Age,Phone Number to Email: ccunit...@live.com ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] COCA COLA UK November Draw

2012-11-16 Thread COCA-COLA EMAIL AWARD
You just won 750,000 pounds in COCA COLA UK November Draw. To Receive your Prize, Send: Name,Address,Age,Phone Number to Email: ccunit...@live.com You just won 750,000 pounds in COCA COLA UK November Draw. To Receive your Prize, Send: Name,Address,Age,Phone Number to Email: ccunit...

Re: [ovs-dev] [PATCH] daemon: Avoid the link() syscall.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 05:26:52PM -0800, Ethan Jackson wrote: > Here's an incremental. Looks good to me. I wasn't sure at first whether a+ mode would work, but after thinking about it for a minute I guess there's no reason to believe it won't. Thanks, Ben. _

Re: [ovs-dev] [PATCH] daemon: Avoid the link() syscall.

2012-11-16 Thread Ethan Jackson
Here's an incremental. --- lib/daemon.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/daemon.c b/lib/daemon.c index da09eed..25f2db7 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -185,7 +185,7 @@ make_pidfile(void) tmpfile = xasprintf("

Re: [ovs-dev] [PATCH] daemon: Avoid the link() syscall.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 02:52:48PM -0800, Ethan Jackson wrote: > > I don't see why we're scheduling tmpfile to get deleted on exit. We're > > about to rename it away to pidfile. After we do that, someone else may > > come along and newly create a file with that name and lock it on the way > > to

[ovs-dev] COCA COLA UK November Draw

2012-11-16 Thread COCA-COLA EMAIL AWARD
You just won 750,000 pounds in COCA COLA UK November Draw. To Receive your Prize, Send: Name,Address,Age,Phone Number to Email: ccunit...@live.com You just won 750,000 pounds in COCA COLA UK November Draw. To Receive your Prize, Send: Name,Address,Age,Phone Number to Email: ccunit...

Re: [ovs-dev] [PATCH] daemon: Avoid the link() syscall.

2012-11-16 Thread Ethan Jackson
> I think that passing "w+" as the mode to fopen() is now a mistake, > because it will cause us to truncate an existing file to zero length. > That's bad if some other process already opened the file and obtained a > lock on it, because we just erased its pid. > Good catch, thanks. I'll work some

[ovs-dev] [PATCH v2] datapath: Add support for VXLAN tunnels to Open vSwitch

2012-11-16 Thread Kyle Mestery
Add support for VXLAN tunnels to Open vSwitch. Add support for setting the destination UDP port on a per-port basis. This is done by adding a "dst_port" parameter to the port configuration. This is only applicable currently to VXLAN tunnels. The only change in this version of the patch is around t

Re: [ovs-dev] VXLAN source port hashing performance problems

2012-11-16 Thread Kyle Mestery (kmestery)
On Nov 16, 2012, at 3:31 PM, Kyle Mestery (kmestery) wrote: > On Nov 16, 2012, at 3:18 PM, Jesse Gross wrote: >> On Fri, Nov 16, 2012 at 1:00 PM, Kyle Mestery (kmestery) >> wrote: >>> On Nov 15, 2012, at 3:32 PM, Kyle Mestery (kmestery) >>> wrote: On Nov 15, 2012, at 3:13 PM, Kyle Mestery

Re: [ovs-dev] [PATCH] CodingStyle: Fix indentation.

2012-11-16 Thread Ben Pfaff
Occasionally when I've found it hard to read I'll put the { down a line, like this: if (!isdigit((unsigned char)s[0]) || !isdigit((unsigned char)s[1]) || !isdigit((unsigned char)s[2])) { printf("string %s does not start with 3-digit code\n", s); } I'd be open t

Re: [ovs-dev] [PATCH v4 4/9] net: openvswitch: use this_cpu_ptr per-cpu helper

2012-11-16 Thread Jesse Gross
On Fri, Nov 16, 2012 at 12:35 AM, Shan Wei wrote: > Shan Wei said, at 2012/11/13 9:52: >> From: Shan Wei >> >> just use more faster this_cpu_ptr instead of per_cpu_ptr(p, >> smp_processor_id()); >> >> >> Signed-off-by: Shan Wei >> Reviewed-by: Christoph Lameter > > Jesse Gross, would you like

Re: [ovs-dev] VXLAN source port hashing performance problems

2012-11-16 Thread Kyle Mestery (kmestery)
On Nov 16, 2012, at 3:18 PM, Jesse Gross wrote: > On Fri, Nov 16, 2012 at 1:00 PM, Kyle Mestery (kmestery) > wrote: >> On Nov 15, 2012, at 3:32 PM, Kyle Mestery (kmestery) >> wrote: >>> On Nov 15, 2012, at 3:13 PM, Kyle Mestery (kmestery) >>> wrote: On Nov 15, 2012, at 1:03 PM, Kyle Mest

Re: [ovs-dev] VXLAN source port hashing performance problems

2012-11-16 Thread Jesse Gross
On Fri, Nov 16, 2012 at 1:00 PM, Kyle Mestery (kmestery) wrote: > On Nov 15, 2012, at 3:32 PM, Kyle Mestery (kmestery) > wrote: >> On Nov 15, 2012, at 3:13 PM, Kyle Mestery (kmestery) >> wrote: >>> On Nov 15, 2012, at 1:03 PM, Kyle Mestery (kmestery) >>> wrote: Jesse: I modifi

Re: [ovs-dev] VXLAN source port hashing performance problems

2012-11-16 Thread Kyle Mestery (kmestery)
On Nov 15, 2012, at 3:32 PM, Kyle Mestery (kmestery) wrote: > On Nov 15, 2012, at 3:13 PM, Kyle Mestery (kmestery) > wrote: >> On Nov 15, 2012, at 1:03 PM, Kyle Mestery (kmestery) >> wrote: >>> Jesse: >>> >>> I modified the source port hashing for the VXLAN patch I submitted a few >>> days a

Re: [ovs-dev] [PATCHv2] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Justin Pettit
On Fri, Nov 16, 2012 at 12:19 PM, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 12:00:05PM -0800, Justin Pettit wrote: > > Commit acf608 (ofproto-dpif: Use a single underlying datapath across > > multiple bridges.) causes datapath flows from deleted ports to not be > > removed. The issue is that th

Re: [ovs-dev] [cleanups 12/12] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:01:13PM -0800, Justin Pettit wrote: > On Nov 16, 2012, at 11:24 AM, Ben Pfaff wrote: > > > I don't think memory issues are a real consideration here. The common > > case is exactly one subfacet per facet. So I would do whichever you > > think makes more logical sense.

Re: [ovs-dev] [PATCHv2] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:00:05PM -0800, Justin Pettit wrote: > Commit acf608 (ofproto-dpif: Use a single underlying datapath across > multiple bridges.) causes datapath flows from deleted ports to not be > removed. The issue is that the code that bulk deletes old flows doesn't > know the datapat

Re: [ovs-dev] [cleanups 12/12] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Justin Pettit
On Nov 16, 2012, at 11:24 AM, Ben Pfaff wrote: > I don't think memory issues are a real consideration here. The common > case is exactly one subfacet per facet. So I would do whichever you > think makes more logical sense. I think the subfacet is logically > a better location, but I can live w

[ovs-dev] [PATCHv2] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Justin Pettit
Commit acf608 (ofproto-dpif: Use a single underlying datapath across multiple bridges.) causes datapath flows from deleted ports to not be removed. The issue is that the code that bulk deletes old flows doesn't know the datapath port number that makes up the datapath flow definition. This commit

Re: [ovs-dev] [PATCH] CodingStyle: Fix indentation.

2012-11-16 Thread Justin Pettit
Okay, I find that style hard to read with "if" blocks, but I'm sure I'll get used to it. I'll update my patch to use that style. --Justin On Nov 16, 2012, at 11:39 AM, Ben Pfaff wrote: > Hmm, the indentation looks different from what I expect in your quote > below. (It looks OK to me in the

Re: [ovs-dev] [PATCH] openvswitch: Make IPv6 packet parsing dependent on IPv6 config

2012-11-16 Thread Vlad Yasevich
On 11/16/2012 01:53 PM, David Miller wrote:> From: Jesse Gross > Date: Fri, 16 Nov 2012 10:46:17 -0800 > >> I guess the simplest thing to do seems to just make Open vSwitch >> depend on CONFIG_INET seeing as it is practically useless without >> upper layer protocol support anyways. > > The reas

Re: [ovs-dev] [PATCH] CodingStyle: Fix indentation.

2012-11-16 Thread Ben Pfaff
Hmm, the indentation looks different from what I expect in your quote below. (It looks OK to me in the original message I posted.) Here's another look at the style I've always used in OVS, and that I am suggesting to use in CodingStyle, with leading spaces replaced by underscores in case somethin

Re: [ovs-dev] [cleanups 09/12] bridge: Always "up" internal devices.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 10:49:39AM -0800, Justin Pettit wrote: > On Nov 16, 2012, at 9:54 AM, Ben Pfaff wrote: > > > On Fri, Nov 16, 2012 at 12:03:02AM -0800, Justin Pettit wrote: > >> The kernel datapath automatically "up"s internal devices, but this > >> wasn't happening for the userspace datap

Re: [ovs-dev] [cleanups 12/12] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 10:46:57AM -0800, Justin Pettit wrote: > > On Nov 16, 2012, at 10:18 AM, Ben Pfaff wrote: > > > On Fri, Nov 16, 2012 at 12:03:05AM -0800, Justin Pettit wrote: > >> Commit acf608 (ofproto-dpif: Use a single underlying datapath across > >> multiple bridges.) causes datapath

Re: [ovs-dev] [PATCH] CodingStyle: Fix indentation.

2012-11-16 Thread Justin Pettit
So you're preferred style is for continued if statements to have one space in from the code block? I'm fine with it, but just want to confirm. --Justin On Nov 16, 2012, at 11:19 AM, Ben Pfaff wrote: > This got changed away from what I actually prefer in commit be2c418b73fc > (Cleanup isdigit

Re: [ovs-dev] [PATCH] CodingStyle: Fix indentation.

2012-11-16 Thread Kyle Mestery (kmestery)
On Nov 16, 2012, at 1:19 PM, Ben Pfaff wrote: > This got changed away from what I actually prefer in commit be2c418b73fc > (Cleanup isdigit() warnings.). > > Signed-off-by: Ben Pfaff Acked-by: Kyle Mestery ___ dev mailing list dev@openvswitch.org ht

[ovs-dev] [PATCH] CodingStyle: Fix indentation.

2012-11-16 Thread Ben Pfaff
This got changed away from what I actually prefer in commit be2c418b73fc (Cleanup isdigit() warnings.). Signed-off-by: Ben Pfaff --- CodingStyle |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodingStyle b/CodingStyle index b0aeb4e..ee7a0e6 100644 --- a/CodingStyle ++

Re: [ovs-dev] [PATCH] daemon: Avoid the link() syscall.

2012-11-16 Thread Ben Pfaff
On Wed, Nov 14, 2012 at 06:43:50PM -0800, Ethan Jackson wrote: > make_pidfile() depends on the link() system call to atomically > create pidfiles when multiple daemons are started concurrently. > However, this system call isn't available on ESX so an alternative > strategy is necessary. Fortunatel

Re: [ovs-dev] [PATCH] openvswitch: Make IPv6 packet parsing dependent on IPv6 config

2012-11-16 Thread David Miller
From: Jesse Gross Date: Fri, 16 Nov 2012 10:46:17 -0800 > I guess the simplest thing to do seems to just make Open vSwitch > depend on CONFIG_INET seeing as it is practically useless without > upper layer protocol support anyways. The reason we have the ipv6 extension header parsing in a seperat

Re: [ovs-dev] [cleanups 09/12] bridge: Always "up" internal devices.

2012-11-16 Thread Justin Pettit
On Nov 16, 2012, at 9:54 AM, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 12:03:02AM -0800, Justin Pettit wrote: >> The kernel datapath automatically "up"s internal devices, but this >> wasn't happening for the userspace datapath. This change has the bridge >> module always "up" them. >> >> Signe

Re: [ovs-dev] [cleanups 12/12] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Justin Pettit
On Nov 16, 2012, at 10:18 AM, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 12:03:05AM -0800, Justin Pettit wrote: >> Commit acf608 (ofproto-dpif: Use a single underlying datapath across >> multiple bridges.) causes datapath flows from deleted ports to not be >> removed. The issue is that the code

Re: [ovs-dev] [PATCH] openvswitch: Make IPv6 packet parsing dependent on IPv6 config

2012-11-16 Thread Jesse Gross
On Fri, Nov 16, 2012 at 9:43 AM, Vlad Yasevich wrote: > On 11/16/2012 12:26 PM, Jesse Gross wrote: >> >> On Fri, Nov 16, 2012 at 7:40 AM, Vlad Yasevich >> wrote: >> >>> Openvswitch attempts to use IPv6 packet parsing functions without >>> any dependency on IPv6 (unlike every other place in kernel

Re: [ovs-dev] [cleanups 08/12] bridge: Introduce iface_is_internal() function.

2012-11-16 Thread Justin Pettit
On Nov 16, 2012, at 9:51 AM, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 12:03:01AM -0800, Justin Pettit wrote: >> This will have an additional caller in the future. >> >> Signed-off-by: Justin Pettit > > I would think it more natural to write this: > >if (!strcmp(iface->type, "internal")

Re: [ovs-dev] [cleanups 07/12] ofproto-dpif: Query port existence by name to prevent warnings.

2012-11-16 Thread Justin Pettit
On Nov 16, 2012, at 9:49 AM, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 12:03:00AM -0800, Justin Pettit wrote: >> The port_destruct() function checks if the port still exists in the >> datapath to see if additional cleanup is necessary. It used >> dpif_port_query_by_number(), since the datapath

Re: [ovs-dev] [cleanups 03/12] Add functions to determine how port should be opened based on type.

2012-11-16 Thread Justin Pettit
On Nov 16, 2012, at 10:21 AM, Ben Pfaff wrote: > It might still be improved, perhaps, because "how" seems awfully vague > to me. Maybe: > >Returns the type to pass to netdev_open() when a dpif of class >'dpif_class' has a port of type 'type', for a few special cases when >a netdev t

Re: [ovs-dev] [PATCH 2/2] ovs-save: Set ofport_request while saving flows.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 10:06:05AM -0800, Gurucharan Shetty wrote: > On Fri, Nov 16, 2012 at 9:16 AM, Ben Pfaff wrote: > > > [adding ovs-dev back, I hope that's OK--I don't see anything private > > here] > > > > On Thu, Nov 15, 2012 at 05:29:57PM -0800, Gurucharan Shetty wrote: > > > On Wed, Nov

Re: [ovs-dev] [cleanups 03/12] Add functions to determine how port should be opened based on type.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 10:14:52AM -0800, Justin Pettit wrote: > On Fri, Nov 16, 2012 at 9:40 AM, Ben Pfaff wrote: > > > On Fri, Nov 16, 2012 at 12:02:56AM -0800, Justin Pettit wrote: > > > Depending on the port and type of datapath, a port may need to be opened > > > as a different type of devic

Re: [ovs-dev] [cleanups 12/12] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:03:05AM -0800, Justin Pettit wrote: > Commit acf608 (ofproto-dpif: Use a single underlying datapath across > multiple bridges.) causes datapath flows from deleted ports to not be > removed. The issue is that the code that bulk deletes old flows doesn't > know the datapat

Re: [ovs-dev] [cleanups 01/12] dpif-netdev: Don't special-case "br" bridges in create_dp_netdev().

2012-11-16 Thread Justin Pettit
On Nov 16, 2012, at 9:28 AM, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 12:02:54AM -0800, Justin Pettit wrote: >> With a single datapath, we no longer need to special case bridges >> beginning with "br*" for testing, since all bridges are netdev-based >> bridges are named "ovs-netdev". This rem

Re: [ovs-dev] [cleanups 03/12] Add functions to determine how port should be opened based on type.

2012-11-16 Thread Justin Pettit
On Fri, Nov 16, 2012 at 9:40 AM, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 12:02:56AM -0800, Justin Pettit wrote: > > Depending on the port and type of datapath, a port may need to be opened > > as a different type of device than it's configured. For example, an > > "internal" port on a "dummy"

Re: [ovs-dev] [cleanups 11/12] netdev-linux: Don't log vport warnings when kernel datapath not loaded.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:03:04AM -0800, Justin Pettit wrote: > The *_get_stats functions call get_stats_via_vport(), which tries to get > information about ports attached to the kernel datapath. When a pure > userspace switch is used (eg, the OVS kernel module isn't loaded), ports > are not atta

Re: [ovs-dev] [cleanups 10/12] netdev-linux: "Down" tap devices before setting hw addr.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:03:03AM -0800, Justin Pettit wrote: > On Linux, it is not possible to set the mac address on "up" tap > interfaces. This commit temporarily "down"s the interface so the > address can be set for the netdev_linux_set_etheraddr() call. > > Signed-off-by: Justin Pettit Lo

Re: [ovs-dev] [PATCH 2/2] ovs-save: Set ofport_request while saving flows.

2012-11-16 Thread Gurucharan Shetty
On Fri, Nov 16, 2012 at 9:16 AM, Ben Pfaff wrote: > [adding ovs-dev back, I hope that's OK--I don't see anything private > here] > > On Thu, Nov 15, 2012 at 05:29:57PM -0800, Gurucharan Shetty wrote: > > On Wed, Nov 14, 2012 at 10:02 AM, Ben Pfaff wrote: > > > > > On Tue, Nov 06, 2012 at 11:11:3

Re: [ovs-dev] [cleanups 09/12] bridge: Always "up" internal devices.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:03:02AM -0800, Justin Pettit wrote: > The kernel datapath automatically "up"s internal devices, but this > wasn't happening for the userspace datapath. This change has the bridge > module always "up" them. > > Signed-off-by: Justin Pettit Seems reasonable, thanks. Th

Re: [ovs-dev] [cleanups 08/12] bridge: Introduce iface_is_internal() function.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:03:01AM -0800, Justin Pettit wrote: > This will have an additional caller in the future. > > Signed-off-by: Justin Pettit I would think it more natural to write this: if (!strcmp(iface->type, "internal") || !strcmp(iface->name, br->name)) { return true;

Re: [ovs-dev] [cleanups 07/12] ofproto-dpif: Query port existence by name to prevent warnings.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:03:00AM -0800, Justin Pettit wrote: > The port_destruct() function checks if the port still exists in the > datapath to see if additional cleanup is necessary. It used > dpif_port_query_by_number(), since the datapath port number is readily > available and cheap to use a

Re: [ovs-dev] [cleanups 06/12] dpif: Don't log warning for ENOENT with dpif_port_exists().

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:02:59AM -0800, Justin Pettit wrote: > Signed-off-by: Justin Pettit It seems fine, but the commit message should explain why we're doing this. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [cleanups 05/12] ofproto-dpif: Correct in_port on send_packet().

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:02:58AM -0800, Justin Pettit wrote: > The switch to a single datapath uncovered a long-standing bug in the > send_packet() function. The code had used an (invalid) ingress OpenFlow > port of 0, which happened to get translated to the datapath's local > port, which was al

Re: [ovs-dev] [PATCH] openvswitch: Make IPv6 packet parsing dependent on IPv6 config

2012-11-16 Thread Vlad Yasevich
On 11/16/2012 12:26 PM, Jesse Gross wrote: On Fri, Nov 16, 2012 at 7:40 AM, Vlad Yasevich wrote: Openvswitch attempts to use IPv6 packet parsing functions without any dependency on IPv6 (unlike every other place in kernel). Pull the IPv6 code in openvswitch togeter and put a conditional that'

Re: [ovs-dev] [cleanups 04/12] bridge: Open internal ports with the correct type.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:02:57AM -0800, Justin Pettit wrote: > Use the new ofproto function that returns how a port should be opened > based on the datapath type. This fixes a problem with internal ports > being attached to userspace datapaths. > > Signed-off-by: Justin Pettit Looks good, tha

Re: [ovs-dev] [cleanups 03/12] Add functions to determine how port should be opened based on type.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:02:56AM -0800, Justin Pettit wrote: > Depending on the port and type of datapath, a port may need to be opened > as a different type of device than it's configured. For example, an > "internal" port on a "dummy" datapath should opened as a "dummy" port. > This commit add

Re: [ovs-dev] [PATCH] openvswitch: Make IPv6 packet parsing dependent on IPv6 config

2012-11-16 Thread Jesse Gross
On Fri, Nov 16, 2012 at 7:40 AM, Vlad Yasevich wrote: > Openvswitch attempts to use IPv6 packet parsing functions without > any dependency on IPv6 (unlike every other place in kernel). Pull > the IPv6 code in openvswitch togeter and put a conditional that's > dependent on CONFIG_IPV6. > > Resolve

Re: [ovs-dev] [PATCH] openvswitch: Make IPv6 packet parsing dependent on IPv6 config

2012-11-16 Thread Jesse Gross
On Fri, Nov 16, 2012 at 7:40 AM, Vlad Yasevich wrote: > Openvswitch attempts to use IPv6 packet parsing functions without > any dependency on IPv6 (unlike every other place in kernel). Pull > the IPv6 code in openvswitch togeter and put a conditional that's > dependent on CONFIG_IPV6. > > Resolv

Re: [ovs-dev] [cleanups 02/12] dpif-linux.c: Let the kernel pick a port number if one not requested.

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:02:55AM -0800, Justin Pettit wrote: > With the single datapath change, we no longer depend on the kernel to > make sure that we don't reuse OpenFlow port numbers, since the ofproto > library now picks them. Remove the code that contained that logic. > > Suggested-by: Be

Re: [ovs-dev] [cleanups 01/12] dpif-netdev: Don't special-case "br" bridges in create_dp_netdev().

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 12:02:54AM -0800, Justin Pettit wrote: > With a single datapath, we no longer need to special case bridges > beginning with "br*" for testing, since all bridges are netdev-based > bridges are named "ovs-netdev". This removes that unnecessary code. > > Signed-off-by: Justin

Re: [ovs-dev] [PATCH] openvswitch: Make IPv6 packet parsing dependent on IPv6 config

2012-11-16 Thread Jesse Gross
On Fri, Nov 16, 2012 at 7:40 AM, Vlad Yasevich wrote: > Openvswitch attempts to use IPv6 packet parsing functions without > any dependency on IPv6 (unlike every other place in kernel). Pull > the IPv6 code in openvswitch togeter and put a conditional that's > dependent on CONFIG_IPV6. > > Resolv

Re: [ovs-dev] [of1.2 0/5] enable oxm flow format

2012-11-16 Thread Ben Pfaff
On Fri, Nov 16, 2012 at 07:52:46PM +0900, Simon Horman wrote: > On Thu, Nov 15, 2012 at 10:44:19PM -0800, Ben Pfaff wrote: > > See http://openvswitch.org/pipermail/dev/2012-November/022990.html > > for background. > > > > Ben Pfaff (5): > > ovs-ofctl: Style fix. > > ofp-util: Rename OFPUTIL_P_

Re: [ovs-dev] [PATCH 2/2] ovs-save: Set ofport_request while saving flows.

2012-11-16 Thread Ben Pfaff
[adding ovs-dev back, I hope that's OK--I don't see anything private here] On Thu, Nov 15, 2012 at 05:29:57PM -0800, Gurucharan Shetty wrote: > On Wed, Nov 14, 2012 at 10:02 AM, Ben Pfaff wrote: > > > On Tue, Nov 06, 2012 at 11:11:31AM -0800, Gurucharan Shetty wrote: > > > Populate the interface

[ovs-dev] [PATCH] openvswitch: Make IPv6 packet parsing dependent on IPv6 config

2012-11-16 Thread Vlad Yasevich
Openvswitch attempts to use IPv6 packet parsing functions without any dependency on IPv6 (unlike every other place in kernel). Pull the IPv6 code in openvswitch togeter and put a conditional that's dependent on CONFIG_IPV6. Resolves: net/built-in.o: In function `ovs_flow_extract': (.text+0xbf5d5)

Re: [ovs-dev] [PATCH 07/14] vswitchd: Configuration of allowed OpenFlow versions

2012-11-16 Thread Simon Horman
On Thu, Nov 15, 2012 at 08:16:27PM -0800, Ben Pfaff wrote: > On Fri, Nov 16, 2012 at 10:43:39AM +0900, Simon Horman wrote: > > On Mon, Nov 12, 2012 at 10:23:00AM -0800, Ben Pfaff wrote: > > > On Wed, Nov 07, 2012 at 05:03:05PM +0900, Simon Horman wrote: > > > > Versions may be configured using a co

Re: [ovs-dev] [of1.2 0/5] enable oxm flow format

2012-11-16 Thread Simon Horman
On Thu, Nov 15, 2012 at 10:44:19PM -0800, Ben Pfaff wrote: > See http://openvswitch.org/pipermail/dev/2012-November/022990.html > for background. > > Ben Pfaff (5): > ovs-ofctl: Style fix. > ofp-util: Rename OFPUTIL_P_* constants and update comments for > clarity. > ofp-util: Allow use o

Re: [ovs-dev] [PATCH v4 4/9] net: openvswitch: use this_cpu_ptr per-cpu helper

2012-11-16 Thread Shan Wei
Shan Wei said, at 2012/11/13 9:52: > From: Shan Wei > > just use more faster this_cpu_ptr instead of per_cpu_ptr(p, > smp_processor_id()); > > > Signed-off-by: Shan Wei > Reviewed-by: Christoph Lameter Jesse Gross, would you like to pick it up to your tree? > --- > no changes vs v3,v2. >

[ovs-dev] [cleanups 12/12] ofproto-dpif: Remove datapath flows of deleted ports.

2012-11-16 Thread Justin Pettit
Commit acf608 (ofproto-dpif: Use a single underlying datapath across multiple bridges.) causes datapath flows from deleted ports to not be removed. The issue is that the code that bulk deletes old flows doesn't know the datapath port number that makes up the datapath flow definition. This commit

[ovs-dev] [cleanups 11/12] netdev-linux: Don't log vport warnings when kernel datapath not loaded.

2012-11-16 Thread Justin Pettit
The *_get_stats functions call get_stats_via_vport(), which tries to get information about ports attached to the kernel datapath. When a pure userspace switch is used (eg, the OVS kernel module isn't loaded), ports are not attached to a kernel datapath, so warnings get logged. This commit handles

[ovs-dev] [cleanups 10/12] netdev-linux: "Down" tap devices before setting hw addr.

2012-11-16 Thread Justin Pettit
On Linux, it is not possible to set the mac address on "up" tap interfaces. This commit temporarily "down"s the interface so the address can be set for the netdev_linux_set_etheraddr() call. Signed-off-by: Justin Pettit --- lib/netdev-linux.c | 14 ++ 1 files changed, 14 insertion

[ovs-dev] [cleanups 09/12] bridge: Always "up" internal devices.

2012-11-16 Thread Justin Pettit
The kernel datapath automatically "up"s internal devices, but this wasn't happening for the userspace datapath. This change has the bridge module always "up" them. Signed-off-by: Justin Pettit --- tests/ofproto.at | 12 ++-- vswitchd/bridge.c |3 ++- 2 files changed, 8 insertions

[ovs-dev] [cleanups 08/12] bridge: Introduce iface_is_internal() function.

2012-11-16 Thread Justin Pettit
This will have an additional caller in the future. Signed-off-by: Justin Pettit --- vswitchd/bridge.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index dbce59a..b600a3c 100644 --- a/vswitchd/bridge.c +++ b/vswitch

[ovs-dev] [cleanups 07/12] ofproto-dpif: Query port existence by name to prevent warnings.

2012-11-16 Thread Justin Pettit
The port_destruct() function checks if the port still exists in the datapath to see if additional cleanup is necessary. It used dpif_port_query_by_number(), since the datapath port number is readily available and cheap to use as a lookup handle. Unfortunately, that function logs a warning message

[ovs-dev] [cleanups 06/12] dpif: Don't log warning for ENOENT with dpif_port_exists().

2012-11-16 Thread Justin Pettit
Signed-off-by: Justin Pettit --- lib/dpif.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/dpif.c b/lib/dpif.c index 9577e4f..9feb67b 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -516,7 +516,7 @@ bool dpif_port_exists(const struct dpif *dpif, const char *devname) {

[ovs-dev] [cleanups 05/12] ofproto-dpif: Correct in_port on send_packet().

2012-11-16 Thread Justin Pettit
The switch to a single datapath uncovered a long-standing bug in the send_packet() function. The code had used an (invalid) ingress OpenFlow port of 0, which happened to get translated to the datapath's local port, which was always 0. With the single datapath, this invalid OpenFlow port number no

[ovs-dev] [cleanups 04/12] bridge: Open internal ports with the correct type.

2012-11-16 Thread Justin Pettit
Use the new ofproto function that returns how a port should be opened based on the datapath type. This fixes a problem with internal ports being attached to userspace datapaths. Signed-off-by: Justin Pettit --- vswitchd/bridge.c | 14 +- 1 files changed, 9 insertions(+), 5 deletio

[ovs-dev] [cleanups 03/12] Add functions to determine how port should be opened based on type.

2012-11-16 Thread Justin Pettit
Depending on the port and type of datapath, a port may need to be opened as a different type of device than it's configured. For example, an "internal" port on a "dummy" datapath should opened as a "dummy" port. This commit adds the ability for a dpif to provide this information to a caller. It w

[ovs-dev] [cleanups 02/12] dpif-linux.c: Let the kernel pick a port number if one not requested.

2012-11-16 Thread Justin Pettit
With the single datapath change, we no longer depend on the kernel to make sure that we don't reuse OpenFlow port numbers, since the ofproto library now picks them. Remove the code that contained that logic. Suggested-by: Ben Pfaff Signed-off-by: Justin Pettit --- lib/dpif-linux.c | 47 +

[ovs-dev] [cleanups 01/12] dpif-netdev: Don't special-case "br" bridges in create_dp_netdev().

2012-11-16 Thread Justin Pettit
With a single datapath, we no longer need to special case bridges beginning with "br*" for testing, since all bridges are netdev-based bridges are named "ovs-netdev". This removes that unnecessary code. Signed-off-by: Justin Pettit --- lib/dpif-netdev.c |4 +--- 1 files changed, 1 insertion

[ovs-dev] [cleanups 00/12] Various cleanups

2012-11-16 Thread Justin Pettit
This patch series contains a number of cleanups that came up from the switch to a single datapath. There are a few direct fixes for that project, but there are also some fixes for running the userspace datapath that have been long-standing. Justin Pettit (12): dpif-netdev: Don't special-case "