Re: [ovs-dev] [PATCH 2/4] ofproto/bond: Drop traffic in balance-tcp mode without lacp.

2017-02-14 Thread nickcooper-zhangtonghao

> On Feb 15, 2017, at 11:51 AM, Andy Zhou  wrote:
> 
> On Mon, Feb 13, 2017 at 10:52 PM, nickcooper-zhangtonghao
> mailto:n...@opencloud.tech>> wrote:
>> The balance-tcp mode requires the upstream switch to support 802.3ad
>> with successful LACP negotiation. When bond ports are configured to
>> balance-tcp mode without lacp or lacp is disabled, drop the traffic.
>> 
>> Signed-off-by: nickcooper-zhangtonghao > >
> 
> I think the following change is equivalent and may be easier to
> follow, what do you think?
> 
> diff --git a/ofproto/bond.c b/ofproto/bond.c
> index 2703bc9..4c2781d 100644
> --- a/ofproto/bond.c
> +++ b/ofproto/bond.c
> @@ -787,6 +787,9 @@ bond_check_admissibility(struct bond *bond, const
> void *slave_,
> goto out;
> }
break;
We should add ‘break' here. If not, traffic(e.g lacp) will be dropped.
> case LACP_DISABLED:
> +if (bond->balance == BM_TCP) {
> +goto out;
> +}
> break;
> }

Thanks for your review.


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


Re: [ovs-dev] [PATCH ovs V3 05/25] other-config: Add tc-policy switch to control tc flower flag

2017-02-14 Thread Roi Dayan



On 14/02/2017 01:53, Chandran, Sugesh wrote:



Regards
_Sugesh



-Original Message-
From: Roi Dayan [mailto:r...@mellanox.com]
Sent: Wednesday, February 8, 2017 3:29 PM
To: d...@openvswitch.org
Cc: Paul Blakey ; Or Gerlitz
; Hadar Hen Zion ; Shahar
Klein ; Mark Bloch ; Rony
Efraim ; Fastabend, John R
; Joe Stringer ; Andy
Gospodarek ; Lance Richardson
; Marcelo Ricardo Leitner ;
Simon Horman ; Jiri Pirko
; Chandran, Sugesh 
Subject: [PATCH ovs V3 05/25] other-config: Add tc-policy switch to control tc
flower flag




*ovs_other_config)

 VLOG_INFO("netdev: Flow API Enabled");

+tc_set_policy(smap_get_def(ovs_other_config, "tc-policy",
+   TC_POLICY_DEFAULT));
+

[Sugesh] I feel we better call this policy as hw-ofld-policy than tc-policy. As 
far as I know tc is one of the way to program the hardware. In the dpdk dpif 
there must be be another flow programming interface that can be used to program 
the offload. It would be nice if we can use the same configuration option  for 
all the deployments.


currently the options used in tc-policy are somewhat tc specific.
the options could be a lot different for other interfaces.
maybe leave this like this for now?
if another interface will have a policy then we can revisit this if the 
same options apply or if we can merge those options or maybe we'll see 
we'll need an entirely different [interface]-policy option?



 ovsthread_once_done(&once);
 }
 }
diff --git a/lib/tc.c b/lib/tc.c
index 431242b..b2e3d21 100644
--- a/lib/tc.c
+++ b/lib/tc.c
@@ -38,6 +38,14 @@ VLOG_DEFINE_THIS_MODULE(tc);

 static struct vlog_rate_limit parse_err = VLOG_RATE_LIMIT_INIT(5, 5);

+enum tc_offload_policy {
+TC_POLICY_NONE,
+TC_POLICY_SKIP_SW,
+TC_POLICY_SKIP_HW
+};
+
+static enum tc_offload_policy tc_policy = TC_POLICY_NONE;
+
 /* Returns tc handle 'major':'minor'. */  unsigned int
tc_make_handle(unsigned int major, unsigned int minor) @@ -719,6 +727,18
@@ tc_get_flower(int ifindex, int prio, int handle, struct tc_flower *flower)
 return error;
 }

+static int
+tc_get_tc_cls_policy(enum tc_offload_policy policy) {

[Sugesh] tc_get_hw_ofld_policy ??

+if (policy == TC_POLICY_SKIP_HW) {
+return TCA_CLS_FLAGS_SKIP_HW;
+} else if (policy == TC_POLICY_SKIP_SW) {
+return TCA_CLS_FLAGS_SKIP_SW;
+}
+
+return 0;
+}
+
 static void
 nl_msg_put_act_push_vlan(struct ofpbuf *request, uint16_t vid, uint8_t
prio)  { @@ -989,7 +1009,7 @@ nl_msg_put_flower_options(struct ofpbuf
*request, struct tc_flower *flower)
 }
 }

-nl_msg_put_u32(request, TCA_FLOWER_FLAGS, 0);
+nl_msg_put_u32(request, TCA_FLOWER_FLAGS,
+ tc_get_tc_cls_policy(tc_policy));

 if (flower->tunnel.tunnel) {
 nl_msg_put_flower_tunnel(request, flower); @@ -1033,3 +1053,24 @@
tc_replace_flower(int ifindex, uint16_t prio, uint32_t handle,

 return error;
 }
+
+void
+tc_set_policy(const char *policy)
+{
+if (!policy) {
+return;
+}
+
+if (!strcmp(policy, "skip_sw")) {
+tc_policy = TC_POLICY_SKIP_SW;
+} else if (!strcmp(policy, "skip_hw")) {
+tc_policy = TC_POLICY_SKIP_HW;
+} else if (!strcmp(policy, "none")) {
+tc_policy = TC_POLICY_NONE;
+} else {
+VLOG_WARN("tc: Invalid policy '%s'", policy);
+return;
+}
+
+VLOG_INFO("tc: Using policy '%s'", policy); }
diff --git a/lib/tc.h b/lib/tc.h
index 5ca6c55..6f6cc09 100644
--- a/lib/tc.h
+++ b/lib/tc.h
@@ -115,5 +115,6 @@ int tc_flush(int ifindex);  int tc_dump_flower_start(int
ifindex, struct nl_dump *dump);  int parse_netlink_to_tc_flower(struct
ofpbuf *reply,
struct tc_flower *flower);
+void tc_set_policy(const char *policy);

 #endif /* tc.h */
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index
942e68f..8b9bdcb 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -183,6 +183,23 @@
 
   

+  
+
+Specified the policy used with HW offloading.
+Options:
+none- Add software rule and offload rule to 
HW.
+skip_sw - Offload rule to HW only.
+skip_hw - Add software rule without offloading 
rule
to HW.
+
+
+This is only relevant if HW offloading is enabled (hw-offload).
+
+
+  The default value is false.
+
+  
+
   
 
--
2.7.4



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


Re: [ovs-dev] [PATCH ovs V3 04/25] other-config: Add hw-offload switch to control netdev flow offloading

2017-02-14 Thread Roi Dayan



On 14/02/2017 01:53, Chandran, Sugesh wrote:



Regards
_Sugesh



-Original Message-
From: Roi Dayan [mailto:r...@mellanox.com]
Sent: Wednesday, February 8, 2017 3:29 PM
To: d...@openvswitch.org
Cc: Paul Blakey ; Or Gerlitz
; Hadar Hen Zion ; Shahar
Klein ; Mark Bloch ; Rony
Efraim ; Fastabend, John R
; Joe Stringer ; Andy
Gospodarek ; Lance Richardson
; Marcelo Ricardo Leitner ;
Simon Horman ; Jiri Pirko
; Chandran, Sugesh 
Subject: [PATCH ovs V3 04/25] other-config: Add hw-offload switch to control
netdev flow offloading

From: Paul Blakey 

 }

diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index
146a816..942e68f 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -170,6 +170,17 @@
 
   The default is 1.
 
+
+
+  
+
+  Set this value to true to enable netdev flow offload.
+
+
+  The default value is false. Changing this value requires
+  restarting the daemon

[Sugesh] Hope its only the case of current implementation. Its possible to 
change the hardware offload status at run-time in the future. The system will 
re-populate the hardware ports accordingly when the status get changed.


We actually already changed that and the current implementation is same 
as for dpdk-init where we can change from false to true during run time 
but not from true back to false again. can be fixed later.


In case you do change this at run time we are missing to go over the 
netdevs and add the needed ingress qdisc so this will be needed to be 
done manually if working with this patchset.

We intend to fix this for V4.

I see the comment requiring restart also still exists for dpdk-init.
Maybe we should keep it currently as well until it's fully supported..


+
   

   


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


Re: [ovs-dev] how to create new ovsdb tables and code c funtion related?

2017-02-14 Thread Valentine Sinitsyn

Hi,

On 15.02.2017 10:08, lg.yue wrote:

Hi, everyone:

一. after i change ovn/ovn-[sn]b.ovsschema,  how to apply the changes?
makefile compiles ovn/ovn-[sn]b.ovsschema to
ovn/lib/ovn-[s,n]b-idl.ovsidl, i can not  find anyone use
ovn-[s,n]b-idl.ovsidl.
As the name suggests, *.ovsschema defines schema only. You still need to 
write code which uses your new tables. It should be possible to fill 
them with ovs-vsctl, but without something reading them, this would be 
dead data.



二. lets take sb for example.
 ovsdb-server --detach --monitor -vconsole:off
--log-file=/var/log/openvswitch/ovsdb-server-sb.log
--remote=punix:/run/openvswitch/ovnsb_db.sock
--pidfile=/run/openvswitch/ovnsb_db.pid
--remote=db:OVN_Southbound,SB_Global,connections --unixctl=ovnsb_db.ctl
--private-key=db:OVN_Southbound,SSL,private_key
--certificate=db:OVN_Southbound,SSL,certificate
--ca-cert=db:OVN_Southbound,SSL,ca_cert /var/lib/openvswitch/ovnsb_db.db
1. who launches the ovsdb-server process?  and when?
Usually this happens from the init scripts. The real machinery is under 
${PREFIX}/share/openvswitch/scripts.



2. how  /var/lib/openvswitch/ovnsb_db.db is created?
You can use ovsdb-tool create, see INSTALL.md. ovn-ctl script called 
from init scripts should handle this automatically.



3. 'ovn-sbctl set-connection ptp:6642'  how this instruction
associates port 6642 with ovsdb-server (please tell the source code)
三. supported the new db is created, whether  or not i need to code c
funtion  like sbrec_idl_class in ovn/lib/ovn-sb-idl.c
This is basically a compiled schema definition. You should start at 
ovn/utilities/ovn-sbctl.c





 too many questions, please help me figure it out.
thanks very much
Just don't forget to consult the documentation, some of your questions 
are already answered there ;-)


Valentine








At 2017-02-14 21:15:42, "Valentine Sinitsyn"  
wrote:

Hi,

Look at ovn/ovn-[sn]b.ovsschema. It's JSON. You'll also need to update
the documentation and the cksum; make explains how to do it.

Best,
Valentine
___
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


Re: [ovs-dev] [PATCH] ovsdb: Print enum elements for man pages in alphabetical order.

2017-02-14 Thread Justin Pettit

> On Feb 14, 2017, at 8:50 PM, Ben Pfaff  wrote:
> 
> On Tue, Feb 14, 2017 at 04:55:11PM -0800, Justin Pettit wrote:
>> The previous behavior printed them in a pseudorandom order, which made
>> them look odd in man pages.
>> 
>> Signed-off-by: Justin Pettit 
> 
> Assuming it builds:
> 
> Acked-by: Ben Pfaff 

Pushed.  Thanks.

--Justin


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


Re: [ovs-dev] [PATCH ovs V3 03/25] netdev: Adding a new netdev api to be used for offloading flows

2017-02-14 Thread Roi Dayan



On 14/02/2017 01:53, Chandran, Sugesh wrote:



Regards
_Sugesh



-Original Message-
From: Roi Dayan [mailto:r...@mellanox.com]
Sent: Wednesday, February 8, 2017 3:29 PM
To: d...@openvswitch.org
Cc: Paul Blakey ; Or Gerlitz
; Hadar Hen Zion ; Shahar
Klein ; Mark Bloch ; Rony
Efraim ; Fastabend, John R
; Joe Stringer ; Andy
Gospodarek ; Lance Richardson
; Marcelo Ricardo Leitner ;
Simon Horman ; Jiri Pirko
; Chandran, Sugesh 
Subject: [PATCH ovs V3 03/25] netdev: Adding a new netdev api to be used
for offloading flows

From: Paul Blakey 


.


+
 /* Network device class structure, to be defined by each implementation of
a
  * network device.
  *
@@ -769,6 +777,49 @@ struct netdev_class {

 /* Discards all packets waiting to be received from 'rx'. */
 int (*rxq_drain)(struct netdev_rxq *rx);
