Re: [ovs-dev] [packet_in 07/13] ovs-ofctl: Support daemonization for monitor and snoop.

2011-12-28 Thread Ben Pfaff
On Wed, Dec 28, 2011 at 05:52:34PM -0800, Ethan Jackson wrote: > This will ease implementation of future unit tests. You could add a mention of this to NEWS, I guess. I won't insist on it. Looks good. ___ dev mailing list dev@openvswitch.org http://ope

Re: [ovs-dev] [packet_in 06/13] ofp-print: Print checksum in ofp_packet_to_string().

2011-12-28 Thread Ben Pfaff
On Wed, Dec 28, 2011 at 05:52:33PM -0800, Ethan Jackson wrote: > This will improve the unit tests of future patches. Seems reasonable, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [packet_in 05/13] ofp-print: Remove tcpdump from ofp_packet_to_string().

2011-12-28 Thread Ben Pfaff
On Wed, Dec 28, 2011 at 05:52:32PM -0800, Ethan Jackson wrote: > Instead this patch uses flow_format() which gives very similar > output. This patch will improve the reliability of unit tests in > future patches which rely on the results of ofp_packet_to_string(). This looks good as far as it goe

Re: [ovs-dev] [PATCH] ofproto-dpif: Fix GCC warning.

2011-12-28 Thread Justin Pettit
Ben, do you think it's worth putting a small comment above the assignment? Otherwise, it looks kind of odd. --Justin On Dec 28, 2011, at 10:50 PM, Ethan Jackson wrote: > Looks good. > > Ethan > > On Tue, Dec 27, 2011 at 14:32, Ben Pfaff wrote: >> gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)

Re: [ovs-dev] [packet_in 03/13] flow: Improve flow_format() output.

2011-12-28 Thread Ethan Jackson
The only place I've found it's used are logs and ofctl monitor for packet ins. I doubt anything depends on either of those. Ethan (iPhone) On Dec 29, 2011, at 0:57, Ben Pfaff wrote: > On Wed, Dec 28, 2011 at 05:52:30PM -0800, Ethan Jackson wrote: >> I find this significantly easier to read. >

Re: [ovs-dev] [packet_in 04/13] ofp-print: Remove vestigial 'total_len' argument.

2011-12-28 Thread Ben Pfaff
On Wed, Dec 28, 2011 at 05:52:31PM -0800, Ethan Jackson wrote: > ofp_print_packet() and ofp_packet_to_string() don't use the > 'total_len' argument which they require callers to supply. Looks good, thanks. ___ dev mailing list dev@openvswitch.org http://

Re: [ovs-dev] [packet_in 03/13] flow: Improve flow_format() output.

2011-12-28 Thread Ben Pfaff
On Wed, Dec 28, 2011 at 05:52:30PM -0800, Ethan Jackson wrote: > I find this significantly easier to read. Seems fine to me. I doubt anything external really depends on this format. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman

Re: [ovs-dev] [packet_in 02/13] ofpbuf: Maintain header pointers in clone functions.

2011-12-28 Thread Ben Pfaff
This looks good, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] unixctl: Improve readability of "help" output for long command names.

2011-12-28 Thread Ethan Jackson
Looks good. Ethan On Thu, Dec 22, 2011 at 18:51, Ben Pfaff wrote: > Without this change, if a unixctl command name is 23 character long or > longer, no space appeared between the command name and its usage.  This > commit ensures that at least one space always appears. > > No command yet has a n

Re: [ovs-dev] [PATCH] ofproto-dpif: Fix GCC warning.

2011-12-28 Thread Ethan Jackson
Looks good. Ethan On Tue, Dec 27, 2011 at 14:32, Ben Pfaff wrote: > gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) warned: > >    ofproto/ofproto-dpif.c: In function 'bundle_send_learning_packets': >    ofproto/ofproto-dpif.c:1835: warning: dereferencing type-punned pointer >    will break strict-a

