DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Gaetan Rivet <gaetan.rivet@6wind.com>,
	dpdk-techboard <techboard@dpdk.org>,
	Luca Boccassi <bluca@debian.org>,
	Kevin Traynor <ktraynor@redhat.com>,
	Yongseok Koh <yskoh@mellanox.com>,
	Christian Ehrhardt <christian.ehrhardt@canonical.com>,
	Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [dpdk-dev] [PATCH v3 7/7] ethdev: deprecate rte_flow_copy function
Date: Thu, 4 Oct 2018 15:21:48 +0100	[thread overview]
Message-ID: <4a967831-e02d-75d5-b729-5c8d3758d861@intel.com> (raw)
In-Reply-To: <20180831085337.21419-8-adrien.mazarguil@6wind.com>

On 8/31/2018 10:01 AM, Adrien Mazarguil wrote:
> No users left for this function, time to deprecate it.
> 
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Ferruh Yigit <ferruh.yigit@intel.com>
> Cc: Andrew Rybchenko <arybchenko@solarflare.com>
> Cc: Gaetan Rivet <gaetan.rivet@6wind.com>
> --
> v3 changes:
> 
> - Removed deprecation notice (finally got Ferruh's point), made patch last
>   in series.
> 
> v2 changes:
> 
> - Patch was not present in original series.
> ---
>  doc/guides/rel_notes/deprecation.rst | 7 -------
>  lib/librte_ethdev/rte_flow.h         | 7 ++++++-
>  2 files changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index e2dbee317..48cfb266b 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -88,10 +88,3 @@ Deprecation Notices
>    - ``rte_pdump_set_socket_dir`` will be removed;
>    - The parameter, ``path``, of ``rte_pdump_init`` will be removed;
>    - The enum ``rte_pdump_socktype`` will be removed.
> -
> -* ethdev: flow API function ``rte_flow_copy()`` will be deprecated in v18.11
> -  in favor of ``rte_flow_conv()`` (which will appear in that version) and
> -  subsequently removed for v19.02.
> -
> -  This is due to a lack of flexibility and reliance on a type unusable with
> -  C++ programs (struct rte_flow_desc).
> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
> index 052ceefb6..f062ffead 100644
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -2332,6 +2332,7 @@ rte_flow_error_set(struct rte_flow_error *error,
>  		   const char *message);
>  
>  /**
> + * @deprecated
>   * @see rte_flow_copy()
>   */
>  struct rte_flow_desc {
> @@ -2343,10 +2344,13 @@ struct rte_flow_desc {
>  };
>  
>  /**
> + * @deprecated
>   * Copy an rte_flow rule description.
>   *
>   * This interface is kept for compatibility with older applications but is
> - * implemented as a wrapper to rte_flow_conv().
> + * implemented as a wrapper to rte_flow_conv(). It is deprecated due to its
> + * lack of flexibility and reliance on a type unusable with C++ programs
> + * (struct rte_flow_desc).
>   *
>   * @param[in] fd
>   *   Flow rule description.
> @@ -2365,6 +2369,7 @@ struct rte_flow_desc {
>   *   If len is lower than the size of the flow, the number of bytes that would
>   *   have been written to desc had it been sufficient. Nothing is written.
>   */
> +__rte_deprecated
>  size_t
>  rte_flow_copy(struct rte_flow_desc *fd, size_t len,
>  	      const struct rte_flow_attr *attr,
> 


Not exactly related to this patch but I have a deprecation process question,
what we are mostly doing is:

1) Release N, document in deprecation.rst the API that will be changed
2) Release N + 1, change the API and remove the note from the deprecation.rst

But using __rte_deprecated makes sense, how can we include this into process?

It looks like we can use __rte_deprecated only when an API replaced (add a new
one & deprecate old one), but if an API changed switch needs to be atomic.


Options I can think of:

For replacing an API,

A)
a1) Release N, add note to deprecation.rst and add __rte_deprecated to old API
a2) Release N + 1, add new API, remove note from deprecation.rst and remove old API

B)
b1) Release N, add note to deprecation.rst
b2) Release N + 1, remove note from deprecation.rst add __rte_deprecated to old
API and add new API (as non experimental [1])
b3) Release N + 1 + M, remove old API (perhaps cleanup on each new LTS)



For changing exiting API,

C)
c1) Release N, add note to deprecation.rst
c2) Release N + 1, remove note from deprecation.rst and switch to new API

The problem with C) is, even developer sees the deprecation note, there is
nothing she can do or prepare, only in "Release N + 1" she will hit to the
change and will update her code. Not very useful for developer, so what about:

D)
d1) Release N, add note to deprecation.rst implement new API within RTE_NEXT_ABI
#ifdef
d2) Release N + 1, remove note from deprecation.rst and switch to new API

Switching to D means one can't send deprecation notice without doing the actual
implementation, so there is a big difference between C).

I am for B & D, what do you think?





[1]
This is happening again with rte_flow_conv(), old API is deprecated, new API is
experimental, from user point of view there is no stable API.
I am not happy with "an API should be experimental for first release it has been
introduced" policy, is it really helping, can we re-visit this again?

  reply	other threads:[~2018-10-04 14:21 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05  9:49 [dpdk-dev] [PATCH v1 0/7] Flow API helpers enhancements Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper Adrien Mazarguil
2017-10-11  9:23   ` Thomas Monjalon
2017-10-11 11:56     ` Adrien Mazarguil
2017-10-11 19:05       ` Aaron Conole
2017-10-12 13:37         ` Neil Horman
2017-10-12 14:02         ` Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 2/7] ethdev: replace flow API object copy function Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 3/7] ethdev: add flow API item/action name conversion Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 4/7] app/testpmd: rely on flow API conversion function Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 5/7] ethdev: enhance flow API item/action descriptions Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 6/7] ethdev: generate flow API conversion header Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 7/7] ethdev: update " Adrien Mazarguil
2017-10-06  1:13 ` [dpdk-dev] [PATCH v1 0/7] Flow API helpers enhancements Ferruh Yigit
2017-10-06  8:05   ` Adrien Mazarguil
2017-10-10 18:05     ` Ferruh Yigit
2017-10-11  9:57       ` Adrien Mazarguil
2017-10-11 18:07         ` Ferruh Yigit
2017-10-12 12:53           ` Adrien Mazarguil
2017-10-12 16:37             ` Ferruh Yigit
2017-10-13 10:42               ` Adrien Mazarguil
2018-08-03 13:36 ` [dpdk-dev] [PATCH v2 0/7] ethdev: add flow API object converter Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 1/7] " Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 2/7] ethdev: add flow API item/action name conversion Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 3/7] app/testpmd: rely on flow API conversion function Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 4/7] net/failsafe: switch to flow API object " Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 5/7] net/bonding: " Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 6/7] ethdev: deprecate rte_flow_copy function Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 7/7] ethdev: add missing item/actions to flow object converter Adrien Mazarguil
2018-08-03 14:06   ` [dpdk-dev] [PATCH v2 0/7] ethdev: add flow API " Thomas Monjalon
2018-08-23 13:48   ` Ferruh Yigit
2018-08-27 15:14     ` Adrien Mazarguil
2018-08-24 10:58   ` Ferruh Yigit
2018-08-27 14:12     ` Adrien Mazarguil
2018-08-31  9:00   ` [dpdk-dev] [PATCH v3 " Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 1/7] " Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 2/7] ethdev: add flow API item/action name conversion Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 3/7] app/testpmd: rely on flow API conversion function Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 4/7] net/failsafe: switch to flow API object " Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 5/7] net/bonding: " Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 6/7] ethdev: add missing items/actions to flow object converter Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 7/7] ethdev: deprecate rte_flow_copy function Adrien Mazarguil
2018-10-04 14:21       ` Ferruh Yigit [this message]
2018-08-31 11:32     ` [dpdk-dev] [PATCH v3 0/7] ethdev: add flow API object converter Nélio Laranjeiro
2018-10-03 20:31       ` Thomas Monjalon
2018-10-04 14:25         ` 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=4a967831-e02d-75d5-b729-5c8d3758d861@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=arybchenko@solarflare.com \
    --cc=bluca@debian.org \
    --cc=christian.ehrhardt@canonical.com \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=ktraynor@redhat.com \
    --cc=nhorman@tuxdriver.com \
    --cc=techboard@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=yskoh@mellanox.com \
    /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).