+
+/* ##  ## */
+/* ## netdev flow offloading functions ## */
+/* ##  ## */

[Sugesh] The netdev offload api are good to call out offload APIs. Something 
like hw_offload_flow_flush or offload_flow_flush. Thoughts??


to make sure I understand. are you suggesting here to add prefix for 
offload related functions?



+
+/* If a particular netdev class does not support offloading flows, all
+these
+ * function pointers must be NULL. */
+
+/* Deleting all offloaded flows from netdev */
+int (*flow_flush)(struct netdev *);
+/* Dumping interface:
+ * Usage is as with dpif_port_dump api (create, next, destory).
+ * Create sets dump on success or returns error status on failure. */
+int (*flow_dump_create)(struct netdev *, struct netdev_flow_dump
**dump);
+int (*flow_dump_destroy)(struct netdev_flow_dump *);
+ /* rbuffer is for use of the implementation (e.g using nl_dump),
+ * and is usually shared for the given thread that runs flow_dump_next.
+ * wbuffer is the buffer that dumped actions will be stored in, and given
+ * pointers to. */
+bool (*flow_dump_next)(struct netdev_flow_dump *, struct match *,
+   struct nlattr **actions,
+   struct dpif_flow_stats *stats, ovs_u128 *ufid,
+   struct ofpbuf *rbuffer, struct ofpbuf
+ *wbuffer);
+
+/* Offload the given flow (match, actions, stats, ufid) on netdev.
+ * If stats isn't null, sets the given stats for that flow.
+ * To modify the flow, use the same ufid.
+ * actions are in netlink format, as with struct dpif_flow_put.
+ * info is anything else that is need to offload the flow. */
+int (*flow_put)(struct netdev *, struct match *, struct nlattr *actions,
+size_t actions_len, struct dpif_flow_stats *,
+const ovs_u128 *ufid, struct offload_info *info);
+/* Queries the flow with specified ufid on netdev.
+ * Fills match, actions, stats as with flow_dump_next */
+int (*flow_get)(struct netdev *, struct match *, struct nlattr **actions,
+struct dpif_flow_stats *, const ovs_u128 *ufid,
+struct ofpbuf *);
+/* Deletes the given flow specified by ufid from netdev.
+ * If stats is not null, fills it with flow stats. */
+int (*flow_del)(struct netdev *, struct dpif_flow_stats *,
+const ovs_u128 *ufid);
+/* Initializies the netdev flow api. */
+int (*init_flow_api)(struct netdev *);
 };


.

2.7.4



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


[ovs-dev] how to create new ovsdb tables and code c funtion related?

2017-02-14 Thread lg.yue
Hi, everyone:


一. after i change ovn/ovn-[sn]b.ovsschema,  how to apply the changes?  makefile 
compiles ovn/ovn-[sn]b.ovsschema to  ovn/lib/ovn-[s,n]b-idl.ovsidl, i can not  
find anyone use ovn-[s,n]b-idl.ovsidl.
二. lets take sb for example.
 ovsdb-server --detach --monitor -vconsole:off 
--log-file=/var/log/openvswitch/ovsdb-server-sb.log 
--remote=punix:/run/openvswitch/ovnsb_db.sock 
--pidfile=/run/openvswitch/ovnsb_db.pid 
--remote=db:OVN_Southbound,SB_Global,connections --unixctl=ovnsb_db.ctl 
--private-key=db:OVN_Southbound,SSL,private_key 
--certificate=db:OVN_Southbound,SSL,certificate 
--ca-cert=db:OVN_Southbound,SSL,ca_cert /var/lib/openvswitch/ovnsb_db.db
1. who launches the ovsdb-server process?  and when?
2. how  /var/lib/openvswitch/ovnsb_db.db is created?
3. 'ovn-sbctl set-connection ptp:6642'  how this instruction associates 
port 6642 with ovsdb-server (please tell the source code)
三. supported the new db is created, whether  or not i need to code c funtion  
like sbrec_idl_class in ovn/lib/ovn-sb-idl.c




 too many questions, please help me figure it out.
thanks very much








At 2017-02-14 21:15:42, "Valentine Sinitsyn"  
wrote:
>Hi,
>
>Look at ovn/ovn-[sn]b.ovsschema. It's JSON. You'll also need to update 
>the documentation and the cksum; make explains how to do it.
>
>Best,
>Valentine
>___
>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


Re: [ovs-dev] [PATCH] ovsdb: Print enum elements for man pages in alphabetical order.

2017-02-14 Thread Ben Pfaff
On Tue, Feb 14, 2017 at 04:55:11PM -0800, Justin Pettit wrote:
> The previous behavior printed them in a pseudorandom order, which made
> them look odd in man pages.
> 
> Signed-off-by: Justin Pettit 

Assuming it builds:

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


Re: [ovs-dev] [PATCH 3/4] ofproto/bond: balance-slb mode fallbacks to active-backup mode.

2017-02-14 Thread Andy Zhou
On Mon, Feb 13, 2017 at 10:52 PM, nickcooper-zhangtonghao
 wrote:
> lacp-fallback-ab determines the behavior of OvS bond in LACP mode.
> If the partner switch does not support LACP, setting this option
> to true allows OvS to fallback to active-backup. The balance-tcp
> mode requires lacp. If LACP negotiation fails and
> other-config:lacp-fallback-ab is true, then active-backup mode is
> used. But if users configure the bond port to balance-slb and lacp
> (unsuccessfully), active-backup mode is also used.
>
> Signed-off-by: nickcooper-zhangtonghao 

I think only accepts input from one port may be too restrictive. In case the
up stream switch choose to transmit on the port that we deicde not to receive,
then connection will be broken.

It seems the currently the lacp_fallback_ab only applies to
transmit(output).  Why should
it also apply to receive?
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 2/4] ofproto/bond: Drop traffic in balance-tcp mode without lacp.

2017-02-14 Thread Andy Zhou
On Mon, Feb 13, 2017 at 10:52 PM, nickcooper-zhangtonghao
 wrote:
> The balance-tcp mode requires the upstream switch to support 802.3ad
> with successful LACP negotiation. When bond ports are configured to
> balance-tcp mode without lacp or lacp is disabled, drop the traffic.
>
> Signed-off-by: nickcooper-zhangtonghao 

