[ovs-dev] [PATCH v2] debian: Move libovn out from package libopenvswitch.

2018-08-24 Thread Han Zhou
From: Han Zhou Since we are packaging OVN and OVS components separately, libovn shouldn't belong to OVS, so move it to ovn-common. Also, remove it from libopenvswitch-dev. Signed-off-by: Han Zhou --- debian/libopenvswitch-dev.install | 12 ++-- debian/libopenvswitch.install | 6 ++

Re: [ovs-dev] debian: Move libovn out from package libopenvswitch.

2018-08-24 Thread Han Zhou
On Fri, Aug 24, 2018 at 5:56 PM 0-day Robot wrote: > > Bleep bloop. Greetings Han Zhou, I am a robot and I have tried out your patch. > Thanks for your contribution. > > I encountered some error that I wasn't expecting. See the details below. > > > checkpatch: > ERROR: Author Han Zhou needs to

Re: [ovs-dev] debian: Move libovn out from package libopenvswitch.

2018-08-24 Thread 0-day Robot
Bleep bloop. Greetings Han Zhou, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: ERROR: Author Han Zhou needs to sign off. WARNING: Unexpected sign-offs from developers who are not

Re: [ovs-dev] [PATCH 1/4] tests: Add regression tests for all the bugs found by oss-fuzz so far.

2018-08-24 Thread Ben Pfaff
This should actually be at the end of the series because the series fixes some of the bugs that it tests for. Other than ordering, the series is correct and ready for review. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/

[ovs-dev] [PATCH] debian: Move libovn out from package libopenvswitch.

2018-08-24 Thread Han Zhou
From: Han Zhou Since we are packaging OVN and OVS components separately, libovn shouldn't belong to OVS, so move it to ovn-common. Also, remove it from libopenvswitch-dev. Signed-off-by: Han Zhou --- debian/libopenvswitch-dev.install | 12 ++-- debian/libopenvswitch.install | 6 ++

Re: [ovs-dev] [PATCH] datapath-windows: Add support to configure ct zone limits

2018-08-24 Thread Sairam Venugopal
Hi Anand, Thanks for the patch. See comments inline. Thanks, Sairam On 8/21/18, 2:58 PM, "ovs-dev-boun...@openvswitch.org on behalf of Anand Kumar" wrote: This patch implements limiting conntrack entries per zone using dpctl commands. Example: ovs-appctl dpctl/ct-set-l

[ovs-dev] [PATCH 4/4] ofp-actions: Re-fix error path for parsing OpenFlow actions.

2018-08-24 Thread Ben Pfaff
A previous commit attempted to fix the error path when the actions nested within clone provoked an error. However, this commit just introduced a new problem in another case, since it made ofpacts_pull_openflow_actions__() restore a previously valid pointer to data that might have been reallocated.

[ovs-dev] [PATCH 3/4] ofp-port: Fix leak on error path in parse_intel_port_custom_property().

2018-08-24 Thread Ben Pfaff
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9972 Signed-off-by: Ben Pfaff --- lib/ofp-port.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ofp-port.c b/lib/ofp-port.c index 8d882a14b4df..f19beb64a04c 100644 --- a/lib/ofp-port.c +++ b/lib/ofp-port.c @@ -1618,6 +1

[ovs-dev] [PATCH 1/4] tests: Add regression tests for all the bugs found by oss-fuzz so far.

2018-08-24 Thread Ben Pfaff
This will make it harder for bugs found by oss-fuzz to reappear. Signed-off-by: Ben Pfaff --- tests/automake.mk | 33 + tests/fuzz-regression-list.at | 23 ++ tests/fuzz-regression.at

[ovs-dev] [PATCH 2/4] nx-match: Avoid double-free on some error paths.

2018-08-24 Thread Ben Pfaff
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9966 Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9968 Fixes: f1eb32b9641c ("ofp-group: Fix memory leak in error cases parsing group requests.") Signed-off-by: Ben Pfaff --- lib/nx-match.c | 1 + 1 file chan

Re: [ovs-dev] [PATCH v2] ovn: Fix the issue in IPv6 Neigh Solicitation responder for router IPs

2018-08-24 Thread Han Zhou
On Fri, Aug 24, 2018 at 12:27 PM wrote: > > From: Numan Siddique > > Commit [1] added a new action 'nd_na_router' to set the router bit > in the 'flags' field of the Neighbour Adv packet for router IPs. > This action was used in the router pipeline. But the logical switch > pipeline also adds the

[ovs-dev] [PATCH V2] ofproto-dpif: Check for EBUSY as well

2018-08-24 Thread Greg Rose
Guru reported that we can't create more than one geneve tunnel. Sometimes a driver will return EBUSY as well as EEXIST for some duplicate configurations. Check for EBUSY too. Fixes: 7521e0cf9e ("ofproto-dpif: Let the dpif report when a ...") Reported-at: https://mail.openvswitch.org/pipermail/ov

Re: [ovs-dev] [PATCH] ofproto-dpif-trace: Make -generate send packets to controller again.

2018-08-24 Thread Justin Pettit
> On Aug 24, 2018, at 12:25 PM, Ben Pfaff wrote: > > +/* Copies ODP actions from 'in' (with length 'size') to 'out', dropping > + * OVS_ACTION_ATTR_OUTPUT along the way. */ > +static void > +prune_output_actions(const struct ofpbuf *in, struct ofpbuf *out) Do you think it's worth clarifying th

Re: [ovs-dev] [PATCH] oss-fuzz: Move oss-fuzz test harnesses and fuzzer configs to ovs source repo

2018-08-24 Thread Ben Pfaff
Thanks. Applied to master. On Wed, Aug 22, 2018 at 03:09:26PM +0200, Bhargava Shastry wrote: > Sorry, I forgot to attach the patch itself. Here it is (attached). > > On 08/22/2018 02:37 PM, Bhargava Shastry wrote: > > Hi Ben, > > > > The patch looks good to me. I have signed it here: > > > > h

Re: [ovs-dev] [PATCH] ofproto-dpif: Check for EBUSY as well

2018-08-24 Thread Gregory Rose
On 8/24/2018 12:39 PM, Ben Pfaff wrote: On Wed, Aug 22, 2018 at 02:38:13PM -0700, Greg Rose wrote: Sometimes a driver will return EBUSY as well as EEXIST for some duplicate configurations. Check for EBUSY too. Fixes: 7521e0cf9e ("ofproto-dpif: Let the dpif report when a ...") Reported by: Gu

Re: [ovs-dev] openvswitch ipv6 field question

2018-08-24 Thread Ben Pfaff
On Thu, Aug 23, 2018 at 03:35:57PM +0800, hany...@zzidc.cn wrote: > I have a need, Use openvswitch to support IPV6 protocol,When I use it > field "ovs-ofctl add-flow bridge > "ipv6,ipv6_src=2400:A480:xxx:xxx::0/64,actions=xxx"",IPV6 address can > not be fully supported. This is vague. Can you des

Re: [ovs-dev] [PATCH v2] netdev: Clean up class initialization.

2018-08-24 Thread Ben Pfaff
On Wed, Aug 22, 2018 at 12:52:47PM +, Stokes, Ian wrote: > > The macros are hard to read. This makes it a little more readable. > > > > Signed-off-by: Ben Pfaff > > --- > > v1->v2: Refactor DPDK_FLOW_OFFLOAD_API as Ian requested. > > Thanks Ben, LGTM, will add this to this week's pull reque

Re: [ovs-dev] [PATCH] ofproto-dpif: Check for EBUSY as well

2018-08-24 Thread Ben Pfaff
On Wed, Aug 22, 2018 at 02:38:13PM -0700, Greg Rose wrote: > Sometimes a driver will return EBUSY as well as EEXIST for some > duplicate configurations. Check for EBUSY too. > > Fixes: 7521e0cf9e ("ofproto-dpif: Let the dpif report when a ...") > Reported by: Guru Shetty > Signed-off-by: Greg Ro

[ovs-dev] [PATCH v2] ovn: Fix the issue in IPv6 Neigh Solicitation responder for router IPs

2018-08-24 Thread nusiddiq
From: Numan Siddique Commit [1] added a new action 'nd_na_router' to set the router bit in the 'flags' field of the Neighbour Adv packet for router IPs. This action was used in the router pipeline. But the logical switch pipeline also adds the Neighbour Adv flows for router IPs but with 'nd_na' a

[ovs-dev] [PATCH] ofproto-dpif-trace: Make -generate send packets to controller again.

2018-08-24 Thread Ben Pfaff
Prior to the OVS 2.9 development cycle, any flow that sent a packet to a controller required that the flow be slow-pathed. In some cases this led to poor performance, so OVS 2.9 made controller actions fast-pathable. As a side effect of the change, "ovs-appctl ofproto/trace -generate" no longer s

Re: [ovs-dev] [PATCH] Do not add IPv6 Neigh Adv flows for router ips in switch pipeline

2018-08-24 Thread Han Zhou
On Fri, Aug 24, 2018 at 11:17 AM Numan Siddique wrote: > > > > On Fri, Aug 24, 2018 at 11:19 PM Han Zhou wrote: >> >> >> >> On Thu, Aug 23, 2018 at 12:10 PM wrote: >> > >> > From: Numan Siddique >> > >> > Commit [1] added a new action 'nd_na_router' to set the router bit >> > in the 'flags' fie

Re: [ovs-dev] [PATCH v3 1/1] netdev-vport: reject concomitant incompatible tunnels

2018-08-24 Thread Eelco Chaudron
On 24 Aug 2018, at 19:49, Ben Pfaff wrote: On Fri, Aug 24, 2018 at 11:38:05AM +0200, Eelco Chaudron wrote: Hi Ben some of this is existing code, however, which version of Sparse are you using, as I’m not getting any error? I appear to be using: $ sparse --version v0.5.0-44-g4079

Re: [ovs-dev] [PATCH] Do not add IPv6 Neigh Adv flows for router ips in switch pipeline

2018-08-24 Thread Numan Siddique
On Fri, Aug 24, 2018 at 11:19 PM Han Zhou wrote: > > > On Thu, Aug 23, 2018 at 12:10 PM wrote: > > > > From: Numan Siddique > > > > Commit [1] added a new action 'nd_na_router' to set the router bit > > in the 'flags' field of the Neighbour Adv packet in the router > > pipeline. But the logical

Re: [ovs-dev] [PATCH 2/2] tests: Extend tests of simulated packets to kernel 4.17.x

2018-08-24 Thread Ben Pfaff
On Thu, Aug 23, 2018 at 10:18:05PM -0700, Gregory Rose wrote: > On 8/21/2018 7:42 AM, Yifeng Sun wrote: > >GRE-related tests are skipped on ubuntu-18.04.1 because the > >vanilla `ip` will fail to set dev's mac address. This bug > >is described in this link: > > > >https://bugzilla.redhat.com/show_b

Re: [ovs-dev] [PATCH v3 1/1] netdev-vport: reject concomitant incompatible tunnels

2018-08-24 Thread Ben Pfaff
On Fri, Aug 24, 2018 at 11:38:05AM +0200, Eelco Chaudron wrote: > > > On 10 Jul 2018, at 23:45, Ben Pfaff wrote: > > >On Fri, Jun 01, 2018 at 07:03:55PM +0200, Eelco Chaudron wrote: > >>This patch will make sure VXLAN tunnels with and without the group > >>based policy (GBP) option enabled can n

Re: [ovs-dev] [PATCH] Do not add IPv6 Neigh Adv flows for router ips in switch pipeline

2018-08-24 Thread Han Zhou
On Thu, Aug 23, 2018 at 12:10 PM wrote: > > From: Numan Siddique > > Commit [1] added a new action 'nd_na_router' to set the router bit > in the 'flags' field of the Neighbour Adv packet in the router > pipeline. But the logical switch pipeline was also adding the > Neighbour Adv flows for router

[ovs-dev] [PATCH 6/6] netdev-dummy: Initialize new dummy ports as "up".

2018-08-24 Thread Ben Pfaff
Dummy ports started out down and hardly any of the tests ever brought them up. This led to some odd test results and caused problems for testing with controllers that didn't bother with ports that were down, like recent versions of Faucet. There doesn't seem to be a big reason for them to be down

[ovs-dev] [PATCH 5/6] ofproto: Consistently force off OFPPS_LIVE if port or link is down.

2018-08-24 Thread Ben Pfaff
It doesn't make sense for a port that is down to be "live" from OpenFlow's point of view, but this could happen in OVS. Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif.c | 26 ++ ofproto/ofproto-provider.h | 1 + ofproto/ofproto.c | 43

[ovs-dev] [PATCH 4/6] ofproto-dpif: Refactor port_run().

2018-08-24 Thread Ben Pfaff
This makes port_run() easier to understand but should not change its behavior. Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif.c | 62 ++ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpi

[ovs-dev] [PATCH 3/6] ofproto: Move may_enable from ofport_dpif to ofport.

2018-08-24 Thread Ben Pfaff
This concept of whether a port is suitable to be "live" in the sense of the OpenFlow OFPPS_LIVE bit is a generic one that can be handled at the ofproto layer instead of needing to be part of ofproto-dpif. An upcoming commit will make more use of this at the ofproto layer. Signed-off-by: Ben Pfaff

[ovs-dev] [PATCH 2/6] ofproto: Refactor update_port().

2018-08-24 Thread Ben Pfaff
update_port() worked a little too hard to avoid copying and comparing some bits in the ofputil_phy_port. This seems like a simpler approach all around. It should behave the same way. Signed-off-by: Ben Pfaff --- ofproto/ofproto.c | 34 +- 1 file changed, 9 inser

[ovs-dev] [PATCH 1/6] connmgr: Suppress duplicate port status notifications.

2018-08-24 Thread Ben Pfaff
When the status of a port changes, ofproto calls into connmgr to notify controllers. Sometimes, particular changes are only visible to controllers running specific versions of OpenFlow. Until now, OVS would send those controllers duplicate port status notifications. This is unnecessary and somew

[ovs-dev] [PATCH v9 14/14] dpdk-tests: End-to-end tests for multi-seg mbufs.

2018-08-24 Thread Tiago Lam
The following tests are added to the DPDK testsuite to add some coverage for the multi-segment mbufs: - Check that multi-segment mbufs are disabled by default; - Check that providing `other_config:dpdk-multi-seg-mbufs=true` indeed enables mbufs; - Using a DPDK port, send a random packet out and c

[ovs-dev] [PATCH v9 13/14] dpdk-tests: Accept other configs in OVS_DPDK_START

2018-08-24 Thread Tiago Lam
As it stands, OVS_DPDK_START() won't allow other configs to be set before starting the ovs-vswitchd daemon. This is a problem since some configs, such as the "dpdk-multi-seg-mbufs=true" for enabling the multi-segment mbufs, need to be set prior to start OvS. To support other options, OVS_DPDK_STAR

[ovs-dev] [PATCH v9 12/14] dpdk-tests: Add unit-tests for multi-seg mbufs.

2018-08-24 Thread Tiago Lam
In order to create a minimal environment that allows the tests to get mbufs from an existing mempool, the following approach is taken: - EAL is initialised (by using the main dpdk_init()) and a (very) small mempool is instantiated (mimicking the logic in dpdk_mp_create()). This mempool instance

[ovs-dev] [PATCH v9 11/14] netdev-dpdk: support multi-segment jumbo frames

