a708ad76912178767a8de917ef2f2a0da49c3308
[dpdk.git] / doc / guides / rel_notes / deprecation.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright 2018 The DPDK contributors
3
4 ABI and API Deprecation
5 =======================
6
7 See the guidelines document for details of the :doc:`ABI policy
8 <../contributing/abi_policy>`. API and ABI deprecation notices are to be posted
9 here.
10
11 Deprecation Notices
12 -------------------
13
14 * kvargs: The function ``rte_kvargs_process`` will get a new parameter
15   for returning key match count. It will ease handling of no-match case.
16
17 * eal: The function ``rte_eal_remote_launch`` will return new error codes
18   after read or write error on the pipe, instead of calling ``rte_panic``.
19
20 * eal: Making ``struct rte_intr_handle`` internal to avoid any ABI breakages
21   in future.
22
23 * rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
24   not allow for writing optimized code for all the CPU architectures supported
25   in DPDK. DPDK has adopted the atomic operations from
26   https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. These
27   operations must be used for patches that need to be merged in 20.08 onwards.
28   This change will not introduce any performance degradation.
29
30 * rte_smp_*mb: These APIs provide full barrier functionality. However, many
31   use cases do not require full barriers. To support such use cases, DPDK has
32   adopted atomic operations from
33   https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. These
34   operations and a new wrapper ``rte_atomic_thread_fence`` instead of
35   ``__atomic_thread_fence`` must be used for patches that need to be merged in
36   20.08 onwards. This change will not introduce any performance degradation.
37
38 * mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated and will
39   be removed in DPDK 22.11. The replacement macro
40   ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
41
42 * mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
43   deprecated and will be removed in DPDK 22.11. Use replacement macro
44   ``RTE_MEMPOOL_REGISTER_OPS()``.
45
46 * mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
47   will be removed in DPDK 22.11.
48
49 * pci: To reduce unnecessary ABIs exposed by DPDK bus driver, "rte_bus_pci.h"
50   will be made internal in 21.11 and macros/data structures/functions defined
51   in the header will not be considered as ABI anymore. This change is inspired
52   by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
53
54 * lib: will fix extending some enum/define breaking the ABI. There are multiple
55   samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
56   used by iterators, and arrays holding these values are sized with this
57   ``.*MAX.*`` value. So extending this enum/define increases the ``.*MAX.*``
58   value which increases the size of the array and depending on how/where the
59   array is used this may break the ABI.
60   ``RTE_ETH_FLOW_MAX`` is one sample of the mentioned case, adding a new flow
61   type will break the ABI because of ``flex_mask[RTE_ETH_FLOW_MAX]`` array
62   usage in following public struct hierarchy:
63   ``rte_eth_fdir_flex_conf -> rte_eth_fdir_conf -> rte_eth_conf (in the middle)``.
64   Need to identify this kind of usages and fix in 20.11, otherwise this blocks
65   us extending existing enum/define.
66   One solution can be using a fixed size array instead of ``.*MAX.*`` value.
67
68 * ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
69   and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
70   will be removed in DPDK 20.11.
71
72 * ethdev: New offload flags ``RTE_ETH_RX_OFFLOAD_FLOW_MARK`` will be added in 19.11.
73   This will allow application to enable or disable PMDs from updating
74   ``rte_mbuf::hash::fdir``.
75   This scheme will allow PMDs to avoid writes to ``rte_mbuf`` fields on Rx and
76   thereby improve Rx performance if application wishes do so.
77   In 19.11 PMDs will still update the field even when the offload is not
78   enabled.
79
80 * ethdev: Announce moving from dedicated modify function for each field,
81   to using the general ``rte_flow_modify_field`` action.
82
83 * ethdev: The flow API matching pattern structures, ``struct rte_flow_item_*``,
84   should start with relevant protocol header.
85   Some matching pattern structures implements this by duplicating protocol header
86   fields in the struct. To clarify the intention and to be sure protocol header
87   is intact, will replace those fields with relevant protocol header struct.
88   In v21.02 both individual protocol header fields and the protocol header struct
89   will be added as union, target is switch usage to the protocol header by time.
90   In v21.11 LTS, protocol header fields will be cleaned and only protocol header
91   struct will remain.
92
93 * ethdev: Queue specific stats fields will be removed from ``struct rte_eth_stats``.
94   Mentioned fields are: ``q_ipackets``, ``q_opackets``, ``q_ibytes``, ``q_obytes``,
95   ``q_errors``.
96   Instead queue stats will be received via xstats API. Current method support
97   will be limited to maximum 256 queues.
98   Also compile time flag ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` will be removed.
99
100 * ethdev: Items and actions ``PF``, ``VF``, ``PHY_PORT``, ``PORT_ID`` are
101   deprecated as hard-to-use / ambiguous and will be removed in DPDK 22.11.
102
103 * ethdev: The use of attributes ``ingress`` / ``egress`` in "transfer" flows
104   is deprecated as ambiguous with respect to the embedded switch. The use of
105   these attributes will become invalid starting from DPDK 22.11.
106
107 * vhost: ``rte_vdpa_register_device``, ``rte_vdpa_unregister_device``,
108   ``rte_vhost_host_notifier_ctrl`` and ``rte_vdpa_relay_vring_used`` vDPA
109   driver interface will be marked as internal in DPDK v21.11.
110
111 * vhost: rename ``struct vhost_device_ops`` to ``struct rte_vhost_device_ops``
112   in DPDK v21.11.
113
114 * vhost: The experimental tags of ``rte_vhost_driver_get_protocol_features``,
115   ``rte_vhost_driver_get_queue_num``, ``rte_vhost_crypto_create``,
116   ``rte_vhost_crypto_free``, ``rte_vhost_crypto_fetch_requests``,
117   ``rte_vhost_crypto_finalize_requests``, ``rte_vhost_crypto_set_zero_copy``,
118   ``rte_vhost_va_from_guest_pa``, ``rte_vhost_extern_callback_register``,
119   and ``rte_vhost_driver_set_protocol_features`` functions will be removed
120   and the API functions will be made stable in DPDK 21.11.
121
122 * cryptodev: Hide structures ``rte_cryptodev_sym_session`` and
123   ``rte_cryptodev_asym_session`` to remove unnecessary indirection between
124   session and the private data of session. An opaque pointer can be exposed
125   directly to application which can be attached to the ``rte_crypto_op``.
126
127 * security: Hide structure ``rte_security_session`` and expose an opaque
128   pointer for the private data to the application which can be attached
129   to the packet while enqueuing.
130
131 * eventdev: The file ``rte_eventdev_pmd.h`` will be renamed to ``eventdev_driver.h``
132   to make the driver interface as internal and the structures ``rte_eventdev_data``,
133   ``rte_eventdev`` and ``rte_eventdevs`` will be moved to a new file named
134   ``rte_eventdev_core.h`` in DPDK 21.11.
135   The ``rte_`` prefix for internal structures and functions will be removed across the
136   library.
137   The experimental eventdev trace APIs and ``rte_event_vector_pool_create``,
138   ``rte_event_eth_rx_adapter_vector_limits_get`` will be promoted to stable.
139   An 8-byte reserved field will be added to the structure ``rte_event_timer`` to
140   support future extensions.
141
142 * eventdev: The structure ``rte_event_eth_rx_adapter_queue_conf`` will be
143   extended to include ``rte_event_eth_rx_adapter_event_vector_config`` elements
144   and the function ``rte_event_eth_rx_adapter_queue_event_vector_config`` will
145   be removed in DPDK 21.11.
146
147   An application can enable event vectorization by passing the desired vector
148   values to the function ``rte_event_eth_rx_adapter_queue_add`` using
149   the structure ``rte_event_eth_rx_adapter_queue_add``.
150
151 * eventdev: Reserved bytes of ``rte_event_crypto_request`` is a space holder
152   for ``response_info``. Both should be decoupled for better clarity in
153   DPDK 21.11.
154   New space for ``response_info`` can be made by changing
155   ``rte_event_crypto_metadata`` type to structure from union.
156
157 * metrics: The function ``rte_metrics_init`` will have a non-void return
158   in order to notify errors instead of calling ``rte_exit``.
159
160 * raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
161   functionality is provided through the new ``dmadev`` infrastructure.
162   To continue to use hardware previously supported by the ``ioat`` rawdev driver,
163   applications should be updated to use the ``dmadev`` library instead,
164   with the underlying HW-functionality being provided by the ``ioat`` or
165   ``idxd`` dma drivers