[ovs-dev] [ovs-dev, dpdk-howl, v2] netdev-dpdk: Upgrade to dpdk v18.08.0

Ian Stokes ian.stokes at intel.com
Tue Sep 11 21:18:07 UTC 2018


On 9/11/2018 10:35 AM, Ilya Maximets wrote:
> Comments inline.
> 
> Best regards, Ilya Maximets.
> 
> 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 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 in Documentation
>>
>> 4. Update DPDK version in travis' linux-build script

Thanks for working on this Ophir, I've been testing and spotted one 
issue relating to scatter offload enablement detailed below.

I'll keep testing in the mean time.

>>
>> 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
>>
>>   .travis/linux-build.sh         |   2 +-
>>   Documentation/faq/releases.rst |   2 +-
>>   lib/netdev-dpdk.c              | 142 +++++++++++++++++++++++++++++------------
>>   3 files changed, 104 insertions(+), 42 deletions(-)
>>
>> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
>> index 4b9fc4a..c60ac71 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.0"
>>       fi
>>       install_dpdk $DPDK_VER
>>       if [ "$CC" = "clang" ]; then
>> diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
>> index 41d41e3..646ae09 100644
>> --- a/Documentation/faq/releases.rst
>> +++ b/Documentation/faq/releases.rst
>> @@ -168,7 +168,7 @@ Q: What DPDK version does each Open vSwitch release work with?
>>       2.7.x        16.11.7
>>       2.8.x        17.05.2
>>       2.9.x        17.11.3
>> -    2.10.x       17.11.3
>> +    2.10.x       18.08.0
>>       ============ =======
>>   
>>   Q: Are all the DPDK releases that OVS versions work with maintained?
>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>> index f91aa27..6879e9a 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;

Above will break MTU support for i40e devices (and any other devices 
that do not have scatter listed in their offload capabilities).

DPDK seems to have implemented offload capabilities for more PMD drivers 
since 17.11 so I'm thinking we can remove the specific check against 
net_nfp altogether and check for support for scatter in device 
capabilities before setting it for the device. Something like below:

     if (dev->mtu > ETHER_MTU) {
         if (info.rx_offload_capa & DEV_RX_OFFLOAD_SCATTER) {
             conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
         }
     }

It would require confirmation/testing for other PMD devices however that 
they list supported offloads correctly for scatter if it's required for 
RX jumbo frames.

Ian


More information about the dev mailing list