Re: [ovs-dev] [PATCH] ofproto-dpif: Omit "execute" operation entirely when there are no actions.

2011-12-28 Thread Ethan Jackson
Looks good. This conflicts with a series I just sent out. Once you merge, I'll resend the relevant patch. Ethan On Tue, Dec 27, 2011 at 16:25, Ben Pfaff wrote: > There's no point in executing an empty set of actions. > > dpif_execute() has had this optimization internally for a long time but >

Re: [ovs-dev] [packet_in 01/13] classifier: Update cls_rule_set_in_port() prototype.

2011-12-28 Thread Ben Pfaff
On Wed, Dec 28, 2011 at 05:52:28PM -0800, Ethan Jackson wrote: > -void cls_rule_set_in_port(struct cls_rule *, uint16_t odp_port); > +void cls_rule_set_in_port(struct cls_rule *, uint16_t ofp_port); Looks good, thanks. ___ dev mailing list dev@openvswitc

Re: [ovs-dev] How to commit the new feature of OpenvSwitch

2011-12-28 Thread Ben Pfaff
On Thu, Dec 29, 2011 at 09:41:31AM +0800, Emmily wrote: > We have developed a new feature on "OpenvSwitch with Hook Point". > > This feature provides hook points for developers to intercept packets on > the packet processing. > > To commit this feature "OpenvSwitch with Hook Point" , what process

[ovs-dev] [packet_in 13/13] openflow: New Nicira Extended PACKET_IN format.

2011-12-28 Thread Ethan Jackson
The new PACKET_IN format implemented in this patch includes flow metadata such as the cookie, table_id, and registers. --- include/openflow/nicira-ext.h | 46 +- lib/learning-switch.c |2 + lib/nx-match.h|2 +- lib/ofp-print.c | 34

[ovs-dev] [packet_in 12/13] ofproto-dpif: Implement PACKET_IN in userspace.

2011-12-28 Thread Ethan Jackson
In future patches, PACKET_IN messages will include meta-data which is only available in userspace during action translation. Either, this data needs to be stored until it's required by a userspace datapath action, or the PACKET_IN messages must be sent at the time the data is available. This patc

[ovs-dev] [packet_in 11/13] packets: New packet_set_*() helper functions.

2011-12-28 Thread Ethan Jackson
This commit pulls code used to modify L3 and L4 header fields from dp_netdev into the packet library. An additional user will be added in a future commit. --- lib/dpif-netdev.c | 120 + lib/packets.c | 101 +

[ovs-dev] [packet_in 10/13] ofputil: New function ofputil_decode_packet_in().

2011-12-28 Thread Ethan Jackson
--- lib/ofp-print.c| 39 +++ lib/ofp-util.c | 28 lib/ofp-util.h |3 +++ ofproto/ofproto-dpif.c |2 ++ 4 files changed, 56 insertions(+), 16 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-pri

[ovs-dev] [packet_in 09/13] ofp-util: Use constant ofpbuf in ofputil_packet_in struct.

2011-12-28 Thread Ethan Jackson
This will make the memory ownership clearer when future patches make more extensive use of ofputil_packet_in. --- lib/ofp-util.c |4 ++-- lib/ofp-util.h |4 ++-- ofproto/connmgr.c |5 +++-- ofproto/ofproto-dpif.c |4 ++-- 4 files changed, 9 insertions(+), 8 del

[ovs-dev] [packet_in 08/13] tests: Unit test PACKET_IN.

2011-12-28 Thread Ethan Jackson
--- tests/ofproto-dpif.at | 168 + 1 files changed, 168 insertions(+), 0 deletions(-) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 55d1500..73bca1d 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -165,6 +165,17

[ovs-dev] [packet_in 07/13] ovs-ofctl: Support daemonization for monitor and snoop.

