From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1B731A0613 for ; Thu, 26 Sep 2019 13:50:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A33034F0; Thu, 26 Sep 2019 13:50:44 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id C53DE31FC for ; Thu, 26 Sep 2019 13:50:42 +0200 (CEST) Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D62E89AC9 for ; Thu, 26 Sep 2019 11:50:42 +0000 (UTC) Received: by mail-vk1-f197.google.com with SMTP id 70so913258vki.19 for ; Thu, 26 Sep 2019 04:50:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H+f1LqMWCm+s2pMZ/EXScp2tWdCDkLdCYlq5wfONGLM=; b=Lbpv7PGOJjW4JKyBIhksu3MJrRwcVcgUdq5J4IhVEl3D23W8uQ924F4Qd3UA8vCpJu P8jKltxoIYPleaN/9qmMheWE2FPFaOM7iZZm3/BqtymvUQGF/gFy/xTaWikfaxCQrwqa XC2Vk4bDEtj0CwFDyH2Y00jtC251qEsHorFjg/1ggoJFFN57Tneo4WEfjl5cfexLh4ng pP4vHFhepWukEAJRm4+uaU89YgebwSY9sWJUuL1NLZm2tCxps8EdGQu6BpGi4xTM4Z4/ wabrmZO5aXUoFQFLh/8TVz6AQFJkcEioEHjQiAnDGJexvdZIATY4Lar1uvyMFtdmwTXz ypag== X-Gm-Message-State: APjAAAUrAC/LOP4MuNw/6fwW3/DIvtLjBDmjTG3ZBfPwmA43bjz7XkLm tOmgEKliv4BAtN122tOWMeWTiGoBX/oeWyW+H+C6z1uYJv0mBUOK5Ch/50/pNqRXDAtvgT2QY7q mHLVo6Ooeu4qFTJXwYKs= X-Received: by 2002:a67:e254:: with SMTP id w20mr1503515vse.39.1569498641246; Thu, 26 Sep 2019 04:50:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGARAWVlTnd2c/e/YRqPxxwLrtGgZDMm/SJY+0Ax63NA0yxtnmWvutjqqv2tutf4H0GkH9s47INZ3xtiykR/o= X-Received: by 2002:a67:e254:: with SMTP id w20mr1503497vse.39.1569498640982; Thu, 26 Sep 2019 04:50:40 -0700 (PDT) MIME-Version: 1.0 References: <980083c6-130a-9658-f82b-0c9ddc7cc0cc@ashroe.eu> <2601191342CEEE43887BDE71AB9772580191969C2E@irsmsx105.ger.corp.intel.com> <90610982-ac3e-314e-a623-81610e591958@solarflare.com> In-Reply-To: <90610982-ac3e-314e-a623-81610e591958@solarflare.com> From: David Marchand Date: Thu, 26 Sep 2019 13:50:29 +0200 Message-ID: To: Andrew Rybchenko , Thomas Monjalon Cc: "Ananyev, Konstantin" , Jerin Jacob , Ray Kinsella , dpdk-dev , "Richardson, Bruce" , Jerin Jacob Kollanukkaran , Hemant Agrawal , Stephen Hemminger , "Yigit, Ferruh" , "maxime.coquelin@redhat.com" , "Zapolski, MarcinX A" , Ian Stokes , Ilya Maximets Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] RFC: hiding struct rte_eth_dev X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Sep 26, 2019 at 1:13 PM Andrew Rybchenko wrote: > > On 9/24/19 7:50 PM, Ananyev, Konstantin wrote: > > Hi everyone, > > Hi folks, > > The ABI Stability proposals should be pretty well known at this point. > The latest rev is here ... > > http://inbox.dpdk.org/dev/1565864619-17206-1-git-send-email-mdr@ashroe.eu/ > > As has been discussed public data structure's are risky for ABI > stability, as any changes to a data structure can change the ABI. As a > general rule you want to expose as few as possible (ideally none), and > keep them as small as possible. > > One of the key data structures in DPDK is `struct rte_eth_dev`. In this > case, rte_eth_dev is exposed public-ally, as a side-effect of the > inlining of the [rx,tx]_burst functions. > > Marcin Zapolski has been looking at what to do about it, with no current > consensus on a path forward. The options on our table is:- > > 1. Do nothing, live with the risk to DPDK v20 ABI stability. > > 2. Pad rte_eth_dev, add some extra bytes to the structure "in case" we > need to add a field during the v20 ABI (through to 20.11). > > 3. Break rte_eth_dev into public and private structs. > - See > http://inbox.dpdk.org/dev/20190906131813.1343-1-marcinx.a.zapolski@intel.com/ > - This ends up quiet an invasive patch, late in the cycle, however it > does have no performance penalty. > > 4. Uninline [rx,tx]_burst functions > - See > http://inbox.dpdk.org/dev/20190730124950.1293-1-marcinx.a.zapolski@intel.com/ > - This has a performance penalty of ~2% with testpmd, impact on a "real > workload" is likely to be in the noise. > > We need to agree an approach for v19.11, and that may be we agree to do > nothing. My personal vote is 4. as the simplest with minimal impact. > > My preference NOT to do #4. Reasons are: > - I have seen performance drop from 1.5% to 3.5% based on the arm64 > cores in use(Embedded vs Server cores) > - We need the correct approach to cater to cryptodev and eventdev as > well. If #4 is checked in, We will > take shotcut for cryptodev and eventdev > > My preference #1, do nothing, is probably ok and could live with #2, > adding padding, > and fix properly with #3 as when needed and use #3 scheme for crypto > dev and eventdev as well. > > > My preference would be #4 also. > If that's not an option, then I suppose #1 for 19.11 and #3 for next release > when ABI breakage would be allowed. > BTW, good point that we need similar thing for other dev types too. > Konstantin > > > My preference would be #4 or #1. > #2 and #3 are both tradeoffs and do not resolve ABI breaking completely. > #3 is really invasive, it requires changes of driverRx/Tx burst prototypes and > uninline descriptor status functions (may be it would be better to change > callback prototypes as well, but keep functions inline). > #4 is better since it is really a step to ABI stability and it still allow to > do many generic checks (dev->data dependent) on ethdev API level. Did we ensure that external users have all the required api before hiding the rte_eth_dev struct? ovs still accesses rte_eth_devices[]. CC Ian and Ilya. -- David Marchand