Morten Brørup [Tue, 19 May 2020 15:27:25 +0000 (15:27 +0000)]
ring: optimize empty test
Testing if the ring is empty is as simple as comparing the producer and
consumer pointers.
In theory, this optimization reduces the number of potential cache misses
from 3 to 2 by not having to read r->mask in rte_ring_count().
The modification of this function were also discussed in the RFC here:
https://mails.dpdk.org/archives/dev/2020-April/165752.html
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Morten Brørup [Tue, 19 May 2020 15:27:24 +0000 (15:27 +0000)]
ring: cleanup coding style
Fix coding style violations that checkpatch will complain about.
Add missing "int" after "unsigned".
Add missing spaces around "+=" and "+".
Remove superfluous type cast of numerical constant.
Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Feifei Wang [Sun, 28 Jun 2020 06:23:47 +0000 (14:23 +0800)]
ring: fix tail in peek API for ST mode
The value of *tail should be the prod->tail not prod->head. After
modification, it can record 'tail' so head/tail can be updated
accordingly.
Fixes:
664ff4b1729b ("ring: introduce peek style API")
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Feifei Wang [Wed, 10 Jun 2020 05:57:04 +0000 (13:57 +0800)]
ring: fix bulk enqueue for HTS/RTS ring modes
Remove the unwanted call to "_rte_ring_do_enqueue_elem" to allow for
correct handling of RTS/HTS modes.
Fixes:
e6ba4731c0f3 ("ring: introduce RTS ring mode")
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Feifei Wang [Mon, 8 Jun 2020 05:58:46 +0000 (13:58 +0800)]
test/ring: fix statistics in bulk enq/dequeue
In size 32 bulk ring enq/dequeue performance test, the "Total count"
statistics is incorrect. For example, running the test on lcore 25 and
lcore 26, the output is as follows:
The test command:
$sudo ./arm64-armv8a-linuxapp-gcc/app/test -l 25-26
RTE>>ring_perf_autotest
Bulk enq/dequeue count on size 32
Core [25] count = 288268
Core [26] count = 288281
Total count (size: 32):
1066323
Fixed it by reset the counter at the beginning of each loop. The
revised output is as follows:
Bulk enq/dequeue count on size 32
Core [25] count = 285643
Core [26] count = 285688
Total count (size: 32): 571331
Fixes:
759cf9b5632c ("test/ring: enhance mp/mc coverage")
Cc: stable@dpdk.org
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Ciara Loftus [Thu, 25 Jun 2020 13:39:50 +0000 (13:39 +0000)]
net/af_xdp: revert to MP/MC ring for copy mode
This reverts commit
489e0b5b33209d929dc490cc591abd840dcefdfc.
The ring used in copy mode should be multi-producer multi-consumer
because enqueues and dequeues to the ring are performed on both the rx
and tx paths, which can be running on different threads.
Fixes:
489e0b5b3320 ("net/af_xdp: use single producer/consumer ring")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Ciara Loftus [Tue, 23 Jun 2020 14:29:25 +0000 (14:29 +0000)]
net/af_xdp: improve packet loss
This commit makes some changes to the AF_XDP PMD in an effort to improve
its packet loss characteristics.
1. In the case of failed transmission due to inability to reserve a tx
descriptor, the PMD now pulls from the completion ring, issues a
syscall in which the kernel attempts to complete outstanding tx
operations, then tries to reserve the tx descriptor again. Prior to
this we dropped the packet after the syscall and didn't try to
re-reserve.
2. During completion ring cleanup, always pull as many entries as
possible from the ring as opposed to the batch size or just how many
packets we're going to attempt to send. Keeping the completion ring
emptier should reduce failed transmissions in the kernel, as the
kernel requires space in the completion ring to successfully tx.
3. Size the fill ring as twice the receive ring size which may help
reduce allocation failures in the driver.
4. Emulate a tx_free_thresh - when the number of available entries in
the completion ring rises above this, we pull from it. The threshold
is set to 1k entries.
With these changes, a benchmark which measured the packet rate at which
0.01% packet loss could be reached improved from ~0.1G to ~3Gbps.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Ciara Loftus [Tue, 30 Jun 2020 12:04:58 +0000 (12:04 +0000)]
maintainers: update for af_xdp
Replace Xiaolong Ye with Ciara Loftus.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiaolong Ye [Thu, 18 Jun 2020 14:14:11 +0000 (22:14 +0800)]
maintainers: resign from next-net-intel/virtio/vhost/af_xdp
I will leave Intel soon and likely won't have dedicated time for
maintainership, so removing my name from all related maintainer roles.
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Matan Azrad [Thu, 18 Jun 2020 19:08:20 +0000 (19:08 +0000)]
vhost: fix features definition location
The vhost library provide an infrastructure in order to help the DPDK
users to manage vhost devices.
One of the infrastructure parts is the features enablement APIs.
Some features bits may be defined only in the internal file vhost.h in
case the kernel version doesn't include them.
Hence, user running on old kernel may not be able to manage thus
features.
Move all the feature bits definitions to the API file rte_vhost.h.
Fixes:
db69be54b6ff ("vhost: hide internal code")
Fixes:
8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kernels")
Fixes:
3d3c6590b58c ("vhost: enable virtio MTU feature")
Fixes:
704098fc478c ("vhost: fix build with old kernels")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Joyce Kong [Wed, 24 Jun 2020 08:45:10 +0000 (16:45 +0800)]
net/virtio: simplify variable name
Virtio_hw *hw has been pointed to vq->hw, it is better to use
hw instead of vq->hw in later code.
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Matan Azrad [Mon, 29 Jun 2020 14:08:21 +0000 (14:08 +0000)]
vdpa/mlx5: support queue update
Last changes in vDPA device management by vhost library may cause queue
ready state update after the device configuration.
So, there is chance that some queue configuration information will be
known only after the device was configured.
Add support to reconfigure a queue after the device configuration
according to the queue state update and the configuration changes.
Adjust the host notifier and the guest notification configuration to be
per queue and to be applied in the enablement process.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Matan Azrad [Mon, 29 Jun 2020 14:08:20 +0000 (14:08 +0000)]
vhost: notify virtq file descriptor update
When virtq call or kick file descriptors are changed in the device
configuration when the queue is ready, the application and the vDPA
driver should be notified to be aligned to the new file descriptors.
Notify the state to be disabled before the file descriptor update and
return it back to be enabled after the update.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Matan Azrad [Mon, 29 Jun 2020 14:08:19 +0000 (14:08 +0000)]
vhost: handle memory hotplug with vDPA devices
Some vDPA drivers' basic configurations should be updated when the
guest memory is hotplugged.
Close vDPA device before hotplug operation and recreate it after the
hotplug operation is done.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Matan Azrad [Mon, 29 Jun 2020 14:08:18 +0000 (14:08 +0000)]
vhost: improve device readiness notifications
Some guest drivers may not configure disabled virtio queues.
In this case, the vhost management never notifies the application and
the vDPA device readiness because it waits to the device to be ready.
The current ready state means that all the virtio queues should be
configured regardless the enablement status.
In order to support this case, this patch changes the ready state:
The device is ready when at least 1 queue pair is configured and
enabled.
So, now, the application and vDPA driver are notifies when the first
queue pair is configured and enabled.
Also the queue notifications will be triggered according to the new
ready definition.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Matan Azrad [Mon, 29 Jun 2020 14:08:17 +0000 (14:08 +0000)]
vhost: skip access lock when vDPA is configured
No need to take access lock in the vhost-user message handler when
vDPA driver controls all the data-path of the vhost device.
It allows the vDPA set_vring_state operation callback to configure
guest notifications.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Matan Azrad [Mon, 29 Jun 2020 14:08:16 +0000 (14:08 +0000)]
vhost: support host notifier queue configuration
As an arrangement to per queue operations in the vDPA device it is
needed to change the next experimental API:
The API ``rte_vhost_host_notifier_ctrl`` was changed to be per queue
instead of per device.
A `qid` parameter was added to the API arguments list.
Setting the parameter to the value RTE_VHOST_QUEUE_ALL configures the
host notifier to all the device queues as done before this patch.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Matan Azrad [Mon, 29 Jun 2020 14:01:56 +0000 (14:01 +0000)]
vdpa/mlx5: control completion queue event mode
The CQ polling is necessary in order to manage guest notifications when
the guest doesn't work with poll mode (callfd != -1).
The CQ polling scheduling method can affect the host CPU utilization and
the traffic bandwidth.
Define 3 modes to control the CQ polling scheduling:
1. A timer thread which automatically adjusts its delays to the coming
traffic rate.
2. A timer thread with fixed delay time.
3. Interrupts: Each CQE burst arms the CQ in order to get an interrupt
event in the next traffic burst.
When traffic becomes off, mode 3 is taken automatically.
The interrupt management takes a lot of CPU cycles but forward traffic
event to the guest very fast.
Timer thread save the interrupt overhead but may add delay for the guest
notification.
Add device arguments to control on the mode.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Matan Azrad [Mon, 29 Jun 2020 14:01:55 +0000 (14:01 +0000)]
vdpa/mlx5: optimize completion queue poll
The vDPA driver uses a CQ in order to know when traffic works were
completed by the HW.
Each traffic burst completion adds a CQE to the CQ.
When the vDPA driver detects CQEs in the CQ, it triggers the guest
notification for the corresponding queue and consumes all of them.
There is collapse feature in the HW that configures the HW to write all
the CQEs in the first entry of the CQ.
Using this feature, the vDPA driver can read only the first CQE,
validate that the completion counter inside the CQE was changed and if
so, to notify the guest.
Use CQ collapse feature in order to improve the poll utilization.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Matan Azrad [Mon, 29 Jun 2020 14:01:54 +0000 (14:01 +0000)]
vdpa/mlx5: optimize notification events
When the virtio guest driver doesn't work with poll mode, the driver
creates event mechanism in order to schedule completion notifications
for each virtq burst traffic.
When traffic comes to a virtq, a CQE will be added to the virtq CQ by
the FW.
The driver requests interrupt for the next CQE index, and when interrupt
is triggered, the driver polls the CQ and notifies the guest by virtq
callfd writing.
According to the described method, the interrupts will be triggered for
each burst of traffic. The burst size depends on interrupt latency.
Interrupts management takes a lot of CPU cycles and using it for each
traffic burst takes big portion of CPU capacity.
When traffic is on, using timer for CQ poll scheduling instead of
interrupts saves a lot of CPU cycles.
Move CQ poll scheduling to be done by timer in case of running traffic.
Request interrupts only when traffic is off.
The timer scheduling management is done by a new dedicated thread uses
a usleep command.
Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
David Marchand [Thu, 25 Jun 2020 07:57:41 +0000 (09:57 +0200)]
common/mlx5: remove unneeded experimental build flag
allow_experimental_apis flag has no effect for in-tree compilation.
See https://git.dpdk.org/dpdk/commit/?id=
acec04c4b2f5
Fixes:
72f756605651 ("common/mlx5: move glue files under Linux directory")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
Michael Baum [Wed, 24 Jun 2020 13:50:39 +0000 (13:50 +0000)]
net/mlx5: fix iterator type in Rx queue management
The mlx5_check_vec_rx_support function in the mlx5_rxtx_vec.c file
passes the RX queues array in the loop. Similarly, the mlx5_mprq_enabled
function in the mlx5_rxq.c file passes the RX queues array in the loop.
In both cases, the iterator of the loop is called i and the variable
representing the array size is called rxqs_n.
The i variable is of UINT16_T type while the rxqs_n variable is of
unsigned int type. The size of the rxqs_n variable is much larger than
the number of iterations allowed by the i type, theoretically there may
be a situation where the value of the rxqs_n will be greater than can be
represented by 16 bits and the loop will never end.
Change the type of i to UINT32_T.
Fixes:
7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Fixes:
6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 24 Jun 2020 13:46:41 +0000 (13:46 +0000)]
net/mlx5: use anonymous Direct Verbs allocator argument
The mlx5_dev_spawn function defines an struct mlx5dv_ctx_allocators type
variable several hundred rows after it starts, with the only use it
being passed as a parameter to the mlx5_glue->dv_set_context_attr
function.
However, according to DPDK Coding Style Guidelines, variables should be
declared at the start of a block of code rather than in the middle.
Therefore, to improve the Coding Style, the variable is passed directly
to the function without declaring it before.
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 24 Jun 2020 13:44:27 +0000 (13:44 +0000)]
net/mlx4: remove useless assignment
The mlx4_ibv_device_to_pci_addr function defines a variable called ret
inside a loop and uses it.
During the loop, the function assigns a value within the variable and
breaks from the loop, so that this assigning has done nothing and is
actually unnecessary.
Remove the unnecessary assigning.
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 24 Jun 2020 13:33:50 +0000 (13:33 +0000)]
common/mlx5: remove useless assignment
The mlx5_dev_to_pci_addr function defines a variable called ret inside a
loop and uses it.
During the loop, the function assigns a value within the variable and
breaks from the loop, so that this assigning has done nothing and is
actually unnecessary.
Remove the unnecessary assigning.
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 24 Jun 2020 13:29:55 +0000 (13:29 +0000)]
net/mlx4: use anonymous Direct Verbs allocator argument
The mlx4_pci_probe function defines an struct mlx4dv_ctx_allocators type
variable several hundred rows after it starts, with the only use it
being passed as a parameter to the mlx4_glue->dv_set_context_attr
function.
However, according to DPDK Coding Style Guidelines, variables should be
declared at the start of a block of code rather than in the middle.
Therefore, to improve the Coding Style, the variable is passed directly
to the function without declaring it before.
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 24 Jun 2020 13:23:57 +0000 (13:23 +0000)]
net/mlx5: use direct API to find port by device
Using RTE_ETH_FOREACH_DEV_OF loop is not necessary when the driver wants
to find only the first match.
Use rte_eth_find_next_of to find it.
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Michael Baum [Wed, 24 Jun 2020 13:20:31 +0000 (13:20 +0000)]
common/mlx5: fix code arrangement in tag allocation
Flow tag action is supported only when the driver has DR or DV support.
The tag allocation is adjusted to the modes DV or DR.
In case both DR and DV are not supported in the system, the driver
handles static code for error report.
This error code, wrongly, was compiled when DV is supported while in
this case it cannot be accessed at all.
Ignore the aforementioned static error code in case of DV by
preprocessor commands rearrangement.
Fixes:
cbb66daa3c85 ("net/mlx5: prepare Direct Verbs for Direct Rule")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Shiri Kuzin [Tue, 23 Jun 2020 08:41:07 +0000 (11:41 +0300)]
net/mlx5: add parameter for LACP packets control
The new devarg will control the steering of the lacp traffic.
When setting dv_lacp_by_user = 0 the lacp traffic will be
steered to kernel and managed there.
When setting dv_lacp_by_user = 1 the lacp traffic will
not be steered and the user will need to manage it.
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Shiri Kuzin [Tue, 23 Jun 2020 08:41:06 +0000 (11:41 +0300)]
net/mlx5: add default miss action to flow engine
The new action is an internal mlx5 action that will call
the rdma-core function MLX5DV_FLOW_ACTION_DEFAULT_MISS.
The default miss action will be used when a bond is
configured to allow traffic related to the bond to
be managed in the kernel.
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Shiri Kuzin [Tue, 23 Jun 2020 08:41:05 +0000 (11:41 +0300)]
common/mlx5: add default miss action
Add dv_create_action_default_miss wrapper function
for the action added to the rdma-core
MLX5DV_FLOW_ACTION_DEFAULT_MISS.
When a packet matches MLX5DV_FLOW_ACTION_DEFAULT_MISS
action it is steered to the default miss of the verbs
steering domain.
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Qi Zhang [Tue, 23 Jun 2020 12:29:33 +0000 (20:29 +0800)]
doc: update for ice DCF datapath configuration
Add DCF datapath configuration to release notes.
Add "ice_dcf" driver feature list.
Signed-off-by: Ting Xu <ting.xu@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:37 +0000 (10:38 +0800)]
net/ice: set MAC filter during start for DCF
Add support to add and delete MAC address filter in DCF.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:36 +0000 (10:38 +0800)]
net/ice: enable stats for DCF
Add support to get and reset Rx/Tx stats in DCF. Query stats
from PF.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:35 +0000 (10:38 +0800)]
net/ice: add queue start and stop for DCF
Add queue start and stop in DCF. Support queue enable and disable
through virtual channel. Add support for Rx queue mbufs allocation
and queue reset.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:34 +0000 (10:38 +0800)]
net/ice: add queue config in DCF
Add queues and Rx queue irqs configuration during device start
in DCF. The setup is sent to PF via virtchnl.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:33 +0000 (10:38 +0800)]
net/ice: init RSS during DCF start
Enable RSS initialization during DCF start. Add RSS LUT and
RSS key configuration functions.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:32 +0000 (10:38 +0800)]
net/ice: add Rx queue init in DCF
Enable Rx queues initialization during device start in DCF.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:31 +0000 (10:38 +0800)]
net/ice: add stop flag for device start/stop
Add stop flag for DCF device start and stop.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:30 +0000 (10:38 +0800)]
net/ice: complete queue setup in DCF
Delete original DCF queue setup functions and use ice
queue setup and release functions instead.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:29 +0000 (10:38 +0800)]
net/ice: complete device configure in DCF
Enable device configuration function in DCF.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:28 +0000 (10:38 +0800)]
net/ice: complete device info get in DCF
Add support to get complete device information for DCF, including
Rx/Tx offload capabilities and default configuration.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Qi Zhang [Tue, 23 Jun 2020 02:38:27 +0000 (10:38 +0800)]
net/ice: init RSS and supported RXDID in DCF
Enable RSS parameters initialization and get the supported
flexible descriptor RXDIDs bitmap from PF during DCF init.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:24 +0000 (18:20 +0530)]
net/bnxt: update ULP template database for new opcodes
The ulp template database is updated to support the new
combined opcodes.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:23 +0000 (18:20 +0530)]
net/bnxt: rename fields in device params structure
The fields in the device params structure are renamed to reflect
the usage of those fields.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:52 +0000 (18:19 +0530)]
net/bnxt: support mark action for LFID rules
The ulp mapper changes to support mark actions for non
GFID entries that support only LFID rules.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:51 +0000 (18:19 +0530)]
net/bnxt: add vfr flag to mark manager
Add support for the vfr flag to the mark manager.
The vf representor flag is added to class table so it can be set in
the template details.
Also added the vfr flag process in mark database.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:21 +0000 (18:20 +0530)]
net/bnxt: support internal exact match flows
Added support of internal exact match flows and the action
mark is supported for these flows.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Mike Baucom [Fri, 12 Jun 2020 12:50:18 +0000 (18:20 +0530)]
net/bnxt: refactor mapper opcodes
Unify the opcodes of the different enums into a single enum for reuse of
common processors. Also the ADD_PAD opcode is now SET_TO_ZERO.
This change better reflects the intent of the opcode and allows it to be
used in more circumstances without overloading the term pad.
The fields that were setting a constant zero have now been switched to
use the new SET_TO_ZERO opcode as an optimization. The SET_TO_ZERO does
not copy data into the key/result/mask fields, but rather simply
increments the write pointer.
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:17 +0000 (18:20 +0530)]
net/bnxt: divide ULP template database to smaller modules
The ulp template db file is broken into three parts namely the
table, class and action files.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:16 +0000 (18:20 +0530)]
net/bnxt: remove implicit bitset update for vnic action
The implicit update of the egress vnic action bitset for a flow
that does not specify the forwarding port explicitly is removed.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Fri, 12 Jun 2020 12:50:15 +0000 (18:20 +0530)]
net/bnxt: modify IPv6 VTC flow field parsing
ipv6 vtc_flow contains three fields
1. Version
2. Priority / Traffic Class
3. Flow Label
Currently, these are not parsed separately and also not set separately
in the field bitmap by the flow parser. However, the template treats
them separately. As a result, the flow matching doesn't succeed because
the bitmaps of parser and the template doesn't match.
This patch fixes this problem by parsing the above mentioned fields
individually to align with the template.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:14 +0000 (18:20 +0530)]
net/bnxt: get VF representor action record
Added flow db api to get the vf representor action
record for a given flow.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:13 +0000 (18:20 +0530)]
net/bnxt: support VXLAN encap/decap templates
Two templates are added to ulp template db, an ingress rule
for vxlan decap and an egress rule for vxlan encap.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Shuanglin Wang [Fri, 12 Jun 2020 12:50:12 +0000 (18:20 +0530)]
net/bnxt: set maximum flow count
User could set max flow count by passing a devarg
"-w 0000:0d:00.0,max_num_kflows=64" to a DPDK application;
The value must be not less than 32K and be power-of-2;
the default value is 32K.
Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:08 +0000 (18:20 +0530)]
net/bnxt: refactor and rename some fields and enums
- rename regfile_wr_idx to regfile_idx
The regfile index shall be used for both write and read operations.
Hence the field is renamed.
- remove the unused enum BNXT_ULP_REGFILE_INDEX_CACHE_ENTRY_PTR
- rename the enums in the bnxt_ulp_resource_sub_type
The enums in the bnxt_ulp_resource_sub_type are renamed to reflect
the table types explicitly.
- rename an enum in the regfile index
The BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN is renamed to
BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR since it is the main
action pointer.
- remove cache_tbl_id enums
The bnxt_ulp_cache_tbl_id enums are not required any longer
since the index is now calculated using resource sub type
and direction.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:07 +0000 (18:20 +0530)]
net/bnxt: convert critical resource to enum
The critical resource field in the template table is assigned
enumeration values instead of hard coded values.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:06 +0000 (18:20 +0530)]
net/bnxt: use vport in PHY port action handler
The phy port action handler should get vport details and not
vnic id. The fix is to calculate the vport of the given
port.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:05 +0000 (18:20 +0530)]
net/bnxt: process action templates
Extend index table processing to process action templates.
The index table processing is extended to address encapsulation fields
so that action template index table can be processed by a common index
processing function that can process both class and action index
tables.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:02 +0000 (18:20 +0530)]
net/bnxt: support action bitmap opcode
This enables using the action bitmap to update the action result
fields in the flow creation instead of using computed header fields.
Direction bit needs to be added to the action bitmap during
flow parsing, so that egress flows can be matched to the
template signature.
An example would be the usage of the vlan pop action bitmap that is
used to updated action result field as part of this commit.
Also the ulp action bitmap enumeration values that
contain open flow string are renamed.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:50:00 +0000 (18:20 +0530)]
net/bnxt: remove cache table ID from mapper class table
The cache table id is not needed anymore since the value can
be calculated from resource sub type and direction.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:59 +0000 (18:19 +0530)]
net/bnxt: add resource subtype to class and action tables
Added support for resource sub type to class and action tables
renamed table id to resource type.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:58 +0000 (18:19 +0530)]
net/bnxt: change default identifier to global resource
The default identifier list in ulp mapper is extended to support
other truflow resource types and not just identifiers.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:57 +0000 (18:19 +0530)]
net/bnxt: update compute field list and access macros
The compute field is extended to support action fields and not
just header fields, hence CHF is changed to CF. The access macro
for compute field is renamed to address this.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:56 +0000 (18:19 +0530)]
net/bnxt: add computed header field in result opcode
Added support for computed header fields in the result field
processing. The computed header fields are fields that are extracted
from header fields or derived from data that is not part of the flow
command but shall be used in setting up of the flow rule.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:54 +0000 (18:19 +0530)]
net/bnxt: support more resource functions in flow database
Added support to include more resource functions in the flow
database. The number of bits increased from 3 to 8 for storing
the resource function.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:50 +0000 (18:19 +0530)]
net/bnxt: remove fields from bitmap and mapper table
Remove unnecessary fields from bitmap and mapper table.
- remove svif and VLAN info from header bitmap
The svif and vlan information are removed from header bitmap
signature so that the matching algorithm does not use these
fields to perform matching. So flows with or without vlan
tag could use the same flow template.
- remove mem field from mapper class table
Remove the unused mem field in the ulp mapper class table structure
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Fri, 12 Jun 2020 12:49:49 +0000 (18:19 +0530)]
net/bnxt: distribute makefile to subdirectories
Created sub Makefile for tf_ulp and and tf_core for easy management.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Harman Kalra [Wed, 3 Jun 2020 14:52:13 +0000 (20:22 +0530)]
net/octeontx2: fix DMAC filtering
Issue has been observed where packets are getting dropped
at DMAC filtering if a new dmac address is added before
starting of port.
Fixes:
c43adf61682f ("net/octeontx2: add unicast MAC filter")
Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:41 +0000 (16:04 +0200)]
vhost: split vDPA header file
This patch split the vDPA header file in two, making
rte_vdpa_device structure opaque to the application.
Applications should only include rte_vdpa.h, while drivers
should include both rte_vdpa.h and rte_vdpa_dev.h.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:40 +0000 (16:04 +0200)]
vhost: remove vDPA device count API
This API is no more useful, this patch removes it.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:39 +0000 (16:04 +0200)]
examples/vdpa: remove useless device count
The VDPA example now uses the vDPA class iterator, so
knowing the number of available devices beforehand is
no longer needed.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:38 +0000 (16:04 +0200)]
examples/vdpa: use new wrappers instead of ops
Now that wrappers to query number of queues, Virtio
features and Vhost-user protocol features are available,
let's make the vDPA example to use them.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:37 +0000 (16:04 +0200)]
vhost: introduce wrappers for some vDPA ops
This patch is preliminary work to make the vDPA device
structure opaque to the user application. Some callbacks
of the vDPA devices are used to query capabilities before
attaching to a Vhost port. This patch introduces wrappers
for these ops.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:36 +0000 (16:04 +0200)]
vhost: use linked list for vDPA devices
There is no more notion of device ID outside of vdpa.c.
We can now move from array to linked-list model for keeping
track of the vDPA devices.
There is no point in using array here, as all vDPA API are
used from the control path, so no performance concerns.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:35 +0000 (16:04 +0200)]
vhost: remove useless vDPA API
vDPA is no more used outside of the vDPA internals,
so remove rte_vdpa_get_device() API that is now useless.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:34 +0000 (16:04 +0200)]
vhost: replace device ID in applications
This patch replaces the use of vDPA device ID with
vDPA device pointer. The goals is to remove the vDPA
device ID to avoid confusion with the Vhost ID.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:33 +0000 (16:04 +0200)]
vhost: replace vDPA device ID in Vhost
This removes the notion of device ID in Vhost library
as a preliminary step to get rid of the vDPA device ID.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:32 +0000 (16:04 +0200)]
vhost: replace device ID in vDPA ops
This patch is a preliminary step to get rid of the
vDPA device ID. It makes vDPA callbacks to use the
vDPA device struct as a reference instead of the ID.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:31 +0000 (16:04 +0200)]
vhost: make vDPA framework bus agnostic
This patch makes the vDPA framework to no more
support only PCI devices, but any devices by relying
on the generic device name as identifier.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:30 +0000 (16:04 +0200)]
vhost: introduce vDPA device class
This patch introduces vDPA device class. It will enable
application to iterate over the vDPA devices.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:29 +0000 (16:04 +0200)]
bus/fslmc: fix iterating on a class type
This patches fixes a null pointer dereferencing that happens
when the device string passed to the iterator is NULL. This
situation can happen when iterating on a class type.
For example:
RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) {
...
}
Fixes:
e67a61614d0b ("bus/fslmc: support device iteration")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Maxime Coquelin [Fri, 26 Jun 2020 14:04:28 +0000 (16:04 +0200)]
bus/dpaa: fix iterating on a class type
This patches fixes a null pointer dereferencing that happens
when the device string passed to the iterator is NULL. This
situation can happen when iterating on a class type.
For example:
RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) {
...
}
Fixes:
e79df833d3f6 ("bus/dpaa: support hotplug ops")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
Ruifeng Wang [Wed, 24 Jun 2020 07:10:15 +0000 (15:10 +0800)]
net/i40e: support aarch32
Expand vector PMD support to aarch32.
Enable i40e PMD by default for armv7 make build.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ruifeng Wang [Wed, 24 Jun 2020 07:10:14 +0000 (15:10 +0800)]
net/ixgbe: fix include of vector header file
The include of 'arm_neon.h' causes issues to old gcc and aarch32.
Including 'rte_vect.h' instead fixes these issues.
Fixes:
b20971b6cca0 ("net/ixgbe: implement vector driver for ARM")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ruifeng Wang [Wed, 24 Jun 2020 07:10:13 +0000 (15:10 +0800)]
net/ixgbe: support aarch32
Expand vector PMD support to aarch32.
Enable ixgbe PMD by default for armv7 make build.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ruifeng Wang [Wed, 24 Jun 2020 07:10:12 +0000 (15:10 +0800)]
eal/arm: add vcopyq intrinsic for aarch32
vcopyq_laneq_u32 should be implemented for aarch32 which doesn't have
the intrinsic.
This fixes build of examples/l3fwd for armv7.
Fixes:
3c4b4024c225 ("arch/arm: add vcopyq_laneq_u32 for old gcc")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
David Marchand [Tue, 16 Jun 2020 09:47:00 +0000 (11:47 +0200)]
net/mvpp2: fix non-EAL thread support
Caught by code inspection, for a non-EAL thread identified with
rte_lcore_id() == LCORE_ID_ANY, the code currently arbitrarily uses
lcore 0 while there is no guarantee this lcore is used.
Fixes:
3588aaa68eab ("net/mrvl: fix HIF objects allocation")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Liron Himi <lironh@marvell.com>
Devendra Singh Rawat [Thu, 18 Jun 2020 08:15:55 +0000 (13:45 +0530)]
net/qede: fix multicast drop in promiscuous mode
After enabling promiscuous mode all packets whose destination MAC
address is a multicast address were being dropped. This fix configures
H/W to receive all traffic in promiscuous mode. Promiscuous mode also
overrides allmulticast mode on/off status.
Fixes:
40e9f6fc1558 ("net/qede: enable VF-VF traffic with unmatched dest address")
Cc: stable@dpdk.org
Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Harman Kalra [Wed, 24 Jun 2020 12:46:48 +0000 (18:16 +0530)]
net/octeontx2: support CN98xx
New cn98xx SOC comes up with two NIX blocks wrt
cn96xx, cn93xx, to achieve higher performance.
Also the no of cores increased to 36 from 24.
Adding support for cn98xx where need a logic to
detect if the LF is attached to NIX0 or NIX1 and
then accordingly use the respective NIX block.
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Viacheslav Ovsiienko [Tue, 23 Jun 2020 07:48:34 +0000 (07:48 +0000)]
net/mlx5: fix host physical function representor naming
The new kernel adds the names like "pf0" for Host PCI physical
function representor on Bluefield SmartNIC hosts. This patch
provides correct HPF representor recognition over the kernel
versions 5.7 and laters.
The following port naming formats are supported:
- missing physical port name (no sysfs/netlink key) at all,
master is assumed
- decimal digits (for example "12"), representor is
assumed, the value is the index of attached VF
- "p" followed by decimal digits, for example "p2", master
is assumed
- "pf" followed by PF index, for example "pf0", Host PF
representor is assumed on SmartNIC systems.
- "pf" followed by PF index concatenated with "vf" followed by
VF index, for example "pf0vf1", representor is assumed.
If index of VF is "-1" it is a special case of Host PF
representor, this representor must be indexed in devargs
as 65535, for example representor=[0-3,65535] will
allow representors for VF0, VF1, VF2, VF3 and for host PF.
Fixes:
79aa430721b1 ("common/mlx5: split common file under Linux directory")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Junyu Jiang [Wed, 24 Jun 2020 02:09:39 +0000 (02:09 +0000)]
net/ice: initialize and update RSS based on user config
Initialize and update RSS configure based on user request
(rte_eth_rss_conf) from dev_configure and .rss_hash_update ops.
All previous default configure has been removed.
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ori Kam [Fri, 19 Jun 2020 07:30:09 +0000 (07:30 +0000)]
common/mlx5: move doorbell record from net driver
The creation of DBR can be used by a number of different
Mellanox PMDs. for example RegEx / Net / VDPA.
This commits moves the DBR creation and release functions to common
folder.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Ophir Munk [Fri, 19 Jun 2020 07:30:08 +0000 (07:30 +0000)]
common/mlx5: move some getter functions from net driver
Getter functions such as: 'mlx5_os_get_ctx_device_name',
'mlx5_os_get_ctx_device_path', 'mlx5_os_get_dev_device_name',
'mlx5_os_get_umem_id' are implemented under net directory. To enable
additional devices (e.g. regex, vdpa) to access these getter functions
they are moved under common directory.
As part of this commit string sizes DEV_SYSFS_NAME_MAX and
DEV_SYSFS_PATH_MAX are increased by 1 to make sure that the destination
string size in strncpy() function is bigger than the source string size.
This update will avoid GCC version 8 error -Werror=stringop-truncation.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Suanming Mou [Thu, 18 Jun 2020 08:12:50 +0000 (16:12 +0800)]
net/mlx5: optimize free counter lookup
Currently, when allocate a new counter, it needs loop the whole
container pool list to get a free counter.
In the case with millions of counters allocated, and all the pools
are empty, allocate the new counter will still need to loop the
whole container pool list first, then allocate a new pool to get a
free counter. It wastes the cycles during the pool list traversal.
Add a global free counter list in the container helps to get the free
counters more efficiently.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Suanming Mou [Thu, 18 Jun 2020 07:24:44 +0000 (15:24 +0800)]
net/mlx5: optimize single counter pool search
For single counter, when allocate a new counter, it needs to find the pool
it belongs in order to do the query together.
Once there are millions of counters allocated, the pool array in the
counter container will become very large. In this case, the pool search
from the pool array will become extremely slow.
Save the minimum and maximum counter ID to have a quick check of current
counter ID range. And start searching the pool from the last pool in the
container will mostly get the needed pool since counter ID increases
sequentially.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Suanming Mou [Thu, 18 Jun 2020 07:24:43 +0000 (15:24 +0800)]
net/mlx5: manage shared counters in three-level table
Currently, to check if any shared counter with same ID existing, it will
have to loop the counter pools to search for the counter. Even add the
counter to the list will also not so helpful while there are thousands
of shared counters in the list.
Change Three-Level table to look up the counter index saved in the
relevant table entry will be more efficient.
This patch introduces the Three-level table to save the ID relevant
counter index in the table. Then the next while the same ID comes, just
check the table entry of this ID will get the counter index directly.
No search will be needed.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Suanming Mou [Thu, 18 Jun 2020 07:24:42 +0000 (15:24 +0800)]
net/mlx5: add three-level table utility
For the case which data is linked with sequence increased index, the
array table will be more efficient than hash table once need to search
one data entry in large numbers of entries. Since the traditional hash
tables has fixed table size, when huge numbers of data saved to the hash
table, it also comes lots of hash conflict.
But simple array table also has fixed size, allocates all the needed
memory at once will waste lots of memory. For the case don't know the
exactly number of entries will be impossible to allocate the array.
Then the multiple level table helps to balance the two disadvantages.
Allocate a global high level table with sub table entries at first,
the global table contains the sub table entries, and the sub table will
be allocated only once the corresponding index entry need to be saved.
e.g. for up to 32-bits index, three level table with 10-10-12 splitting,
with sequence increased index, the memory grows with every 4K entries.
The currently implementation introduces 10-10-12 32-bits splitting
Three-Level table to help the cases which have millions of entries to
save. The index entries can be addressed directly by the index, no
search will be needed.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
David Marchand [Wed, 17 Jun 2020 13:53:24 +0000 (15:53 +0200)]
net/mlx5: remove redundant newline from logs
The DRV_LOG macro already appends a newline.
Fixes:
46287eacc1b1 ("net/mlx5: introduce hash list")
Fixes:
860897d2895a ("net/mlx5: reorganize flow tables with hash list")
Fixes:
e484e4032332 ("net/mlx5: optimize tag traversal with hash list")
Fixes:
6801116688fe ("net/mlx5: fix multiple flow table hash list")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
Andrew Rybchenko [Fri, 19 Jun 2020 10:25:23 +0000 (11:25 +0100)]
net/sfc: reap Tx descriptors at least once
Improve cache hit and increase packet rate on benchmarks.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>