[ovs-dev] [PATCH net-next v3] openvswitch: Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Wenyu Zhang
When sampling rate is 1, the sampling probability is UINT32_MAX. The packet should be sampled even the prandom32() generate the number of UINT32_MAX. And none packet need be sampled when the probability is 0. Signed-off-by: Wenyu Zhang --- net/openvswitch/actions.c |5 - 1 file changed,

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Wenyu Zhang
> On Aug 4, 2015, at 12:17 PM, Ben Pfaff wrote: > > On Tue, Aug 04, 2015 at 04:05:58AM +, Wenyu Zhang wrote: >> In ipfix and sflow, the sampling rate can be set as 1, which means >> 100%. And in order to make 100% packets sampled, I work out a patch >> in datapath, which is for review on ne

Re: [ovs-dev] Adding a new file to ovs-master

2015-08-05 Thread Thadeu Lima de Souza Cascardo
On Wed, Aug 05, 2015 at 03:55:11AM +, ravali.bu...@wipro.com wrote: > Hi Russell & Thomas, > > When I am adding the new header file in bridge.c file depending on the order > of the header file I am seeing different errors i.e. if I place the header > file in the end of header file section i.

[ovs-dev] [PATCH] dpif-netdev: proper tx queue id

2015-08-05 Thread Ilya Maximets
Currently tx_qid is equal to pmd->core_id. This leads to wrong behavior if pmd-cpu-mask different from '/(0*)(1|3|7)?(f*)/', e.g. if core_ids are not sequential, or doesn't start from 0, or both. Example(just one of possible wrong scenarios): starting 2 pmd threads with 1 port, 2 rxqs per

[ovs-dev] If there are any information/documents for the source code of open vswitch, May I get them?

2015-08-05 Thread 최익성
Dear experts. I am Ick-Sung Choi living in South Korea. Thank you very much for your excellent contribution and excellent work for open vswitch. I started to study the source code of open vswitch. I have little knowledge about open vswitch. It is hard for me to study the source code becau

Re: [ovs-dev] [PATCH] dpif-netdev: proper tx queue id

2015-08-05 Thread Daniele Di Proietto
On 05/08/2015 13:28, "Ilya Maximets" wrote: >Currently tx_qid is equal to pmd->core_id. This leads to wrong >behavior if pmd-cpu-mask different from '/(0*)(1|3|7)?(f*)/', >e.g. if core_ids are not sequential, or doesn't start from 0, or both. > >Example(just one of possible wrong scenarios): >

Re: [ovs-dev] [PATCH] dpif-netdev: proper tx queue id

2015-08-05 Thread Ilya Maximets
Sorry, I agree that example is incorrect. It is really not true, because of using ovs_numa_get_n_cores() to call netdev_set_multiq(). No, I didn't actually observe a bug. But there is another example: same configuration(2 pmd threads with 1 port, 2 rxqs per port and pmd-cpu-mask =

Re: [ovs-dev] [PATCH] dpif-netdev: proper tx queue id

2015-08-05 Thread Daniele Di Proietto
On 05/08/2015 16:42, "Ilya Maximets" wrote: >Sorry, I agree that example is incorrect. It is really not true, because >of using ovs_numa_get_n_cores() to call netdev_set_multiq(). >No, I didn't actually observe a bug. > >But there is another example: > > same configuration(2 pmd threads w

Re: [ovs-dev] [PATCH] dpif-netdev: proper tx queue id

2015-08-05 Thread Ilya Maximets
On 05.08.2015 19:26, Daniele Di Proietto wrote: > > > On 05/08/2015 16:42, "Ilya Maximets" wrote: > >> Sorry, I agree that example is incorrect. It is really not true, because >> of using ovs_numa_get_n_cores() to call netdev_set_multiq(). >> No, I didn't actually observe a bug. >> >> But the

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Justin Pettit
> On Aug 5, 2015, at 3:11 AM, Wenyu Zhang wrote: > > >> On Aug 4, 2015, at 12:17 PM, Ben Pfaff wrote: >> >> On Tue, Aug 04, 2015 at 04:05:58AM +, Wenyu Zhang wrote: >>> In ipfix and sflow, the sampling rate can be set as 1, which means >>> 100%. And in order to make 100% packets sampled,

Re: [ovs-dev] [PATCH] dpif-netdev: proper tx queue id

2015-08-05 Thread Daniele Di Proietto
On 05/08/2015 17:47, "Ilya Maximets" wrote: > > >On 05.08.2015 19:26, Daniele Di Proietto wrote: >> >> >> On 05/08/2015 16:42, "Ilya Maximets" wrote: >> >>> Sorry, I agree that example is incorrect. It is really not true, >>>because >>> of using ovs_numa_get_n_cores() to call netdev_set_mul

Re: [ovs-dev] [PATCH 3/3] tests: Add userspace-testsuite.

2015-08-05 Thread Joe Stringer
Thanks for this Daniele. A couple of general things: - "userspace testsuite" as a name, while accurate, is also perhaps misleading as the unit tests are also userspace tests (and don't require any special root privileges). I guess this class of tests should be "system", in which case it would make

Re: [ovs-dev] [PATCH] datapath: Revert "datapath: Constify netlink structs."

2015-08-05 Thread Pravin Shelar
On Tue, Aug 4, 2015 at 9:36 PM, Joe Stringer wrote: > On 4 August 2015 at 18:07, Pravin B Shelar wrote: >> This reverts commit 2023bdcfc44c149a8e3b38dcde8f04f2ec3f8501. >> This commit is causing segfaults when genl compat code is in use. >> >> Compat code update genl_multicast_group and genl_fami

[ovs-dev] [PATCH 1/5] classifier: Fix comment.

2015-08-05 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/classifier.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/classifier.c b/lib/classifier.c index fc6a1f5..cba80b5 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -283,11 +283,10 @@ cls_rule_is_catchall(const struct cl

[ovs-dev] [PATCH 2/5] flow: Avoid compile errors.

2015-08-05 Thread Jarno Rajahalme
GCC (4.7) sees too wide shifts when there are none, refactor to circumvent the false error. Signed-off-by: Jarno Rajahalme --- lib/flow.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index 352e9b8..72c172c 10064

[ovs-dev] [PATCH 4/5] classifier: Pre-compute stage masks.

2015-08-05 Thread Jarno Rajahalme
This makes stage mask computation happen only when a subtable is inserted and allows simplification of the main lookup function. Classifier benchmark shows that this speeds up the classification (with wildcards) about 5%. Signed-off-by: Jarno Rajahalme --- lib/classifier-private.h | 107 +++

[ovs-dev] [PATCH 3/5] test-classifier: Add benchmark.

2015-08-05 Thread Jarno Rajahalme
Add a benchmark command for classifier lookup performance testing. Usage: ovstest test-classifier benchmark Where: - The number of rules to install for lookups. More rules makes misses less likely. - How many different priorities to use. Using only 1

[ovs-dev] [PATCH 5/5] flow: Add struct flowmap.

2015-08-05 Thread Jarno Rajahalme
Struct miniflow is now sometimes used just as a map. Define a new struct flowmap for that purpose. The flowmap is defined as an array of maps, and it is automatically sized according to the size of struct flow, so it will be easier to maintain in the future. It would have been tempting to use th

Re: [ovs-dev] [PATCH net-next v3] openvswitch: Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Pravin Shelar
On Wed, Aug 5, 2015 at 12:30 AM, Wenyu Zhang wrote: > When sampling rate is 1, the sampling probability is UINT32_MAX. The packet > should be sampled even the prandom32() generate the number of UINT32_MAX. > And none packet need be sampled when the probability is 0. > > Signed-off-by: Wenyu Zhang

Re: [ovs-dev] [PATCH 3/3] tests: Add userspace-testsuite.

2015-08-05 Thread Daniele Di Proietto
On 05/08/2015 18:44, "Joe Stringer" wrote: >Thanks for this Daniele. > >A couple of general things: >- "userspace testsuite" as a name, while accurate, is also perhaps >misleading as the unit tests are also userspace tests (and don't >require any special root privileges). I guess this class of

Re: [ovs-dev] [PATCH 3/3] tests: Add userspace-testsuite.

2015-08-05 Thread Joe Stringer
On 5 August 2015 at 11:08, Daniele Di Proietto wrote: > > > On 05/08/2015 18:44, "Joe Stringer" wrote: > >>Thanks for this Daniele. >> >>A couple of general things: >>- "userspace testsuite" as a name, while accurate, is also perhaps >>misleading as the unit tests are also userspace tests (and do

Re: [ovs-dev] [PATCH v2] Make 100 percents packets sampled when sampling rate is 1.

2015-08-05 Thread Ben Pfaff
On Wed, Aug 05, 2015 at 10:01:26AM -0700, Justin Pettit wrote: > > > On Aug 5, 2015, at 3:11 AM, Wenyu Zhang wrote: > > > > > >> On Aug 4, 2015, at 12:17 PM, Ben Pfaff wrote: > >> > >> On Tue, Aug 04, 2015 at 04:05:58AM +, Wenyu Zhang wrote: > >>> In ipfix and sflow, the sampling rate can

Re: [ovs-dev] [PATCH 2/2] dpif-netdev: Translate Geneve options per-flow, not per-packet.

2015-08-05 Thread Jarno Rajahalme
> On Aug 3, 2015, at 6:04 PM, Jesse Gross wrote: > > On Mon, Aug 3, 2015 at 3:45 PM, Jarno Rajahalme wrote: >> With few suggestions and questions below: >> >> Acked-by: Jarno Rajahalme > > Thanks for the comments - I had one follow up question below. > >>> @@ -3014,11 +3014,25 @@ dp_netdev_

[ovs-dev] datapath forwarding

2015-08-05 Thread Raul Suarez Marin
Hello everyone, I am developing a new match option in the datapath. I implemented almost everything already, but I am missing something and I don't know what nor what is next step. Adding the flow directly to the datapath gives the following error: ovs-dpctl: updating flow table (Invalid argument

Re: [ovs-dev] [PATCH 5/5] flow: Add struct flowmap.

2015-08-05 Thread Joe Stringer
With this full series applied, gcc (Debian 4.9.2-10) 4.9.2: ../lib/classifier-private.h:352:14: warning: crazy programmer I think this is actually a sparse warning, and I've seen it before but I have no recollection how we appeased it. On 5 August 2015 at 10:53, Jarno Rajahalme wrote: > Struct

[ovs-dev] [PATCH] ofp-print: Fix redundant expression.

2015-08-05 Thread Joe Stringer
'features' is always a valid pointer to something on the stack, so checking (!features || ...) is the same as checking (false || ...). Simplify the expression. Found by MIT STACK undefined behaviour checker. Signed-off-by: Joe Stringer --- lib/ofp-print.c | 2 +- 1 file changed, 1 insertion(+),

Re: [ovs-dev] [PATCH 1/5] classifier: Fix comment.

2015-08-05 Thread Joe Stringer
On 5 August 2015 at 10:53, Jarno Rajahalme wrote: > Signed-off-by: Jarno Rajahalme > --- > lib/classifier.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/lib/classifier.c b/lib/classifier.c > index fc6a1f5..cba80b5 100644 > --- a/lib/classifier.c > +++ b/lib/cla

Re: [ovs-dev] datapath forwarding

2015-08-05 Thread Joe Stringer
On 5 August 2015 at 13:02, Raul Suarez Marin wrote: > Hello everyone, > > I am developing a new match option in the datapath. I implemented almost > everything already, but I am missing something and I don't know what nor > what is next step. > > Adding the flow directly to the datapath gives the

Re: [ovs-dev] [PATCH 1/5] classifier: Fix comment.

2015-08-05 Thread Jarno Rajahalme
> On Aug 5, 2015, at 1:35 PM, Joe Stringer wrote: > > On 5 August 2015 at 10:53, Jarno Rajahalme wrote: >> Signed-off-by: Jarno Rajahalme >> --- >> lib/classifier.c | 7 +++ >> 1 file changed, 3 insertions(+), 4 deletions(-) >> >> diff --git a/lib/classifier.c b/lib/classifier.c >> index f

Re: [ovs-dev] [PATCH 5/5] flow: Add struct flowmap.

2015-08-05 Thread Jarno Rajahalme
> On Aug 5, 2015, at 1:17 PM, Joe Stringer wrote: > > With this full series applied, gcc (Debian 4.9.2-10) 4.9.2: > > ../lib/classifier-private.h:352:14: warning: crazy programmer > > I think this is actually a sparse warning, and I've seen it before but > I have no recollection how we appease

Re: [ovs-dev] [PATCH] dpif-netdev: Translate Geneve options per-flow, not per-packet.

2015-08-05 Thread Jesse Gross
On Wednesday, August 5, 2015, Jarno Rajahalme wrote: > > > On Aug 3, 2015, at 6:04 PM, Jesse Gross > > wrote: > > On Mon, Aug 3, 2015 at 3:45 PM, Jarno Rajahalme > wrote: > >>> static inline uint32_t > >>> diff --git a/lib/flow.c b/lib/flow.c > >>> index 352e9b8..d3d25e4 100644 > >>> --- a/lib/fl

[ovs-dev] [PATCH] ofproto: Allow in-place modifications of datapath flows.

2015-08-05 Thread Ethan Jackson
There are certain use cases (such as bond rebalancing) where a datapath flow's actions may change, while it's wildcard pattern remains the same. Before this patch, revalidators would note the change, delete the flow, and wait for the handlers to install an updated version. This is inefficient, as

[ovs-dev] Open vSwitch Flow slicing / splitting

2015-08-05 Thread Dario Banfi
Hello, I am trying to split a flow in multiple subflows in order to do a multipath routing. This has been done in many research projects: http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=true&arnumber=7019842

[ovs-dev] [PATCH] ofp-util: For OF1.0, don't wildcard PCP field when 802.1Q header absent.

2015-08-05 Thread Ben Pfaff
OpenFlow 1.0.1 says: The dl_vlan_pcp field must be ignored when the OFPFW_DL_VLAN wildcard bit is set or when the dl_vlan value is set to OFP_VLAN_NONE. Fields that are ignored don’t need to be wildcarded and should be set to 0. Previously, OVS wildcarded the PCP field when dl_vlan w

[ovs-dev] [PATCH] ofp-util: Use correct error for indirect group with more than one bucket.

2015-08-05 Thread Ben Pfaff
OpenFlow 1.5 says: If the group-mod request specifies more than one bucket for a group of type Indirect, the switch must refuse to add the group entry and must send an ofp_error_msg with OFPET_GROUP_MOD_FAILED type and OFPGMFC_INVALID_GROUP code. Older versions don't specify a par

[ovs-dev] [PATCH/RFC] flow: Ignore miss-sized IPv6 neighbour discovery options

2015-08-05 Thread Simon Horman
There appears to be a miss-match between the handling of miss-sized neighbour discovery options in implementation of parse_icmpv6() in user-space and in the kernel datapath. This patch addresses that by modifying the user-space handling to match that of the kernel datapath; processing is terminate