Re: [ovs-dev] [PATCH 2/4 v2] datapath-windows: fixes in Flow.c in key parsing

2014-10-18 Thread Ankur Sharma
Acked-by: Ankur Sharma From: dev on behalf of Nithin Raju Sent: Saturday, October 18, 2014 11:39 AM To: dev@openvswitch.org Subject: [ovs-dev] [PATCH 2/4 v2] datapath-windows: fixes in Flow.c in key parsing Signed-off-by: Nithin Raju --- datapat

[ovs-dev] [PATCH v3] lib/dpif: Fix crash in format_odp_actions, actions = 0x0

2014-10-18 Thread Madhu Challa
When flow_get fails (in this case flow does not exist) simply log the key part of the get and erase the rest of the flow because it is invalid. verified the fix by doing ovs-ofctl del-flows when traffic is running 2014-10-18T20:12:13.785Z|00011|dpif(revalidator20)|WARN|system@ovs-system: failed

Re: [ovs-dev] [PATCH v2] lib/dpif: Fix crash in format_odp_actions, actions = 0x0

2014-10-18 Thread Ben Pfaff
On Sat, Oct 18, 2014 at 11:02:58AM -0700, Madhu Challa wrote: > Do not log_flow_get_message on error since the flow isn't available I agree that there is a bug here but it's actually more important to log the operation in the case of an error, for debugging purposes. I think that, in case of an e

[ovs-dev] [PATCH 3/4 v2] datapath-windows: Fixes in packet created for userspace

2014-10-18 Thread Nithin Raju
A couple of miscellaneous fixes in code that creates a packet for userspace as well as when we copy the packet to memory specified by userspace. Signed-off-by: Nithin Raju Acked-by: Ankur Sharma --- datapath-windows/ovsext/User.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletion

[ovs-dev] [PATCH 4/4 v2] lib/netlink-socket.c: fixes in nl_sock_recv__() on Windows

2014-10-18 Thread Nithin Raju
In nl_sock_recv__() on Windows, we realloc a new ofpbuf to copy received data if the caller specified buffer is small. While we do so, we need reset some of the other stack variables to point to the new ofpbuf. Other fixes are around using 'error' rather than 'errno'. Signed-off-by: Nithin Raju

[ovs-dev] [PATCH 2/4 v2] datapath-windows: fixes in Flow.c in key parsing

2014-10-18 Thread Nithin Raju
Signed-off-by: Nithin Raju --- datapath-windows/ovsext/Flow.c | 57 +-- 1 files changed, 36 insertions(+), 21 deletions(-) diff --git a/datapath-windows/ovsext/Flow.c b/datapath-windows/ovsext/Flow.c index f3ee726..bc9ef87 100644 --- a/datapath-windows/ovsex

[ovs-dev] [PATCH 1/4 v2] datapath-windows: event read should not fail when no events

2014-10-18 Thread Nithin Raju
The semantics are read operation are generally to return 0 bytes and STATUS_SUCCESS when there are no events. Also, added a fix to assign the PID to the synthetic OVS_MESSAGE formed for the command validation. Signed-off-by: Nithin Raju Acked-by: Nithin Raju --- datapath-windows/ovsext/Datapat

Re: [ovs-dev] [PATCH 4/4] lib/netlink-socket.c: fixes in nl_sock_recv__() on Windows

2014-10-18 Thread Nithin Raju
> @@ -548,6 +548,8 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, > bool wait) > } else { > if (retval >= buf->allocated) { > ofpbuf_reinit(buf, retval); > +nlmsghdr = ofpbuf_base(buf); > +nlmsgh

Re: [ovs-dev] [PATCH 3/4] datapath-windows: Fixes in packet created for userspace

2014-10-18 Thread Nithin Raju
> + > +nlMsg = (PNL_MSG_HDR)NlBufAt(&nlBuf, 0, 0); > +nlMsg->nlmsgLen = NlBufSize(&nlBuf); > > [ANKUR]: Should we not align the msgLen here.? Each of the attributes written out to the nlBuf are already aligned. If you look at the nlAttrLen of each attribute, it is not set to the aligned

Re: [ovs-dev] [PATCH 2/4] datapath-windows: fixes in Flow.c in key parsing

2014-10-18 Thread Nithin Raju
> -Original Message- > From: Ankur Sharma > Sent: Friday, October 17, 2014 10:05 AM > To: Nithin Raju; dev@openvswitch.org > Subject: RE: [ovs-dev] [PATCH 2/4] datapath-windows: fixes in Flow.c in key > parsing > > Hi Nithin, > > While reading the ETHERTYPE attribute we already use ntohs.

[ovs-dev] [PATCH v2] lib/dpif: Fix crash in format_odp_actions, actions = 0x0

2014-10-18 Thread Madhu Challa
Do not log_flow_get_message on error since the flow isn't available --- lib/dpif.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dpif.c b/lib/dpif.c index d088f68..f7aafa8 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -1155,10 +1155,11 @@ dpif_operate(struct dpif *dpif

Re: [ovs-dev] [PATCH] lib/dpif: Fix crash in format_odp_actions, actions = 0x0

2014-10-18 Thread Ben Pfaff
On Fri, Oct 17, 2014 at 06:20:57PM -0700, Madhu Challa wrote: > I think I know whats happening. In case there is an error getting the > datapath flow we should not try logging it since the flow is not valid. > > dpif_netlink_operate__ > { > ... > case DPIF_OP_FLOW_GET: > op

Re: [ovs-dev] [PATCH] Add OpenFlow support for 802.1AD Ethertype

2014-10-18 Thread Ben Pfaff
On Sat, Oct 18, 2014 at 09:55:57AM -0400, Thomas F Herbert wrote: > On 10/17/14, 4:54 PM, Ben Pfaff wrote: > >On Fri, Oct 17, 2014 at 01:19:33PM -0400, Dave Benson wrote: > >>On Fri, Oct 10, 2014 at 6:43 PM, Ben Pfaff wrote: > >>... > > >My first thought is to define a new NXM_NX_VLAN_TPID that m

Re: [ovs-dev] [PATCH] Add OpenFlow support for 802.1AD Ethertype

2014-10-18 Thread Thomas F Herbert
On 10/17/14, 4:54 PM, Ben Pfaff wrote: On Fri, Oct 17, 2014 at 01:19:33PM -0400, Dave Benson wrote: On Fri, Oct 10, 2014 at 6:43 PM, Ben Pfaff wrote: ... My first thought is to define a new NXM_NX_VLAN_TPID that matches the TPID, and for backward compatibility to imply a match on 0x8100 if i