I think the following change is equivalent and may be easier to
follow, what do you think?

diff --git a/ofproto/bond.c b/ofproto/bond.c
index 2703bc9..4c2781d 100644
--- a/ofproto/bond.c
+++ b/ofproto/bond.c
@@ -787,6 +787,9 @@ bond_check_admissibility(struct bond *bond, const
void *slave_,
 goto out;
 }
 case LACP_DISABLED:
+if (bond->balance == BM_TCP) {
+goto out;
+}
 break;
 }
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH 1/4] ofproto/bond: Validate active-slave mac.

2017-02-14 Thread Andy Zhou
On Mon, Feb 13, 2017 at 10:52 PM, nickcooper-zhangtonghao
 wrote:
> That the mac of active-slave is invalid(e.g. 00:00:00:00:00:00)
> is incidental. The reason is described as below.
>
> In the bridge_reconfig():
> 1. bond devices created in port_configure().
> 2. the bonded interfaces may be disabled even calling bridge_run__(),
>because the interface link is not ready.
>
> The OvS will run bridge_run__() in next loop. In next loop, the
> active-slave may be selected. But OvS the bridge_reconfig() again,
> the bond_reconfigure() set active-slave mac zero and flag false.
> If using the 'ovs-appctl bond/show bond-name' to check active-slave
> mac, you will find the mac is zero and mac in the ovsdb is also zero.
>
> The active_slave_mac and active_slave_changed should be initialized
> when created.
>
> Signed-off-by: nickcooper-zhangtonghao 

Thanks for working on this!

This patch looks good to me. I will push it after we converged on the other
patches in the series.


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


[ovs-dev] [PATCH] ovsdb: Print enum elements for man pages in alphabetical order.

2017-02-14 Thread Justin Pettit
The previous behavior printed them in a pseudorandom order, which made
them look odd in man pages.

Signed-off-by: Justin Pettit 
---
 python/ovs/db/types.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py
index 78d5fcd..50eb505 100644
--- a/python/ovs/db/types.py
+++ b/python/ovs/db/types.py
@@ -296,6 +296,7 @@ class BaseType(object):
 if self.enum:
 literals = [value.toEnglish(escapeLiteral)
 for value in self.enum.values]
+literals.sort()
 if len(literals) == 1:
 english = 'must be %s' % (literals[0])
 elif len(literals) == 2:
-- 
1.9.1

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


Re: [ovs-dev] [PATCH 3/3] rhel: Fix ifup and ifdown after DPDK naming change.

2017-02-14 Thread Aaron Conole
Daniele Di Proietto  writes:

> On 02/02/2017 12:48, "Ben Pfaff"  wrote:
>
>>On Tue, Jan 24, 2017 at 06:21:53PM -0800, Daniele Di Proietto wrote:
>>> Names like dpdk0 and dpdk1 are not enough to identify a DPDK interface.
>>> We could update README.RHEL.rst and add
>>> 
>>> OVS_EXTRA='set Interface ${DEVICE} options:dpdk-devargs=:01:00.0'
>>> 
>>> but a better solution is to add new parameters in the configuration file
>>> to explicitly specify the dpdk-devargs.
>>> 
>>> Fixes: 55e075e65ef9("netdev-dpdk: Arbitrary 'dpdk' port naming")
>>> Signed-off-by: Daniele Di Proietto 
>>
>>This seems useful.
>
> Hi Ben,
>
> thanks for looking at this one and sorry for the delay.
>
>
>>
>>I don't understand why this uses "set" then $1.  Are you concerned that
>>BOND_DPDK_DEVARGS might have multiple words and you want to get just the
>>first one?
>
> Now for each interface we need to specify two parameters: the name (it is
> chosen by the user and it can be arbitrary) and the devargs (most likely the
> PCI address).
>
> With this patch the user enters the names in BOND_IFACES and the devargs in
> BOND_DPDK_DEVARGS.
>
> set -- ${BOND_DPDK_DEVARGS}
> for _iface in ${BOND_IFACE}; do
> echo $_iface $1
> shift
> done
>
> is a quick and dirty way to iterate through both lists in the same loop.
>
> Or maybe we could change the interface to specify in the same list the
> name and the devargs.
>
> Aaron, since you were looking at this as well, do you have any preference
> on the user interface?

I don't have a preference, but I think typically put OVS_ in front of
variables in the ifcfg-* files.

Otherwise, ACK

> Thanks,
>
> Daniele
>
>>
>>> OVSDPDKBond)
>>> ifup_ovs_bridge
>>> +   set -- ${BOND_DPDK_DEVARGS}
>>> for _iface in $BOND_IFACES; do
>>> -   IFACE_TYPES="${IFACE_TYPES} -- set interface ${_iface} 
>>> type=dpdk"
>>> +   IFACE_TYPES="${IFACE_TYPES} -- set interface ${_iface} 
>>> type=dpdk options:dpdk-devargs=$1"
>>> +   shift
>>> done
>>> ovs-vsctl -t ${TIMEOUT} \
>>> -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] Reclutamiento: Facebook y LinkedIn

2017-02-14 Thread Recursos Humanos - 12 Temas
Aprovechamiento de los recursos Tecnológicos avanzados

RECLUTAMIENTO: dónde localizar talento humano ideal para la Empresa + 11 temas

El reclutamiento, selección e incorporación de recursos humanos de calidad, son 
exigencias fundamentales para el logro de los objetivos estratégicos de la 
organización. El proceso inicia con la búsqueda de talento y concluye con la 
incorporación de los mejores candidatos, que llenen las expectativas generadas, 
al interior de cada organización.

Los múltiples desafíos de este proceso van desde la lectura precisa del 
entorno, hasta lograr el resultado esperado: asegurar la idoneidad de los 
candidatos.

Si desea que le adjuntemos el temario Sin compromiso, responda este correo con 
la palabra: Info-RH, juntos con los datos solicitados.

Nombre:
Teléfono:
Correo:

y le enviaremos la información completa de este tema que está incluido en 
nuestro Plan Integral de Capacitación de RECURSOS HUMANOS.
centro telefónico: 018002129393


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


Re: [ovs-dev] [PATCH ovs V3 23/25] dpctl: Add an option to dump only certain kinds of flows

2017-02-14 Thread Simon Horman
On Wed, Feb 08, 2017 at 05:29:36PM +0200, Roi Dayan wrote:
> From: Paul Blakey 
> 
> Usage:
> # to dump all datapath flows (default):
> ovs-dpctl dump-flows
> 
> # to dump only flows that in kernel datapath:
> ovs-dpctl dump-flows type=ovs