2018-08-24 Thread Tiago Lam
From: Mark Kavanagh Currently, jumbo frame support for OvS-DPDK is implemented by increasing the size of mbufs within a mempool, such that each mbuf within the pool is large enough to contain an entire jumbo frame of a user-defined size. Typically, for each user-defined MTU, 'requested_mtu', a ne

[ovs-dev] [PATCH v9 10/14] netdev-dpdk: copy large packet to multi-seg. mbufs

2018-08-24 Thread Tiago Lam
From: Mark Kavanagh Currently, packets are only copied to a single segment in the function dpdk_do_tx_copy(). This could be an issue in the case of jumbo frames, particularly when multi-segment mbufs are involved. This patch calculates the number of segments needed by a packet and copies the dat

[ovs-dev] [PATCH v9 09/14] dp-packet: Add support for data "linearization".

2018-08-24 Thread Tiago Lam
Previous commits have added support to the dp_packet API to handle multi-segmented packets, where data is not stored contiguously in memory. However, in some cases, it is inevitable and data must be provided contiguously. Examples of such cases are when performing csums over the entire packet data,

[ovs-dev] [PATCH v9 08/14] dp-packet: copy data from multi-seg. DPDK mbuf

2018-08-24 Thread Tiago Lam
From: Michael Qiu When doing packet clone, if packet source is from DPDK driver, multi-segment must be considered, and copy the segment's data one by one. Also, lots of DPDK mbuf's info is missed during a copy, like packet type, ol_flags, etc. That information is very important for DPDK to do p

[ovs-dev] [PATCH v9 07/14] dp-packet: Handle multi-seg mubfs in shift() func.

2018-08-24 Thread Tiago Lam
In its current implementation dp_packet_shift() is also unaware of multi-seg mbufs (that holds data in memory non-contiguously) and assumes that data exists contiguously in memory, memmove'ing data to perform the shift. To add support for multi-seg mbuds a new set of functions was introduced, dp_p

[ovs-dev] [PATCH v9 06/14] dp-packet: Handle multi-seg mbufs in helper funcs.

2018-08-24 Thread Tiago Lam
Most helper functions in dp-packet assume that the data held by a dp_packet is contiguous, and perform operations such as pointer arithmetic under that assumption. However, with the introduction of multi-segment mbufs, where data is non-contiguous, such assumptions are no longer possible. Some exam

[ovs-dev] [PATCH v9 05/14] dp-packet: Fix data_len handling multi-seg mbufs.

2018-08-24 Thread Tiago Lam
When a dp_packet is from a DPDK source, and it contains multi-segment mbufs, the data_len is not equal to the packet size, pkt_len. Instead, the data_len of each mbuf in the chain should be considered while distributing the new (provided) size. To account for the above dp_packet_set_size() has bee

[ovs-dev] [PATCH v9 04/14] netdev-dpdk: Serialise non-pmds mbufs' alloc/free.

2018-08-24 Thread Tiago Lam
A new mutex, 'nonpmd_mp_mutex', has been introduced to serialise allocation and free operations by non-pmd threads on a given mempool. free_dpdk_buf() has been modified to make use of the introduced mutex. Signed-off-by: Tiago Lam Acked-by: Eelco Chaudron --- lib/netdev-dpdk.c | 33 +++

[ovs-dev] [PATCH v9 03/14] dp-packet: Fix allocated size on DPDK init.

2018-08-24 Thread Tiago Lam
When enabled with DPDK OvS deals with two types of packets, the ones coming from the mempool and the ones locally created by OvS - which are copied to mempool mbufs before output. In the latter, the space is allocated from the system, while in the former the mbufs are allocated from a mempool, whic

[ovs-dev] [PATCH v9 02/14] dp-packet: Init specific mbuf fields.

2018-08-24 Thread Tiago Lam
From: Mark Kavanagh dp_packets are created using xmalloc(); in the case of OvS-DPDK, it's possible the the resultant mbuf portion of the dp_packet contains random data. For some mbuf fields, specifically those related to multi-segment mbufs and/or offload features, random values may cause unexpec

[ovs-dev] [PATCH v9 01/14] netdev-dpdk: fix mbuf sizing

2018-08-24 Thread Tiago Lam
From: Mark Kavanagh There are numerous factors that must be considered when calculating the size of an mbuf: - the data portion of the mbuf must be sized in accordance With Rx buffer alignment (typically 1024B). So, for example, in order to successfully receive and capture a 1500B packet, mbu

[ovs-dev] [PATCH v9 00/14] Support multi-segment mbufs

2018-08-24 Thread Tiago Lam
Overview This patchset introduces support for multi-segment mbufs to OvS-DPDK. Multi-segment mbufs are typically used when the size of an mbuf is insufficient to contain the entirety of a packet's data. Instead, the data is split across numerous mbufs, each carrying a portion, or 'segment'

Re: [ovs-dev] [PATCH 2/2] vswitch.xml: Fix type of dpdk-init key.

2018-08-24 Thread Kevin Traynor
On 08/24/2018 04:18 PM, Ilya Maximets wrote: > This adds available modes to the man page. > > CC: Kevin Traynor > Fixes: 6d947d508a51 ("vswitch.xml: Update dpdk-init documentation.") > Signed-off-by: Ilya Maximets Thanks for catching here and in roundrobin patch. Acked-by: Kevin Traynor > --

[ovs-dev] [PATCH 2/2] vswitch.xml: Fix type of dpdk-init key.

2018-08-24 Thread Ilya Maximets
This adds available modes to the man page. CC: Kevin Traynor Fixes: 6d947d508a51 ("vswitch.xml: Update dpdk-init documentation.") Signed-off-by: Ilya Maximets --- vswitchd/vswitch.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.x

[ovs-dev] [PATCH 1/2] vswitch.xml: Fix key type and description style of tc-policy.

2018-08-24 Thread Ilya Maximets
The set of supported values specified. Style fixed to look good in man page. Fixed indents. CC: Paul Blakey Fixes: 691d20cbdcf3 ("other-config: Add tc-policy switch to control tc flower flag") Signed-off-by: Ilya Maximets --- vswitchd/vswitch.xml | 27 +

Re: [ovs-dev] [PATCH v2 1/2] dpif-netdev: Add round-robin based rxq to pmd assignment.

2018-08-24 Thread Ilya Maximets
I'd suggest following incremental with mostly style fixes: - diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index e886acd3f..d39ac3779 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4272,14 +4272,12 @@ rr_numa_list_populate(st

[ovs-dev] Physical device and virtual device in OVS

2018-08-24 Thread rakesh kumar
1.How OVS handles the packet coming from Physical device or virtual device means how it differentiate from both . Please give your views. Regards Rakesh Kumar ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-de

Re: [ovs-dev] [PATCH v3 1/1] netdev-vport: reject concomitant incompatible tunnels

2018-08-24 Thread Eelco Chaudron
On 24 Aug 2018, at 11:38, Eelco Chaudron wrote: On 10 Jul 2018, at 23:45, Ben Pfaff wrote: On Fri, Jun 01, 2018 at 07:03:55PM +0200, Eelco Chaudron wrote: "sparse" doesn't like the initialization strategy: ../lib/netdev-vport.c:1207:9: error: Using plain integer as NULL pointer ../lib/net

Re: [ovs-dev] [PATCH v3 1/1] netdev-vport: reject concomitant incompatible tunnels

2018-08-24 Thread Eelco Chaudron
On 10 Jul 2018, at 23:45, Ben Pfaff wrote: On Fri, Jun 01, 2018 at 07:03:55PM +0200, Eelco Chaudron wrote: This patch will make sure VXLAN tunnels with and without the group based policy (GBP) option enabled can not coexist on the same destination UDP port. In theory, VXLAN tunnel with and w