DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	Jasvinder Singh <jasvinder.singh@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	dev <dev@dpdk.org>, Dodji Seketeli <dodji@redhat.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Raslan Darawsheh <rasland@nvidia.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>
Subject: Re: [dpdk-dev] [PATCH] ethdev: add namespace
Date: Wed, 30 Jun 2021 10:08:38 +0100	[thread overview]
Message-ID: <2fae7aa6-f6bc-16a7-37c7-98b08c26a331@intel.com> (raw)
In-Reply-To: <CAJFAV8xS+e2QVKMTa1vxLDz0r6Zfn5PHrSTOyZzJXDCBNR0hCA@mail.gmail.com>

On 6/30/2021 7:29 AM, David Marchand wrote:
> Hello Ferruh,
> 
> On Tue, Jun 29, 2021 at 3:46 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> Add 'RTE_ETH' namespace to all enums & macros in a backward compatible
>> way. The macros for backward compatibility can be removed in next LTS.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> - I did not do a full check but I noticed that ETH_RSS compat macro at
> least is removed.
> Is this intentional?
> 

Yes, two groups of macros was remaining from 2013 for backward compatibility,
with this patch it would be two layer of redicrection, so I moved to old ones.
The only changes in the examples/app are because of these removed macros, since
rest are all backward compatible.

Removed ones:
/**
 * for rx mq mode backward compatible
 */
#define ETH_RSS                       ETH_MQ_RX_RSS
#define VMDQ_DCB                      ETH_MQ_RX_VMDQ_DCB
#define ETH_DCB_RX                    ETH_MQ_RX_DCB

/**
 * for tx mq mode backward compatible
 */
#define ETH_DCB_NONE                ETH_MQ_TX_NONE
#define ETH_VMDQ_DCB_TX             ETH_MQ_TX_VMDQ_DCB
#define ETH_DCB_TX                  ETH_MQ_TX_DCB



> 
> - libabigail is not happy because of enum names changes.
> Example:
> 
>   [C] 'function int rte_eth_dev_configure(uint16_t, uint16_t,
> uint16_t, const rte_eth_conf*)' at rte_ethdev.c:1326:1 has some
> indirect sub-type changes:
>     parameter 4 of type 'const rte_eth_conf*' has sub-type changes:
>       in pointed to type 'const rte_eth_conf':
>         in unqualified underlying type 'struct rte_eth_conf' at
> rte_ethdev.h:1491:1:
>           type size hasn't changed
>           5 data member changes (1 filtered):
>             type of 'rte_eth_rxmode rxmode' changed:
>               type size hasn't changed
>               1 data member change:
>                 type of 'rte_eth_rx_mq_mode mq_mode' changed:
>                   type size hasn't changed
>                   8 enumerator deletions:
>                     'rte_eth_rx_mq_mode::ETH_MQ_RX_NONE' value '0'
>                     'rte_eth_rx_mq_mode::ETH_MQ_RX_RSS' value '1'
>                     'rte_eth_rx_mq_mode::ETH_MQ_RX_DCB' value '2'
>                     'rte_eth_rx_mq_mode::ETH_MQ_RX_DCB_RSS' value '3'
>                     'rte_eth_rx_mq_mode::ETH_MQ_RX_VMDQ_ONLY' value '4'
>                     'rte_eth_rx_mq_mode::ETH_MQ_RX_VMDQ_RSS' value '5'
>                     'rte_eth_rx_mq_mode::ETH_MQ_RX_VMDQ_DCB' value '6'
>                     'rte_eth_rx_mq_mode::ETH_MQ_RX_VMDQ_DCB_RSS' value '7'
>                   8 enumerator insertions:
>                     'rte_eth_rx_mq_mode::RTE_ETH_MQ_RX_NONE' value '0'
>                     'rte_eth_rx_mq_mode::RTE_ETH_MQ_RX_RSS' value '1'
>                     'rte_eth_rx_mq_mode::RTE_ETH_MQ_RX_DCB' value '2'
>                     'rte_eth_rx_mq_mode::RTE_ETH_MQ_RX_DCB_RSS' value '3'
>                     'rte_eth_rx_mq_mode::RTE_ETH_MQ_RX_VMDQ_ONLY' value '4'
>                     'rte_eth_rx_mq_mode::RTE_ETH_MQ_RX_VMDQ_RSS' value '5'
>                     'rte_eth_rx_mq_mode::RTE_ETH_MQ_RX_VMDQ_DCB' value '6'
>                     'rte_eth_rx_mq_mode::RTE_ETH_MQ_RX_VMDQ_DCB_RSS' value '7'
> [snip]
> 
> 
> I guess libabigail is lost because the symbol
> rte_eth_rx_mq_mode::ETH_MQ_RX_NONE simply disappeared (because we used
> a macro to wrap to the new name).