ovs does not seem to be an intuitive name for software datapath flows to me.

> # to dump only flows that are offloaded:
> ovs-dpctl dump-flows type=offloaded

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


Re: [ovs-dev] [PATCH ovs V3 15/25] dpif-netlink: Delete a flow from netdev

2017-02-14 Thread Simon Horman
On Wed, Feb 08, 2017 at 05:29:28PM +0200, Roi Dayan wrote:
> From: Paul Blakey 
> 
> If a flow was offloaded to a netdev we delete it using netdev
> flow api.
> 
> Signed-off-by: Paul Blakey 
> Reviewed-by: Roi Dayan 
> ---
>  lib/dpif-netlink.c | 12 +++-
>  lib/netdev.c   | 15 +++
>  2 files changed, 26 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
> index a7525de..b5f5694 100644
> --- a/lib/dpif-netlink.c
> +++ b/lib/dpif-netlink.c
> @@ -2086,7 +2086,17 @@ try_send_to_netdev(struct dpif_netlink *dpif, struct 
> dpif_op *op)
> put->actions, put->actions_len, put->ufid, "PUT");
>  return parse_flow_put(dpif, put);
>  }
> -case DPIF_OP_FLOW_DEL:
> +case DPIF_OP_FLOW_DEL: {
> +struct dpif_flow_del *del = &op->u.flow_del;
> +
> +if (!del->ufid) {
> +break;
> +}
> +dbg_print_flow(del->key, del->key_len, NULL, 0, NULL, 0,
> +   del->ufid, "DEL");
> +return netdev_ports_flow_del(DPIF_HMAP_KEY(&dpif->dpif), del->ufid,
> + del->stats);
> +}

I'm not sure that I understand how the above implements the logic
to delete a flow from hardware if it was offloaded. Instead it seems to:

1. Not delete flows that do not have a UID and otherwise
2. Not delete flows that were not offloaded.

In any case I agree with Sugesh's comment that it seems useful to use a
hash of offloaded flows to determine which flows to delete from hardware
(and get from hardware in patch 17).

>  case DPIF_OP_FLOW_GET:
>  case DPIF_OP_EXECUTE:
>  default:
> diff --git a/lib/netdev.c b/lib/netdev.c
> index a0206b0..c6a4582 100644
> --- a/lib/netdev.c
> +++ b/lib/netdev.c
> @@ -2269,6 +2269,21 @@ netdev_ports_flow_dumps_create(const void *obj, int 
> *ports)
>  return dumps;
>  }
>  
> +int
> +netdev_ports_flow_del(const void *obj, const ovs_u128 *ufid,
> +  struct dpif_flow_stats *stats)
> +{
> +struct port_to_netdev_data *data;
> +
> +HMAP_FOR_EACH(data, node, &port_to_netdev) {
> +if (data->obj == obj && !netdev_flow_del(data->netdev, stats, ufid)) 
> {
> +return 0;
> +}
> +}
> +
> +return ENOENT;
> +}
> +
>  bool netdev_flow_api_enabled = false;
>  
>  void
> -- 
> 2.7.4
> 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovs V3 12/25] dpif-netlink: Use netdev flow put api to insert a flow

2017-02-14 Thread Simon Horman
On Wed, Feb 08, 2017 at 05:29:25PM +0200, Roi Dayan wrote:
> From: Paul Blakey 
> 
> Using the new netdev flow api operate will now try and
> offload flows to the relevant netdev of the input port.
> Other operate methods flows will come in later patches.
> 
> Signed-off-by: Paul Blakey 
> Reviewed-by: Roi Dayan 
> ---
>  lib/dpif-netlink.c | 222 
> +++--
>  lib/odp-util.c |  53 +
>  lib/odp-util.h |   3 +
>  3 files changed, 271 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
> index 5519c10..a7525de 100644
> --- a/lib/dpif-netlink.c
> +++ b/lib/dpif-netlink.c

...

