Ivan Malov [Tue, 20 Oct 2020 09:13:11 +0000 (10:13 +0100)]
net/sfc: support flow action flag in MAE backend
The action handler will use MAE action FLAG.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:10 +0000 (10:13 +0100)]
common/sfc_efx/base: support adding flag action to set
This action can be added at any point before DELIVER.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:09 +0000 (10:13 +0100)]
net/sfc: support VLAN push actions in MAE backend
A group of actions (OF_PUSH_VLAN, OF_VLAN_SET_VID and
OF_VLAN_SET_PCP) maps to MAE action VLAN_PUSH.
This action group is supported only for rules which have transfer
attribute, and can be requested once or twice per a rule.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:08 +0000 (10:13 +0100)]
net/sfc: add facilities to handle bundles of actions
There are MAE actions which do not have uniform counterparts
in terms of RTE flow. However, there are bundles of RTE flow
actions which can be considered as such counterparts.
Implement facilities to handle related RTE flow actions as
parts of a whole. These facilities will be used by a later
patch to add support for VLAN PUSH actions bundle.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:07 +0000 (10:13 +0100)]
common/sfc_efx/base: support adding VLAN push action
MAE supports pushing two tags, so this action can
be requested once or twice.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:06 +0000 (10:13 +0100)]
net/sfc: support flow action OF pop VLAN in MAE backend
This action is supported only for rules which have transfer attribute,
and can be requested once or twice per a rule.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:05 +0000 (10:13 +0100)]
common/sfc_efx/base: support adding VLAN pop action to set
MAE supports stripping two tags, so this action can
be requested once or twice.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:04 +0000 (10:13 +0100)]
net/sfc: implement flow insert/remove in MAE backend
Exercise action set allocation / release and action rule
insertion / removal in order to let flow API callers
actually get created flows functioning.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:03 +0000 (10:13 +0100)]
common/sfc_efx/base: add MAE action rule provisioning APIs
Add APIs for action rule insert / remove operations.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:02 +0000 (10:13 +0100)]
common/sfc_efx/base: add MAE action set provisioning APIs
The patch adds APIs for action set allocation / release.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:01 +0000 (10:13 +0100)]
net/sfc: support flow action PHY port in MAE backend
The action handler will use MAE action DELIVER with
MPORT of a given physical port.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:13:00 +0000 (10:13 +0100)]
common/sfc_efx/base: support adding deliver action to set
Introduce a mechanism for adding actions to an action set and
add support for DELIVER action.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:59 +0000 (10:12 +0100)]
net/sfc: support flow item eth in MAE backend
Add support for this flow item to MAE-specific RTE flow implementation.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:58 +0000 (10:12 +0100)]
common/sfc_efx/base: add MAE match fields for Ethernet
Add MCDI-compatible enumeration for these fields and
provide necessary mappings for them to be inserted
directly into mask-value pairs buffer.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:57 +0000 (10:12 +0100)]
net/sfc: support flow item PHY PORT in MAE backend
Add support for this flow item to MAE-specific RTE flow implementation.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:56 +0000 (10:12 +0100)]
common/sfc_efx/base: support setting PPORT in match spec
Add an API for setting mask-value pairs in a match specification
structure and add support for MAE field INGRESS_PORT of type PPORT.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:55 +0000 (10:12 +0100)]
net/sfc: add actions parsing stub to MAE backend
If parsing a flow results in an action set specification
identical to an already existing one, duplication will
be avoided by reusing the list entry of the latter.
Using an attach helper and a reference counter
is meant to serve the said purpose.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:54 +0000 (10:12 +0100)]
common/sfc_efx/base: add action set spec init/fini APIs
The engine is only able to carry out chosen actions on matching packets in
a strict order. No MCDI exists to identify supported actions and the order.
Still, the definition of the latter is available from the FW documentation.
The general idea is to define an action specification structure and supply
a client driver with APIs for adding actions individually, order-dependent.
A client driver is supposed to invoke an API on every action passed by the
application, and if an out-of-order action follows, the API will reject it.
Add an action set specification stub and supply initialise / finalise APIs.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:53 +0000 (10:12 +0100)]
net/sfc: add verify method to flow validate path
The new method is needed to make sure that a flow being
validated will have a chance to be accepted by the FW.
MAE-specific implementation of the method should
compare the class of a rule being validated with
the corresponding classes of active rules, and,
if no matches found, make a request to the FW.
Support for the latter will be added in future.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:52 +0000 (10:12 +0100)]
common/sfc_efx/base: add match specs class comparison API
From MAE standpoint, a flow rule belongs to some class. Field capabilities
advertised by the FW provide a hint on whether changing a particular match
field value or its mask will affect the class of the rule. A client driver
can make use of the concept of a class by comparing a rule being validated
with already inserted ones so that if an existing rule with the same class
is encountered, it will become possible to skip making an explicit request
to the FW because the class of an already inserted rule is wittingly valid.
Implement an API for client drivers to carry out the said class comparison.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:51 +0000 (10:12 +0100)]
net/sfc: validate match spec in MAE backend
Validate the match specification resulting from pattern
parsing within MAE backend in RTE flow implementation.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:50 +0000 (10:12 +0100)]
common/sfc_efx/base: add match spec validate API
MAE has restrictions on what kind of mask a particular field can have in
a match specification. Add an API for client drivers to check
specifications.
The patch defines a field description list, whilst the list itself is
left empty. This is to provide a general idea of how field properties
will be used to validate a match specification. Particular fields
will be added to the list by follow-up patches.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:49 +0000 (10:12 +0100)]
net/sfc: add pattern parsing stub to MAE backend
Add pattern parsing stub, define and implement flow cleanup method.
The latter is needed to free any dynamic structures allocated
during flow parsing.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:48 +0000 (10:12 +0100)]
common/sfc_efx/base: add match spec init/fini APIs
An MAE rule is a function of match criteria and a priority. The said match
criteria have to be provided using "mask-value pairs" packing format which
on its own should not be exposed to client drivers. The latter have to use
a functional interface of sorts in order to generate a match specification.
Define an EFX match specification and implement initialise / finalise APIs.
The "mask-value pairs" buffer itself is not used in this particular patch,
so the corresponding struct member will be added in the follow-up patch.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:47 +0000 (10:12 +0100)]
net/sfc: add concept of MAE (transfer) rules
Define the corresponding specification structure and
make the code identify MAE rules by testing transfer
attribute presence. Also, add a priority level check.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:46 +0000 (10:12 +0100)]
common/sfc_efx/base: add MAE limit query API
Add an API for client drivers to query the engine limits.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:45 +0000 (10:12 +0100)]
drivers: init/fini MAE on attach/detach
These actions affect MAE supplementary resources which are
libefx-internal.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:44 +0000 (10:12 +0100)]
common/sfc_efx/base: add MAE init/fini APIs
The patch adds APIs for client drivers to initialise / finalise
MAE-specific context in NIC control structure. The context
itself will be used by the follow-up patches to store
supportive data for library-internal consumers.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:43 +0000 (10:12 +0100)]
net/sfc: add stub for attaching to MAE
Add a stub for MAE attach / detach path and introduce MAE-specific
context.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Tue, 20 Oct 2020 09:12:42 +0000 (10:12 +0100)]
common/sfc_efx/base: indicate support for MAE
Riverhead boards maintain support for MAE, a low-level Match-Action
Engine.
The feature is documented in SF-122526-TC.
The new field will help client drivers to test NIC support for MAE
status.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Currently there exists inconsistency about name of transmission
policy for a Link Bonding device. "xmit_balance_policy" is not
correct, which should be modified to "balance_xmit_policy".
Fixes: 2950a769315e ("bond: testpmd support") Fixes: ac718398f477 ("doc: testpmd application user guide") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Simei Su [Tue, 20 Oct 2020 11:32:42 +0000 (19:32 +0800)]
net/ice: support ACL filter in DCF
Add ice_acl_create_filter to create a rule and ice_acl_destroy_filter
to destroy a rule. If a flow is matched by ACL filter, filter rule
will be set to HW. Currently IPV4/IPV4_UDP/IPV4_TCP/IPV4_SCTP pattern
and drop action are supported.
Signed-off-by: Simei Su <simei.su@intel.com> Signed-off-by: Xuan Ding <xuan.ding@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Leyi Rong [Mon, 19 Oct 2020 05:42:53 +0000 (13:42 +0800)]
net/iavf: fix unchecked Tx cleanup error
Coverity complains of unchecked return value warning of
iavf_xmit_cleanup, while this cleanup is opportunistic and will not cause
problems if it fails. So instead of checking the return value of
iavf_xmit_cleanup and return in case of cleanup failure, we directly cast
it to void function to make the Coverity happy.
Simei Su [Tue, 20 Oct 2020 08:46:39 +0000 (16:46 +0800)]
net/ice/base: fix bitmap set function
This patch corrects an upper limit value in for loop.
Fixes: dd4a3cef556a ("net/ice/base: introduce and use bitmap set API") Cc: stable@dpdk.org Signed-off-by: Simei Su <simei.su@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Guinan Sun [Thu, 15 Oct 2020 08:43:05 +0000 (08:43 +0000)]
net/iavf: fix adding multicast MAC address
When the multicast address list is added, it will flush
previous addresses first, and then add new ones.
If the number of multicast address in the list exceeds
the upper limit, it will cause failure, then need to
roll back previous addresses. This patch fixes the issue.
Fixes: 05e4c3aff35f ("net/iavf: support multicast configuration") Cc: stable@dpdk.org Signed-off-by: Guinan Sun <guinanx.sun@intel.com> Tested-by: Yuan Peng <yuan.peng@intel.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
Dekel Peled [Thu, 15 Oct 2020 13:37:09 +0000 (16:37 +0300)]
net/mlx5: log LRO minimal size
Add debug printout showing HCA capability lro_min_mss_size - the
minimal size of TCP segment required for coalescing.
MLX5 PMD documentation is updated to note this condition.
Dekel Peled [Thu, 15 Oct 2020 11:44:24 +0000 (14:44 +0300)]
net/mlx5: fix use of atomic cmpset for age state
According to documentation [1], function rte_atomic16_cmpset()
return value is non-zero on success; 0 on failure.
In existing code this function is called, and the return value
is compared to AGE_CANDIDATE, which is defined as 1.
Such comparison is incorrect and can lead to unwanted behavior.
This patch updates the calls to rte_atomic16_cmpset(), to check
that the return value is 0 or non-zero.
Dekel Peled [Thu, 15 Oct 2020 14:05:57 +0000 (17:05 +0300)]
net/mlx5: enforce limitation on IPv6 next protocol
Due to PRM requirement, the IPv6 header item 'proto' field, indicating
the next header protocol, should not be set as extension header.
This patch adds the relevant validation, and documents the limitation.
Signed-off-by: Dekel Peled <dekelp@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com>
Dekel Peled [Thu, 15 Oct 2020 14:05:56 +0000 (17:05 +0300)]
net/mlx5: support match on IPv6 fragment extension
rte_flow update, following RFC [1], added to ethdev the rte_flow item
ipv6_frag_ext.
This patch adds to MLX5 PMD the option to match on this item type.
Dekel Peled [Thu, 15 Oct 2020 14:05:55 +0000 (17:05 +0300)]
net/mlx5: support match on IPv6 fragment packets
This patch adds to MLX5 PMD the support of matching on IPv6
fragmented and non-fragmented packets, using the new field
has_frag_ext, added to rte_flow following RFC [1].
Dekel Peled [Thu, 15 Oct 2020 14:05:53 +0000 (17:05 +0300)]
net/mlx5: remove handling of ICMP fragmented packets
Commit [1] forced setting of match on 'frag' bit mask 1 and value 0.
Previous patch in this series added support of match on fragmented and
non-fragmented packets on L3 items, so this setting is now redundant.
This patch removes the changes done in [1].
[1] commit 85407db9f60d ("net/mlx5: fix matching for ICMP fragments")
Signed-off-by: Dekel Peled <dekelp@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com>
Matan Azrad [Thu, 15 Oct 2020 06:38:13 +0000 (06:38 +0000)]
net/mlx5/linux: fix Tx queue operations decision
One of the conditions to create Tx queue object by DevX is to be sure
that the DPDK mlx5 driver is not going to be the E-Switch manager of
the device. The issue is with the default FDB flows managed by the
kernel driver, which are not created by the kernel when the Tx queues
are created by DevX.
The current decision is to create the Tx queues by Verbs when E-Switch
is enabled while the current behavior uses an opposite condition to
create them by DevX.
Create the Tx queues by Verbs when E-Switch is enabled.
Matan Azrad [Thu, 15 Oct 2020 06:38:12 +0000 (06:38 +0000)]
net/mlx5: fix event queue number query
When a Rx\Tx queue is created by DevX, its CQ configuration should
include the EQ number of the interrupts.
The EQ is managed by the kernel and there is a glue API in order to
query the EQ number from the kernel.
The EQ query API gets a vector number specifies the kernel vector of
the interrupt handling.
The vector number was wrongly detected according to the configuration
CPU instead of using the device attributes of the supported vectors.
The CPU was wrongly detected by the rte_lcore_to_cpu_id API without any
check, and in case of non-EAL thread context the value was 0xFFFFFFFF
which caused a failure in the EQ number query API.
Use vector 0 for each EQ number query which must be supported by the
kernel.
Fixes: 08d1838f645a ("net/mlx5: implement CQ for Rx using DevX API") Fixes: d133f4cdb706 ("net/mlx5: create clock queue for packet pacing") Cc: stable@dpdk.org Signed-off-by: Matan Azrad <matan@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Matan Azrad [Thu, 15 Oct 2020 06:38:11 +0000 (06:38 +0000)]
net/mlx5: fix Tx queue release
The HW objects of the Tx queue is created/destroyed in the device
start\stop stage while the ethdev configurations for the Tx queue
starts from the tx_queue_setup stage.
The PMD should save all the last configurations it got from the ethdev
and to apply them to the device in the dev_start operation.
Wrongly, last code added to mitigate the reference counters didn't take
into account the above rule and combined the configurations and HW
objects to be created\destroyed together.
This causes to memory leak and other memory issues.
Make sure the HW object is released in stop operation when there is no
any reference to it while the configurations stay saved.
Matan Azrad [Thu, 15 Oct 2020 06:38:10 +0000 (06:38 +0000)]
net/mlx5: fix Rx queue release
The HW objects of the Rx queue is created/destroyed in the device
start\stop stage while the ethdev configurations for the Rx queue
starts from the rx_queue_setup stage.
The PMD should save all the last configurations it got from the ethdev
and to apply them to the device in the dev_start operation.
Wrongly, last code added to mitigate the reference counters didn't take
into account the above rule and combined the configurations and HW
objects to be created\destroyed together.
This causes to memory leak and other memory issues.
Make sure the HW object is released in stop operation when there is no
any reference to it while the configurations stay saved.
Ciara Power [Thu, 17 Sep 2020 15:03:41 +0000 (16:03 +0100)]
metrics: fix memory leak on allocation failure
If an error occurred when allocating memory for metrics or names,
the function returned without freeing allocated memory. This is now
fixed to avoid the resource leak in the case that either metrics or
names had been successfully allocated memory.
Coverity issue: 362053 Fixes: c5b7197f662e ("telemetry: move some functions to metrics library") Cc: stable@dpdk.org Reported-by: Gaurav Singh <gaurav1086@gmail.com> Signed-off-by: Ciara Power <ciara.power@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
Anatoly Burakov [Mon, 2 Nov 2020 12:57:36 +0000 (12:57 +0000)]
eal: fix power intrinsics API description
Currently, the intrinsics documentation refers to `rte_cpu_get_features`
as a check for whether these intrinsics are supported at runtime. This
is incorrect, because actually the user should use the
`rte_cpu_get_intrinsics_support` API to do said check. Fix the typo.
Fixes: 128021421256 ("eal: add intrinsics support check infrastructure") Reported-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Liang Ma <liang.j.ma@intel.com>
Yi Yang [Mon, 26 Oct 2020 06:47:13 +0000 (14:47 +0800)]
gso: fix mbuf freeing responsibility
rte_gso_segment decreased refcnt of pkt by one, but
it is wrong if pkt is external mbuf, pkt won't be
freed because of incorrect refcnt, the result is
application can't allocate mbuf from mempool because
mbufs in mempool are run out of.
One correct way is application should call
rte_pktmbuf_free after calling rte_gso_segment to free
pkt explicitly. rte_gso_segment must not handle it, this
should be responsibility of application.
This commit changed rte_gso_segment in functional behavior
and return value, so the application must take appropriate
actions according to return values, "ret < 0" means it
should free and drop 'pkt', "ret == 0" means 'pkt' isn't
GSOed but 'pkt' can be transmitted as a normal packet,
"ret > 0" means 'pkt' has been GSOed into two or multiple
segments, it should use "pkts_out" to transmit these
segments. The application must free 'pkt' after call
rte_gso_segment when return value isn't equal to 0.
Fixes: 119583797b6a ("gso: support TCP/IPv4 GSO") Cc: stable@dpdk.org Signed-off-by: Yi Yang <yangyi01@inspur.com> Acked-by: Jiayu Hu <jiayu.hu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Dmitry Kozlyuk [Fri, 30 Oct 2020 18:42:16 +0000 (21:42 +0300)]
eal/windows: fix deadlock when setting alarm
Windows alarms are both armed and executed from the interrupt thread.
rte_eal_alarm_set() dispatched alarm-arming code to that thread and
waited for its completion via a spinlock. However, if called from alarm
callback (i.e. from the interrupt thread), this caused a deadlock,
because arming could not be run until its dispatcher exits, but it could
only exit after it finished waiting for arming to complete.
Call arming code directly when running in the interrupt thread.
Pallavi Kadam [Mon, 26 Oct 2020 18:44:58 +0000 (11:44 -0700)]
eal/windows: allow running as non-admin
Currently, since there is no runtime directory set, the code tries to
create a file in C:\ which is only writable with administrator
privileges. As a result, if the user is not admin, the application will
fail.
So, forcing no_shconf to 1 to prevent the code having to create files in
the runtime directory.
Vimal Chungath [Tue, 3 Nov 2020 18:06:45 +0000 (10:06 -0800)]
config/arm: add Graviton2
Add meson build configuration for Graviton2 platform
with 64-bit Arm Neoverse N1 cores. This patch makes the
following changes to generic Neoverse N1 config:
1. increase lcore limit to 64
2. increase memory support to 1TB
3. remove +crc from -march as that is default when setting armv8.2
For more information about Graviton2 platform, refer to:
https://aws.amazon.com/ec2/graviton/
Pablo de Lara [Thu, 22 Oct 2020 16:20:58 +0000 (16:20 +0000)]
test/crypto: disable wireless cases for CPU crypto API
SNOW3G, KASUMI and ZUC algorithms have been added to
aesni_mb PMD in this release. These algorithms are not supported
for the crypto synchronous API, so the crypto tests for these algorithms
are disabled.
Fixes: ae8e085c608d ("crypto/aesni_mb: support KASUMI F8/F9") Fixes: 6c42e0cf4d12 ("crypto/aesni_mb: support SNOW3G-UEA2/UIA2") Fixes: fd8df85487c4 ("crypto/aesni_mb: support ZUC-EEA3/EIA3") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Creation of a session mempool may fail in the case of a single lcore
and a low number of SA.
In case when there is only one lcore and number of configures SA less
then (0.5 * CDEV_MP_CACHE_SZ) then creation of the mempool fails with
EINVAL. This is because the number of requested items is less than
(cache size * CDEV_MP_CACHE_MULTIPLIER).
Hence, the number of elements in mempool is increased in such cases.
Arek Kusztal [Wed, 14 Oct 2020 05:07:00 +0000 (06:07 +0100)]
doc: remove notice about AES-GCM IV and J0
This patch removes information about deprecation of AES-GCM/GMAC
API for IV without J0.
Fixes: fac52fb26a54 ("cryptodev: add option to support both IV and J0 for GCM") Cc: stable@dpdk.org Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Adam Dybkowski [Tue, 13 Oct 2020 14:10:15 +0000 (15:10 +0100)]
doc: update VFIO usage in qat crypto guide
This patch marks the old igb-uio driver as unsecure when used
with the QAT PMD and updates all examples to recommend using
VFIO-PCI instead.
It also mentions security issues with the QAT CPM and provides
information about the new VFIO-PCI parameter 'disable_denylist'
available in Linux kernels 5.9 and later.
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Since the built driver filenames have changed in DPDK 20.11, we need to
update the driver doc to match.
Most drivers start their section with the driver filename highlighted in
bold, while a number were missing the highlight. When updating the names,
add the markers for bold text to any missing it, so as to have things more
consistent.
Fixes: a20b2c01a7a1 ("build: standardize component names and defines") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Thomas Monjalon [Mon, 2 Nov 2020 19:51:00 +0000 (20:51 +0100)]
ethdev: include mbuf registration in Tx timestamp API
Previously, the Tx timestamp field and flag were registered in testpmd,
as described in mlx5 guide.
For consistency between Rx and Tx timestamps,
managing mbuf registrations inside the driver, as properly documented,
is a simpler expectation.
The only driver to support this feature (mlx5) is updated
as well as the testpmd application.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thomas Monjalon [Wed, 28 Oct 2020 13:21:00 +0000 (14:21 +0100)]
mbuf: remove deprecated timestamp field
As announced in the deprecation note, the field timestamp
is removed to give more space to the dynamic fields.
The related offload flag PKT_RX_TIMESTAMP is also removed.
This is how the mbuf layout looks like (pahole-style):
Thomas Monjalon [Mon, 2 Nov 2020 19:53:44 +0000 (20:53 +0100)]
ethdev: add doxygen comment for Rx timestamp API
The offload flag DEV_RX_OFFLOAD_TIMESTAMP had no documentation.
After switching to dynamic mbuf flag and field,
it becomes even more important to explicit the feature behaviour.
A doxygen comment for the timesync API was mentioning
the deprecated timestamp field, so it is also updated.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thomas Monjalon [Thu, 29 Oct 2020 03:14:59 +0000 (04:14 +0100)]
net/mlx5: fix dynamic mbuf offset lookup check
The functions rte_mbuf_dynfield_lookup() and rte_mbuf_dynflag_lookup()
can return an offset starting with 0 or a negative error code.
In reality the first offsets are probably reserved forever,
but for the sake of strict API compliance,
the checks which considered 0 as an error are fixed.
Fixes: efa79e68c8cd ("net/mlx5: support fine grain dynamic flag") Fixes: 3172c471b86f ("net/mlx5: prepare Tx queue structures to support timestamp") Fixes: 0febfcce3693 ("net/mlx5: prepare Tx to support scheduling") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thomas Monjalon [Thu, 29 Oct 2020 02:26:41 +0000 (03:26 +0100)]
net/ark: switch Rx timestamp to dynamic mbuf field
The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related dynamic mbuf flag is set, although was missing previously.
The timestamp is set if configured for at least one device.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thomas Monjalon [Wed, 28 Oct 2020 23:55:16 +0000 (00:55 +0100)]
latency: switch Rx timestamp to dynamic mbuf field
The mbuf timestamp is moved to a dynamic field
in order to allow removal of the deprecated static field.
The related mbuf flag is also replaced with the dynamic one.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thomas Monjalon [Wed, 28 Oct 2020 13:20:44 +0000 (14:20 +0100)]
mbuf: add Rx timestamp flag and helpers
There is already a dynamic field for timestamp,
used only for Tx scheduling with the dedicated Tx offload flag.
The same field can be used for Rx timestamp filled by drivers.
A new dynamic flag is defined for Rx usage.
A new function wraps the registration of both field and Rx flag.
The type rte_mbuf_timestamp_t is defined for the API users.
After migrating all Rx timestamp usages, it will be possible
to remove the deprecated timestamp field.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thomas Monjalon [Wed, 28 Oct 2020 23:22:58 +0000 (00:22 +0100)]
eventdev: remove software Rx timestamp
This a revert of the commit 569758758dcd ("eventdev: add Rx timestamp").
If the Rx timestamp is not configured on the ethdev port,
there is no reason to set one.
Also the accuracy of the timestamp was bad because set at a late stage.
Anyway there is no trace of the usage of this timestamp.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thomas Monjalon [Fri, 23 Oct 2020 17:41:30 +0000 (19:41 +0200)]
regex/octeontx2: fix driver name
Following the recent alignment of all driver names,
this new driver get unaligned:
librte_regex_octeontx2_regex.so
The 'fmt_name' must be "octeontx2_regex", and if not provided,
is taken from the 'name' variable.
But the variable 'name' should not be overwritten,
to keep the automatic value from the directory name.
The library name will be composed of the class directory
and the driver directory name:
librte_regex_octeontx2.so
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com>