Yes.

> Maybe we could go the other way: leave the current enums defined as is
> and put in place wrappers for new names pointing as old names. 
> The rest of the code in DPDK would use the new names only.

It works to prevent libabigail warnings but I think it can be confusing for
users on figuring out which ones are the correct ones to use.

> This comment applies if we want to merge this change in 21.08 and/or
> we want to backport this change.
> 
> This won't be a problem if we merge this patch in 21.11.
> 

OK to have it on v21.11. In that case I assume all internal components also
needs to be updated to use new macros/enums during v21.11 release.

Let me send a deprecation notice for it.

Meanwhile, we can use this patch to discuss the prefix/namespace, if it should
be 'RTE_ETH_' or 'RTE_ETH_DEV_', or mix of both (as done now).

And if mixed prefix used, we can try to define when to have DEV_ part and when
not to have it.

> 
>> ---
>> We can get the update on v21.11 and remove backward compatibility macros
>> on v22.11.
> 
> 
> 


  reply	other threads:[~2021-06-30  9:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 13:46 Ferruh Yigit
2021-06-29 15:02 ` Tyler Retzlaff
2021-06-30  6:29 ` David Marchand
2021-06-30  9:08   ` Ferruh Yigit [this message]
2021-08-27  1:19 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2021-08-27  7:59   ` Andrew Rybchenko
2021-08-27 20:24     ` Ferruh Yigit
2021-08-28 14:26     ` Ajit Khaparde
2021-08-29  7:47       ` Jerin Jacob
2021-08-29  8:17       ` Wisam Monther
2021-08-30  2:13         ` Xu, Rosen
2021-08-30  5:27           ` Xia, Chenbo
2021-08-30  6:24         ` Hemant Agrawal
2021-08-30  9:41   ` David Marchand
2021-08-30 17:01     ` Ferruh Yigit
2021-08-30 17:19   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2021-08-31  7:59     ` Thomas Monjalon
2021-10-18 15:43     ` [dpdk-dev] [PATCH v4] " Ferruh Yigit
2021-10-20 19:23       ` [dpdk-dev] [PATCH v5] " Ferruh Yigit
2021-10-22  2:02         ` [dpdk-dev] [PATCH v6] " Ferruh Yigit
2021-10-22  6:44           ` Andrew Rybchenko
2021-10-22  8:25             ` Ferruh Yigit
2021-10-22  9:48           ` Pattan, Reshma
2021-10-22 11:03           ` [dpdk-dev] [PATCH v7] " Ferruh Yigit
2021-10-22 11:28             ` Andrew Rybchenko
2021-10-22 12:29               ` Somnath Kotur
2021-10-22 16:26                 ` Ferruh Yigit
2021-10-22 13:02               ` Ferruh Yigit
2021-11-01  9:23             ` Jiawen Wu
2021-11-01 12:39               ` Ferruh Yigit
2021-11-01 12:48                 ` Ferruh Yigit
2021-11-01 13:20                   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2fae7aa6-f6bc-16a7-37c7-98b08c26a331@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dodji@redhat.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jerinj@marvell.com \
    --cc=qi.z.zhang@intel.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).