> @@ -1922,18 +1921,227 @@ dpif_netlink_operate__(struct dpif_netlink *dpif,
>  return n_ops;
>  }
>  
> +static int
> +parse_flow_get(struct dpif_netlink *dpif, struct dpif_flow_get *get)
> +{
> +struct dpif_flow *dpif_flow = get->flow;
> +struct match match;
> +struct nlattr *actions;
> +struct dpif_flow_stats stats;
> +struct ofpbuf buf;
> +uint64_t act_buf[1024 / 8];
> +struct odputil_keybuf maskbuf;
> +struct odputil_keybuf keybuf;
> +struct odputil_keybuf actbuf;
> +struct ofpbuf key, mask, act;
> +int err;
> +
> +ofpbuf_use_stack(&buf, &act_buf, sizeof act_buf);
> +err = netdev_ports_flow_get(DPIF_HMAP_KEY(&dpif->dpif), &match,
> +&actions, &stats, get->ufid, &buf);
> +if (err) {
> +return err;
> +}
> +
> +VLOG_DBG("found flow from netdev, translating to dpif flow");
> +
> +ofpbuf_use_stack(&key, &keybuf, sizeof keybuf);
> +ofpbuf_use_stack(&act, &actbuf, sizeof actbuf);
> +ofpbuf_use_stack(&mask, &maskbuf, sizeof maskbuf);
> +dpif_netlink_netdev_match_to_dpif_flow(&match, &key, &mask, actions,
> +   &stats,
> +   (ovs_u128 *) get->ufid,
> +   dpif_flow,
> +   false);
> +ofpbuf_put(get->buffer, nl_attr_get(actions), nl_attr_get_size(actions));
> +dpif_flow->actions = ofpbuf_at(get->buffer, 0, 0);
> +dpif_flow->actions_len = nl_attr_get_size(actions);
> +
> +// XXX: missing ofpbuf_uninit?

If I am reading things right then the ofpufs are all initialised using
ofpbuf_use_stack(). If so then calling ofpbuf_uninit() should not be
necessary.

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


Re: [ovs-dev] [PATCH ovs V3 09/25] dpif-netlink: Dump netdevs flows on flow dump

2017-02-14 Thread Simon Horman
On Wed, Feb 08, 2017 at 05:29:22PM +0200, Roi Dayan wrote:
> From: Paul Blakey 
> 
> While dumping flows, dump flows that were offloaded to
> netdev and parse them back to dpif flow.
> 
> Signed-off-by: Paul Blakey 
> Reviewed-by: Roi Dayan 
> ---
>  lib/dpif-netlink.c | 178 
> +
>  1 file changed, 178 insertions(+)
> 
> diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
> index 0a2e429..5519c10 100644
> --- a/lib/dpif-netlink.c
> +++ b/lib/dpif-netlink.c

...

> @@ -1425,6 +1465,13 @@ struct dpif_netlink_flow_dump_thread {
>  struct dpif_flow_stats stats;
>  struct ofpbuf nl_flows; /* Always used to store flows. */
>  struct ofpbuf *nl_actions;  /* Used if kernel does not supply actions. */
> +int netdev_dump_idx;/* This thread current netdev dump index */
> +bool netdev_done;   /* If we are finished dumping netdevs */
> +
> +/* (Key/Mask/Actions) Buffers for netdev dumpin */

s/dumpin/dumping/

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


Re: [ovs-dev] [PATCH ovs V3 07/25] dpif-netlink: Flush added ports using netdev flow api

2017-02-14 Thread Simon Horman
On Wed, Feb 08, 2017 at 05:29:20PM +0200, Roi Dayan wrote:
> From: Paul Blakey 
> 
> If netdev flow offloading is enabled, flush all
> added ports using netdev flow api.
> 
> Signed-off-by: Paul Blakey 
> Reviewed-by: Roi Dayan 

...

> diff --git a/lib/netdev.c b/lib/netdev.c
> index 792ab8c..a0206b0 100644
> --- a/lib/netdev.c
> +++ b/lib/netdev.c
> @@ -2225,6 +2225,50 @@ netdev_hmap_port_del(odp_port_t port_no, const void 
> *obj)
>  return ret;
>  }
>  
> +void
> +netdev_ports_flow_flush(const void *obj)
> +{
> +struct port_to_netdev_data *data;
> +
> +HMAP_FOR_EACH(data, node, &port_to_netdev) {
> +if (data->obj == obj) {
> +netdev_flow_flush(data->netdev);
> +}
> +}
> +}
> +
> +struct netdev_flow_dump **
> +netdev_ports_flow_dumps_create(const void *obj, int *ports)
> +{
> +struct port_to_netdev_data *data;
> +struct netdev_flow_dump **dumps;
> +int count = 0;
> +int i = 0;
> +
> +HMAP_FOR_EACH(data, node, &port_to_netdev) {
> +if (data->obj == obj) {
> +count++;
> +}
> +}
> +
> +dumps = count ? xzalloc(sizeof(dumps[0]) * count) : NULL;
> +
> +HMAP_FOR_EACH(data, node, &port_to_netdev) {
> +if (data->obj == obj) {
> +int err = netdev_flow_dump_create(data->netdev, &dumps[i]);
> +if (err) {
> +continue;
> +}
> +
> +dumps[i]->port = data->dpif_port.port_no;
> +i++;
> +}
> +}
> +
> +*ports = i;
> +return dumps;
> +}
> +
>  bool netdev_flow_api_enabled = false;
>  
>  void

netdev_ports_flow_dumps_create() does not appear to relate to changelog.
Perhaps it should be moved to a different or new patch?
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovs V3 06/25] dpif: Save added ports in a port map for netdev flow api use

2017-02-14 Thread Simon Horman
On Wed, Feb 08, 2017 at 05:29:19PM +0200, Roi Dayan wrote:
> From: Paul Blakey 
> 
> To use netdev flow offloading api, dpifs needs to iterate over
> added ports. This addition inserts the added dpif ports in a hash map,
> The map will also be used to translate dpif ports to netdevs.
> 
> Signed-off-by: Paul Blakey 
> Reviewed-by: Roi Dayan 
> ---
>  lib/dpif.c   |  25 
>  lib/dpif.h   |   2 +
>  lib/netdev.c | 121 
> +++
>  lib/netdev.h |  15 
>  4 files changed, 163 insertions(+)
> 
> diff --git a/lib/dpif.c b/lib/dpif.c
> index 57aa3c6..d4e4c0a 100644
> --- a/lib/dpif.c
> +++ b/lib/dpif.c

...

