Adds the __extension__ attribute to resolve the following warning
with gcc 4.8.5 on CentOS 7:
lib/net/rte_macsec.h:38:2: error: type of bit-field 'short_length' is
a GCC extension [-Werror=pedantic]
Fixes: 0aaf097585 ("ethdev: add MACsec flow item")
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Added support for MACsec in rte_security for offloading
MACsec Protocol operation to inline NIC device or a crypto device.
To support MACsec we cannot just make one security session and
send with the packet to process it. MACsec specifications suggest,
it has 3 different entities - SECY Entity, SC (secure channel) and
SA (security association). And same SA can be used by multiple SCs and
similarly many SECY can have same SCs. Hence, in order to support this
many to one relationships between all entities, 2 new APIs are created -
rte_security_macsec_sc_create and rte_security_macsec_sa_create.
Flow of execution of the APIs would be as
- rte_security_macsec_sa_create
- rte_security_macsec_sc_create
- rte_security_session_create (for secy)
And in case of inline protocol processing rte_flow can be created with
rte_security action. A new flow item will be added for MACsec header.
New APIs are also created for getting SC and SA stats.
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
A new flow item is defined for MACsec flows which can be
offloaded to an inline device. If the flow matches with
MACsec header, device will process as per the security
session created using rte_security APIs.
If an error comes while MACsec processing in HW, PMD will
notify with the events defined in this patch.
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ori Kam <orika@nvidia.com>
Added MACsec protocol header to be used for supporting
MACsec protocol offload in hardware or directly in the application.
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ori Kam <orika@nvidia.com>
Add support to start or stop a particular queue
that is associated with the adapter.
Start function enables the Tx adapter to start enqueueing
packets to the Tx queue.
Stop function stops the Tx adapter from enqueueing any
packets to the Tx queue. The stop API also frees any packets
that may have been buffered for this queue. All in-flight packets
destined to the queue are freed by the adapter runtime until the
queue is started again.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Add `rte_event_vector:elem_offset:12` bit field event vector
structure the bits are taken from `rte_event_vector::rsvd:15`.
The element offset defines the offset into the vector array
at which valid elements start.
The valid elements count will be equal to
`rte_event_vector::nb_elem`.
Update Rx/Tx adapter SW implementation to use elem_offset.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
These are necessary to build when HPET is enabled.
Fixes: 2ff3976e67 ("eal: remove unneeded header includes")
Cc: stable@dpdk.org
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Patch adds new event subtypes for notifying expiry
events upon reaching IPsec SA soft packet expiry and
hard packet/byte expiry limits.
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
SHA3 family algorithms were missing in the array of algorithm strings.
Fixes: 1df800f895 ("crypto/ccp: support SHA3 family")
Cc: stable@dpdk.org
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Clarify mbuf meta data needed for Outbound Inline IPsec processing.
Application needs to provide mbuf.l3_len and L3 type in
mbuf.ol_flags so that like tunnel mode using mbuf.l2_len, transport mode
can make use of l3_len and l3_type to determine perform
proper transport mode IPsec processing.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
GCC 12 raises the following warning:
In function '_mm_loadu_si128',
inlined from 'rte_mov16' at
../lib/eal/x86/include/rte_memcpy.h:507:9,
inlined from 'rte_mov128' at
../lib/eal/x86/include/rte_memcpy.h:549:2,
inlined from 'rte_memcpy_generic' at
../lib/eal/x86/include/rte_memcpy.h:732:4,
inlined from 'rte_memcpy' at
../lib/eal/x86/include/rte_memcpy.h:882:10,
inlined from 'outb_tun_pkt_prepare' at
../lib/ipsec/esp_outb.c:224:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:703:10: error:
array subscript '__m128i_u[15]' is partly outside array bounds of
'const uint8_t[255]' {aka 'const unsigned char[255]'}
[-Werror=array-bounds]
703 | return *__P;
| ^~~~
In file included from ../lib/ipsec/esp_outb.c:17:
../lib/ipsec/pad.h: In function 'outb_tun_pkt_prepare':
../lib/ipsec/pad.h:10:22: note: at offset 240 into object 'esp_pad_bytes'
of size 255
10 | static const uint8_t esp_pad_bytes[IPSEC_MAX_PAD_SIZE] = {
| ^~~~~~~~~~~~~
This patch restrict copy to minimum size.
Bugzilla ID: 1060
Fixes: 6015e6a133 ("ipsec: move inbound and outbound code")
Cc: stable@dpdk.org
Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Added new fields to represent event queue weight and affinity in
rte_event_queue_conf structure. Internal op to get queue attribute is
removed as it is no longer needed. Updated driver to use the new field.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add support to configure and use periodic event timers in
software timer adapter.
The structure ``rte_event_timer_adapter_stats`` is extended
by adding a new field, ``evtim_drop_count``. This stat
represents the number of times an event_timer expiry event
is dropped by the event timer adapter.
Updated the software eventdev pmd timer_adapter_caps_get
callback function to report the support of periodic
event timer capability.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
In rte_event_eth_rx_adapter_queue_add(), sub_event_type of
rte_event structure is reset which can be used by the
application to determine the processing function.
Removed resetting of rte_event::sub_event_type
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
adapter_stop function is stopping the adapter service using
rte_service_runstate_set() API and waiting until
rte_service_may_be_active() API returns stopped state in an
infinite loop.
This results in hang issues if application calls
rte_service_lcore_stop() before adapter stop.
Remove the state check after setting the service state which
avoids running into hang issues. This also makes Tx adapter stop
inline with remaining adapters.
Fixes: a3bbf2e097 ("eventdev: add eth Tx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Add spinlock protection for tx adapter stop and start APIs add
null check for tx adapter service pointer in adapter start/stop APIs.
Fixes: a3bbf2e097 ("eventdev: add eth Tx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Added rte_event_eth_tx_adapter_instance_get() to get the
adapter instance id for specified ethernet device id and
tx queue index.
Added testcase for rte_event_eth_tx_adapter_instance_get().
Added rte_event_eth_tx_adapter_instance_get() details in
prog_guide/event_ethernet_tx_adapter.rst
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Reviewed-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Added rte_event_eth_rx_adapter_instance_get() to get
adapter instance id for specified ethernet device id and
rx queue index.
Added telemetry handler for rte_event_eth_rx_adapter_instance_get().
Added test case for rte_event_eth_rx_adapter_instance_get()
Added rte_event_eth_rx_adapter_instance_get() details in
prog_guide/event_ethernet_rx_adapter.rst
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Reviewed-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.
The patch breaks ABI.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.
The patch breaks ABI.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.
The patch breaks ABI.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.
The patch breaks ABI.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
rte_flow_pick_transfer_proxy() was first added to DPDK 21.11.
Since then, no one has requested any fixes. At the same time,
the API is required by series [1] in OvS for the new release.
[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
The following set of primitives has been introduced in 21.11:
- RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
- RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
- RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
Since then, no one has requested any fixes. At the same time,
the set is required by series [1] in OvS for the new release.
[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
rte_eth_rx_metadata_negotiate() was introduced in DPDK 21.11.
Since then, no one has requested any fixes. At the same time,
the API is required by series [1] in OvS for the new release.
[1] http://patchwork.ozlabs.org/project/openvswitch/list/?series=310415
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX defines are unused
since xmem API removal.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Replacement RTE_MEMPOOL_REGISTER_OPS() should be used instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
MEMPOOL_HEADER_SIZE() is removed. The replacement with RTE_ prefix
is internal only since it is implementation details which are not
required in applications.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
The /help telemetry command prints out the help text for the given
command passed in as parameter. However, entering /help without any
parameters does not give any useful information as to the fact that you
need to pass in a command to get help on. Update the command so it
prints its own help text when called without any parameters.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
When preparing the json response to a telemetry socket query, the code
for prefixing the command name, and appending the file "}" on the end of
the response was duplicated for multiple reply types. Taking this code
out of the switch statement reduces the duplication and makes the code
more maintainable.
For completeness of testing, add in a test case to validate the "null"
response type - the only leg of the switch statement not already covered
by an existing test case in the telemetry_data tests.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Limit the telemetry command characters to the minimum set needed for
current implementations. This prevents issues with invalid json
characters needing to be escaped on replies.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
When strings are added to an dict variable, we need to properly escape
the invalid json characters in the strings.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
When strings are added to an array variable, we need to properly escape
the invalid json characters in the strings.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
For string values returned from telemetry, escape any values that cannot
normally appear in a json string. According to the json spec[1], the
characters than need to be handled are control chars (char value < 0x20)
and '"' and '\' characters.
To handle this, we replace the snprintf call with a separate string
copying and encapsulation routine which checks each character as it
copies it to the final array.
[1] https://www.rfc-editor.org/rfc/rfc8259.txt
Bugzilla ID: 1037
Fixes: 6dd571fd07 ("telemetry: introduce new functionality")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
To save issues with encoding the names of values in dicts, we limit the
allowed names to a subset of character values. This list of allowed
characters can be expanded as necessary in future.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Remove deprecated fdir_conf from device configuration.
Assume that mode is equal to RTE_FDIR_MODE_NONE.
Add internal Flow Director configuration copy in ixgbe and txgbe device
private data since flow API supports requires it. Initialize mode to
the first flow rule mode on the rule validation or creation.
Since Flow Director configuration data types are still used by some
drivers internally, move it from public API to ethdev driver internal
API.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
Remove deprecated ``ETH_VLAN_*`` and ``ETH_QINQ_`` defines.
Use corresponding defines with ``RTE_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Remove deprecated ``DEV_RX_OFFLOAD_*`` and ``DEV_TX_OFFLOAD_`` defines.
Use corresponding defines with ``RTE_ETH_RX_OFFLOAD_`` and
``RTE_ETH_TX_OFFLOAD_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Remove deprecated ``ETH_RSS_*`` defines used for hash function and RETA
size specification. Use corresponding defines with ``RTE_`` prefix
instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Remove deprecated ``ETH_MQ_RX_*`` and ``ETH_MQ_TX_*`` defines.
Use corresponding defines with ``RTE_`` prefix instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Remove deprecated ``ETH_LINK_SPEED_``, ``ETH_SPEED_NUM_`` and
``ETH_LINK_`` defines. Use corresponding defines with ``RTE_`` prefix
instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Add pipeline control path API to manage direct meters. These meters
are identified by a table key, whose entry ID is used as the index
into the meter array.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>