eal: provide API for querying valid socket ids
[dpdk.git] / doc / guides / rel_notes / deprecation.rst
1 ABI and API Deprecation
2 =======================
3
4 See the :doc:`guidelines document for details of the ABI policy </contributing/versioning>`.
5 API and ABI deprecation notices are to be posted here.
6
7
8 Deprecation Notices
9 -------------------
10
11 * eal: both declaring and identifying devices will be streamlined in v18.05.
12   New functions will appear to query a specific port from buses, classes of
13   device and device drivers. Device declaration will be made coherent with the
14   new scheme of device identification.
15   As such, ``rte_devargs`` device representation will change.
16
17   - removal of ``name`` and ``args`` fields.
18   - The enum ``rte_devtype`` was used to identify a bus and will disappear.
19   - The ``rte_devargs_list`` will be made private.
20   - Functions previously deprecated will change or disappear:
21
22     + ``rte_eal_devargs_add``
23     + ``rte_eal_devargs_type_count``
24     + ``rte_eal_parse_devargs_str``, replaced by ``rte_eal_devargs_parse``
25     + ``rte_eal_devargs_parse`` will change its format and use.
26     + all ``rte_devargs`` related functions will be renamed, changing the
27       ``rte_eal_devargs_`` prefix to ``rte_devargs_``.
28
29 * pci: Several exposed functions are misnamed.
30   The following functions are deprecated starting from v17.11 and are replaced:
31
32   - ``eal_parse_pci_BDF`` replaced by ``rte_pci_addr_parse``
33   - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
34   - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
35
36 * eal: The semantics of the return value for the ``rte_lcore_has_role`` function
37   are planned to change in v18.05. The function currently returns 0 and <0 for
38   success and failure, respectively.  This will change to 1 and 0 for true and
39   false, respectively, to make use of the function more intuitive.
40
41 * eal: due to internal data layout reorganization, there will be changes to
42   several structures and functions as a result of coming changes to support
43   memory hotplug in v18.05.
44   ``rte_eal_get_physmem_layout`` will be deprecated and removed in subsequent
45   releases.
46   ``rte_mem_config`` contents will change due to switch to memseg lists.
47   ``rte_memzone`` member ``memseg_id`` will no longer serve any useful purpose
48   and will be removed.
49
50 * eal: a new set of mbuf mempool ops name APIs for user, platform and best
51   mempool names have been defined in ``rte_mbuf`` in v18.02. The uses of
52   ``rte_eal_mbuf_default_mempool_ops`` shall be replaced by
53   ``rte_mbuf_best_mempool_ops``.
54   The following function is now redundant and it is target to be deprecated
55   in 18.05:
56
57   - ``rte_eal_mbuf_default_mempool_ops``
58
59 * mempool: several API and ABI changes are planned in v18.05.
60   The following functions, introduced for Xen, which is not supported
61   anymore since v17.11, are hard to use, not used anywhere else in DPDK.
62   Therefore they will be deprecated in v18.05 and removed in v18.08:
63
64   - ``rte_mempool_xmem_create``
65   - ``rte_mempool_xmem_size``
66   - ``rte_mempool_xmem_usage``
67
68   The following changes are planned:
69
70   - removal of ``get_capabilities`` mempool ops and related flags.
71   - substitute ``register_memory_area`` with ``populate`` ops.
72   - addition of new ops to customize required memory chunk calculation,
73     customize objects population and allocate contiguous
74     block of objects if underlying driver supports it.
75
76 * mbuf: The control mbuf API will be removed in v18.05. The impacted
77   functions and macros are:
78
79   - ``rte_ctrlmbuf_init()``
80   - ``rte_ctrlmbuf_alloc()``
81   - ``rte_ctrlmbuf_free()``
82   - ``rte_ctrlmbuf_data()``
83   - ``rte_ctrlmbuf_len()``
84   - ``rte_is_ctrlmbuf()``
85   - ``CTRL_MBUF_FLAG``
86
87   The packet mbuf API should be used as a replacement.
88
89 * mbuf: The opaque ``mbuf->hash.sched`` field will be updated to support generic
90   definition in line with the ethdev TM and MTR APIs. Currently, this field
91   is defined in librte_sched in a non-generic way. The new generic format
92   will contain: queue ID, traffic class, color. Field size will not change.
93
94 * ethdev: a new Tx and Rx offload API was introduced on 17.11.
95   In the new API, offloads are divided into per-port and per-queue offloads.
96   Offloads are disabled by default and enabled per application request.
97   The old offloads API is target to be deprecated on 18.05. This includes:
98
99   - removal of ``ETH_TXQ_FLAGS_NO*`` flags.
100   - removal of ``txq_flags`` field from ``rte_eth_txconf`` struct.
101   - removal of the offloads bit-field from ``rte_eth_rxmode`` struct.
102
103 * ethdev: the legacy filter API, including
104   ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
105   as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
106   HASH and L2_TUNNEL, is superseded by the generic flow API (rte_flow) in
107   PMDs that implement the latter.
108   Target release for removal of the legacy API will be defined once most
109   PMDs have switched to rte_flow.
110
111 * ethdev: A new rss level field planned in 18.05.
112   The new API add rss_level field to ``rte_eth_rss_conf`` to enable a choice
113   of RSS hash calculation on outer or inner header of tunneled packet.
114
115 * ethdev:  Currently, if the  rte_eth_rx_burst() function returns a value less
116   than *nb_pkts*, the application will assume that no more packets are present.
117   Some of the hw queue based hardware can only support smaller burst for RX
118   and TX and thus break the expectation of the rx_burst API. Similar is the
119   case for TX burst as well as ring sizes. ``rte_eth_dev_info`` will be added
120   with following new parameters so as to support semantics for drivers to
121   define a preferred size for Rx/Tx burst and rings.
122
123   - Member ``struct preferred_size`` would be added to enclose all preferred
124     size to be fetched from driver/implementation.
125   - Members ``uint16_t rx_burst``,  ``uint16_t tx_burst``, ``uint16_t rx_ring``,
126     and ``uint16_t tx_ring`` would be added to ``struct preferred_size``.
127
128 * ethdev: A work is being planned for 18.05 to expose VF port representors
129   as a mean to perform control and data path operation on the different VFs.
130   As VF representor is an ethdev port, new fields are needed in order to map
131   between the VF representor and the VF or the parent PF. Those new fields
132   are to be included in ``rte_eth_dev_info`` struct.
133
134 * ethdev: The prototype and the behavior of
135   ``dev_ops->eth_mac_addr_set()`` will change in v18.05. A return code
136   will be added to notify the caller if an error occurred in the PMD. In
137   ``rte_eth_dev_default_mac_addr_set()``, the new default MAC address
138   will be copied in ``dev->data->mac_addrs[0]`` only if the operation is
139   successful. This modification will only impact the PMDs, not the
140   applications.
141
142 * i40e: The default flexible payload configuration which extracts the first 16
143   bytes of the payload for RSS will be deprecated starting from 18.02. If
144   required the previous behavior can be configured using existing flow
145   director APIs. There is no ABI/API break. This change will just remove a
146   global configuration setting and require explicit configuration.
147
148 * ring: The alignment constraints on the ring structure will be relaxed
149   to one cache line instead of two, and an empty cache line padding will
150   be added between the producer and consumer structures. The size of the
151   structure and the offset of the fields will remain the same on
152   platforms with 64B cache line, but will change on other platforms.