> @@ -545,6 +560,14 @@ dpif_port_add(struct dpif *dpif, struct netdev *netdev, 
> odp_port_t *port_nop)
>  if (!error) {
>  VLOG_DBG_RL(&dpmsg_rl, "%s: added %s as port %"PRIu32,
>  dpif_name(dpif), netdev_name, port_no);
> +
> +/* temp dpif_port, will be cloned in netdev_hmap_port_add */
> +struct dpif_port dpif_port;
> +
> +dpif_port.type = CONST_CAST(char *, netdev_get_type(netdev));
> +dpif_port.name = CONST_CAST(char *, netdev_name);
> +dpif_port.port_no = port_no;
> +netdev_hmap_port_add(netdev, DPIF_HMAP_KEY(dpif), &dpif_port);

I wonder if it would be cleaner to get the dpif_port from the dpif API,
for example by providing a optionally NULL struct dpif_port * parameter to
dpif_class->port_add.

>  } else {
>  VLOG_WARN_RL(&error_rl, "%s: failed to add %s as port: %s",
>   dpif_name(dpif), netdev_name, ovs_strerror(error));

...

> diff --git a/lib/netdev.h b/lib/netdev.h
> index d7d4199..96300c4 100644
> --- a/lib/netdev.h
> +++ b/lib/netdev.h
> @@ -181,6 +181,21 @@ int netdev_init_flow_api(struct netdev *);
>  extern bool netdev_flow_api_enabled;
>  void netdev_set_flow_api_enabled(const struct smap *ovs_other_config);
>  
> +struct dpif_port;
> +int netdev_hmap_port_add(struct netdev *, const void *obj, struct dpif_port 
> *);
> +struct netdev *netdev_hmap_port_get(odp_port_t port, const void *obj);
> +int netdev_hmap_port_del(odp_port_t port, const void *obj);
> +struct netdev_flow_dump **netdev_ports_flow_dumps_create(const void *obj,
> + int *ports);
> +void netdev_ports_flow_flush(const void *obj);

Two functions function above are defined in the following patch.
Probably their definitions should go there too.

> +int netdev_ports_flow_del(const void *obj, const ovs_u128 *ufid,
> +  struct dpif_flow_stats *stats);

Likewise, the above patch seems to be defined in patch 17 of this series.

> +int netdev_ports_flow_get(const void *obj, struct match *match,
> +  struct nlattr **actions,
> +  struct dpif_flow_stats *stats,
> +  const ovs_u128 *ufid, struct ofpbuf *buf);

The above function is declared in this patch, used in patch 12 and
defined in patch 17. This does not seem correct from a bisection point of
view.

> +odp_port_t netdev_hmap_port_get_byifidx(int ifindex);
> +
>  /* native tunnel APIs */
>  /* Structure to pass parameters required to build a tunnel header. */
>  struct netdev_tnl_build_header_params {
> -- 
> 2.7.4
> 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] how to set up ovn's nb and sb table and column structure?

2017-02-14 Thread Valentine Sinitsyn

Hi,

Look at ovn/ovn-[sn]b.ovsschema. It's JSON. You'll also need to update 
the documentation and the cksum; make explains how to do it.


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


[ovs-dev] how to set up ovn's nb and sb table and column structure?

2017-02-14 Thread lg.yue
Hi, all:
1. how to set up ovn's nb and sb table and column structure?  i need to create 
new tables.




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


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

2017-02-14 Thread Loftus, Ciara
> 
> On 02/10/2017 10:57 AM, Ciara Loftus wrote:
> > Unconditional insertion of EMC entries results in EMC thrashing at high
> > numbers of parallel flows. When this occurs, the performance of the EMC
> > often falls below that of the dpcls classifier, rendering the EMC
> > practically useless.
> >
> > Instead of unconditionally inserting entries into the EMC when a miss
> > occurs, use a 1% probability of insertion. This ensures that the most
> > frequent flows have the highest chance of creating an entry in the EMC,
> > and the probability of thrashing the EMC is also greatly reduced.
> >
> > The probability of insertion is configurable, via the
> > other_config:emc-insert-prob option. For example the following command
> > increases the insertion probability to 10%.
> >
> > ovs-vsctl set Open_vSwitch . other_config:emc-insert-prob=10
> >
> > Signed-off-by: Ciara Loftus 
> > Signed-off-by: Georg Schmuecking 
> > Co-authored-by: Georg Schmuecking 
> > ---
> > v8:
> > - Floating point precision percentiles
> > - Moved NEWS entry to post-2.7 section and is no longer in the DPDK
> >   specific section.
> > v7:
> > - Remove further code duplication
> > v6:
> > - Refactor the code to remove duplication around calls to
> >   emc_probabilistic_insert()
> > v5:
> > - Use percentiles for emc-insert-prob (0-100%)
> > - Update docs to reflect the option not exclusive to the DPDK datapath.
> > v4:
> > - Added Georg to Authors file
> > - Set emc-insert-prob=1 for 'PMD - stats' unit test
> > - Use read_relaxed on atomic var
> > - Correctly allow for 0 and 100% probababilites
> > - Cache align new element in dp_netdev struct
> > - Revert to default probability if invalid emc-insert-prob set
> > - Allow configurability for non-DPDK case
> > v3:
> > - Use new dpif other_config infrastructure to tidy up how the
> >   emc-insert-prob value is passed to dpif-netdev.
> > v2:
> > - Enable probability configurability via other_config:emc-insert-prob
> >   option.
> >
> >  AUTHORS.rst  |  1 +
> >  Documentation/howto/dpdk.rst | 19 +
> >  NEWS |  2 ++
> >  lib/dpif-netdev.c| 50
> 
> >  lib/smap.c   | 10 +
> >  lib/smap.h   |  1 +
> >  tests/pmd.at |  1 +
> >  vswitchd/vswitch.xml | 13 
> >  8 files changed, 93 insertions(+), 4 deletions(-)
> >
> > diff --git a/AUTHORS.rst b/AUTHORS.rst
> > index b567fcc..3382ad8 100644
> > --- a/AUTHORS.rst
> > +++ b/AUTHORS.rst
> > @@ -382,6 +382,7 @@ Eric Lopez  elo...@nicira.com
> >  Frido Roose fr.ro...@gmail.com
> >  Gaetano Catalli gaetano.cata...@gmail.com
> >  Gavin Remaley   gavin_rema...@selinc.com
> > +Georg Schmuecking   georg.schmueck...@ericsson.com
> >  George Shuklin  ama...@desunote.ru
> >  Gerald Rogers   gerald.rog...@intel.com
> >  Ghanem Bahribahri.gha...@gmail.com
> > diff --git a/Documentation/howto/dpdk.rst
> b/Documentation/howto/dpdk.rst
> > index d1e6e89..9e0dbeb 100644
> > --- a/Documentation/howto/dpdk.rst
> > +++ b/Documentation/howto/dpdk.rst
> > @@ -354,6 +354,25 @@ the `DPDK documentation
> >
> >  Note: Not all DPDK virtual PMD drivers have been tested and verified to
> work.
> >
> > +EMC Insertion Probability
> > +-
> > +By default 1 in every 100 flows are inserted into the Exact Match Cache
> (EMC).
> > +It is possible to change this insertion probability by setting the
> > +``emc-insert-prob`` option::
> > +
> > +$ ovs-vsctl --no-wait set Open_vSwitch . other_config:emc-insert-
> prob=N
> > +
> > +where:
> > +
> > +``N``
> > +  is a positive floating point number between 0 and 100 representing the
> > +  percentage probability of EMC insertion.
> > +
> > +If ``N`` is set to 100, an insertion will be performed for every flow. If 
> > set
> > +to 0, no insertions will be performed and the EMC will effectively be
> disabled.
> > +
> > +For more information on the EMC refer to :doc:`/intro/install/dpdk` .
> > +
> >  .. _dpdk-ovs-in-guest:
> >
> >  OVS with DPDK Inside VMs
> > diff --git a/NEWS b/NEWS
> > index aebd99c..5c9e628 100644
> > --- a/NEWS
> > +++ b/NEWS
> > @@ -3,6 +3,8 @@ Post-v2.7.0
> > - Tunnels:
> >   * Added support to set packet mark for tunnel endpoint using
> > `egress_pkt_mark` OVSDB option.
> > +   - EMC insertion probability is reduced to 1% and is configurable via
> > + the new 'other_config:emc-insert-prob' option.
> >
> >  v2.7.0 - xx xxx 
> >  -
> > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> > index 0be5db5..c8cb9ee 100644
> > --- a/lib/dpif-netdev.c
> > +++ b/lib/dpif-netdev.c
> > @@ -144,6 +144,11 @@ struct netdev_flow_key {
> >  #define EM_FLOW_HASH_MASK (EM_FLOW_HASH_ENTRIES - 1)
> >  #define EM_FLOW_HASH_SEGS 2
> >
> > +/* Percentage prob

[ovs-dev] [PATCH v9] dpif-netdev: Conditional EMC insert

2017-02-14 Thread Ciara Loftus
Unconditional insertion of EMC entries results in EMC thrashing at high
numbers of parallel flows. When this occurs, the performance of the EMC
often falls below that of the dpcls classifier, rendering the EMC
practically useless.

Instead of unconditionally inserting entries into the EMC when a miss
occurs, use a 1% probability of insertion. This ensures that the most
frequent flows have the highest chance of creating an entry in the EMC,
and the probability of thrashing the EMC is also greatly reduced.

The probability of insertion is configurable, via the
other_config:emc-insert-inv-prob option. This value sets the average
probability of insertion to 1/emc-insert-inv-prob.

For example the following command changes the insertion proability to
(on average) 1 in every 20 packets ie. 1/20 ie. 5%.

ovs-vsctl set Open_vSwitch . other_config:emc-insert-inv-prob=20

Signed-off-by: Ciara Loftus 
Signed-off-by: Georg Schmuecking 
Co-authored-by: Georg Schmuecking 
---
v9:
- Revert back to original 1/N formula for configuring the probability
  (don't use percentiles).
- Rename option to reflect inverse probability & update documentation to
  make the wording clearer.
v8:
- Floating point precision percentiles
- Moved NEWS entry to post-2.7 section and is no longer in the DPDK
  specific section.
v7:
- Remove further code duplication
v6:
- Refactor the code to remove duplication around calls to
  emc_probabilistic_insert()
v5:
- Use percentiles for emc-insert-prob (0-100%)
- Update docs to reflect the option not exclusive to the DPDK datapath.
v4:
- Added Georg to Authors file
- Set emc-insert-prob=1 for 'PMD - stats' unit test
- Use read_relaxed on atomic var
- Correctly allow for 0 and 100% probababilites
- Cache align new element in dp_netdev struct
- Revert to default probability if invalid emc-insert-prob set
- Allow configurability for non-DPDK case
v3:
- Use new dpif other_config infrastructure to tidy up how the
  emc-insert-prob value is passed to dpif-netdev.
v2:
- Enable probability configurability via other_config:emc-insert-prob
  option.

 AUTHORS.rst  |  1 +
 Documentation/howto/dpdk.rst | 20 ++
 NEWS |  2 ++
 lib/dpif-netdev.c| 49 
 tests/pmd.at |  1 +
 vswitchd/vswitch.xml | 17 +++
 6 files changed, 86 insertions(+), 4 deletions(-)

diff --git a/AUTHORS.rst b/AUTHORS.rst
index f247df5..9a37423 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -385,6 +385,7 @@ Eric Lopez  elo...@nicira.com
 Frido Roose fr.ro...@gmail.com
 Gaetano Catalli gaetano.cata...@gmail.com
 Gavin Remaley   gavin_rema...@selinc.com
+Georg Schmuecking   georg.schmueck...@ericsson.com
 George Shuklin  ama...@desunote.ru
 Gerald Rogers   gerald.rog...@intel.com
 Ghanem Bahribahri.gha...@gmail.com
diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index d1e6e89..52cb3fc 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -354,6 +354,26 @@ the `DPDK documentation
 
 Note: Not all DPDK virtual PMD drivers have been tested and verified to work.
 
+EMC Insertion Probability
+-
+By default 1 in every 100 flows are inserted into the Exact Match Cache (EMC).
+It is possible to change this insertion probability by setting the
+``emc-insert-inv-prob`` option::
+
+$ ovs-vsctl --no-wait set Open_vSwitch . other_config:emc-insert-inv-prob=N
+
+where:
+
+``N``
+  is a positive integer representing the inverse probability of insertion ie.
+  on average 1 in every N packets with a unique flow will generate an EMC
+  insertion.
+
+If ``N`` is set to 1, an insertion will be performed for every flow. If set to
+0, no insertions will be performed and the EMC will effectively be disabled.
+
+For more information on the EMC refer to :doc:`/intro/install/dpdk` .
+
 .. _dpdk-ovs-in-guest:
 
 OVS with DPDK Inside VMs
diff --git a/NEWS b/NEWS
index aebd99c..b14c76d 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ Post-v2.7.0
- Tunnels:
  * Added support to set packet mark for tunnel endpoint using
`egress_pkt_mark` OVSDB option.
+   - EMC insertion probability is reduced to 1% and is configurable via
+ the new 'other_config:emc-insert-inv-prob' option.
 
 v2.7.0 - xx xxx 
 -
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 0be5db5..54af4ac 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -144,6 +144,11 @@ struct netdev_flow_key {
 #define EM_FLOW_HASH_MASK (EM_FLOW_HASH_ENTRIES - 1)
 #define EM_FLOW_HASH_SEGS 2
 
+/* Default EMC insert probability is 1 / DEFAULT_EM_FLOW_INSERT_INV_PROB */
+#define DEFAULT_EM_FLOW_INSERT_INV_PROB 100
+#define DEFAULT_EM_FLOW_INSERT_MIN (UINT32_MAX / \
+DEFAULT

[ovs-dev] Welcome car and truck users

2017-02-14 Thread Car Ads USA
Greetings,

Welcome to our site for cars and trucks in USA:

www.caradsusa.com

Sell It Yourself and online shopping site
for cars, trucks, spare parts, accessories,
services and rentals.

Find your: cars for sale, new cars, used cars and 
collector cars. Search for spare parts, accessories,
services and rentals here.

Always free advertising for one week or longer 
for a small fee.

This site is also a very good resource for older cars,
collector cars, veteran cars, antique cars, vintage cars 
or classic cars, because we got world largest car maker 
list included in our shopping and advertising site.

If you are interested, do not forget to tell
your friends about our site.

Welcome to try this site and join us.

Best Regards,

Car Ads USA

Unsubscribing:

If you wish not to receive any more information
from us simply use this link to unsubscribe:

http://caradsusa.com/scripts/unsubscribe.php?email=d...@openvswitch.org
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev