[ovs-dev] [PATCH] netlink-socket: Fix possiblity of nl_transact dereferncing null pointer

2017-01-30 Thread Roi Dayan
Many nl_transact callers and its wrapper tc_transact pass NULL for replyp
which is being accessed in error flow without being checked if null or not.

Signed-off-by: Roi Dayan 
Reviewed-by: Paul Blakey 
---
 lib/netlink-socket.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index 7502764..e45914c 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
@@ -1698,7 +1698,9 @@ nl_transact(int protocol, const struct ofpbuf *request,
 
 error = nl_pool_alloc(protocol, );
 if (error) {
-*replyp = NULL;
+if (replyp) {
+*replyp = NULL;
+}
 return error;
 }
 
-- 
2.7.4

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 1/1] dpif-netdev: Conditional EMC insert

2017-01-30 Thread Daniele Di Proietto
2017-01-26 9:55 GMT-08:00 Loftus, Ciara :
>>
>> 2017-01-25 7:52 GMT-08:00 Loftus, Ciara :
>> >> 2017-01-22 11:45 GMT-08:00 Jan Scheurich :
>> >> >
>> >> >> It's not a big deal, since the most important use case we have for
>> >> >> dpif-netdev is with dpdk, but I'd still like the code to behave
>> >> >> similarly on different platforms.  How about defining a function that
>> >> >> uses random_uint32 when compiling without DPDK?
>> >> >>
>> >> >> For testing it's not that simple, because unit tests can be run with
>> >> >> or without DPDK.  It would need to be configurable at runtime.
>> >> >> Perhaps making EM_FLOW_INSERT_PROB configurable at runtime
>> would
>> >> also
>> >> >> help people that want to experiment with different values, even
>> >> >> though, based on the comments, I guess they wouldn't really see
>> much
>> >> >> difference.
>> >> >>
>> >> >> Again, what do you think about simply using counting the packets and
>> >> >> inserting only 1 every EM_FLOW_INSERT_PROB?
>> >> >>
>> >> >> Thanks,
>> >> >>
>> >> >> Daniele
>> >> >
>> >> >
>> >> > As far as I know Ciara did some quick tests with a counter-based
>> >> > implementation and it performed 5% worse for 1K and 4K flows than
>> then
>> >> > current patch. Perhaps we could find the reason for that and fix it, 
>> >> > but I
>> >> > also feel uncomfortable with deterministic insertion of every Nth flow.
>> This
>> >> > could lead to very strange lock-step phenomena with typical artificial
>> test
>> >> > work loads, which often generate flows round-robin. I would rather use
>> a
>> >> > random function, as you suggest, or count "cycles" differently when
>> >> > compiling without DPDK.
>> >>
>> >> Ok, using another pseudo random function when compiling without DPDK
>> >> sounds
>> >> good to me.
>> >>
>> >
>> > Any suggestions for the random function?
>>
>> I think we can use random_uint32() from lib/random.h
>>
>> >
>> >> >
>> >> > I agree to making the parameter EM_FLOW_INSERT_PROB configurable
>> for
>> >> unit
>> >> > test or other purposes. Should it be a new option in the OpenvSwitch
>> table
>> >> > in OVSDB or rather a run-time parameter to be changed with ovs-
>> appctl?
>> >>
>> >> I think a new option in Openvswitch other_config would be appropriate.
>> >
>> > I like this idea. I've started making these changes. How about something
>> like the following?..
>> >
>> > +  > > +  type='{"type": "integer", "minInteger": 0, "maxInteger":
>> 4294967295}'>
>> > +
>> > +  Specifies the probability (1/emc-insert-prob) of a flow being
>> > +  inserted into the Exact Match Cache (EMC). Higher values of
>> > +  emc-insert-prob will result in less insertions, and lower
>> > +  values will result in more insertions. A value of zero will
>> > +  result in no insertions and essentially disable the EMC.
>> > +
>> > +
>> > +  Defaults to 100 ie. there is 1/100 chance of EMC insertion.
>>
>> Looks good to me, thanks.
>>
>> I would also add that this only applies to 'netdev' bridges (userspace) and
>> that
>> a value of 1 means that every flow is going to be sent to the EMC.
>
> Thanks Daniele. I've posted a v2. Not sure it's the ideal approach so would 
> appreciate your feedback if you get a chance.
>
> On a separate note, I'm wondering would now be a good time to consider 
> allowing the size of the EMC to be configurable ie. allow EM_FLOW_HASH_SHIFT 
> or a similar value to be modifiable. Whatever scheme is followed for 
> modifying insert probability could probably be easily be re-used for EMC 
> sizing too. Just an idea!

By the way, I forgot to mention that I like this idea.  Hopefully it
shouldn't introduce any overhead.

Thanks,

Daniele

>
> Thanks,
> Ciara
>
>>
>> >
>> > Thanks,
>> > Ciara
>> >
>> >>
>> >> Thanks,
>> >>
>> >> Daniele
>> >>
>> >> >
>> >> > Jan
>> >> >
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 1/3] rhel: Fix ifdown for OVSDPDKBond.

2017-01-30 Thread Daniele Di Proietto





On 26/01/2017 11:11, "Aaron Conole"  wrote:

>Daniele Di Proietto  writes:
>
>> The OVSDPDKBond case wasn't handled in the rhel ifdown script.
>>
>> Fixes: f6bf8880613a ("rhel: Add support DPDK port creation via network 
>> scripts")
>> Signed-off-by: Daniele Di Proietto 
>> ---
>
>D'oh!
>
>Acked-by: Aaron Conole 

Thanks!  Pushed to master, branch-2.{7,6,5}
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v4 3/5] datapath-windows: Retain MRU value in the OvsForwardingContext.

2017-01-30 Thread Sairam Venugopal
My main comment here would be to see if we can add the MRU to the NBL Buffer 
Context instead of OvsForwardingContext - 
https://github.com/openvswitch/ovs/blob/75e2077e0c43224bcca92746b28b01a4936fc101/datapath-windows/ovsext/BufferMgmt.h#L51

This will drastically reduce the amount of changes required to support the MRU 
field.

Thanks,
Sairam



On 1/30/17, 1:39 PM, "ovs-dev-boun...@openvswitch.org on behalf of Anand Kumar" 
 wrote:

>This patch retains the MRU value for the reassembled IP datagram in the
>OvsForwardingContext when the packet is forwarded to userspace and/or
>retrived from userspace.
>
>Also retain the MRU value when there are any deferred actions for the
>current NBL.
>
>Signed-off-by: Anand Kumar 
>---
>v4->v3: No Change
>v2->v3: No change
>v1->v2: No change
>---
> datapath-windows/ovsext/Actions.c| 49 +++-
> datapath-windows/ovsext/Actions.h|  3 +++
> datapath-windows/ovsext/DpInternal.h |  2 +-
> datapath-windows/ovsext/PacketIO.c   |  9 ---
> datapath-windows/ovsext/Recirc.c |  6 -
> datapath-windows/ovsext/Recirc.h |  2 ++
> datapath-windows/ovsext/Tunnel.c |  4 +--
> datapath-windows/ovsext/User.c   | 26 +--
> datapath-windows/ovsext/User.h   |  6 +++--
> 9 files changed, 72 insertions(+), 35 deletions(-)
>
>diff --git a/datapath-windows/ovsext/Actions.c 
>b/datapath-windows/ovsext/Actions.c
>index e4e56e8..5b541b1 100644
>--- a/datapath-windows/ovsext/Actions.c
>+++ b/datapath-windows/ovsext/Actions.c
>@@ -150,6 +150,7 @@ OvsInitForwardingCtx(OvsForwardingContext *ovsFwdCtx,
>  UINT32 srcVportNo,
>  ULONG sendFlags,
>  PNDIS_SWITCH_FORWARDING_DETAIL_NET_BUFFER_LIST_INFO 
> fwdDetail,
>+ UINT16 mru,
>  OvsCompletionList *completionList,
>  OVS_PACKET_HDR_INFO *layers,
>  BOOLEAN resetTunnelInfo)
>@@ -167,7 +168,7 @@ OvsInitForwardingCtx(OvsForwardingContext *ovsFwdCtx,
> ovsFwdCtx->switchContext = switchContext;
> ovsFwdCtx->completionList = completionList;
> ovsFwdCtx->fwdDetail = fwdDetail;
>-
>+ovsFwdCtx->mru = mru;
> if (fwdDetail->NumAvailableDestinations > 0) {
> /*
>  * XXX: even though MSDN says GetNetBufferListDestinations() returns
>@@ -615,6 +616,7 @@ OvsDoFlowLookupOutput(OvsForwardingContext *ovsFwdCtx)
>  ovsFwdCtx->srcVportNo,
>  ovsFwdCtx->sendFlags,
>  , , >layers,
>+ ovsFwdCtx->mru,
>  flow->actions, flow->actionsLen);
> ovsFwdCtx->curNbl = NULL;
> } else {
>@@ -623,9 +625,11 @@ OvsDoFlowLookupOutput(OvsForwardingContext *ovsFwdCtx)
> ovsFwdCtx->switchContext->datapath.misses++;
> InitializeListHead();
> status = OvsCreateAndAddPackets(NULL, 0, OVS_PACKET_CMD_MISS, vport,
>-  ,ovsFwdCtx->curNbl,
>-  FALSE, >layers,
>-  ovsFwdCtx->switchContext, , );
>+,ovsFwdCtx->curNbl,
>+FALSE, >layers,
>+ovsFwdCtx->switchContext,
>+ovsFwdCtx->mru,
>+, );
> if (num) {
> OvsQueuePackets(, num);
> }
>@@ -722,6 +726,7 @@ OvsTunnelPortTx(OvsForwardingContext *ovsFwdCtx)
> status = OvsInitForwardingCtx(ovsFwdCtx, ovsFwdCtx->switchContext,
>   newNbl, srcVportNo, 0,
>   
> NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(newNbl),
>+  ovsFwdCtx->mru,
>   ovsFwdCtx->completionList,
>   >layers, FALSE);
> ovsFwdCtx->curNbl = newNbl;
>@@ -822,6 +827,7 @@ OvsTunnelPortRx(OvsForwardingContext *ovsFwdCtx)
> OvsInitForwardingCtx(ovsFwdCtx, ovsFwdCtx->switchContext,
>  newNbl, tunnelRxVport->portNo, 0,
>  NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(newNbl),
>+ ovsFwdCtx->mru,
>  ovsFwdCtx->completionList,
>  >layers, FALSE);
> 
>@@ -921,6 +927,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
> status = OvsInitForwardingCtx(ovsFwdCtx, ovsFwdCtx->switchContext,
>   newNbl, ovsFwdCtx->srcVportNo, 0,
>   
> NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(newNbl),
>+  ovsFwdCtx->mru,
> 

[ovs-dev] [PATCH v4 3/5] datapath-windows: Retain MRU value in the OvsForwardingContext.

2017-01-30 Thread Anand Kumar
This patch retains the MRU value for the reassembled IP datagram in the
OvsForwardingContext when the packet is forwarded to userspace and/or
retrived from userspace.

Also retain the MRU value when there are any deferred actions for the
current NBL.

Signed-off-by: Anand Kumar 
---
v4->v3: No Change
v2->v3: No change
v1->v2: No change
---
 datapath-windows/ovsext/Actions.c| 49 +++-
 datapath-windows/ovsext/Actions.h|  3 +++
 datapath-windows/ovsext/DpInternal.h |  2 +-
 datapath-windows/ovsext/PacketIO.c   |  9 ---
 datapath-windows/ovsext/Recirc.c |  6 -
 datapath-windows/ovsext/Recirc.h |  2 ++
 datapath-windows/ovsext/Tunnel.c |  4 +--
 datapath-windows/ovsext/User.c   | 26 +--
 datapath-windows/ovsext/User.h   |  6 +++--
 9 files changed, 72 insertions(+), 35 deletions(-)

diff --git a/datapath-windows/ovsext/Actions.c 
b/datapath-windows/ovsext/Actions.c
index e4e56e8..5b541b1 100644
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
@@ -150,6 +150,7 @@ OvsInitForwardingCtx(OvsForwardingContext *ovsFwdCtx,
  UINT32 srcVportNo,
  ULONG sendFlags,
  PNDIS_SWITCH_FORWARDING_DETAIL_NET_BUFFER_LIST_INFO 
fwdDetail,
+ UINT16 mru,
  OvsCompletionList *completionList,
  OVS_PACKET_HDR_INFO *layers,
  BOOLEAN resetTunnelInfo)
@@ -167,7 +168,7 @@ OvsInitForwardingCtx(OvsForwardingContext *ovsFwdCtx,
 ovsFwdCtx->switchContext = switchContext;
 ovsFwdCtx->completionList = completionList;
 ovsFwdCtx->fwdDetail = fwdDetail;
-
+ovsFwdCtx->mru = mru;
 if (fwdDetail->NumAvailableDestinations > 0) {
 /*
  * XXX: even though MSDN says GetNetBufferListDestinations() returns
@@ -615,6 +616,7 @@ OvsDoFlowLookupOutput(OvsForwardingContext *ovsFwdCtx)
  ovsFwdCtx->srcVportNo,
  ovsFwdCtx->sendFlags,
  , , >layers,
+ ovsFwdCtx->mru,
  flow->actions, flow->actionsLen);
 ovsFwdCtx->curNbl = NULL;
 } else {
@@ -623,9 +625,11 @@ OvsDoFlowLookupOutput(OvsForwardingContext *ovsFwdCtx)
 ovsFwdCtx->switchContext->datapath.misses++;
 InitializeListHead();
 status = OvsCreateAndAddPackets(NULL, 0, OVS_PACKET_CMD_MISS, vport,
-  ,ovsFwdCtx->curNbl,
-  FALSE, >layers,
-  ovsFwdCtx->switchContext, , );
+,ovsFwdCtx->curNbl,
+FALSE, >layers,
+ovsFwdCtx->switchContext,
+ovsFwdCtx->mru,
+, );
 if (num) {
 OvsQueuePackets(, num);
 }
@@ -722,6 +726,7 @@ OvsTunnelPortTx(OvsForwardingContext *ovsFwdCtx)
 status = OvsInitForwardingCtx(ovsFwdCtx, ovsFwdCtx->switchContext,
   newNbl, srcVportNo, 0,
   
NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(newNbl),
+  ovsFwdCtx->mru,
   ovsFwdCtx->completionList,
   >layers, FALSE);
 ovsFwdCtx->curNbl = newNbl;
@@ -822,6 +827,7 @@ OvsTunnelPortRx(OvsForwardingContext *ovsFwdCtx)
 OvsInitForwardingCtx(ovsFwdCtx, ovsFwdCtx->switchContext,
  newNbl, tunnelRxVport->portNo, 0,
  NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(newNbl),
+ ovsFwdCtx->mru,
  ovsFwdCtx->completionList,
  >layers, FALSE);
 
@@ -921,6 +927,7 @@ OvsOutputForwardingCtx(OvsForwardingContext *ovsFwdCtx)
 status = OvsInitForwardingCtx(ovsFwdCtx, ovsFwdCtx->switchContext,
   newNbl, ovsFwdCtx->srcVportNo, 0,
   
NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(newNbl),
+  ovsFwdCtx->mru,
   ovsFwdCtx->completionList,
   >layers, FALSE);
 if (status != NDIS_STATUS_SUCCESS) {
@@ -986,7 +993,7 @@ OvsLookupFlowOutput(POVS_SWITCH_CONTEXT switchContext,
 status = OvsInitForwardingCtx(, switchContext, curNbl,
   internalVport->portNo, 0,
   
NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(curNbl),
-  completionList, NULL, TRUE);
+  0, completionList, NULL, TRUE);
 if 

Re: [ovs-dev] [PATCH v2] ovn-trace: Possible null dereference

2017-01-30 Thread Guru Shetty
On 29 January 2017 at 23:04, Alin Serdean 
wrote:

> From: Alin Serdean 
>
> Found by inspection.
>
> Signed-off-by: Alin Gabriel Serdean 
>
Applied, thanks!


> ---
> v2: change paranthesis as suggested by Gurucharan Shetty 
> ---
>  ovn/utilities/ovn-trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ovn/utilities/ovn-trace.c b/ovn/utilities/ovn-trace.c
> index 307556b..b894442 100644
> --- a/ovn/utilities/ovn-trace.c
> +++ b/ovn/utilities/ovn-trace.c
> @@ -1224,7 +1224,7 @@ execute_output(const struct ovntrace_datapath *dp,
> struct flow *uflow,
>  }
>  }
>
> -if (port->tunnel_key != in_key || allow_loopback) {
> +if ((port && port->tunnel_key != in_key) || allow_loopback) {
>  struct ovntrace_node *node = ovntrace_node_append(
>  super, OVNTRACE_NODE_PIPELINE,
>  "egress(dp=\"%s\", inport=\"%s\", outport=\"%s\")",
> --
> 2.10.2.windows.1
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] Get maximum ROI.

2017-01-30 Thread Dora Delgado
 

Hi,

 

I have gone through your company's website and thought you would be
interested in Sage One user's contacts for your campaign. It's very
important to generate good quality of leads to improve sales.

 

We provide customize service to our clients so that they can reach to their
targeted market and get maximum ROI and maximum satisfaction from our
service.

 

We can also provide other technology users as well so please let me know
your requirement so I can send you more details regarding the same.

 

Thank you for your valuable time, hope the above information will be helpful
to you.

 

Regards

Dora Delgado 

 

To OPT-OUT please reply Leave OUT in subject line.

 

 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] Your DHL parcel arrived our postal office

2017-01-30 Thread DHL EXPRESS DELIVERY
Track your package at DHL
Arrival Date:  25th January, 11:28AM

Dear Consignee,

Please receive your packages:
Your parcel arrived at the post office last week.
Our courier was unable to deliver the parcel to you due to incorrect delivery 
details, To receive your parcel
Due to internet security DHL now uses authentication for tracking Packages.
Click the link below and sign in with your email ID to confirm delivery details

Best Regards
© 2017 DHL International GmbH · All Rights Reserved




























"All students are issued with an iMail email account. This is the official 
method by which Sunway will communicate with you on a range of administrative 
and academic matters. When corresponding with Sunway via email, you must use 
your iMail email account. Using the iMail email account helps to ensure your 
identity and validity of the communication."
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] Do You Need ASO Services for Your App Marketing

2017-01-30 Thread ASMBee
 HI APP TEAM,

 Good day to you!

 As you are developing Apple Apps, do you need ASO services for your
app marketing?

 We're offering reliable ASO services for Apple app developers, and
have served more than 160 customers with success.

 Here is the detaisl page:
http://site.asmbee.com/app-store-optimization-service/
http://wizz.asmranker.com/index.php/campaigns/pf0204epem2ec/track-url/te411v0oxwb00/f38cbd549f1221ed8a101b822b50549b83fc8eb2

 
http://wizz.asmranker.com/index.php/campaigns/pf0204epem2ec/track-url/te411v0oxwb00/f38cbd549f1221ed8a101b822b50549b83fc8eb2

 Very sorry if I bothered you, but this could be really useful if
you're marketing your app in Apple Appstore.

 Feel free to contact us if you need any further information and
suggestions for ASO.

 Thanks with regards.

 _ASMBEE TEAM_

   
Very sorry if I'm botherring you

 This Email is delievered to d...@openvswitch.org , if this is not you,
or you don't want to see email from us:

 Unsubscribe You from The List
http://wizz.asmranker.com/index.php/campaigns/pf0204epem2ec/track-url/te411v0oxwb00/b1b80e26efc8faf192b10cb4a1820161890baa91
 
http://OQGV.trk.elasticemail.com/tracking/unsubscribe?msgid=U5UnbqU7QfcenEIDg3N6xQ2
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3 4/4] datapath-windows: Add support for OVS_KEY_ATTR_TCP set action

2017-01-30 Thread Alin Serdean


From: Guru Shetty [mailto:g...@ovn.org]
Sent: Friday, January 27, 2017 11:56 PM
To: Alin Serdean 
Cc: d...@openvswitch.org
Subject: Re: [ovs-dev] [PATCH v3 4/4] datapath-windows: Add support for 
OVS_KEY_ATTR_TCP set action



On 26 January 2017 at 15:43, Alin Serdean 
> wrote:
From: Alin Serdean 
>

This patch adds support for set action with OVS_KEY_ATTR_TCP attribute
(change TCP source or destination port).

If the source or destination TCP port was changed, update the TCP checksum.

A sample flow can look like the following:
set(tcp(src=80,dst=443))

Signed-off-by: Alin Gabriel Serdean 
>

I applied the series to master. Was this the series that you needed for OVN to 
work on Windows and needed it in 2.7?
[Alin Serdean] Thanks! Yes this series will allow OVN DHCP requests to be 
handled properly 
(https://mail.openvswitch.org/pipermail/ovs-dev/2017-January/327304.html) .
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev