diff mbox series

[ovs-dev,dpdk-howl,v3] netdev-dpdk: Upgrade to dpdk v18.08

Message ID 1537382075-26789-1-git-send-email-ophirmu@mellanox.com
State Superseded
Headers show
Series [ovs-dev,dpdk-howl,v3] netdev-dpdk: Upgrade to dpdk v18.08 | expand

Commit Message

Ophir Munk Sept. 19, 2018, 6:34 p.m. UTC
1. Enable compilation and linkage with dpdk 18.08.0
The following dpdk commits which were introduced after dpdk 17.11.x
require OVS updates to accommodate to the dpdk changes.
- ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
- ab3ce1e0c193 ("ethdev: remove old offload API")
- c06ddf9698e0 ("meter: add configuration profile")
- e58638c32411 ("ethdev: fix TPID handling in flow API")
- cd8c7c7ce241 ("ethdev: replace bus specific struct with generic dev")
- ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")

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

3. Update references to DPDK version 18.08 in Documentation

4. Update DPDK version 18.08 in travis' linux-build script

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
v1:
First version

v2:
Avoid seg faults cases as described in https://patchwork.ozlabs.org/patch/965451/
by using the patch in:
https://github.com/kevintraynor/ovs-dpdk-master/commit/88f46cc5ab338eb4f3ca5db1eacd0effefe4fa0c

v3:
- rebase on latest dpdk-hwol branch
- Updates based on latest reviews to versions v1 & v2

 .travis/linux-build.sh                   |   2 +-
 Documentation/intro/install/dpdk.rst     |  14 +--
 Documentation/topics/dpdk/vhost-user.rst |   6 +-
 lib/netdev-dpdk.c                        | 143 ++++++++++++++++++++++---------
 4 files changed, 114 insertions(+), 51 deletions(-)

Comments

Ilya Maximets Sept. 20, 2018, 1:17 p.m. UTC | #1
Hi Ophir,
I see no significant code changes. At least there are no changes
related to my comments for v2.

Best regards, Ilya Maximets.

> 1. Enable compilation and linkage with dpdk 18.08.0
> The following dpdk commits which were introduced after dpdk 17.11.x
> require OVS updates to accommodate to the dpdk changes.
> - ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> - ab3ce1e0c193 ("ethdev: remove old offload API")
> - c06ddf9698e0 ("meter: add configuration profile")
> - e58638c32411 ("ethdev: fix TPID handling in flow API")
> - cd8c7c7ce241 ("ethdev: replace bus specific struct with generic dev")
> - ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")
> 
> 2. Limit configured rss hash functions to only those supported
> by the eth device.
> 
> 3. Update references to DPDK version 18.08 in Documentation
> 
> 4. Update DPDK version 18.08 in travis' linux-build script
> 
> Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
> ---
> v1:
> First version
> 
> v2:
> Avoid seg faults cases as described in https://patchwork.ozlabs.org/patch/965451/
> by using the patch in:
> https://github.com/kevintraynor/ovs-dpdk-master/commit/88f46cc5ab338eb4f3ca5db1eacd0effefe4fa0c
> 
> v3:
> - rebase on latest dpdk-hwol branch
> - Updates based on latest reviews to versions v1 & v2
> 
>  .travis/linux-build.sh                   |   2 +-
>  Documentation/intro/install/dpdk.rst     |  14 +--
>  Documentation/topics/dpdk/vhost-user.rst |   6 +-
>  lib/netdev-dpdk.c                        | 143 ++++++++++++++++++++++---------
>  4 files changed, 114 insertions(+), 51 deletions(-)
Kevin Traynor Sept. 26, 2018, 9:46 a.m. UTC | #2
On 09/21/2018 11:12 AM, Ophir Munk wrote:
> 1. Enable compilation and linkage with dpdk 18.08.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. Update references to DPDK version 18.08 in Documentation
> 
> 5. Update DPDK version 18.08 in travis' linux-build script
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
> v1:
> First version
> 
> v2:
> Avoid seg faults cases as described in 
> https://patchwork.ozlabs.org/patch/965451/
> by using the patch in:
> https://github.com/kevintraynor/ovs-dpdk-
> master/commit/88f46cc5ab338eb4f3ca5db1eacd0effefe4fa0c
> 
> v3:
> - rebase on latest dpdk-hwol branch
> - Updates based on latest reviews to versions v1 & v2
> 
> v4:
> - update commit message
> - 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"
> 

Hi Ophir, I can't see this v4 in the ML archives or patchwork - I
suspect it got dropped during some ML issues last week. Perhaps you
could resend to the ML.

Kevin.
Ophir Munk Sept. 26, 2018, 10:05 p.m. UTC | #3
Hi Kevin,
I have reviews to be addressed in v5 which may change v4. 
Therefore I suggest sending v5 (hopefully) as the final version for this PATCH.
Please let me know if you still want me to resend v4 to the ML.
Regards,
Ophir

> -----Original Message-----
> From: Kevin Traynor [mailto:ktraynor@redhat.com]
> Sent: Wednesday, September 26, 2018 12:47 PM
> To: Ophir Munk <ophirmu@mellanox.com>; ovs-dev@openvswitch.org
> Cc: Asaf Penso <asafp@mellanox.com>; Sugesh Chandran
> <sugesh.chandran@intel.com>; Ian Stokes <ian.stokes@intel.com>; Ben
> Pfaff <blp@ovn.org>; Shahaf Shuler <shahafs@mellanox.com>; Thomas
> Monjalon <thomas@monjalon.net>; Olga Shern <olgas@mellanox.com>
> Subject: Re: [dpdk-howl PATCH v4] netdev-dpdk: Upgrade to dpdk v18.08
> 
> On 09/21/2018 11:12 AM, Ophir Munk wrote:
> > 1. Enable compilation and linkage with dpdk 18.08.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. Update references to DPDK version 18.08 in Documentation
> >
> > 5. Update DPDK version 18.08 in travis' linux-build script
> >
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> > ---
> > v1:
> > First version
> >
> > v2:
> > Avoid seg faults cases as described in
> >
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpat
> >
> chwork.ozlabs.org%2Fpatch%2F965451%2F&amp;data=02%7C01%7Cophirm
> u%40mel
> >
> lanox.com%7C92464c8120cf4c14ebaa08d62394f775%7Ca652971c7d2e4d9b
> a6a4d14
> >
> 9256f461b%7C0%7C0%7C636735520041931061&amp;sdata=vhHc3nMU3Gg
> MBDOgqtZWL
> > TEk%2FBnswcZM%2BZhVt6hMK00%3D&amp;reserved=0
> > by using the patch in:
> >
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> > hub.com%2Fkevintraynor%2Fovs-dpdk-
> &amp;data=02%7C01%7Cophirmu%40mellan
> >
> ox.com%7C92464c8120cf4c14ebaa08d62394f775%7Ca652971c7d2e4d9ba6
> a4d14925
> >
> 6f461b%7C0%7C0%7C636735520041931061&amp;sdata=KR8HIJBkKqXwUsC
> BeOwWMUi%
> > 2BPgqOKJnu%2FCqZ1Zo3JuM%3D&amp;reserved=0
> > master/commit/88f46cc5ab338eb4f3ca5db1eacd0effefe4fa0c
> >
> > v3:
> > - rebase on latest dpdk-hwol branch
> > - Updates based on latest reviews to versions v1 & v2
> >
> > v4:
> > - update commit message
> > - 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"
> >
> 
> Hi Ophir, I can't see this v4 in the ML archives or patchwork - I suspect it got
> dropped during some ML issues last week. Perhaps you could resend to the
> ML.
> 
> Kevin.
Kevin Traynor Sept. 27, 2018, 6:07 p.m. UTC | #4
On 09/26/2018 11:05 PM, Ophir Munk wrote:
> Hi Kevin,
> I have reviews to be addressed in v5 which may change v4. 
> Therefore I suggest sending v5 (hopefully) as the final version for this PATCH.
> Please let me know if you still want me to resend v4 to the ML.

No need - makes sense to just send v5 in that case.

thanks,
Kevin.

> Regards,
> Ophir
> 
>> -----Original Message-----
>> From: Kevin Traynor [mailto:ktraynor@redhat.com]
>> Sent: Wednesday, September 26, 2018 12:47 PM
>> To: Ophir Munk <ophirmu@mellanox.com>; ovs-dev@openvswitch.org
>> Cc: Asaf Penso <asafp@mellanox.com>; Sugesh Chandran
>> <sugesh.chandran@intel.com>; Ian Stokes <ian.stokes@intel.com>; Ben
>> Pfaff <blp@ovn.org>; Shahaf Shuler <shahafs@mellanox.com>; Thomas
>> Monjalon <thomas@monjalon.net>; Olga Shern <olgas@mellanox.com>
>> Subject: Re: [dpdk-howl PATCH v4] netdev-dpdk: Upgrade to dpdk v18.08
>>
>> On 09/21/2018 11:12 AM, Ophir Munk wrote:
>>> 1. Enable compilation and linkage with dpdk 18.08.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. Update references to DPDK version 18.08 in Documentation
>>>
>>> 5. Update DPDK version 18.08 in travis' linux-build script
>>>
>>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
>>> ---
>>> v1:
>>> First version
>>>
>>> v2:
>>> Avoid seg faults cases as described in
>>>
>> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpat
>>>
>> chwork.ozlabs.org%2Fpatch%2F965451%2F&amp;data=02%7C01%7Cophirm
>> u%40mel
>>>
>> lanox.com%7C92464c8120cf4c14ebaa08d62394f775%7Ca652971c7d2e4d9b
>> a6a4d14
>>>
>> 9256f461b%7C0%7C0%7C636735520041931061&amp;sdata=vhHc3nMU3Gg
>> MBDOgqtZWL
>>> TEk%2FBnswcZM%2BZhVt6hMK00%3D&amp;reserved=0
>>> by using the patch in:
>>>
>> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
>>> hub.com%2Fkevintraynor%2Fovs-dpdk-
>> &amp;data=02%7C01%7Cophirmu%40mellan
>>>
>> ox.com%7C92464c8120cf4c14ebaa08d62394f775%7Ca652971c7d2e4d9ba6
>> a4d14925
>>>
>> 6f461b%7C0%7C0%7C636735520041931061&amp;sdata=KR8HIJBkKqXwUsC
>> BeOwWMUi%
>>> 2BPgqOKJnu%2FCqZ1Zo3JuM%3D&amp;reserved=0
>>> master/commit/88f46cc5ab338eb4f3ca5db1eacd0effefe4fa0c
>>>
>>> v3:
>>> - rebase on latest dpdk-hwol branch
>>> - Updates based on latest reviews to versions v1 & v2
>>>
>>> v4:
>>> - update commit message
>>> - 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"
>>>
>>
>> Hi Ophir, I can't see this v4 in the ML archives or patchwork - I suspect it got
>> dropped during some ML issues last week. Perhaps you could resend to the
>> ML.
>>
>> Kevin.
Ophir Munk Oct. 10, 2018, 4:41 p.m. UTC | #5
Hi Eelco,

1. v5 was sent. 

2. Regarding the deprecated functions warnings:

The deprecated DPDK functions are declared so in DPDK 18.08 but their actual replacement will only appear in DPDK 18.11.
Therefore I suggest to temporarily ignore the deprecated warnings till DPDK 18.11 is released at which time the OVS will be updated with the new function calls. 

3. FYI - There is an unexpected behavior with the OVS ML.
* Ilya's review did not reach my mail box (although it appears in the ML web site). This is probably why I initially skipped Ilay's comments.
* v4 that I sent a few days ago does not appear in the ML. Please consider it obsolete.

Starting from now I will check closely both my email and the ML to avoid further confusion.

Regards,
Ophir

> -----Original Message-----
> From: Eelco Chaudron [mailto:echaudro@redhat.com]
> Sent: Friday, September 21, 2018 4:02 PM
> To: Ophir Munk <ophirmu@mellanox.com>
> Cc: Ilya Maximets <i.maximets@samsung.com>; ovs-dev@openvswitch.org;
> Stokes, Ian <ian.stokes@intel.com>; Kevin Traynor <ktraynor@redhat.com>;
> Chandran, Sugesh <sugesh.chandran@intel.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Asaf Penso <asafp@mellanox.com>; Thomas
> Monjalon <thomas@monjalon.net>
> Subject: Re: [ovs-dev] [dpdk-howl PATCH v3] netdev-dpdk: Upgrade to dpdk
> v18.08
> 
> Ophir,
> 
> Maybe a quick reply to the email with the review comments will clear things
> up. For example if and how you addressed them, etc. For example, did you
> take care of the deprecated DPDK functions, and if not why.
> Rather than only sending out the next version.
> 
> Will wait for the V5 before doing another review round...
> 
> //Eelco
> 
> On 21 Sep 2018, at 12:20, Ophir Munk wrote:
> 
> > Hi Ilya,
> > I apologize for skipping your last comments.
> > I will send v5 based on your review.
> >
> > Regards,
> > Ophir
> >
> >> -----Original Message-----
> >> From: Ilya Maximets [mailto:i.maximets@samsung.com]
> >> Sent: Thursday, September 20, 2018 4:17 PM
> >> To: ovs-dev@openvswitch.org; Ophir Munk <ophirmu@mellanox.com>
> >> Cc: Stokes, Ian <ian.stokes@intel.com>; Kevin Traynor
> >> <ktraynor@redhat.com>; Chandran, Sugesh
> <sugesh.chandran@intel.com>;
> >> Eelco Chaudron <echaudro@redhat.com>; Shahaf Shuler
> >> <shahafs@mellanox.com>; Asaf Penso <asafp@mellanox.com>; Thomas
> >> Monjalon <thomas@monjalon.net>
> >> Subject: Re: [ovs-dev] [dpdk-howl PATCH v3] netdev-dpdk: Upgrade to
> >> dpdk
> >> v18.08
> >>
> >> Hi Ophir,
> >> I see no significant code changes. At least there are no changes
> >> related to my comments for v2.
> >>
> >> Best regards, Ilya Maximets.
> >>
> >>> 1. Enable compilation and linkage with dpdk 18.08.0 The following
> >>> dpdk commits which were introduced after dpdk 17.11.x require OVS
> >>> updates to accommodate to the dpdk changes.
> >>> - ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> >>> - ab3ce1e0c193 ("ethdev: remove old offload API")
> >>> - c06ddf9698e0 ("meter: add configuration profile")
> >>> - e58638c32411 ("ethdev: fix TPID handling in flow API")
> >>> - cd8c7c7ce241 ("ethdev: replace bus specific struct with generic
> >>> dev")
> >>> - ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")
> >>>
> >>> 2. Limit configured rss hash functions to only those supported by
> >>> the eth device.
> >>>
> >>> 3. Update references to DPDK version 18.08 in Documentation
> >>>
> >>> 4. Update DPDK version 18.08 in travis' linux-build script
> >>>
> >>> Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
> >>> ---
> >>> v1:
> >>> First version
> >>>
> >>> v2:
> >>> Avoid seg faults cases as described in
> >>>
> >>
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpa
> >> t
> >>>
> >>
> chwork.ozlabs.org%2Fpatch%2F965451%2F&amp;data=02%7C01%7Cophirm
> >> u%40mel
> >>>
> >>
> lanox.com%7C4644f155884f45c71a8b08d61efb2499%7Ca652971c7d2e4d9b
> >> a6a4d14
> >>>
> >>
> 9256f461b%7C0%7C0%7C636730461353548241&amp;sdata=Zlz3WXL%2Bh
> >> HlAXXLL6dC
> >>> 9AMeU1Yy9qfpIeNudsUPvCVw%3D&amp;reserved=0
> >>> by using the patch in:
> >>>
> >>
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
> >> t
> >>> hub.com%2Fkevintraynor%2Fovs-dpdk-
> >> master%2Fcommit%2F88f46cc5ab338eb4f3
> >>>
> >>
> ca5db1eacd0effefe4fa0c&amp;data=02%7C01%7Cophirmu%40mellanox.co
> >> m%7C464
> >>>
> >>
> 4f155884f45c71a8b08d61efb2499%7Ca652971c7d2e4d9ba6a4d149256f461
> >> b%7C0%7
> >>>
> >>
> C0%7C636730461353548241&amp;sdata=QcduhGev%2BSGSpKwb09y4j1I78
> >> uXboAVLt5
> >>> xzwv12ZQc%3D&amp;reserved=0
> >>>
> >>> v3:
> >>> - rebase on latest dpdk-hwol branch
> >>> - Updates based on latest reviews to versions v1 & v2
> >>>
> >>>  .travis/linux-build.sh                   |   2 +-
> >>>  Documentation/intro/install/dpdk.rst     |  14 +--
> >>>  Documentation/topics/dpdk/vhost-user.rst |   6 +-
> >>>  lib/netdev-dpdk.c                        | 143
> >>> ++++++++++++++++++++++---------
> >>>  4 files changed, 114 insertions(+), 51 deletions(-)
Ophir Munk Oct. 10, 2018, 4:55 p.m. UTC | #6
Hi Ilya,
Please find comment inline

> 
> On 11.09.2018 02:04, Ophir Munk wrote:
> > 1. Enable compilation and linkage with dpdk 18.08.0 The following dpdk
> > commits which were introduced after dpdk 17.11.x require OVS updates
> > +    conf.rxmode.offloads |= ((dev->hw_ol_features &
> > +                             NETDEV_RX_CHECKSUM_OFFLOAD) != 0) ?
> > +                             DEV_RX_OFFLOAD_CHECKSUM : 0;
> 
> IMHO, it's better to use 'if'. This thing became too complex.

Done in v5

> 
> >
> > +        if (pci_dev) {
> > +            smap_add_format(args, "pci-vendor_id", "0x%u",
> > +                            pci_dev->id.vendor_id);
> > +             smap_add_format(args, "pci-device_id", "0x%x",
> > +                             pci_dev->id.device_id);
> 
> %u --> %x.
> Also, something happened with indents.
> 

Fixed in v5

> > -    for (i = 0; i < rss->num; i++) {
> > -        rss->queue[i] = i;
> > +    rss_data = xmalloc(sizeof(struct action_rss_data));
> > +    *rss_data = (struct action_rss_data){
> > +        .conf = (struct rte_flow_action_rss){
> 
> Some spaces needed between the type and '{'.
> 

Fixed in v5

> 
> It's better to use 'xzalloc' instead of manual memory initialization.
> 

I have allocated the exact space required for the number of queues using xmalloc (please see v5). No need to initialize to 0.

> >
> > -    return rss;
> > +    return &rss_data->conf;
> 

> Pointer to the field of the structure returned. 'free' will be invoked for it but
> not for the pointer to the structure. This should not be like this even if this
> field is the first one.
> 

Fixed using container_of (please see v5)

> Maybe it's better to not have the additional structure and allocate arrays
> explicitly? The caller will free rss->queue, rss->key and the rss itself at the
> end. This will also remove the restriction for the number of queues.
> 

The required number of queues is allocated by xmalloc, later they are free (please see v5)

Regards,
Ophir
diff mbox series

Patch

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 4b9fc4a..4c9e952 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -83,7 +83,7 @@  fi
 
 if [ "$DPDK" ]; then
     if [ -z "$DPDK_VER" ]; then
-        DPDK_VER="17.11.3"
+        DPDK_VER="18.08"
     fi
     install_dpdk $DPDK_VER
     if [ "$CC" = "clang" ]; then
diff --git a/Documentation/intro/install/dpdk.rst b/Documentation/intro/install/dpdk.rst
index 36501c6..73610ef 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.3
+- DPDK 18.08.0
 
 - 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.3.tar.xz
-       $ tar xf dpdk-17.11.3.tar.xz
-       $ export DPDK_DIR=/usr/src/dpdk-stable-17.11.3
+       $ wget http://fast.dpdk.org/rel/dpdk-18.08.tar.xz
+       $ tar xf dpdk-18.08.tar.xz
+       $ export DPDK_DIR=/usr/src/dpdk-stable-18.08
        $ 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"
 
 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
@@ -673,7 +673,7 @@  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: http://dpdk.org/doc/guides/rel_notes/release_18_08.html
 
 - Upper bound MTU: DPDK device drivers differ in how the L2 frame for a
   given MTU value is calculated e.g. i40e driver includes 2 x vlan headers in
diff --git a/Documentation/topics/dpdk/vhost-user.rst b/Documentation/topics/dpdk/vhost-user.rst
index b1e2285..56f58ba 100644
--- a/Documentation/topics/dpdk/vhost-user.rst
+++ b/Documentation/topics/dpdk/vhost-user.rst
@@ -320,9 +320,9 @@  To begin, instantiate a guest as described in :ref:`dpdk-vhost-user` or
 DPDK sources to VM and build DPDK::
 
     $ cd /root/dpdk/
-    $ wget http://fast.dpdk.org/rel/dpdk-17.11.3.tar.xz
-    $ tar xf dpdk-17.11.3.tar.xz
-    $ export DPDK_DIR=/root/dpdk/dpdk-stable-17.11.3
+    $ wget http://fast.dpdk.org/rel/dpdk-18.08.tar.xz
+    $ tar xf dpdk-18.08.tar.xz
+    $ export DPDK_DIR=/root/dpdk/dpdk-stable-18.08
     $ export DPDK_TARGET=x86_64-native-linuxapp-gcc
     $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
     $ cd $DPDK_DIR
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index f91aa27..ac59452 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -168,11 +168,7 @@  static const struct rte_eth_conf port_conf = {
     .rxmode = {
         .mq_mode = ETH_MQ_RX_RSS,
         .split_hdr_size = 0,
-        .header_split   = 0, /* Header Split disabled */
-        .hw_ip_checksum = 0, /* IP checksum offload disabled */
-        .hw_vlan_filter = 0, /* VLAN filtering disabled */
-        .jumbo_frame    = 0, /* Jumbo Frame Support disabled */
-        .hw_strip_crc   = 0,
+        .offloads = 0,
     },
     .rx_adv_conf = {
         .rss_conf = {
@@ -364,6 +360,7 @@  struct dpdk_ring {
 struct ingress_policer {
     struct rte_meter_srtcm_params app_srtcm_params;
     struct rte_meter_srtcm in_policer;
+    struct rte_meter_srtcm_profile in_prof;
     rte_spinlock_t policer_lock;
 };
 
@@ -894,6 +891,8 @@  dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq)
     struct rte_eth_dev_info info;
     uint16_t conf_mtu;
 
+    rte_eth_dev_info_get(dev->port_id, &info);
+
     /* As of DPDK 17.11.1 a few PMDs require to explicitly enable
      * scatter to support jumbo RX. Checking the offload capabilities
      * is not an option as PMDs are not required yet to report
@@ -901,20 +900,24 @@  dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq)
      * (testing or code review). Listing all such PMDs feels harder
      * than highlighting the one known not to need scatter */
     if (dev->mtu > ETHER_MTU) {
-        rte_eth_dev_info_get(dev->port_id, &info);
         if (strncmp(info.driver_name, "net_nfp", 7)) {
-            conf.rxmode.enable_scatter = 1;
+            conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
         }
     }
 
     conf.intr_conf.lsc = dev->lsc_interrupt_mode;
-    conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &
-                                  NETDEV_RX_CHECKSUM_OFFLOAD) != 0;
+    conf.rxmode.offloads |= ((dev->hw_ol_features &
+                             NETDEV_RX_CHECKSUM_OFFLOAD) != 0) ?
+                             DEV_RX_OFFLOAD_CHECKSUM : 0;
 
     if (dev->hw_ol_features & NETDEV_RX_HW_CRC_STRIP) {
-        conf.rxmode.hw_strip_crc = 1;
+        conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
     }
 
+    /* Limit configured rss hash functions to only those supported
+     * by the eth device. */
+    conf.rx_adv_conf.rss_conf.rss_hf &= info.flow_type_rss_offloads;
+
     /* A device may report more queues than it makes available (this has
      * been observed for Intel xl710, which reserves some of them for
      * SRIOV):  rte_eth_*_queue_setup will fail if a queue is not
@@ -1932,16 +1935,18 @@  netdev_dpdk_eth_tx_burst(struct netdev_dpdk *dev, int qid,
 
 static inline bool
 netdev_dpdk_policer_pkt_handle(struct rte_meter_srtcm *meter,
+                               struct rte_meter_srtcm_profile *profile,
                                struct rte_mbuf *pkt, uint64_t time)
 {
     uint32_t pkt_len = rte_pktmbuf_pkt_len(pkt) - sizeof(struct ether_hdr);
 
-    return rte_meter_srtcm_color_blind_check(meter, time, pkt_len) ==
+    return rte_meter_srtcm_color_blind_check(meter, profile, time, pkt_len) ==
                                                 e_RTE_METER_GREEN;
 }
 
 static int
 netdev_dpdk_policer_run(struct rte_meter_srtcm *meter,
+                        struct rte_meter_srtcm_profile *profile,
                         struct rte_mbuf **pkts, int pkt_cnt,
                         bool should_steal)
 {
@@ -1953,7 +1958,8 @@  netdev_dpdk_policer_run(struct rte_meter_srtcm *meter,
     for (i = 0; i < pkt_cnt; i++) {
         pkt = pkts[i];
         /* Handle current packet */
-        if (netdev_dpdk_policer_pkt_handle(meter, pkt, current_time)) {
+        if (netdev_dpdk_policer_pkt_handle(meter, profile, pkt,
+                                                 current_time)) {
             if (cnt != i) {
                 pkts[cnt] = pkt;
             }
@@ -1975,8 +1981,8 @@  ingress_policer_run(struct ingress_policer *policer, struct rte_mbuf **pkts,
     int cnt = 0;
 
     rte_spinlock_lock(&policer->policer_lock);
-    cnt = netdev_dpdk_policer_run(&policer->in_policer, pkts,
-                                  pkt_cnt, should_steal);
+    cnt = netdev_dpdk_policer_run(&policer->in_policer, &policer->in_prof,
+                                  pkts, pkt_cnt, should_steal);
     rte_spinlock_unlock(&policer->policer_lock);
 
     return cnt;
@@ -2767,8 +2773,15 @@  netdev_dpdk_policer_construct(uint32_t rate, uint32_t burst)
     policer->app_srtcm_params.cir = rate_bytes;
     policer->app_srtcm_params.cbs = burst_bytes;
     policer->app_srtcm_params.ebs = 0;
+    err = rte_meter_srtcm_profile_config(&policer->in_prof,
+                                         &policer->app_srtcm_params);
+    if (err) {
+        VLOG_ERR("Could not create rte meter profile for ingress policer");
+        free(policer);
+        return NULL;
+    }
     err = rte_meter_srtcm_config(&policer->in_policer,
-                                    &policer->app_srtcm_params);
+                                    &policer->in_prof);
     if (err) {
         VLOG_ERR("Could not create rte meter for ingress policer");
         free(policer);
@@ -3043,13 +3056,18 @@  netdev_dpdk_get_status(const struct netdev *netdev, struct smap *args)
     smap_add_format(args, "if_descr", "%s %s", rte_version(),
                                                dev_info.driver_name);
 
-    if (dev_info.pci_dev) {
-        smap_add_format(args, "pci-vendor_id", "0x%x",
-                        dev_info.pci_dev->id.vendor_id);
-        smap_add_format(args, "pci-device_id", "0x%x",
-                        dev_info.pci_dev->id.device_id);
+    const struct rte_bus *bus;
+    const struct rte_pci_device *pci_dev;
+    bus = rte_bus_find_by_device(dev_info.device);
+    if (bus && !strcmp(bus->name, "pci")) {
+        pci_dev = RTE_DEV_TO_PCI(dev_info.device);
+        if (pci_dev) {
+            smap_add_format(args, "pci-vendor_id", "0x%u",
+                            pci_dev->id.vendor_id);
+             smap_add_format(args, "pci-device_id", "0x%x",
+                             pci_dev->id.device_id);
+        }
     }
-
     return 0;
 }
 
@@ -3727,6 +3745,7 @@  struct egress_policer {
     struct qos_conf qos_conf;
     struct rte_meter_srtcm_params app_srtcm_params;
     struct rte_meter_srtcm egress_meter;
+    struct rte_meter_srtcm_profile egress_prof;
 };
 
 static void
@@ -3749,11 +3768,21 @@  egress_policer_qos_construct(const struct smap *details,
     policer = xmalloc(sizeof *policer);
     qos_conf_init(&policer->qos_conf, &egress_policer_ops);
     egress_policer_details_to_param(details, &policer->app_srtcm_params);
+    err = rte_meter_srtcm_profile_config(&policer->egress_prof,
+                                         &policer->app_srtcm_params);
+    if (err) {
+        VLOG_ERR("Could not create rte meter profile for egress policer");
+        free(policer);
+        *conf = NULL;
+        return -err;
+    }
     err = rte_meter_srtcm_config(&policer->egress_meter,
-                                 &policer->app_srtcm_params);
+                                 &policer->egress_prof);
+
     if (!err) {
         *conf = &policer->qos_conf;
     } else {
+        VLOG_ERR("Could not create rte meter for egress policer");
         free(policer);
         *conf = NULL;
         err = -err;
@@ -3803,7 +3832,8 @@  egress_policer_run(struct qos_conf *conf, struct rte_mbuf **pkts, int pkt_cnt,
     struct egress_policer *policer =
         CONTAINER_OF(conf, struct egress_policer, qos_conf);
 
-    cnt = netdev_dpdk_policer_run(&policer->egress_meter, pkts,
+    cnt = netdev_dpdk_policer_run(&policer->egress_meter,
+                                  &policer->egress_prof, pkts,
                                   pkt_cnt, should_steal);
 
     return cnt;
@@ -4103,15 +4133,15 @@  dump_flow_pattern(struct rte_flow_item *item)
 
         VLOG_DBG("rte flow vlan pattern:\n");
         if (vlan_spec) {
-            VLOG_DBG("  Spec: tpid=0x%"PRIx16", tci=0x%"PRIx16"\n",
-                     ntohs(vlan_spec->tpid), ntohs(vlan_spec->tci));
+            VLOG_DBG("  Spec: inner_type=0x%"PRIx16", tci=0x%"PRIx16"\n",
+                     ntohs(vlan_spec->inner_type), ntohs(vlan_spec->tci));
         } else {
             VLOG_DBG("  Spec = null\n");
         }
 
         if (vlan_mask) {
-            VLOG_DBG("  Mask: tpid=0x%"PRIx16", tci=0x%"PRIx16"\n",
-                     vlan_mask->tpid, vlan_mask->tci);
+            VLOG_DBG("  Mask: inner_type=0x%"PRIx16", tci=0x%"PRIx16"\n",
+                     vlan_mask->inner_type, vlan_mask->tci);
         } else {
             VLOG_DBG("  Mask = null\n");
         }
@@ -4281,27 +4311,55 @@  add_flow_action(struct flow_actions *actions, enum rte_flow_action_type type,
     actions->cnt++;
 }
 
+/*
+ * Storage for struct rte_flow_action_rss
+ * including storage for key and queue array
+ */
+#define MAX_RSS_HASH_KEY_LENGTH  128
+#define MAX_ACTION_RSS_QUEUE_NUM 128
+
+struct action_rss_data {
+    struct rte_flow_action_rss conf;
+    uint16_t queue[MAX_ACTION_RSS_QUEUE_NUM];
+    uint8_t key[MAX_RSS_HASH_KEY_LENGTH];
+};
+
 static struct rte_flow_action_rss *
 add_flow_rss_action(struct flow_actions *actions,
                     struct netdev *netdev) {
     int i;
-    struct rte_flow_action_rss *rss;
+    struct action_rss_data *rss_data;
 
-    rss = xmalloc(sizeof(*rss) + sizeof(uint16_t) * netdev->n_rxq);
-    /*
-     * Setting it to NULL will let the driver use the default RSS
-     * configuration we have set: &port_conf.rx_adv_conf.rss_conf.
-     */
-    rss->rss_conf = NULL;
-    rss->num = netdev->n_rxq;
+    if (netdev->n_rxq > MAX_ACTION_RSS_QUEUE_NUM) {
+        VLOG_ERR("Num of rxq (%u) must not be greater " \
+                 "than max rss num of queues (%u)",
+                 netdev->n_rxq, MAX_ACTION_RSS_QUEUE_NUM);
+        return NULL;
+    }
+
+    rss_data = xmalloc(sizeof(struct action_rss_data));
+    *rss_data = (struct action_rss_data){
+        .conf = (struct rte_flow_action_rss){
+            .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
+            .level = 0,
+            .types = ETH_RSS_IP,
+            .key_len = 0,
+            .queue_num = netdev->n_rxq,
+            .queue = rss_data->queue,
+            .key = rss_data->key,
+        },
+        .key = { 0 },
+        .queue = { 0 },
+    };
 
-    for (i = 0; i < rss->num; i++) {
-        rss->queue[i] = i;
+    /* Override queue array with default */
+    for (i = 0; i < rss_data->conf.queue_num; i++) {
+       rss_data->queue[i] = i;
     }
 
-    add_flow_action(actions, RTE_FLOW_ACTION_TYPE_RSS, rss);
+    add_flow_action(actions, RTE_FLOW_ACTION_TYPE_RSS, &rss_data->conf);
 
-    return rss;
+    return &rss_data->conf;
 }
 
 static int
@@ -4365,7 +4423,7 @@  netdev_dpdk_add_rte_flow_offload(struct netdev *netdev,
         vlan_mask.tci  = match->wc.masks.vlans[0].tci & ~htons(VLAN_CFI);
 
         /* match any protocols */
-        vlan_mask.tpid = 0;
+        vlan_mask.inner_type = 0;
 
         add_flow_pattern(&patterns, RTE_FLOW_ITEM_TYPE_VLAN,
                          &vlan_spec, &vlan_mask);
@@ -4516,6 +4574,11 @@  end_proto_check:
 
     struct rte_flow_action_rss *rss;
     rss = add_flow_rss_action(&actions, netdev);
+    if (!rss) {
+        VLOG_ERR("add_flow_rss_action error.\n");
+        ret = -1;
+        goto out;
+    }
     add_flow_action(&actions, RTE_FLOW_ACTION_TYPE_END, NULL);
 
     flow = rte_flow_create(dev->port_id, &flow_attr, patterns.items,