2011-12-28 Thread Ethan Jackson
This will ease implementation of future unit tests. --- manpages.mk |2 + utilities/ovs-ofctl.8.in | 11 utilities/ovs-ofctl.c| 62 +++-- 3 files changed, 72 insertions(+), 3 deletions(-) diff --git a/manpages.mk b/manpages

[ovs-dev] [packet_in 06/13] ofp-print: Print checksum in ofp_packet_to_string().

2011-12-28 Thread Ethan Jackson
This will improve the unit tests of future patches. --- lib/ofp-print.c| 13 + tests/ofp-print.at |2 +- 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 0417e9d..37c5823 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c

[ovs-dev] [packet_in 05/13] ofp-print: Remove tcpdump from ofp_packet_to_string().

2011-12-28 Thread Ethan Jackson
Instead this patch uses flow_format() which gives very similar output. This patch will improve the reliability of unit tests in future patches which rely on the results of ofp_packet_to_string(). --- lib/ofp-print.c| 58 --- tests/ofp-print.at

[ovs-dev] [packet_in 04/13] ofp-print: Remove vestigial 'total_len' argument.

2011-12-28 Thread Ethan Jackson
ofp_print_packet() and ofp_packet_to_string() don't use the 'total_len' argument which they require callers to supply. --- lib/dpif.c |3 +-- lib/ofp-print.c| 13 + lib/ofp-print.h|4 ++-- ofproto/ofproto-dpif.c |2 +- tests/test-flows.c |

[ovs-dev] [packet_in 03/13] flow: Improve flow_format() output.

2011-12-28 Thread Ethan Jackson
I find this significantly easier to read. --- lib/flow.c | 32 tests/ofp-print.at |2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index fa7ae4f..5d18212 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -518,4

[ovs-dev] [packet_in 02/13] ofpbuf: Maintain header pointers in clone functions.

2011-12-28 Thread Ethan Jackson
--- lib/ofpbuf.c | 25 ++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c index 3887481..29698dc 100644 --- a/lib/ofpbuf.c +++ b/lib/ofpbuf.c @@ -129,7 +129,7 @@ ofpbuf_new_with_headroom(size_t size, size_t headroom) struct ofpb

[ovs-dev] [packet_in 01/13] classifier: Update cls_rule_set_in_port() prototype.

2011-12-28 Thread Ethan Jackson
--- lib/classifier.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/classifier.h b/lib/classifier.h index c33f1e1..d55475d 100644 --- a/lib/classifier.h +++ b/lib/classifier.h @@ -96,7 +96,7 @@ void cls_rule_set_reg_masked(struct cls_rule *, unsigned int reg_idx, v

[ovs-dev] How to commit the new feature of OpenvSwitch

2011-12-28 Thread Emmily
Hi, We have developed a new feature on "OpenvSwitch with Hook Point". This feature provides hook points for developers to intercept packets on the packet processing. To commit this feature "OpenvSwitch with Hook Point" , what processes need to do? Best regards, Emmily

[ovs-dev] [PATCH] datapath: Ensure that skb->protocol is set in internal_dev_xmit().

2011-12-28 Thread Ben Pfaff
The AF_PACKET raw socket implementation of sendmsg() doesn't initialize skb->protocol, but ovs_vport_receive() expects that skb->protocol to be valid. Thus, datapath code that depends on skb->protocol did not properly recognize packet type. This fixes the problem by always extracting the protocol

Re: [ovs-dev] [PATCH 1/3] datapath: Add genl_exec().

2011-12-28 Thread Jesse Gross
On Tue, Dec 27, 2011 at 8:17 PM, Pravin Shelar wrote: > On Thu, Dec 22, 2011 at 5:01 PM, Jesse Gross wrote: >> On Dec 21, 2011, at 8:28 PM, Pravin B Shelar wrote: >>> +     skb_get(genlmsg_skb); >>> + >>> +     nlh = genlmsg_put(genlmsg_skb, 0, 0, &genl_exec_family, >>> NLM_F_REQUEST, GENL_EXEC_