Re: [ovs-dev] [PATCH] tests: keep some datapath parsing tests from hanging

2018-12-11 Thread Ilya Maximets
On 10.12.2018 20:45, Ben Pfaff wrote:
> On Mon, Dec 10, 2018 at 08:34:32PM +0300, Ilya Maximets wrote:
>> On 10.12.2018 20:25, Ben Pfaff wrote:
>>> On Fri, Dec 07, 2018 at 06:15:29PM +0300, Ilya Maximets wrote:
> Whoops, looks like you dropped the list.  No problem.  I've re-added it.
>
> Scott Cheloha  writes:
>
>> On Thu, Nov 29, 2018 at 01:15:24PM -0500, Aaron Conole wrote:
>>> Scott Cheloha  writes:
>>>
 On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
> Hi Scott,
>
> Scott Cheloha  writes:
>
>> The arguments to sed(1) need to be on the same line in the shell
>> script or it will just sit there awaiting input.
>>
>> Signed-off-by: Scott Cheloha 
>> ---
>>
>> This is my first submission so I'm not sure if I'm doing this 
>> correctly.
>>
>>  tests/odp.at | 12 
>>  1 file changed, 4 insertions(+), 8 deletions(-)
>>
>> diff --git a/tests/odp.at b/tests/odp.at
>> index 1cff727ae..05dc76dbf 100644
>> --- a/tests/odp.at
>> +++ b/tests/odp.at
>> @@ -83,13 +83,11 @@ sed 
>> 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' 
>> odp-base.txt | s
>>  
>>   echo
>>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>> - sed
>> - 
>> 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/'
>>  odp-base.txt
>> + sed 
>> 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/'
>>  odp-base.txt
>>  
>>   echo
>>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>> - sed
>> - 
>> 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/'
>>  odp-base.txt
>> + sed 
>> 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/'
>>  odp-base.txt
>>  ) > odp-in.txt
>>  AT_CAPTURE_FILE([odp-in.txt])
>>  
>> @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' 
>> odp-base.txt
>>  
>>   echo
>>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>> - sed
>> - 
>> 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/'
>>  odp-base.txt
>> + sed 
>> 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/'
>>  odp-base.txt
>>  
>>   echo
>>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>> - sed
>> - 
>> 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/'
>>  odp-base.txt
>> + sed 
>> 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/'
>>  odp-base.txt
>>  ) > odp.txt
>>  AT_CAPTURE_FILE([odp.txt])
>>  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], 
>> [`cat odp.txt`
>
> I see the following error on a RHEL7 system:
>
>485: OVS datapath key parsing and formatting - valid forms FAILED 
> (odp.at:107)
>
> Let me know if you want a zip of the testsuite directory.  I can make 
> it
> available.

 I'm getting nearly the same error here on OpenBSD 6.4:

 485: OVS datapath key parsing and formatting - valid forms FAILED 
 (odp.at:108)

 But before digging into the meat of the test itself, can you try 
 running that
 test without my patch?  When I invoke sed(1) without arguments on 
 RHEL7.6 it
 exits with status 4 and prints a usage statement, which makes me think 
 that
 the test is failing/broken without this patch.  (The fact that the 
 test hangs
 here with OpenBSD's sed seems to be a historical difference in 
 behavior between
 the two implementations.)
>>>
>>> I looked at the last few builds on the build server, and this

Re: [ovs-dev] [PATCH] tests: Fix syntax in another ODP test.

2018-12-11 Thread Ilya Maximets
On 10.12.2018 20:45, Ben Pfaff wrote:
> Reported-by: Ilya Maximets 
> Signed-off-by: Ben Pfaff 
> ---
>  tests/odp.at | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

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


Re: [ovs-dev] [PATCH v1 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread David Marchand
Hello Ian,

On Tue, Dec 11, 2018 at 1:13 AM Ian Stokes  wrote:

>
> diff --git a/Documentation/intro/install/dpdk.rst
> b/Documentation/intro/install/dpdk.rst
> index 13546bb72..61307cb7c 100644
> --- a/Documentation/intro/install/dpdk.rst
> +++ b/Documentation/intro/install/dpdk.rst
>

[...]

@@ -283,9 +283,9 @@ with either the ovs-vswitchd logs, or by running either
> of the commands::
>
>$ ovs-vswitchd --version
>ovs-vswitchd (Open vSwitch) 2.9.0
> -  DPDK 17.11.0
> +  DPDK 18.08.0
>$ ovs-vsctl get Open_vSwitch . dpdk_version
> -  "DPDK 17.11.0"
> +  "DPDK 18.08.0"
>
>  At this point you can use ovs-vsctl to set up bridges and other Open
> vSwitch
>  features. Seeing as we've configured the DPDK datapath, we will use
> DPDK-type
>
>
Just spotted this.
Do you want a patch for this ?

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


Re: [ovs-dev] [PATCH v1 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Ilya Maximets
On 11.12.2018 3:13, Ian Stokes wrote:
> This commit adds support for DPDK v18.11, it includes the following
> changes.
> 
> 1. Enable compilation and linkage with dpdk 18.11.0
>The following dpdk commits which were introduced after dpdk 17.11.x
>require OVS updates to accommodate to the dpdk changes.
>- ce17edde ("ethdev: introduce Rx queue offloads API")
>- ab3ce1e0 ("ethdev: remove old offload API")
>- c06ddf96 ("meter: add configuration profile")
>- e58638c3 ("ethdev: fix TPID handling in flow API")
>- cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
>- ac8d22de ("ethdev: flatten RSS configuration in flow API")
> 
> 2. Limit configured rss hash functions to only those supported
>by the eth device.
> 
> 3. Set default RSS key in struct action_rss_data, required by OVS
>commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
>when configured with "other_config:hw-offload=true".
> 
> 4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
>DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
>Use the correct flag and check it is supported.
> 
> 5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
>Replace them with rte_dev_probe/remove.
> 
> 6. redhat: change variable used for non-root user support from
>$HOME to $XDG_RUNTIME_DIR.
> 
> 7. Update docs and travis to use DPDK18.11.
> 
> This commit squashes the following commits present on the dpdk-latest
> branch:
> 
> 7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
> 270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
> bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
> 73c1a65167fc ("redhat: change variable used for non-root user support")
> eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")
> 
> For credit all authors of the original commits above have been added as
> co-authors for this commmit.
> 
> Signed-off-by: Ophir Munk 
> Co-authored-by: Ophir Munk 
> Signed-off-by: Kevin Traynor 
> Co-authored-by: Kevin Traynor 
> Signed-off-by: Ilya Maximets 
> Co-authored-by: Ilya Maximets 
> Signed-off-by: Timothy Redaelli 
> Co-authored-by: Timothy Redaelli 
> Signed-off-by: Ian Stokes 
> ---
>  .travis/linux-build.sh |   8 +-
>  Documentation/intro/install/dpdk.rst   |  15 +-
>  Documentation/topics/dpdk/ring.rst |   3 +-
>  Documentation/topics/dpdk/vhost-user.rst   |   8 +-
>  NEWS   |   1 +
>  lib/netdev-dpdk.c  | 176 
> +
>  .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
>  7 files changed, 132 insertions(+), 81 deletions(-)
> 
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> index 1fe5bbfa9..5f4d838a9 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -56,9 +56,9 @@ function install_dpdk()
>  cd dpdk-$1
>  git checkout tags/v$1
>  else
> -wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
> -tar xzvf dpdk-$1.tar.gz > /dev/null
> -DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
> +wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
> +tar xvf dpdk-$1.tar.xz > /dev/null
> +DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
>  if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
>  cd dpdk-$1
>  fi
> @@ -83,7 +83,7 @@ fi
>  
>  if [ "$DPDK" ]; then
>  if [ -z "$DPDK_VER" ]; then
> -DPDK_VER="17.11.4"
> +DPDK_VER="18.11"
>  fi
>  install_dpdk $DPDK_VER
>  if [ "$CC" = "clang" ]; then
> diff --git a/Documentation/intro/install/dpdk.rst 
> b/Documentation/intro/install/dpdk.rst
> index 13546bb72..61307cb7c 100644
> --- a/Documentation/intro/install/dpdk.rst
> +++ b/Documentation/intro/install/dpdk.rst
> @@ -42,7 +42,7 @@ Build requirements
>  In addition to the requirements described in :doc:`general`, building Open
>  vSwitch with DPDK will require the following:
>  
> -- DPDK 17.11.4
> +- DPDK 18.11
>  
>  - A `DPDK supported NIC`_
>  
> @@ -71,9 +71,9 @@ Install DPDK
>  #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
>  
> $ cd /usr/src/
> -   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
> -   $ tar xf dpdk-17.11.4.tar.xz
> -   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
> +   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
> +   $ tar xf dpdk-18.11.tar.xz
> +   $ export DPDK_DIR=/usr/src/dpdk-18.11
> $ cd $DPDK_DIR
>  
>  #. (Optional) Configure DPDK as a shared library
> @@ -283,9 +283,9 @@ with either the ovs-vswitchd logs, or by running either 
> of the commands::
>  
>$ ovs-vswitchd --version
>ovs-vswitchd (Open vSwitch) 2.9.0
> -  DPDK 17.11.0
> +  DPDK 18.08.0
>$ ovs-vsctl get Open_vSwitch . dpdk_version
> -  "DPDK 17.11.0"
> +  "DPDK 18.08.0"
>  

Agree with David t

Re: [ovs-dev] [v3 dpdk-latest 2/3] netdev-dpdk: Replace rte_eth_dev_attach/detach

2018-12-11 Thread Stokes, Ian


> -Original Message-
> From: Ophir Munk [mailto:ophi...@mellanox.com]
> Sent: Sunday, December 2, 2018 4:45 PM
> To: Ilya Maximets ; Stokes, Ian
> ; d...@openvswitch.org; Kevin Traynor
> 
> Cc: Asaf Penso ; Olga Shern ;
> Thomas Monjalon ; Shahaf Shuler
> 
> Subject: RE: [v3 dpdk-latest 2/3] netdev-dpdk: Replace
> rte_eth_dev_attach/detach
> 
> 
> 
> > -Original Message-
> > From: Ilya Maximets 
> > Sent: Friday, November 30, 2018 1:29 PM
> > To: Stokes, Ian ; d...@openvswitch.org; Ophir
> > Munk ; Kevin Traynor 
> > Cc: Asaf Penso ; Olga Shern ;
> > Thomas Monjalon ; Shahaf Shuler
> > 
> > Subject: Re: [v3 dpdk-latest 2/3] netdev-dpdk: Replace
> > rte_eth_dev_attach/detach
> >
> > Hi.
> >
> > On 29.11.2018 19:31, Stokes, Ian wrote:
> > >> Hi Ian, Kevin,
> > >> dpdk 18.11 was officially released. Can you please inform what are
> > >> the
> > plans for merging these series into dpdk-latest and dpdk-hwol branches?
> > >> Once merged - I would appreciate having the representor patches
> > reviewed (after being rebased).
> > >>
> > >
> > > Thanks for Raising this Ophir,
> > >
> > > I would think the steps would be as follows:
> > >
> > > 1. Merge latest changes from OVS master to dpdk-latest. (Ian) 2.
> > > Create
> > 18.11 support patch based on dpdk-latest. (Kevin) 3. Apply DPDK 18.11
> > patch to to support 18.11 to dpdk-latest(Ian).

I've applied kevins 18.11 patch to dpdk-latest and dpdk-hwol as well as pull 
the latest changes from master to these branches.

> > >
> > > I intended to merge master to dpdk-latest tomorrow, if people have
> > > signed
> > off on Kevins patch then I can also apply that to dpdk-latest.
> >
> > Beside the other talks, is it possible to always use 'git pull
> > --rebase' policy for branches ? It's much easier to track the changes
> > / diff with the master if the history is plain.
> >
> > >
> > > As regards moving merging 18.11 support to master I think we need to
> > discuss the logistics of this a little more. Discussing this with
> > Kevin I didn’t see a clear path so we have a few options.
> > >
> > > We could generate a patch on the diff between master and dpdk-latest
> > with 18.11 support.
> > >
> > > Upside is we move in one patch to 18.11. However this could be messy
> > though in terms of bisecting issues in the future, it would also be
> > nice to give proper credit to the authors for the work done on
> individual patches.
> 
> The commit message should include Co-authored-by in order to give credit
> to other authors.
> 
> > >
> > > Another choice is to break the move into 2 patches. Patch 1 could
> > > move to
> > 18.08 on master first (squashed commits based on the DPDK 18.08 work
> > you submitted), then patch 2 would follow up immediately with a move
> > to 18.11 based on what Kevin has submitted.
> > >
> > > This would at least avoid 1 large patch, would be easier to bisect
> > > in the
> > future also if any issues occur.
> > >
> > > The downside here is that the DPDK compilation will fail in travis
> > > for DPDK
> > 18.08 due to the deprecated API for hotplug attach/detach. I'd like to
> > avoid introducing warnings into the OVS build if possible.
> > >
> > > What are peoples thoughts?
> >
> > I'd like the idea to squash everything in a single patch.
> > You may squash in my patch too:
> > bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced
> > struct.") This will slightly decrease the size of resulted change.
> >
> > Kevin's patch is relatively small. It has only 24 lines in code diff.
> > Upgrade to 18.08 is already big and contains a lot of not really
> > connected changes. So, additional 24 lines will not make it worse.
> > IMHO, bisecting will not suffer from squashing. And more, it'll be
> > easier to bisect, because you will not have to build completely
> > different DPDK version for a single commit in the middle. And, as I
> > already said, upgrade to 18.11 is a small patch.
> >
> 
> Squashing is an option. There is no point in having only one commit which
> refers to dpdk 18.08.
> However, the commit message should be detailed and include all the
> information regarding what was done for 18.08 and 18.11 separately.
> 


I've created a new patch based on a diff of master and the head of dpdk-latest.
It summarizes the changes along with commit IDs of all patches used to upgrade 
to 18.11. All authors have been added as co-authors. Please see patch below. 
Comments welcome.

https://mail.openvswitch.org/pipermail/ovs-dev/2018-December/354385.html

Ian

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


Re: [ovs-dev] [PATCH v1 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Stokes, Ian
Hi David,

good catch, I can modify this for a v2, I’ve sent this patch as an example of 
how we can move to 18.11 so I’m awaiting comments from others also, thanks for 
the heads up!

Ian

From: David Marchand [mailto:david.march...@redhat.com]
Sent: Tuesday, December 11, 2018 8:31 AM
To: Stokes, Ian 
Cc: d...@openvswitch.org; i.maxim...@samsung.com
Subject: Re: [ovs-dev] [PATCH v1 1/1] dpdk: Update to use DPDK 18.11.

Hello Ian,

On Tue, Dec 11, 2018 at 1:13 AM Ian Stokes 
mailto:ian.sto...@intel.com>> wrote:

diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 13546bb72..61307cb7c 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst

[...]

@@ -283,9 +283,9 @@ with either the ovs-vswitchd logs, or by running either of 
the commands::

   $ ovs-vswitchd --version
   ovs-vswitchd (Open vSwitch) 2.9.0
-  DPDK 17.11.0
+  DPDK 18.08.0
   $ ovs-vsctl get Open_vSwitch . dpdk_version
-  "DPDK 17.11.0"
+  "DPDK 18.08.0"

 At this point you can use ovs-vsctl to set up bridges and other Open vSwitch
 features. Seeing as we've configured the DPDK datapath, we will use DPDK-type

Just spotted this.
Do you want a patch for this ?
--
David Marchand
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v1 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Ian Stokes

On 12/11/2018 8:46 AM, Ilya Maximets wrote:

On 11.12.2018 3:13, Ian Stokes wrote:

This commit adds support for DPDK v18.11, it includes the following
changes.

1. Enable compilation and linkage with dpdk 18.11.0
The following dpdk commits which were introduced after dpdk 17.11.x
require OVS updates to accommodate to the dpdk changes.
- ce17edde ("ethdev: introduce Rx queue offloads API")
- ab3ce1e0 ("ethdev: remove old offload API")
- c06ddf96 ("meter: add configuration profile")
- e58638c3 ("ethdev: fix TPID handling in flow API")
- cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
- ac8d22de ("ethdev: flatten RSS configuration in flow API")

2. Limit configured rss hash functions to only those supported
by the eth device.

3. Set default RSS key in struct action_rss_data, required by OVS
commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
when configured with "other_config:hw-offload=true".

4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
Use the correct flag and check it is supported.

5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
Replace them with rte_dev_probe/remove.

6. redhat: change variable used for non-root user support from
$HOME to $XDG_RUNTIME_DIR.

7. Update docs and travis to use DPDK18.11.

This commit squashes the following commits present on the dpdk-latest
branch:

7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
73c1a65167fc ("redhat: change variable used for non-root user support")
eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")

For credit all authors of the original commits above have been added as
co-authors for this commmit.

Signed-off-by: Ophir Munk 
Co-authored-by: Ophir Munk 
Signed-off-by: Kevin Traynor 
Co-authored-by: Kevin Traynor 
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Timothy Redaelli 
Co-authored-by: Timothy Redaelli 
Signed-off-by: Ian Stokes 
---
  .travis/linux-build.sh |   8 +-
  Documentation/intro/install/dpdk.rst   |  15 +-
  Documentation/topics/dpdk/ring.rst |   3 +-
  Documentation/topics/dpdk/vhost-user.rst   |   8 +-
  NEWS   |   1 +
  lib/netdev-dpdk.c  | 176 +
  .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
  7 files changed, 132 insertions(+), 81 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 1fe5bbfa9..5f4d838a9 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -56,9 +56,9 @@ function install_dpdk()
  cd dpdk-$1
  git checkout tags/v$1
  else
-wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
-tar xzvf dpdk-$1.tar.gz > /dev/null
-DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
+wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
+tar xvf dpdk-$1.tar.xz > /dev/null
+DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
  if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
  cd dpdk-$1
  fi
@@ -83,7 +83,7 @@ fi
  
  if [ "$DPDK" ]; then

  if [ -z "$DPDK_VER" ]; then
-DPDK_VER="17.11.4"
+DPDK_VER="18.11"
  fi
  install_dpdk $DPDK_VER
  if [ "$CC" = "clang" ]; then
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 13546bb72..61307cb7c 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -42,7 +42,7 @@ Build requirements
  In addition to the requirements described in :doc:`general`, building Open
  vSwitch with DPDK will require the following:
  
-- DPDK 17.11.4

+- DPDK 18.11
  
  - A `DPDK supported NIC`_
  
@@ -71,9 +71,9 @@ Install DPDK

  #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
  
 $ cd /usr/src/

-   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
-   $ tar xf dpdk-17.11.4.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
+   $ tar xf dpdk-18.11.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-18.11
 $ cd $DPDK_DIR
  
  #. (Optional) Configure DPDK as a shared library

@@ -283,9 +283,9 @@ with either the ovs-vswitchd logs, or by running either of 
the commands::
  
$ ovs-vswitchd --version

ovs-vswitchd (Open vSwitch) 2.9.0
-  DPDK 17.11.0
+  DPDK 18.08.0
$ ovs-vsctl get Open_vSwitch . dpdk_version
-  "DPDK 17.11.0"
+  "DPDK 18.08.0"
  


Agree with David that this change is unnecessary. And it's actually
wrong, because it makes example inconsistent.



Yes, agreed, apologies it was a bit late my side whe

[ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Ian Stokes
This commit adds support for DPDK v18.11, it includes the following
changes.

1. Enable compilation and linkage with dpdk 18.11.0
   The following dpdk commits which were introduced after dpdk 17.11.x
   require OVS updates to accommodate to the dpdk changes.
   - ce17edde ("ethdev: introduce Rx queue offloads API")
   - ab3ce1e0 ("ethdev: remove old offload API")
   - c06ddf96 ("meter: add configuration profile")
   - e58638c3 ("ethdev: fix TPID handling in flow API")
   - cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
   - ac8d22de ("ethdev: flatten RSS configuration in flow API")

2. Limit configured rss hash functions to only those supported
   by the eth device.

3. Set default RSS key in struct action_rss_data, required by OVS
   commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
   when configured with "other_config:hw-offload=true".

4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
   DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
   Use the correct flag and check it is supported.

5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
   Replace them with rte_dev_probe/remove.

6. Update docs and travis to use DPDK18.11.

This commit squashes the following commits present on the dpdk-latest
branch:

7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
73c1a65167fc ("redhat: change variable used for non-root user support")
eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")

For credit all authors of the original commits above have been added as
co-authors for this commmit.

Signed-off-by: Ophir Munk 
Co-authored-by: Ophir Munk 
Signed-off-by: Kevin Traynor 
Co-authored-by: Kevin Traynor 
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Timothy Redaelli 
Co-authored-by: Timothy Redaelli 
Signed-off-by: Ian Stokes 
---
v1 -> v2
* Update DPDK validation example to reference 18.11 instead of 18.08 and
  OVS 2.10.0 instead of ovs 2.9.0.
* Vertically align netdev_dpdk_policer_pkt_handle arguments.
---
 .travis/linux-build.sh |   8 +-
 Documentation/intro/install/dpdk.rst   |  17 +-
 Documentation/topics/dpdk/ring.rst |   3 +-
 Documentation/topics/dpdk/vhost-user.rst   |   8 +-
 NEWS   |   1 +
 lib/netdev-dpdk.c  | 176 +
 .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
 7 files changed, 133 insertions(+), 82 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 1fe5bbfa9..5f4d838a9 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -56,9 +56,9 @@ function install_dpdk()
 cd dpdk-$1
 git checkout tags/v$1
 else
-wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
-tar xzvf dpdk-$1.tar.gz > /dev/null
-DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
+wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
+tar xvf dpdk-$1.tar.xz > /dev/null
+DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
 if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
 cd dpdk-$1
 fi
@@ -83,7 +83,7 @@ fi
 
 if [ "$DPDK" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="17.11.4"
+DPDK_VER="18.11"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 13546bb72..cd7ab7577 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -42,7 +42,7 @@ Build requirements
 In addition to the requirements described in :doc:`general`, building Open
 vSwitch with DPDK will require the following:
 
-- DPDK 17.11.4
+- DPDK 18.11
 
 - A `DPDK supported NIC`_
 
@@ -71,9 +71,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
-   $ tar xf dpdk-17.11.4.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
+   $ tar xf dpdk-18.11.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-18.11
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
@@ -282,10 +282,10 @@ Additionally, the library version linked to ovs-vswitchd 
can be confirmed
 with either the ovs-vswitchd logs, or by running either of the commands::
 
   $ ovs-vswitchd --version
-  ovs-vswitchd (Open vSwitch) 2.9.0
-  DPDK 17.11.0
+  ovs-vswitchd (Open vSwitch) 2.10.0
+  DPDK 18.11.0
   $ ovs-vsctl get Open_vSwitch . dpdk_version
-  "DPDK 17.11.0"
+  "DPDK 18.11.0"
 
 At this point you can use ovs-vsctl to set up bridges and other Open vSwitch
 features. Seeing as we've config

Re: [ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Ilya Maximets
On 11.12.2018 14:23, Ian Stokes wrote:
> This commit adds support for DPDK v18.11, it includes the following
> changes.
> 
> 1. Enable compilation and linkage with dpdk 18.11.0
>The following dpdk commits which were introduced after dpdk 17.11.x
>require OVS updates to accommodate to the dpdk changes.
>- ce17edde ("ethdev: introduce Rx queue offloads API")
>- ab3ce1e0 ("ethdev: remove old offload API")
>- c06ddf96 ("meter: add configuration profile")
>- e58638c3 ("ethdev: fix TPID handling in flow API")
>- cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
>- ac8d22de ("ethdev: flatten RSS configuration in flow API")
> 
> 2. Limit configured rss hash functions to only those supported
>by the eth device.
> 
> 3. Set default RSS key in struct action_rss_data, required by OVS
>commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
>when configured with "other_config:hw-offload=true".
> 
> 4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
>DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
>Use the correct flag and check it is supported.
> 
> 5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
>Replace them with rte_dev_probe/remove.
> 
> 6. Update docs and travis to use DPDK18.11.
> 
> This commit squashes the following commits present on the dpdk-latest
> branch:
> 
> 7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
> 270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
> bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
> 73c1a65167fc ("redhat: change variable used for non-root user support")
> eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")
> 
> For credit all authors of the original commits above have been added as
> co-authors for this commmit.
> 
> Signed-off-by: Ophir Munk 
> Co-authored-by: Ophir Munk 
> Signed-off-by: Kevin Traynor 
> Co-authored-by: Kevin Traynor 
> Signed-off-by: Ilya Maximets 
> Co-authored-by: Ilya Maximets 
> Signed-off-by: Timothy Redaelli 
> Co-authored-by: Timothy Redaelli 
> Signed-off-by: Ian Stokes 
> ---
> v1 -> v2
> * Update DPDK validation example to reference 18.11 instead of 18.08 and
>   OVS 2.10.0 instead of ovs 2.9.0.
> * Vertically align netdev_dpdk_policer_pkt_handle arguments.
> ---
>  .travis/linux-build.sh |   8 +-
>  Documentation/intro/install/dpdk.rst   |  17 +-
>  Documentation/topics/dpdk/ring.rst |   3 +-
>  Documentation/topics/dpdk/vhost-user.rst   |   8 +-
>  NEWS   |   1 +
>  lib/netdev-dpdk.c  | 176 
> +
>  .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
>  7 files changed, 133 insertions(+), 82 deletions(-)
> 
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> index 1fe5bbfa9..5f4d838a9 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -56,9 +56,9 @@ function install_dpdk()
>  cd dpdk-$1
>  git checkout tags/v$1
>  else
> -wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
> -tar xzvf dpdk-$1.tar.gz > /dev/null
> -DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
> +wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
> +tar xvf dpdk-$1.tar.xz > /dev/null
> +DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
>  if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
>  cd dpdk-$1
>  fi
> @@ -83,7 +83,7 @@ fi
>  
>  if [ "$DPDK" ]; then
>  if [ -z "$DPDK_VER" ]; then
> -DPDK_VER="17.11.4"
> +DPDK_VER="18.11"
>  fi
>  install_dpdk $DPDK_VER
>  if [ "$CC" = "clang" ]; then
> diff --git a/Documentation/intro/install/dpdk.rst 
> b/Documentation/intro/install/dpdk.rst
> index 13546bb72..cd7ab7577 100644
> --- a/Documentation/intro/install/dpdk.rst
> +++ b/Documentation/intro/install/dpdk.rst
> @@ -42,7 +42,7 @@ Build requirements
>  In addition to the requirements described in :doc:`general`, building Open
>  vSwitch with DPDK will require the following:
>  
> -- DPDK 17.11.4
> +- DPDK 18.11
>  
>  - A `DPDK supported NIC`_
>  
> @@ -71,9 +71,9 @@ Install DPDK
>  #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
>  
> $ cd /usr/src/
> -   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
> -   $ tar xf dpdk-17.11.4.tar.xz
> -   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
> +   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
> +   $ tar xf dpdk-18.11.tar.xz
> +   $ export DPDK_DIR=/usr/src/dpdk-18.11
> $ cd $DPDK_DIR
>  
>  #. (Optional) Configure DPDK as a shared library
> @@ -282,10 +282,10 @@ Additionally, the library version linked to 
> ovs-vswitchd can be confirmed
>  with either the ovs-vswitchd logs, or by running either of the commands::
>  
>$ ovs-vswitchd --version
> -  ovs-vswitc

Re: [ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Kevin Traynor
On 12/11/2018 11:46 AM, Ilya Maximets wrote:
> On 11.12.2018 14:23, Ian Stokes wrote:
>> This commit adds support for DPDK v18.11, it includes the following
>> changes.
>>
>> 1. Enable compilation and linkage with dpdk 18.11.0
>>The following dpdk commits which were introduced after dpdk 17.11.x
>>require OVS updates to accommodate to the dpdk changes.
>>- ce17edde ("ethdev: introduce Rx queue offloads API")
>>- ab3ce1e0 ("ethdev: remove old offload API")
>>- c06ddf96 ("meter: add configuration profile")
>>- e58638c3 ("ethdev: fix TPID handling in flow API")
>>- cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
>>- ac8d22de ("ethdev: flatten RSS configuration in flow API")
>>
>> 2. Limit configured rss hash functions to only those supported
>>by the eth device.
>>
>> 3. Set default RSS key in struct action_rss_data, required by OVS
>>commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
>>when configured with "other_config:hw-offload=true".
>>
>> 4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
>>DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
>>Use the correct flag and check it is supported.
>>
>> 5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
>>Replace them with rte_dev_probe/remove.
>>
>> 6. Update docs and travis to use DPDK18.11.
>>
>> This commit squashes the following commits present on the dpdk-latest
>> branch:
>>
>> 7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
>> 270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
>> bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
>> 73c1a65167fc ("redhat: change variable used for non-root user support")
>> eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")
>>
>> For credit all authors of the original commits above have been added as
>> co-authors for this commmit.
>>
>> Signed-off-by: Ophir Munk 
>> Co-authored-by: Ophir Munk 

I think perhaps it should also be 'From: Ophir Munk' ? as the majority
of the changes are from his 18.08 patches.

>> Signed-off-by: Kevin Traynor 
>> Co-authored-by: Kevin Traynor 
>> Signed-off-by: Ilya Maximets 
>> Co-authored-by: Ilya Maximets 
>> Signed-off-by: Timothy Redaelli 
>> Co-authored-by: Timothy Redaelli 
>> Signed-off-by: Ian Stokes 
>> ---
>> v1 -> v2
>> * Update DPDK validation example to reference 18.11 instead of 18.08 and
>>   OVS 2.10.0 instead of ovs 2.9.0.
>> * Vertically align netdev_dpdk_policer_pkt_handle arguments.
>> ---
>>  .travis/linux-build.sh |   8 +-
>>  Documentation/intro/install/dpdk.rst   |  17 +-
>>  Documentation/topics/dpdk/ring.rst |   3 +-
>>  Documentation/topics/dpdk/vhost-user.rst   |   8 +-
>>  NEWS   |   1 +
>>  lib/netdev-dpdk.c  | 176 
>> +
>>  .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
>>  7 files changed, 133 insertions(+), 82 deletions(-)
>>
>> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
>> index 1fe5bbfa9..5f4d838a9 100755
>> --- a/.travis/linux-build.sh
>> +++ b/.travis/linux-build.sh
>> @@ -56,9 +56,9 @@ function install_dpdk()
>>  cd dpdk-$1
>>  git checkout tags/v$1
>>  else
>> -wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
>> -tar xzvf dpdk-$1.tar.gz > /dev/null
>> -DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
>> +wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
>> +tar xvf dpdk-$1.tar.xz > /dev/null
>> +DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
>>  if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
>>  cd dpdk-$1
>>  fi
>> @@ -83,7 +83,7 @@ fi
>>  
>>  if [ "$DPDK" ]; then
>>  if [ -z "$DPDK_VER" ]; then
>> -DPDK_VER="17.11.4"
>> +DPDK_VER="18.11"
>>  fi
>>  install_dpdk $DPDK_VER
>>  if [ "$CC" = "clang" ]; then
>> diff --git a/Documentation/intro/install/dpdk.rst 
>> b/Documentation/intro/install/dpdk.rst
>> index 13546bb72..cd7ab7577 100644
>> --- a/Documentation/intro/install/dpdk.rst
>> +++ b/Documentation/intro/install/dpdk.rst
>> @@ -42,7 +42,7 @@ Build requirements
>>  In addition to the requirements described in :doc:`general`, building Open
>>  vSwitch with DPDK will require the following:
>>  
>> -- DPDK 17.11.4
>> +- DPDK 18.11
>>  
>>  - A `DPDK supported NIC`_
>>  
>> @@ -71,9 +71,9 @@ Install DPDK
>>  #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
>>  
>> $ cd /usr/src/
>> -   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
>> -   $ tar xf dpdk-17.11.4.tar.xz
>> -   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
>> +   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
>> +   $ tar xf dpdk-18.11.tar.xz
>> +   $ export DPDK_DIR=/usr/src/dpdk-18.11
>> $ cd $DPDK_DIR
>>  
>>  #. (O

[ovs-dev] [PATCH v3 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Ian Stokes
This commit adds support for DPDK v18.11, it includes the following
changes.

1. Enable compilation and linkage with dpdk 18.11.0
   The following dpdk commits which were introduced after dpdk 17.11.x
   require OVS updates to accommodate to the dpdk changes.
   - ce17edde ("ethdev: introduce Rx queue offloads API")
   - ab3ce1e0 ("ethdev: remove old offload API")
   - c06ddf96 ("meter: add configuration profile")
   - e58638c3 ("ethdev: fix TPID handling in flow API")
   - cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
   - ac8d22de ("ethdev: flatten RSS configuration in flow API")

2. Limit configured rss hash functions to only those supported
   by the eth device.

3. Set default RSS key in struct action_rss_data, required by OVS
   commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
   when configured with "other_config:hw-offload=true".

4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
   DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
   Use the correct flag and check it is supported.

5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
   Replace them with rte_dev_probe/remove.

6. Update docs and travis to use DPDK18.11.

This commit squashes the following commits present on the dpdk-latest
branch:

7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
73c1a65167fc ("redhat: change variable used for non-root user support")
eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")

For credit all authors of the original commits above have been added as
co-authors for this commmit.

From: Ophir Munk 
Signed-off-by: Ophir Munk 
Signed-off-by: Kevin Traynor 
Co-authored-by: Kevin Traynor 
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Timothy Redaelli 
Co-authored-by: Timothy Redaelli 
Signed-off-by: Ian Stokes 
---
v2 -> v3
* Revert validation example to use 17.11.0 and OVS 2.9.0.
* Add From: Ophir Monk to reflect where majority of changes originated.

v1 -> v2
* Update DPDK validation example to reference 18.11 instead of 18.08 and
  OVS 2.10.0 instead of ovs 2.9.0.
* Vertically align netdev_dpdk_policer_pkt_handle arguments.
---
 .travis/linux-build.sh |   8 +-
 Documentation/intro/install/dpdk.rst   |  11 +-
 Documentation/topics/dpdk/ring.rst |   3 +-
 Documentation/topics/dpdk/vhost-user.rst   |   8 +-
 NEWS   |   1 +
 lib/netdev-dpdk.c  | 176 +
 .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
 7 files changed, 130 insertions(+), 79 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 1fe5bbfa9..5f4d838a9 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -56,9 +56,9 @@ function install_dpdk()
 cd dpdk-$1
 git checkout tags/v$1
 else
-wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
-tar xzvf dpdk-$1.tar.gz > /dev/null
-DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
+wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
+tar xvf dpdk-$1.tar.xz > /dev/null
+DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
 if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
 cd dpdk-$1
 fi
@@ -83,7 +83,7 @@ fi
 
 if [ "$DPDK" ]; then
 if [ -z "$DPDK_VER" ]; then
-DPDK_VER="17.11.4"
+DPDK_VER="18.11"
 fi
 install_dpdk $DPDK_VER
 if [ "$CC" = "clang" ]; then
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 13546bb72..344d2b3a6 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -42,7 +42,7 @@ Build requirements
 In addition to the requirements described in :doc:`general`, building Open
 vSwitch with DPDK will require the following:
 
-- DPDK 17.11.4
+- DPDK 18.11
 
 - A `DPDK supported NIC`_
 
@@ -71,9 +71,9 @@ Install DPDK
 #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
 
$ cd /usr/src/
-   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
-   $ tar xf dpdk-17.11.4.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
+   $ tar xf dpdk-18.11.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-18.11
$ cd $DPDK_DIR
 
 #. (Optional) Configure DPDK as a shared library
@@ -672,7 +672,8 @@ Limitations
   The latest list of validated firmware versions can be found in the `DPDK
   release notes`_.
 
-.. _DPDK release notes: http://dpdk.org/doc/guides/rel_notes/release_17_11.html
+.. _DPDK release notes:
+   https://doc.dpdk.org/guides/rel_notes/release_18_11.html
 
 - Upper bound MTU: DPDK device drivers differ in how the L2 frame for a
   

Re: [ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Ian Stokes

On 12/11/2018 11:50 AM, Kevin Traynor wrote:

On 12/11/2018 11:46 AM, Ilya Maximets wrote:

On 11.12.2018 14:23, Ian Stokes wrote:

This commit adds support for DPDK v18.11, it includes the following
changes.

1. Enable compilation and linkage with dpdk 18.11.0
The following dpdk commits which were introduced after dpdk 17.11.x
require OVS updates to accommodate to the dpdk changes.
- ce17edde ("ethdev: introduce Rx queue offloads API")
- ab3ce1e0 ("ethdev: remove old offload API")
- c06ddf96 ("meter: add configuration profile")
- e58638c3 ("ethdev: fix TPID handling in flow API")
- cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
- ac8d22de ("ethdev: flatten RSS configuration in flow API")

2. Limit configured rss hash functions to only those supported
by the eth device.

3. Set default RSS key in struct action_rss_data, required by OVS
commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
when configured with "other_config:hw-offload=true".

4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
Use the correct flag and check it is supported.

5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
Replace them with rte_dev_probe/remove.

6. Update docs and travis to use DPDK18.11.

This commit squashes the following commits present on the dpdk-latest
branch:

7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
73c1a65167fc ("redhat: change variable used for non-root user support")
eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")

For credit all authors of the original commits above have been added as
co-authors for this commmit.

Signed-off-by: Ophir Munk 
Co-authored-by: Ophir Munk 


I think perhaps it should also be 'From: Ophir Munk' ? as the majority
of the changes are from his 18.08 patches.


Signed-off-by: Kevin Traynor 
Co-authored-by: Kevin Traynor 
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Timothy Redaelli 
Co-authored-by: Timothy Redaelli 
Signed-off-by: Ian Stokes 
---
v1 -> v2
* Update DPDK validation example to reference 18.11 instead of 18.08 and
   OVS 2.10.0 instead of ovs 2.9.0.
* Vertically align netdev_dpdk_policer_pkt_handle arguments.
---
  .travis/linux-build.sh |   8 +-
  Documentation/intro/install/dpdk.rst   |  17 +-
  Documentation/topics/dpdk/ring.rst |   3 +-
  Documentation/topics/dpdk/vhost-user.rst   |   8 +-
  NEWS   |   1 +
  lib/netdev-dpdk.c  | 176 +
  .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
  7 files changed, 133 insertions(+), 82 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 1fe5bbfa9..5f4d838a9 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -56,9 +56,9 @@ function install_dpdk()
  cd dpdk-$1
  git checkout tags/v$1
  else
-wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
-tar xzvf dpdk-$1.tar.gz > /dev/null
-DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
+wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
+tar xvf dpdk-$1.tar.xz > /dev/null
+DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
  if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
  cd dpdk-$1
  fi
@@ -83,7 +83,7 @@ fi
  
  if [ "$DPDK" ]; then

  if [ -z "$DPDK_VER" ]; then
-DPDK_VER="17.11.4"
+DPDK_VER="18.11"
  fi
  install_dpdk $DPDK_VER
  if [ "$CC" = "clang" ]; then
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 13546bb72..cd7ab7577 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -42,7 +42,7 @@ Build requirements
  In addition to the requirements described in :doc:`general`, building Open
  vSwitch with DPDK will require the following:
  
-- DPDK 17.11.4

+- DPDK 18.11
  
  - A `DPDK supported NIC`_
  
@@ -71,9 +71,9 @@ Install DPDK

  #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
  
 $ cd /usr/src/

-   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
-   $ tar xf dpdk-17.11.4.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
+   $ tar xf dpdk-18.11.tar.xz
+   $ export DPDK_DIR=/usr/src/dpdk-18.11
 $ cd $DPDK_DIR
  
  #. (Optional) Configure DPDK as a shared library

@@ -282,10 +282,10 @@ Additionally, the library version linked to ovs-vswitchd 
can be confirmed
  with either the ovs-vswitchd logs, or by running either of the commands::
  
$ ovs-vswitchd --versi

Re: [ovs-dev] [PATCH v3 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Kevin Traynor
On 12/11/2018 12:26 PM, Ian Stokes wrote:
> This commit adds support for DPDK v18.11, it includes the following
> changes.
> 
> 1. Enable compilation and linkage with dpdk 18.11.0
>The following dpdk commits which were introduced after dpdk 17.11.x
>require OVS updates to accommodate to the dpdk changes.
>- ce17edde ("ethdev: introduce Rx queue offloads API")
>- ab3ce1e0 ("ethdev: remove old offload API")
>- c06ddf96 ("meter: add configuration profile")
>- e58638c3 ("ethdev: fix TPID handling in flow API")
>- cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
>- ac8d22de ("ethdev: flatten RSS configuration in flow API")
> 
> 2. Limit configured rss hash functions to only those supported
>by the eth device.
> 
> 3. Set default RSS key in struct action_rss_data, required by OVS
>commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
>when configured with "other_config:hw-offload=true".
> 
> 4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
>DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
>Use the correct flag and check it is supported.
> 
> 5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
>Replace them with rte_dev_probe/remove.
> 
> 6. Update docs and travis to use DPDK18.11.
> 
> This commit squashes the following commits present on the dpdk-latest
> branch:
> 
> 7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
> 270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
> bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
> 73c1a65167fc ("redhat: change variable used for non-root user support")
> eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")
> 
> For credit all authors of the original commits above have been added as
> co-authors for this commmit.
> 
> From: Ophir Munk 

Actually, I meant authorship of the patch which inserts 'From: Ophir...'
at the top of the patch i.e. using git commit --author='Ophir Munk
'. Anyway, it's not a big deal.

> Signed-off-by: Ophir Munk 
> Signed-off-by: Kevin Traynor 
> Co-authored-by: Kevin Traynor 
> Signed-off-by: Ilya Maximets 
> Co-authored-by: Ilya Maximets 
> Signed-off-by: Timothy Redaelli 
> Co-authored-by: Timothy Redaelli 
> Signed-off-by: Ian Stokes 
> ---
> v2 -> v3
> * Revert validation example to use 17.11.0 and OVS 2.9.0.
> * Add From: Ophir Monk to reflect where majority of changes originated.
> 
> v1 -> v2
> * Update DPDK validation example to reference 18.11 instead of 18.08 and
>   OVS 2.10.0 instead of ovs 2.9.0.
> * Vertically align netdev_dpdk_policer_pkt_handle arguments.
> ---
>  .travis/linux-build.sh |   8 +-
>  Documentation/intro/install/dpdk.rst   |  11 +-
>  Documentation/topics/dpdk/ring.rst |   3 +-
>  Documentation/topics/dpdk/vhost-user.rst   |   8 +-
>  NEWS   |   1 +
>  lib/netdev-dpdk.c  | 176 
> +
>  .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
>  7 files changed, 130 insertions(+), 79 deletions(-)
> 
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> index 1fe5bbfa9..5f4d838a9 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -56,9 +56,9 @@ function install_dpdk()
>  cd dpdk-$1
>  git checkout tags/v$1
>  else
> -wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
> -tar xzvf dpdk-$1.tar.gz > /dev/null
> -DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
> +wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
> +tar xvf dpdk-$1.tar.xz > /dev/null
> +DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
>  if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
>  cd dpdk-$1
>  fi
> @@ -83,7 +83,7 @@ fi
>  
>  if [ "$DPDK" ]; then
>  if [ -z "$DPDK_VER" ]; then
> -DPDK_VER="17.11.4"
> +DPDK_VER="18.11"
>  fi
>  install_dpdk $DPDK_VER
>  if [ "$CC" = "clang" ]; then
> diff --git a/Documentation/intro/install/dpdk.rst 
> b/Documentation/intro/install/dpdk.rst
> index 13546bb72..344d2b3a6 100644
> --- a/Documentation/intro/install/dpdk.rst
> +++ b/Documentation/intro/install/dpdk.rst
> @@ -42,7 +42,7 @@ Build requirements
>  In addition to the requirements described in :doc:`general`, building Open
>  vSwitch with DPDK will require the following:
>  
> -- DPDK 17.11.4
> +- DPDK 18.11
>  
>  - A `DPDK supported NIC`_
>  
> @@ -71,9 +71,9 @@ Install DPDK
>  #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
>  
> $ cd /usr/src/
> -   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
> -   $ tar xf dpdk-17.11.4.tar.xz
> -   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
> +   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
> +   $ tar xf dpdk-18.11.tar.xz
> +   $ export DPDK_DIR=/usr/src/dpdk

[ovs-dev] [RFC] cirrus: Add Cirrus CI integration for FreeBSD build

2018-12-11 Thread Ilya Maximets
CirrusCI [1] is free for open-sorce projects and provides similar
to TravisCI interfaces. One significant difference is ability
to run tasks on FreeBSD instances.

This patch adds simple configuration file to test OVS build
on two FreeBSD releases with gcc and clang.
Unit tests are commented out because they are broken for now.

To enable the automated checks Cirrus CI application from GitHub
Marketplace should be installed. See details in Quick Start guide [2].

[1] https://cirrus-ci.org
[2] https://cirrus-ci.org/guide/quick-start/

Signed-off-by: Ilya Maximets 
---

This could be useful to test FreeBSD build automatically to early
detect issues. CirrusCI looks suitable for that purpose and it's
the only public CI system that I managed to find that supports
FreeBSD images. Sending as RFC to start discussion.

Few more differentiation points with Travis. Cirrus allows to
configure number of CPUs and the amount of required memory. It
also supports Linux, OSX and Windows containers. So, maybe, if
we'll like it, we could drop Travis and AppVeyor and use single
CI system for all the tests.

I'm not advertising and not trying to convince to replace our
current CI systems. I found CirrusCI just few days ago by a mail [3]
in qemu-devel list. I just think that it's the only option for
now to test BSD builds with public CI. And it worked fine for me
with below configuration.

Thoughts ?

As a note: I just spotted that TravisCI adds windows support.
Maybe we could use it in the future for windows builds.

[3] https://lists.nongnu.org/archive/html/qemu-devel/2018-12/msg00935.html

 .cirrus.yml | 30 ++
 Makefile.am |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 .cirrus.yml

diff --git a/.cirrus.yml b/.cirrus.yml
new file mode 100644
index 0..4902fd370
--- /dev/null
+++ b/.cirrus.yml
@@ -0,0 +1,30 @@
+freebsd_build_task:
+
+  freebsd_instance:
+matrix:
+  image: freebsd-12-0-release-amd64
+  image: freebsd-11-2-release-amd64
+cpu: 4
+memory: 8G
+
+  env:
+matrix:
+  COMPILER: gcc
+  COMPILER: clang
+
+  prepare_script:
+- pkg install -y automake libtool gmake gcc wget
+ python py27-six py27-sphinx
+
+  configure_script:
+- ./boot.sh
+- ./configure CC=$COMPILER MAKE=gmake OVS_CFLAGS='-Wall' --enable-Werror
+  || { cat config.log; exit 1; }
+
+  build_script:
+- gmake -j8
+
+#  TODO(i.maximets): Uncomment the test suite execution when it is fixed.
+#  check_script:
+#- gmake -j8 check TESTSUITEFLAGS=-j8 RECHECK=yes
+#|| { cat ./tests/testsuite.log; exit 1; }
diff --git a/Makefile.am b/Makefile.am
index 64725654c..8408509c9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -76,6 +76,7 @@ EXTRA_DIST = \
MAINTAINERS.rst \
README.rst \
NOTICE \
+   .cirrus.yml \
.travis.yml \
.travis/linux-build.sh \
.travis/linux-prepare.sh \
-- 
2.17.1

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


Re: [ovs-dev] [PATCH v3] tests: Simplify and improve the daemon tests.

2018-12-11 Thread Alin Gabriel Serdean



> On 10 Dec 2018, at 19:43, Ben Pfaff  wrote:
> 
> The daemon tests used files a lot when shell variables were easier to use
> and easier to understand.  This commit changes that.
> 
> The tests created empty databases that aren't really needed anymore.  This
> commit changes them to use the ovsdb-server --no-db option instead.
> 
> The tests had a lot of common code for checking the ancestry of processes.
> This commit factors out a new shell function check_ancestors.
> 
> The tests tended to use random pidfile names.  This switches to just using
> the defaults, which are fine.
> 
> The tests didn't check the names of the child processes.  This adds those
> checks using the new check_process_name shell function.  This should avoid
> regression of the bug fixed by commit 266f79e32c60 ("daemon-unix: Use
> same name for original or restarted children.")
> 
> Other minor improvements too.
> 
> I only made small updates to the Windows-specific test, because it is hard
> for me to verify.
> 
> Acked-by: Alin Gabriel Serdean 
> Signed-off-by: Ben Pfaff 
> ---
> v1->v2: Rebased, added ack.
> v2->v3: Fix some mixups in v2 from muddling two patches together.
> 
> tests/daemon-py.at | 218 +
> tests/daemon.at| 212 ---
> 2 files changed, 220 insertions(+), 210 deletions(-)
> 


I did another run of testing on Windows and everything was fine.

Acked-by: Alin Gabriel Serdean 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3 1/1] dpdk: Update to use DPDK 18.11.

2018-12-11 Thread Ian Stokes

On 12/11/2018 1:37 PM, Kevin Traynor wrote:

On 12/11/2018 12:26 PM, Ian Stokes wrote:

This commit adds support for DPDK v18.11, it includes the following
changes.

1. Enable compilation and linkage with dpdk 18.11.0
The following dpdk commits which were introduced after dpdk 17.11.x
require OVS updates to accommodate to the dpdk changes.
- ce17edde ("ethdev: introduce Rx queue offloads API")
- ab3ce1e0 ("ethdev: remove old offload API")
- c06ddf96 ("meter: add configuration profile")
- e58638c3 ("ethdev: fix TPID handling in flow API")
- cd8c7c7c ("ethdev: replace bus specific struct with generic dev")
- ac8d22de ("ethdev: flatten RSS configuration in flow API")

2. Limit configured rss hash functions to only those supported
by the eth device.

3. Set default RSS key in struct action_rss_data, required by OVS
commit- e8a2b5bf ("netdev-dpdk: implement flow offload with rte flow")
when configured with "other_config:hw-offload=true".

4. DEV_RX_OFFLOAD_CRC_STRIP has been removed from DPDK 18.11.
DEV_RX_OFFLOAD_KEEP_CRC can now be used to keep the CRC.
Use the correct flag and check it is supported.

5. rte_eth_dev_attach/detach have been removed from DPDK 18.11.
Replace them with rte_dev_probe/remove.

6. Update docs and travis to use DPDK18.11.

This commit squashes the following commits present on the dpdk-latest
branch:

7f021f902bb3 ("netdev-dpdk: Upgrade to dpdk v18.08")
270d9216f1ed ("netdev-dpdk: Set scatter based on capabilities")
bef2cdc8f412 ("netdev-dpdk: Fix returning the field of malloced struct.")
73c1a65167fc ("redhat: change variable used for non-root user support")
eb485f60ce44 ("dpdk: Update to use DPDK 18.11.")

For credit all authors of the original commits above have been added as
co-authors for this commmit.

From: Ophir Munk 


Actually, I meant authorship of the patch which inserts 'From: Ophir...'
at the top of the patch i.e. using git commit --author='Ophir Munk
'. Anyway, it's not a big deal.



OK, I can apply do this for before committing if it's preferred. I'll 
hold off on a v4 just yet in case there are any other comments on this 
patch.


Ian

Signed-off-by: Ophir Munk 
Signed-off-by: Kevin Traynor 
Co-authored-by: Kevin Traynor 
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Timothy Redaelli 
Co-authored-by: Timothy Redaelli 
Signed-off-by: Ian Stokes 
---
v2 -> v3
* Revert validation example to use 17.11.0 and OVS 2.9.0.
* Add From: Ophir Monk to reflect where majority of changes originated.

v1 -> v2
* Update DPDK validation example to reference 18.11 instead of 18.08 and
   OVS 2.10.0 instead of ovs 2.9.0.
* Vertically align netdev_dpdk_policer_pkt_handle arguments.
---
  .travis/linux-build.sh |   8 +-
  Documentation/intro/install/dpdk.rst   |  11 +-
  Documentation/topics/dpdk/ring.rst |   3 +-
  Documentation/topics/dpdk/vhost-user.rst   |   8 +-
  NEWS   |   1 +
  lib/netdev-dpdk.c  | 176 +
  .../usr_lib_systemd_system_ovs-vswitchd.service.in |   2 +-
  7 files changed, 130 insertions(+), 79 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 1fe5bbfa9..5f4d838a9 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -56,9 +56,9 @@ function install_dpdk()
  cd dpdk-$1
  git checkout tags/v$1
  else
-wget http://fast.dpdk.org/rel/dpdk-$1.tar.gz
-tar xzvf dpdk-$1.tar.gz > /dev/null
-DIR_NAME=$(tar -tf dpdk-$1.tar.gz | head -1 | cut -f1 -d"/")
+wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
+tar xvf dpdk-$1.tar.xz > /dev/null
+DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
  if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
  cd dpdk-$1
  fi
@@ -83,7 +83,7 @@ fi
  
  if [ "$DPDK" ]; then

  if [ -z "$DPDK_VER" ]; then
-DPDK_VER="17.11.4"
+DPDK_VER="18.11"
  fi
  install_dpdk $DPDK_VER
  if [ "$CC" = "clang" ]; then
diff --git a/Documentation/intro/install/dpdk.rst 
b/Documentation/intro/install/dpdk.rst
index 13546bb72..344d2b3a6 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -42,7 +42,7 @@ Build requirements
  In addition to the requirements described in :doc:`general`, building Open
  vSwitch with DPDK will require the following:
  
-- DPDK 17.11.4

+- DPDK 18.11
  
  - A `DPDK supported NIC`_
  
@@ -71,9 +71,9 @@ Install DPDK

  #. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
  
 $ cd /usr/src/

-   $ wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
-   $ tar xf dpdk-17.11.4.tar.xz
-   $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
+   $ wget http://fast.dpdk.org/rel/dpdk-18.11.tar.xz
+   $ tar xf dpdk-18.11.tar.xz
+   $ export DPDK_DIR

Re: [ovs-dev] [patch v9 06/11] Userspace datapath: Add fragmentation handling.

2018-12-11 Thread Ben Pfaff
On Mon, Nov 19, 2018 at 11:09:25AM -0800, Darrell Ball wrote:
> Fragmentation handling is added for supporting conntrack.
> Both v4 and v6 are supported.
> 
> After discussion with several people, I decided to not store
> configuration state in the database to be more consistent with
> the kernel in future, similarity with other conntrack configuration
> which will not be in the database as well and overall simplicity.
> Accordingly, fragmentation handling is enabled by default.
> 
> This patch enables fragmentation tests for the userspace datapath.
> 
> Signed-off-by: Darrell Ball 

Thanks for implementing this.

This could use more comments, especially on the data structures and
file-level variables and at the level of an individual function.

Please don't invent yet another mutex.

ipf_print_reass_packet() seems like it could use ds_put_hex_dump() and
thereby be more readable (I don't really want to read 182 hex digits in
a row without any white space).

Why 91 bytes in ipf_print_reass_packet()?

All the counters seem to be write-only.

struct ipf_addr seems odd to me.  It has both aligned and unaligned
versions of addresses, which means that the overall struct needs to be
aligned, and it's a union nested in a struct instead of just a union.
ipf_addr_hash_add() implies that all the bytes in the struct need to be
initialized even if only some of them are used.

ipf_list_key_hash() seems to be at risk of hashing trailing padding at
the end of struct ipf_list_key.

Does ipf_list_complete() run one past the end of the array?  Naively, it
seems like it might.

I found ipf_sort() a little hard to read mostly due to the long variable
names.  Here's an alternate form that you can accept or reject as you
like (I have not tested it):

static void
ipf_sort(struct ipf_frag *frags, size_t last_idx)
OVS_REQUIRES(ipf_lock)
{
for (int i = 1; i <= last_idx; i++) {
struct ipf_frag ipf_frag = frags[i];
int j = i - 1;
while (j >= 0 && frags[j].start_data_byte > ipf_frag.start_data_byte) {
frags[j + 1] = frags[j];
j--;
}
frags[j + 1] = ipf_frag;
}
}

ipf_reassemble_v4_frags() and ipf_reassemble_v6_frags() know the final
length of the packet they're assembling, but it doesn't look to me like
they preallocate the space for it.

ipf_reassemble_v6_frags() and ipf_reassemble_v6_frags() calculate the
length of the L3 header manually and skip past it.  Couldn't they just
use the L4 header pointer?

The ipf_list_key_cmp() interface is a little confusing because the
return value convention and the name is a little like a strcmp()ish
function, but it doesn't use a -1/+1 return value.  I'd rename it to
ipf_list_key_equal()s, change the return type to "bool", and make true
mean equal, false mean unequal.

Processing a fragment is O(n) in the number of existing fragments due to
the dup check.  I don't know whether this is important.

It looks like packet duplication can cause a fraglist to be marked
invalid.  I wonder whether this is good behavior.

It seems like we could estimate the number of fragments needed by
dividing the total size by the size of the first fragment received.

Do we need xzalloc() for frag_list?  It seems like we're going to
initialize each element as needed anyway.

I think there's a race if either v4 or v6 is ever disabled, because the
code checks whether fragment reassembly is enabled twice, once at a high
level and once again in ipf_handle_frag().  The latter function
assert-fails if reassembly is disabled, which seems like it could be a
problem.

At the same time, I don't see any way to ever disable fragment
reassembly.  The code appears to enable it by default and not provide
any way to disable it.

Is it common practice to enforce a minimum size for fragments?

Maybe it would be a little easier to make the counters a two-dimensional
array: atomic_uint64_t ipf_counters[2][N_COUNTERS], where one dimension
is IPv4/IPv6 and the other is the particular counter.  Then ipf_count()
would become trivial.  Just a thought though.

Thanks, and I'll look forward to the next version.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v9 07/11] dpctl: Simplify opt_dpif_open().

2018-12-11 Thread Ben Pfaff
On Mon, Nov 26, 2018 at 11:08:08AM -0800, Yi-Hung Wei wrote:
> On Mon, Nov 19, 2018 at 11:11 AM Darrell Ball  wrote:
> >
> > The commonly used function, opt_dpif_open(), recently became more complex
> > to check for a datapath argument. Unnecessary dummy parameters for most 
> > users
> > were hence added.  Revert back and call the intended api, dp_arg_exists(), 
> > to
> > query for a datapath argument being supplied.
> >
> > Fixes: 4eeec031d4c4 ("dpctl: Implement dpctl commands for conntrack per 
> > zone limit")
> > CC: Yi-Hung Wei 
> > Signed-off-by: Darrell Ball 
> > ---
> 
> Thanks for the simplification.  Looks good to me.
> 
> Acked-by: Yi-Hung Wei 

Thanks Darrell and Yi-Hung.  I applied this to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v9 08/11] ipf: Add command to disable fragmentation handling.

2018-12-11 Thread Ben Pfaff
On Mon, Nov 19, 2018 at 11:09:27AM -0800, Darrell Ball wrote:
> Commands are added to disable and also enable V4/V6 fragmentation
> handling for conntrack, which is enabled by default.
> 
> Signed-off-by: Darrell Ball 

Looks good to me.  I would fold this in with the patch that adds
fragmentation handling.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v9 09/11] ipf: Add set minimum fragment size command.

2018-12-11 Thread Ben Pfaff
On Mon, Nov 19, 2018 at 11:09:28AM -0800, Darrell Ball wrote:
> A new command "ovs-appctl dpctl/ipf-set-min-frag" is added
> for userspace datapath conntrack v4/v6 fragmentation support.
> 
> Signed-off-by: Darrell Ball 

Looks good to me.  I would squash this into the patch that adds fragment
reassembly support.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v9 10/11] ipf: Add set maximum fragments supported command.

2018-12-11 Thread Ben Pfaff
On Mon, Nov 19, 2018 at 11:09:29AM -0800, Darrell Ball wrote:
> A new command "ovs-appctl dpctl/ipf-set-max-nfrags" is added
> for userspace datapath conntrack fragmentation support.
> 
> Signed-off-by: Darrell Ball 

Looks good to me.  I would fold this into the patch that introduces
fragment handling.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3] tests: Simplify and improve the daemon tests.

2018-12-11 Thread Ben Pfaff
On Tue, Dec 11, 2018 at 05:10:11PM +0200, Alin Gabriel Serdean wrote:
> 
> 
> > On 10 Dec 2018, at 19:43, Ben Pfaff  wrote:
> > 
> > The daemon tests used files a lot when shell variables were easier to use
> > and easier to understand.  This commit changes that.
> > 
> > The tests created empty databases that aren't really needed anymore.  This
> > commit changes them to use the ovsdb-server --no-db option instead.
> > 
> > The tests had a lot of common code for checking the ancestry of processes.
> > This commit factors out a new shell function check_ancestors.
> > 
> > The tests tended to use random pidfile names.  This switches to just using
> > the defaults, which are fine.
> > 
> > The tests didn't check the names of the child processes.  This adds those
> > checks using the new check_process_name shell function.  This should avoid
> > regression of the bug fixed by commit 266f79e32c60 ("daemon-unix: Use
> > same name for original or restarted children.")
> > 
> > Other minor improvements too.
> > 
> > I only made small updates to the Windows-specific test, because it is hard
> > for me to verify.
> > 
> > Acked-by: Alin Gabriel Serdean 
> > Signed-off-by: Ben Pfaff 
> > ---
> > v1->v2: Rebased, added ack.
> > v2->v3: Fix some mixups in v2 from muddling two patches together.
> > 
> > tests/daemon-py.at | 218 
> > +
> > tests/daemon.at| 212 ---
> > 2 files changed, 220 insertions(+), 210 deletions(-)
> > 
> 
> 
> I did another run of testing on Windows and everything was fine.
> 
> Acked-by: Alin Gabriel Serdean 

Thanks!  I applied this to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v9 11/11] ipf: Add fragmentation status reporting.

2018-12-11 Thread Ben Pfaff
On Mon, Nov 19, 2018 at 11:09:30AM -0800, Darrell Ball wrote:
> A new command "ovs-appctl dpctl/ipf-get-status" is added
> for userspace datapath conntrack fragmentation support.
> The command shows the configuration status, fragment counters and
> ipf lists state.
> 
> Signed-off-by: Darrell Ball 

Looks good to me.  I would fold this into the patch that introduces
fragment reassembly.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] route-table: Use classifier versioning to replace all routes atomically.

2018-12-11 Thread Flavio Leitner
Hi Ben,

On Fri, Mar 09, 2018 at 05:00:27PM -0800, Ben Pfaff wrote:
> The route table is implemented in terms of a classifier structure, which
> supports versioning with atomic transactional updates, but OVS didn't
> actually use it for the route table.  This commit starts using that feature
> for the route table and makes OVS atomically replace one set of routes with
> another.  This should fix a reported bug in which the routing table was
> periodically empty due to refreshes.
> 
[...]
> diff --git a/lib/ovs-router.h b/lib/ovs-router.h
> index b55b1a50b146..1b27cceadce3 100644
> --- a/lib/ovs-router.h
> +++ b/lib/ovs-router.h
> @@ -18,6 +18,7 @@
>  #define OVS_TNL_ROUTER_H 1
>  
>  #include 
> +#include 
>  #include 
>  
>  #include "util.h"
> @@ -30,10 +31,21 @@ bool ovs_router_lookup(uint32_t mark, const struct 
> in6_addr *ip_dst,
> char out_dev[],
> struct in6_addr *src, struct in6_addr *gw);
>  void ovs_router_init(void);
> -void ovs_router_insert(uint32_t mark, const struct in6_addr *ip_dst,
> -   uint8_t plen,
> -   const char output_bridge[], const struct in6_addr 
> *gw);

I tried to apply the patch to review, but some parts don't apply. The
line above misses 'bool local' argument included in commit 8e4e45887ec3
("ofproto-dpif-xlate: makes OVS native tunneling honor tunnel-specified
source addresses").

Thanks,
fbl

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


Re: [ovs-dev] [PATCH] tests: Fix syntax in another ODP test.

2018-12-11 Thread Ben Pfaff
On Tue, Dec 11, 2018 at 11:18:08AM +0300, Ilya Maximets wrote:
> On 10.12.2018 20:45, Ben Pfaff wrote:
> > Reported-by: Ilya Maximets 
> > Signed-off-by: Ben Pfaff 
> > ---
> >  tests/odp.at | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> 
> Acked-by: Ilya Maximets 

Thanks, applied to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v3 3/4] conntrack: Enforce conn_type for flush tuple.

2018-12-11 Thread Ben Pfaff
On Mon, Dec 10, 2018 at 07:26:32PM -0800, Darrell Ball wrote:
> On Mon, Dec 10, 2018 at 5:42 PM Ben Pfaff  wrote:
> 
> > On Mon, Nov 26, 2018 at 08:48:39AM -0800, Darrell Ball wrote:
> > > The user should only reference a conntrack entry by the forward
> > > direction context, as per 'conntrack_flush()', enforce this by
> > > checking for 'default' conn_type.  The likelihood of a user
> > > not using the original tuple is low, but it should be guarded
> > > against, logged and documented.
> > >
> > > Signed-off-by: Darrell Ball 
> > > ---
> > >
> > > Backport to 2.9.
> > >
> > > v3: Move backport hint out of commit message.
> > > Remove warning log conditional for now.
> >
> > Would it be more user-friendly to translate these into the forward
> > equivalent and flush that one?
> >
> 
> If there were a practical application to try to flush a tuple using the
> dynamic/random
> NAT tuple assignment, yes; but there is not and it is also not worth the
> added complexity
> to handle the race b/w buckets for this purpose.

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


Re: [ovs-dev] [patch v3 1/4] conntrack: Stop exporting internal datastructures.

2018-12-11 Thread Ben Pfaff
On Mon, Dec 10, 2018 at 07:18:43PM -0800, Darrell Ball wrote:
> On Mon, Dec 10, 2018 at 5:22 PM Ben Pfaff  wrote:
> 
> > On Mon, Dec 10, 2018 at 03:47:17PM -0800, Ben Pfaff wrote:
> > > On Sun, Dec 02, 2018 at 09:17:16PM -0800, Darrell Ball wrote:
> > > > Remove the exporting of the main internal conntrack datastructure.
> > > > These are made static.  Also stop passing around a pointer parameter
> > > > to all the internal datastructures; only one or two is used
> > > > for a given code path and these can be referenced directly and passed
> > > > specifically where appropriate.
> > > >
> > > > Signed-off-by: Darrell Ball 
> > >
> > > Seems fine, I applied this to master.  Thank you!
> >
> > Actually I had to un-apply this because:
> >
> > 1099: dpctl - add-dp del-dp   FAILED (
> > ovs-macros.at:193)
> > 1100: dpctl - add-if set-if del-ifFAILED (
> > ovs-macros.at:193)
> >
> > due to the following Address Sanitizer reports.  The following is for
> > 1099 but the one for 1100 is almost identical:
> >
> > =
> > ==17824==ERROR: AddressSanitizer: SEGV on unknown address 0xeafffba8 (pc
> > 0xf657d67d bp 0x sp 0xffc65150 T0)
> > ==17824==The signal is caused by a READ memory access.
> > #0 0xf657d67c in __GI___pthread_timedjoin_ex
> > (/lib/i386-linux-gnu/libpthread.so.0+0x767c)
> > #1 0xf657d5c3 in pthread_join
> > (/lib/i386-linux-gnu/libpthread.so.0+0x75c3)
> > #2 0xf7522c24 in conntrack_destroy ../lib/conntrack.c:378
> >
> 
> 
> I don't see this using the address sanitizer; I am using
> 
> *../configure** CFLAGS="-g -O2 **-march=native**  -fsanitize=address
> -fno-omit-frame-pointer -fno-common" **--with-linux=/lib/modules/`uname
> -r`/build CC=gcc **--enable-Werror*
> 
> Furthermore, I don't see a functional change here, but I'll double check.

When I apply the following patch:

diff --git a/lib/conntrack.c b/lib/conntrack.c
index a69026d6f32f..f9bdfb6c2aa3 100644
--- a/lib/conntrack.c
+++ b/lib/conntrack.c
@@ -338,6 +338,7 @@ ct_print_conn_info(const struct conn *c, const char 
*log_msg,
 void
 conntrack_init(void)
 {
+VLOG_WARN("%s:%d", __FILE__, __LINE__);
 long long now = time_msec();
 
 ct_rwlock_init(&resources_lock);
@@ -374,6 +375,7 @@ conntrack_init(void)
 void
 conntrack_destroy(void)
 {
+VLOG_WARN("%s:%d", __FILE__, __LINE__);
 latch_set(&clean_thread_exit);
 pthread_join(clean_thread, NULL);
 latch_destroy(&clean_thread_exit);

The test shows the following logging:

--- /dev/null   2018-11-19 11:45:05.360009223 -0800
+++ /home/blp/nicira/ovs/_build/tests/testsuite.dir/at-groups/1099/stdout   
2018-12-11 08:50:04.623158278 -0800
@@ -0,0 +1,3 @@
+2018-12-11T16:50:04.582Z|8|conntrack|WARN|../lib/conntrack.c:341
+2018-12-11T16:50:04.596Z|00031|conntrack|WARN|../lib/conntrack.c:341
+2018-12-11T16:50:04.613Z|00038|conntrack|WARN|../lib/conntrack.c:378

which indicates that conntrack_init() is being called more than once.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [RFC] cirrus: Add Cirrus CI integration for FreeBSD build

2018-12-11 Thread Aaron Conole
Ilya Maximets  writes:

> CirrusCI [1] is free for open-sorce projects and provides similar
> to TravisCI interfaces. One significant difference is ability
> to run tasks on FreeBSD instances.
>
> This patch adds simple configuration file to test OVS build
> on two FreeBSD releases with gcc and clang.
> Unit tests are commented out because they are broken for now.
>
> To enable the automated checks Cirrus CI application from GitHub
> Marketplace should be installed. See details in Quick Start guide [2].
>
> [1] https://cirrus-ci.org
> [2] https://cirrus-ci.org/guide/quick-start/
>
> Signed-off-by: Ilya Maximets 
> ---
>
> This could be useful to test FreeBSD build automatically to early
> detect issues. CirrusCI looks suitable for that purpose and it's
> the only public CI system that I managed to find that supports
> FreeBSD images. Sending as RFC to start discussion.

Awesome find.  Thanks, Ilya!

> Few more differentiation points with Travis. Cirrus allows to
> configure number of CPUs and the amount of required memory. It
> also supports Linux, OSX and Windows containers. So, maybe, if
> we'll like it, we could drop Travis and AppVeyor and use single
> CI system for all the tests.
>
> I'm not advertising and not trying to convince to replace our
> current CI systems. I found CirrusCI just few days ago by a mail [3]
> in qemu-devel list. I just think that it's the only option for
> now to test BSD builds with public CI. And it worked fine for me
> with below configuration.
>
> Thoughts ?

I'm not married to technology for a reason :)  If it seems better, then
it is worth checking out.  I can play around with it a little bit, but
I'll be AFK until Jan, so it might be better for someone else who has
the recent time to take a look.

One thing I really find painful with Travis is the difficulty running
the alternate test suites (make check-*).  Travis can run them, but we
need to request privileged containers, and that will add to the build
time.  Not sure if there's some kind of custom privilege support from
Cirrus that would let us run the alternate test suites - or even let us
run them by requesting privileges.

Another thing I'm not sure about is the polling.  At least Travis does
have a RESTful API that we can poll with.  I hope the CirrusCI system
would as well.  Currently, I am looking into getting the robot to poll
the Travis system and respond to a series if there is a problem.

> As a note: I just spotted that TravisCI adds windows support.
> Maybe we could use it in the future for windows builds.
>
> [3] https://lists.nongnu.org/archive/html/qemu-devel/2018-12/msg00935.html
>
>  .cirrus.yml | 30 ++
>  Makefile.am |  1 +
>  2 files changed, 31 insertions(+)
>  create mode 100644 .cirrus.yml
>
> diff --git a/.cirrus.yml b/.cirrus.yml
> new file mode 100644
> index 0..4902fd370
> --- /dev/null
> +++ b/.cirrus.yml
> @@ -0,0 +1,30 @@
> +freebsd_build_task:
> +
> +  freebsd_instance:
> +matrix:
> +  image: freebsd-12-0-release-amd64
> +  image: freebsd-11-2-release-amd64
> +cpu: 4
> +memory: 8G
> +
> +  env:
> +matrix:
> +  COMPILER: gcc
> +  COMPILER: clang
> +
> +  prepare_script:
> +- pkg install -y automake libtool gmake gcc wget
> + python py27-six py27-sphinx
> +
> +  configure_script:
> +- ./boot.sh
> +- ./configure CC=$COMPILER MAKE=gmake OVS_CFLAGS='-Wall' --enable-Werror
> +  || { cat config.log; exit 1; }
> +
> +  build_script:
> +- gmake -j8
> +
> +#  TODO(i.maximets): Uncomment the test suite execution when it is fixed.
> +#  check_script:
> +#- gmake -j8 check TESTSUITEFLAGS=-j8 RECHECK=yes
> +#|| { cat ./tests/testsuite.log; exit 1; }
> diff --git a/Makefile.am b/Makefile.am
> index 64725654c..8408509c9 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -76,6 +76,7 @@ EXTRA_DIST = \
>   MAINTAINERS.rst \
>   README.rst \
>   NOTICE \
> + .cirrus.yml \
>   .travis.yml \
>   .travis/linux-build.sh \
>   .travis/linux-prepare.sh \
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] treewide: Wider use of packet batch APIs.

2018-12-11 Thread Stokes, Ian
> On Mon, Dec 10, 2018 at 08:17:53PM +0300, Ilya Maximets wrote:
> > This patch replaces most of direct accesses to the dp_packet_batch
> > internal components by appropriate APIs.
> >
> > Signed-off-by: Ilya Maximets 
> 
> I looked over this one and didn't see a problem, but, Ian, I'll leave it
> to you because you are probably more familiar with packet batching.

Thanks Ben, gave this the once over, LGTM and tested, will apply to master.

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


Re: [ovs-dev] [RFC] cirrus: Add Cirrus CI integration for FreeBSD build

2018-12-11 Thread Ben Pfaff
On Tue, Dec 11, 2018 at 05:34:17PM +0300, Ilya Maximets wrote:
> CirrusCI [1] is free for open-sorce projects and provides similar
> to TravisCI interfaces. One significant difference is ability
> to run tasks on FreeBSD instances.
> 
> This patch adds simple configuration file to test OVS build
> on two FreeBSD releases with gcc and clang.
> Unit tests are commented out because they are broken for now.
> 
> To enable the automated checks Cirrus CI application from GitHub
> Marketplace should be installed. See details in Quick Start guide [2].
> 
> [1] https://cirrus-ci.org
> [2] https://cirrus-ci.org/guide/quick-start/
> 
> Signed-off-by: Ilya Maximets 
> ---
> 
> This could be useful to test FreeBSD build automatically to early
> detect issues. CirrusCI looks suitable for that purpose and it's
> the only public CI system that I managed to find that supports
> FreeBSD images. Sending as RFC to start discussion.
> 
> Few more differentiation points with Travis. Cirrus allows to
> configure number of CPUs and the amount of required memory. It
> also supports Linux, OSX and Windows containers. So, maybe, if
> we'll like it, we could drop Travis and AppVeyor and use single
> CI system for all the tests.
> 
> I'm not advertising and not trying to convince to replace our
> current CI systems. I found CirrusCI just few days ago by a mail [3]
> in qemu-devel list. I just think that it's the only option for
> now to test BSD builds with public CI. And it worked fine for me
> with below configuration.
> 
> Thoughts ?
> 
> As a note: I just spotted that TravisCI adds windows support.
> Maybe we could use it in the future for windows builds.
> 
> [3] https://lists.nongnu.org/archive/html/qemu-devel/2018-12/msg00935.html

Good idea.  It's hard for me to see what harm this would cause, so I
enabled cirrus-ci at github and applied this to master.

The big weakness with appveyor is that its limits are too low to run the
whole OVS testsuite.  I wonder whether cirrus-ci has better limits for
this purpose.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [RFC] cirrus: Add Cirrus CI integration for FreeBSD build

2018-12-11 Thread Aaron Conole
On Tue, 11 Dec 2018 13:06:36 -0800, Ben Pfaff  wrote:

> On Tue, Dec 11, 2018 at 05:34:17PM +0300, Ilya Maximets wrote:
>> CirrusCI [1] is free for open-sorce projects and provides similar
>> to TravisCI interfaces. One significant difference is ability
>> to run tasks on FreeBSD instances.
>> 
>> This patch adds simple configuration file to test OVS build
>> on two FreeBSD releases with gcc and clang.
>> Unit tests are commented out because they are broken for now.
>> 
>> To enable the automated checks Cirrus CI application from GitHub
>> Marketplace should be installed. See details in Quick Start guide [2].
>> 
>> [1] https://cirrus-ci.org
>> [2] https://cirrus-ci.org/guide/quick-start/
>> 
>> Signed-off-by: Ilya Maximets 
>> ---
>> 
>> This could be useful to test FreeBSD build automatically to early
>> detect issues. CirrusCI looks suitable for that purpose and it's
>> the only public CI system that I managed to find that supports
>> FreeBSD images. Sending as RFC to start discussion.
>> 
>> Few more differentiation points with Travis. Cirrus allows to
>> configure number of CPUs and the amount of required memory. It
>> also supports Linux, OSX and Windows containers. So, maybe, if
>> we'll like it, we could drop Travis and AppVeyor and use single
>> CI system for all the tests.
>> 
>> I'm not advertising and not trying to convince to replace our
>> current CI systems. I found CirrusCI just few days ago by a mail [3]
>> in qemu-devel list. I just think that it's the only option for
>> now to test BSD builds with public CI. And it worked fine for me
>> with below configuration.
>> 
>> Thoughts ?
>> 
>> As a note: I just spotted that TravisCI adds windows support.
>> Maybe we could use it in the future for windows builds.
>> 
>> [3] https://lists.nongnu.org/archive/html/qemu-devel/2018-12/msg00935.html
>
> Good idea.  It's hard for me to see what harm this would cause, so I
> enabled cirrus-ci at github and applied this to master.

FYI, I've also enabled the cirrus-ci under the ovsrobot, in tandem.

> The big weakness with appveyor is that its limits are too low to run the
> whole OVS testsuite.  I wonder whether cirrus-ci has better limits for
> this purpose.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v5] pinctrl: Check requested IP in DHCPREQUEST messages

2018-12-11 Thread Gregory Smith
Hi Ben,

Thanks for taking a look.

Ben Pfaff wrote:
> This code looks pretty optimistic about things that I'm not sure it
> should depend on.  It uses ALIGNED_CAST in multiple places although I
> don't see a reason to assume that the data in question is actually
> aligned.

Right. I should've spent a little more time thinking this through before
submitting the revision. I've apparently rotted my brain on x86
development...

As for the fix: are the get_unaligned_xxx() functions the right tool to
use? I looked through pinctrl.c for other examples of unaligned access
to mimic, and I was suprised not to find any special handling (e.g., the
extraction of the 4-byte iaid in pinctrl_handle_put_dhcpv6_opts(), or
the 2-byte query_type in pinctrl_handle_dns_lookup()).

Out of curiosity, do we have any test coverage for CPU architectures
that are sensitive to alignment?

> It also appears to read out the DHCP magic cookie before it checks
> whether the packet is long enough to contain it.

I think this part was actually correct; the patch advances in_dhcp_ptr
and does a bounds check before derefercing in_dhcp_cookie.

>> +const ovs_be32 *in_dhcp_cookie =
>> +ALIGNED_CAST(const ovs_be32 *, in_dhcp_ptr);
>> +in_dhcp_ptr += sizeof *in_dhcp_cookie;
>> +if (in_dhcp_ptr > end || *in_dhcp_cookie != magic_cookie) {

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


Re: [ovs-dev] [PATCH v5] pinctrl: Check requested IP in DHCPREQUEST messages

2018-12-11 Thread Ben Pfaff
On Tue, Dec 11, 2018 at 08:19:55PM +, Gregory Smith wrote:
> Hi Ben,
> 
> Thanks for taking a look.
> 
> Ben Pfaff wrote:
> > This code looks pretty optimistic about things that I'm not sure it
> > should depend on.  It uses ALIGNED_CAST in multiple places although I
> > don't see a reason to assume that the data in question is actually
> > aligned.
> 
> Right. I should've spent a little more time thinking this through before
> submitting the revision. I've apparently rotted my brain on x86
> development...
> 
> As for the fix: are the get_unaligned_xxx() functions the right tool to
> use? I looked through pinctrl.c for other examples of unaligned access
> to mimic, and I was suprised not to find any special handling (e.g., the
> extraction of the 4-byte iaid in pinctrl_handle_put_dhcpv6_opts(), or
> the 2-byte query_type in pinctrl_handle_dns_lookup()).
> 
> Out of curiosity, do we have any test coverage for CPU architectures
> that are sensitive to alignment?

We have a few different strategies.  get_unaligned_xxx() is one of them.
Another is get_16aligned_be32() and friends, where we can assume that
data structure are at least aligned on a 16-bit boundary (usually the
case).  Occasionally, we use "packed" annotations to avoid having to do
anything special.  The latter appears to be the case for the dhcpv6 code
you mention.

We have test coverage mostly through Debian builds, which isn't a great
way because Debian lags far behind master, but it's better than nothing.

> > It also appears to read out the DHCP magic cookie before it checks
> > whether the packet is long enough to contain it.
> 
> I think this part was actually correct; the patch advances in_dhcp_ptr
> and does a bounds check before derefercing in_dhcp_cookie.
> 
> >> +const ovs_be32 *in_dhcp_cookie =
> >> +ALIGNED_CAST(const ovs_be32 *, in_dhcp_ptr);
> >> +in_dhcp_ptr += sizeof *in_dhcp_cookie;
> >> +if (in_dhcp_ptr > end || *in_dhcp_cookie != magic_cookie) {

You're right, I misread the code.

Thanks,

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


[ovs-dev] [dpdk-hwol PATCH v1] netdev-dpdk: support port representors

2018-12-11 Thread Ophir Munk
Dpdk port representors were introduced in dpdk 18.xx.
Prior to representors there was a one-to-one relationship
between an rte device (e.g. PCI bus) and an eth device (a dpdk
port id). With representors the relationship becomes one-to-many
rte device to eth devices.
For example in [3] there are two devices (representors) using the same
PCI physical address :08:00.0: ":08:00.0,representor=[3]" and
":08:00.0,representor=[5]".
This commit handles the new one-to-many relationship. For example,
when one of the device representors in [3] is closed - the PCI bus
cannot be detached until the other device representor is closed as
well. OVS remains backward compatible by supporting dpdk legacy PCI
ports which do not include representors.
Dpdk representors related commits are listed in [1]. dpdk representors
documentation appears in [2]. A sample configuration which uses two
representors ports (the output of "ovs-vsctl show" command) is
shown in [3].

[1]
e0cb96204b71 ("net/i40e: add support for representor ports")
cf80ba6e2038 ("net/ixgbe: add support for representor ports")
26c08b979d26 ("net/mlx5: add port representor awareness")

[2]
doc/guides/prog_guide/switch_representation.rst

[3]
Bridge "ovs_br0"
Port "ovs_br0"
Interface "ovs_br0"
type: internal
Port "port-rep3"
Interface "port-rep3"
type: dpdk
options: {dpdk-devargs=":08:00.0,representor=[3]"}
Port "port-rep5"
Interface "port-rep5"
type: dpdk
options: {dpdk-devargs=":08:00.0,representor=[5]"}
ovs_version: "2.10.90"

Signed-off-by: Ophir Munk 
---
v1:
1. rebase on top of Kevin's patch
dpdk: Update to use DPDK 18.11.[ovs-dev,v7,dpdk-latest,1/1] dpdk: Update to use 
DPDK 18.11.
https://patchwork.ozlabs.org/patch/1005535/
2. skipping count of sibling ports in case the sibling port state is 
RTE_ETH_DEV_UNUSED 

 lib/netdev-dpdk.c | 112 --
 1 file changed, 83 insertions(+), 29 deletions(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 6b8e05e..30af043 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1216,6 +1216,25 @@ dpdk_dev_parse_name(const char dev_name[], const char 
prefix[],
 }
 }
 
+/* get the number of OVS interfaces which have the same DPDK
+ * rte device (e.g. same pci bus address). */
+static int
+netdev_dpdk_get_num_ports(struct rte_device *device)
+OVS_REQUIRES(dpdk_mutex)
+{
+struct netdev_dpdk *dev;
+int count;
+
+count = 0;
+LIST_FOR_EACH (dev, list_node, &dpdk_list) {
+if (rte_eth_devices[dev->port_id].device == device
+&& rte_eth_devices[dev->port_id].state != RTE_ETH_DEV_UNUSED) {
+count++;
+}
+}
+return count;
+}
+
 static int
 vhost_common_construct(struct netdev *netdev)
 OVS_REQUIRES(dpdk_mutex)
@@ -1351,20 +1370,23 @@ static void
 netdev_dpdk_destruct(struct netdev *netdev)
 {
 struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
-struct rte_eth_dev_info dev_info;
+struct rte_device *rte_dev;
 
 ovs_mutex_lock(&dpdk_mutex);
 
 rte_eth_dev_stop(dev->port_id);
 dev->started = false;
-
 if (dev->attached) {
+/* Remove the port eth device */
 rte_eth_dev_close(dev->port_id);
-rte_eth_dev_info_get(dev->port_id, &dev_info);
-if (dev_info.device && !rte_dev_remove(dev_info.device)) {
-VLOG_INFO("Device '%s' has been detached", dev->devargs);
-} else {
-VLOG_ERR("Device '%s' can not be detached", dev->devargs);
+VLOG_INFO("Device '%s' has been removed", dev->devargs);
+/* if this is the last port_id using this rte device
+ * remove this rte device and all its eth devices */
+rte_dev = rte_eth_devices[dev->port_id].device;
+if (netdev_dpdk_get_num_ports(rte_dev) == 1) {
+if (rte_dev_remove(rte_dev) < 0) {
+VLOG_ERR("Device '%s' can not be detached", dev->devargs);
+}
 }
 }
 
@@ -1630,8 +1652,26 @@ netdev_dpdk_get_port_by_mac(const char *mac_str)
 return DPDK_ETH_PORT_ID_INVALID;
 }
 
+/* return the first DPDK port_id matching the devargs pattern */
+static dpdk_port_t
+netdev_dpdk_get_port_by_devargs(const char *devargs)
+{
+struct rte_dev_iterator iterator;
+dpdk_port_t port_id;
+
+if (rte_dev_probe(devargs)) {
+port_id = DPDK_ETH_PORT_ID_INVALID;
+} else {
+RTE_ETH_FOREACH_MATCHING_DEV(port_id, devargs, &iterator) {
+break;
+}
+}
+return port_id;
+}
+
 /*
- * Normally, a PCI id is enough for identifying a specific DPDK port.
+ * Normally, a PCI id (optionally followed by a representor number)
+ * is enough for identifying a specific DPDK port.
  * However, for some NICs having multiple ports sharing the same PCI
  * id, using PCI id won't work then.
  *
@@ -1644,29 +1684,32 @@ static dpdk_port_t
 netdev_dpdk_process_devargs(struct netdev_dp

Re: [ovs-dev] [patch v3 1/4] conntrack: Stop exporting internal datastructures.

2018-12-11 Thread Darrell Ball
On Tue, Dec 11, 2018 at 8:51 AM Ben Pfaff  wrote:

> On Mon, Dec 10, 2018 at 07:18:43PM -0800, Darrell Ball wrote:
> > On Mon, Dec 10, 2018 at 5:22 PM Ben Pfaff  wrote:
> >
> > > On Mon, Dec 10, 2018 at 03:47:17PM -0800, Ben Pfaff wrote:
> > > > On Sun, Dec 02, 2018 at 09:17:16PM -0800, Darrell Ball wrote:
> > > > > Remove the exporting of the main internal conntrack datastructure.
> > > > > These are made static.  Also stop passing around a pointer
> parameter
> > > > > to all the internal datastructures; only one or two is used
> > > > > for a given code path and these can be referenced directly and
> passed
> > > > > specifically where appropriate.
> > > > >
> > > > > Signed-off-by: Darrell Ball 
> > > >
> > > > Seems fine, I applied this to master.  Thank you!
> > >
> > > Actually I had to un-apply this because:
> > >
> > > 1099: dpctl - add-dp del-dp   FAILED (
> > > ovs-macros.at:193)
> > > 1100: dpctl - add-if set-if del-ifFAILED (
> > > ovs-macros.at:193)
> > >
> > > due to the following Address Sanitizer reports.  The following is for
> > > 1099 but the one for 1100 is almost identical:
> > >
> > > =
> > > ==17824==ERROR: AddressSanitizer: SEGV on unknown address 0xeafffba8
> (pc
> > > 0xf657d67d bp 0x sp 0xffc65150 T0)
> > > ==17824==The signal is caused by a READ memory access.
> > > #0 0xf657d67c in __GI___pthread_timedjoin_ex
> > > (/lib/i386-linux-gnu/libpthread.so.0+0x767c)
> > > #1 0xf657d5c3 in pthread_join
> > > (/lib/i386-linux-gnu/libpthread.so.0+0x75c3)
> > > #2 0xf7522c24 in conntrack_destroy ../lib/conntrack.c:378
> > >
> >
> >
> > I don't see this using the address sanitizer; I am using
> >
> > *../configure** CFLAGS="-g -O2 **-march=native**  -fsanitize=address
> > -fno-omit-frame-pointer -fno-common" **--with-linux=/lib/modules/`uname
> > -r`/build CC=gcc **--enable-Werror*
> >
> > Furthermore, I don't see a functional change here, but I'll double check.
>
> When I apply the following patch:
>
> diff --git a/lib/conntrack.c b/lib/conntrack.c
> index a69026d6f32f..f9bdfb6c2aa3 100644
> --- a/lib/conntrack.c
> +++ b/lib/conntrack.c
> @@ -338,6 +338,7 @@ ct_print_conn_info(const struct conn *c, const char
> *log_msg,
>  void
>  conntrack_init(void)
>  {
> +VLOG_WARN("%s:%d", __FILE__, __LINE__);
>  long long now = time_msec();
>
>  ct_rwlock_init(&resources_lock);
> @@ -374,6 +375,7 @@ conntrack_init(void)
>  void
>  conntrack_destroy(void)
>  {
> +VLOG_WARN("%s:%d", __FILE__, __LINE__);
>  latch_set(&clean_thread_exit);
>  pthread_join(clean_thread, NULL);
>  latch_destroy(&clean_thread_exit);
>
> The test shows the following logging:
>
> --- /dev/null   2018-11-19 11:45:05.360009223 -0800
> +++ /home/blp/nicira/ovs/_build/tests/testsuite.dir/at-groups/1099/stdout
>  2018-12-11 08:50:04.623158278 -0800
> @@ -0,0 +1,3 @@
> +2018-12-11T16:50:04.582Z|8|conntrack|WARN|../lib/conntrack.c:341
> +2018-12-11T16:50:04.596Z|00031|conntrack|WARN|../lib/conntrack.c:341
> +2018-12-11T16:50:04.613Z|00038|conntrack|WARN|../lib/conntrack.c:378
>
> which indicates that conntrack_init() is being called more than once.
>


Thanks; I am glad your running of the address sanitizer flagged this at
least.
All the built-in testing, including Valgrind and manual testing even with 2
bridges did not, providing a false sense of security.
Missed the forest for PPS tress.

Thanks; I made the adjustments.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v3 1/4] conntrack: Stop exporting internal datastructures.

2018-12-11 Thread Ben Pfaff
On Tue, Dec 11, 2018 at 06:05:11PM -0800, Darrell Ball wrote:
> On Tue, Dec 11, 2018 at 8:51 AM Ben Pfaff  wrote:
> 
> > On Mon, Dec 10, 2018 at 07:18:43PM -0800, Darrell Ball wrote:
> > > On Mon, Dec 10, 2018 at 5:22 PM Ben Pfaff  wrote:
> > >
> > > > On Mon, Dec 10, 2018 at 03:47:17PM -0800, Ben Pfaff wrote:
> > > > > On Sun, Dec 02, 2018 at 09:17:16PM -0800, Darrell Ball wrote:
> > > > > > Remove the exporting of the main internal conntrack datastructure.
> > > > > > These are made static.  Also stop passing around a pointer
> > parameter
> > > > > > to all the internal datastructures; only one or two is used
> > > > > > for a given code path and these can be referenced directly and
> > passed
> > > > > > specifically where appropriate.
> > > > > >
> > > > > > Signed-off-by: Darrell Ball 
> > > > >
> > > > > Seems fine, I applied this to master.  Thank you!
> > > >
> > > > Actually I had to un-apply this because:
> > > >
> > > > 1099: dpctl - add-dp del-dp   FAILED (
> > > > ovs-macros.at:193)
> > > > 1100: dpctl - add-if set-if del-ifFAILED (
> > > > ovs-macros.at:193)
> > > >
> > > > due to the following Address Sanitizer reports.  The following is for
> > > > 1099 but the one for 1100 is almost identical:
> > > >
> > > > =
> > > > ==17824==ERROR: AddressSanitizer: SEGV on unknown address 0xeafffba8
> > (pc
> > > > 0xf657d67d bp 0x sp 0xffc65150 T0)
> > > > ==17824==The signal is caused by a READ memory access.
> > > > #0 0xf657d67c in __GI___pthread_timedjoin_ex
> > > > (/lib/i386-linux-gnu/libpthread.so.0+0x767c)
> > > > #1 0xf657d5c3 in pthread_join
> > > > (/lib/i386-linux-gnu/libpthread.so.0+0x75c3)
> > > > #2 0xf7522c24 in conntrack_destroy ../lib/conntrack.c:378
> > > >
> > >
> > >
> > > I don't see this using the address sanitizer; I am using
> > >
> > > *../configure** CFLAGS="-g -O2 **-march=native**  -fsanitize=address
> > > -fno-omit-frame-pointer -fno-common" **--with-linux=/lib/modules/`uname
> > > -r`/build CC=gcc **--enable-Werror*
> > >
> > > Furthermore, I don't see a functional change here, but I'll double check.
> >
> > When I apply the following patch:
> >
> > diff --git a/lib/conntrack.c b/lib/conntrack.c
> > index a69026d6f32f..f9bdfb6c2aa3 100644
> > --- a/lib/conntrack.c
> > +++ b/lib/conntrack.c
> > @@ -338,6 +338,7 @@ ct_print_conn_info(const struct conn *c, const char
> > *log_msg,
> >  void
> >  conntrack_init(void)
> >  {
> > +VLOG_WARN("%s:%d", __FILE__, __LINE__);
> >  long long now = time_msec();
> >
> >  ct_rwlock_init(&resources_lock);
> > @@ -374,6 +375,7 @@ conntrack_init(void)
> >  void
> >  conntrack_destroy(void)
> >  {
> > +VLOG_WARN("%s:%d", __FILE__, __LINE__);
> >  latch_set(&clean_thread_exit);
> >  pthread_join(clean_thread, NULL);
> >  latch_destroy(&clean_thread_exit);
> >
> > The test shows the following logging:
> >
> > --- /dev/null   2018-11-19 11:45:05.360009223 -0800
> > +++ /home/blp/nicira/ovs/_build/tests/testsuite.dir/at-groups/1099/stdout
> >  2018-12-11 08:50:04.623158278 -0800
> > @@ -0,0 +1,3 @@
> > +2018-12-11T16:50:04.582Z|8|conntrack|WARN|../lib/conntrack.c:341
> > +2018-12-11T16:50:04.596Z|00031|conntrack|WARN|../lib/conntrack.c:341
> > +2018-12-11T16:50:04.613Z|00038|conntrack|WARN|../lib/conntrack.c:378
> >
> > which indicates that conntrack_init() is being called more than once.
> >
> 
> 
> Thanks; I am glad your running of the address sanitizer flagged this at
> least.
> All the built-in testing, including Valgrind and manual testing even with 2
> bridges did not, providing a false sense of security.
> Missed the forest for PPS tress.

You're welcome!  (Really I got lucky ;-)
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev