doc: announce behavior change in bus probing
[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 * rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
21   not allow for writing optimized code for all the CPU architectures supported
22   in DPDK. DPDK has adopted the atomic operations from
23   https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. These
24   operations must be used for patches that need to be merged in 20.08 onwards.
25   This change will not introduce any performance degradation.
26
27 * rte_smp_*mb: These APIs provide full barrier functionality. However, many
28   use cases do not require full barriers. To support such use cases, DPDK has
29   adopted atomic operations from
30   https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. These
31   operations and a new wrapper ``rte_atomic_thread_fence`` instead of
32   ``__atomic_thread_fence`` must be used for patches that need to be merged in
33   20.08 onwards. This change will not introduce any performance degradation.
34
35 * mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated and will
36   be removed in DPDK 22.11. The replacement macro
37   ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
38
39 * mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
40   deprecated and will be removed in DPDK 22.11. Use replacement macro
41   ``RTE_MEMPOOL_REGISTER_OPS()``.
42
43 * mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
44   will be removed in DPDK 22.11.
45
46 * pci: To reduce unnecessary ABIs exposed by DPDK bus driver, "rte_bus_pci.h"
47   will be made internal in 21.11 and macros/data structures/functions defined
48   in the header will not be considered as ABI anymore. This change is inspired
49   by the RFC https://patchwork.dpdk.org/project/dpdk/list/?series=17176.
50
51 * lib: will fix extending some enum/define breaking the ABI. There are multiple
52   samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
53   used by iterators, and arrays holding these values are sized with this
54   ``.*MAX.*`` value. So extending this enum/define increases the ``.*MAX.*``
55   value which increases the size of the array and depending on how/where the
56   array is used this may break the ABI.
57   ``RTE_ETH_FLOW_MAX`` is one sample of the mentioned case, adding a new flow
58   type will break the ABI because of ``flex_mask[RTE_ETH_FLOW_MAX]`` array
59   usage in following public struct hierarchy:
60   ``rte_eth_fdir_flex_conf -> rte_eth_fdir_conf -> rte_eth_conf (in the middle)``.
61   Need to identify this kind of usages and fix in 20.11, otherwise this blocks
62   us extending existing enum/define.
63   One solution can be using a fixed size array instead of ``.*MAX.*`` value.
64
65 * ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
66   and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
67   will be removed in DPDK 20.11.
68
69 * ethdev: Announce moving from dedicated modify function for each field,
70   to using the general ``rte_flow_modify_field`` action.
71
72 * ethdev: The flow API matching pattern structures, ``struct rte_flow_item_*``,
73   should start with relevant protocol header.
74   Some matching pattern structures implements this by duplicating protocol header
75   fields in the struct. To clarify the intention and to be sure protocol header
76   is intact, will replace those fields with relevant protocol header struct.
77   In v21.02 both individual protocol header fields and the protocol header struct
78   will be added as union, target is switch usage to the protocol header by time.
79   In v21.11 LTS, protocol header fields will be cleaned and only protocol header
80   struct will remain.
81
82 * ethdev: Queue specific stats fields will be removed from ``struct rte_eth_stats``.
83   Mentioned fields are: ``q_ipackets``, ``q_opackets``, ``q_ibytes``, ``q_obytes``,
84   ``q_errors``.
85   Instead queue stats will be received via xstats API. Current method support
86   will be limited to maximum 256 queues.
87   Also compile time flag ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` will be removed.
88
89 * ethdev: Items and actions ``PF``, ``VF``, ``PHY_PORT``, ``PORT_ID`` are
90   deprecated as hard-to-use / ambiguous and will be removed in DPDK 22.11.
91
92 * ethdev: The use of attributes ``ingress`` / ``egress`` in "transfer" flows
93   is deprecated as ambiguous with respect to the embedded switch. The use of
94   these attributes will become invalid starting from DPDK 22.11.
95
96 * cryptodev: Hide structures ``rte_cryptodev_sym_session`` and
97   ``rte_cryptodev_asym_session`` to remove unnecessary indirection between
98   session and the private data of session. An opaque pointer can be exposed
99   directly to application which can be attached to the ``rte_crypto_op``.
100
101 * security: Hide structure ``rte_security_session`` and expose an opaque
102   pointer for the private data to the application which can be attached
103   to the packet while enqueuing.
104
105 * metrics: The function ``rte_metrics_init`` will have a non-void return
106   in order to notify errors instead of calling ``rte_exit``.
107
108 * raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
109   functionality is provided through the new ``dmadev`` infrastructure.
110   To continue to use hardware previously supported by the ``ioat`` rawdev driver,
111   applications should be updated to use the ``dmadev`` library instead,
112   with the underlying HW-functionality being provided by the ``ioat`` or
113   ``idxd`` dma drivers
114
115 * drivers/octeontx2: remove octeontx2 drivers
116
117   In the view of enabling unified driver for ``octeontx2(cn9k)``/``octeontx3(cn10k)``,
118   removing ``drivers/octeontx2`` drivers and replace with ``drivers/cnxk/`` which
119   supports both ``octeontx2(cn9k)`` and ``octeontx3(cn10k)`` SoCs.
120   This deprecation notice is to do following actions in DPDK v22.02 version.
121
122   #. Replace ``drivers/common/octeontx2/`` with ``drivers/common/cnxk/``
123   #. Replace ``drivers/mempool/octeontx2/`` with ``drivers/mempool/cnxk/``
124   #. Replace ``drivers/net/octeontx2/`` with ``drivers/net/cnxk/``
125   #. Replace ``drivers/event/octeontx2/`` with ``drivers/event/cnxk/``
126   #. Replace ``drivers/crypto/octeontx2/`` with ``drivers/crypto/cnxk/``
127   #. Rename ``drivers/regex/octeontx2/`` as ``drivers/regex/cn9k/``
128   #. Rename ``config/arm/arm64_octeontx2_linux_gcc`` as ``config/arm/arm64_cn9k_linux_gcc``
129
130   Last two actions are to align naming convention as cnxk scheme.
131
132 * bus: during devices probing, the ``device->numa_node`` field will be
133   set to SOCKET_ID_ANY when the bus is not able to associate a NUMA node
134   to the device. Some bus drivers like PCI currently defaults to 0 in
135   that case, which can be a problem if this NUMA socket is not used.
136   The behavior will change starting from v22.03.