Andy Pei [Tue, 24 May 2022 02:48:17 +0000 (10:48 +0800)]
vdpa/ifc/base: access block device registers
Register address is different between net and blk device.
We are re-using most of the code, when register address is
different, we have to check net and blk device go through
different code.
Signed-off-by: Andy Pei <andy.pei@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Andy Pei [Tue, 24 May 2022 02:48:11 +0000 (10:48 +0800)]
vhost: get vDPA device type
Vhost backend of different devices have different features.
Add an API to get vDPA device type, net device or blk device
currently, so users can set different features for different
kinds of devices.
Signed-off-by: Andy Pei <andy.pei@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Andy Pei [Tue, 24 May 2022 02:48:10 +0000 (10:48 +0800)]
vdpa/ifc: add block device SW live-migration
Add SW live-migration support to block device.
For block device, it is critical that no packet
should be dropped. So when virtio blk device is
paused, make sure hardware last_avail_idx and
last_used_idx are the same. This indicates all
requests have received acks, and no inflight IO.
Signed-off-by: Andy Pei <andy.pei@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Andy Pei [Tue, 24 May 2022 02:48:09 +0000 (10:48 +0800)]
vdpa/ifc: add interrupt relay for block device
For the net device type, only interrupt of rxq needed to be relayed.
But for block, since all the queues are used for both read and write
requests. Interrupt of all queues needed to be relayed.
Signed-off-by: Andy Pei <andy.pei@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Andy Pei [Tue, 24 May 2022 02:48:08 +0000 (10:48 +0800)]
vdpa/ifc: add block operations
For virtio blk device, re-use part of ifc driver ops.
Implement ifcvf_blk_get_config for virtio blk device.
Support VHOST_USER_PROTOCOL_F_CONFIG feature for virtio
blk device.
Signed-off-by: Andy Pei <andy.pei@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Andy Pei [Tue, 24 May 2022 02:48:07 +0000 (10:48 +0800)]
vhost: support vhost message for get/set config
Add support for VHOST_USER_GET_CONFIG and VHOST_USER_SET_CONFIG.
VHOST_USER_GET_CONFIG and VHOST_USER_SET_CONFIG message is only
supported by virtio blk VDPA device.
Signed-off-by: Andy Pei <andy.pei@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Wenwu Ma [Sat, 7 May 2022 13:27:53 +0000 (13:27 +0000)]
vhost: fix deadlock when message handling failed
In vhost_user_msg_handler(), if vhost message handling
failed, we should check whether the queue is locked and
release the lock before returning. Or, it will cause a
deadlock later.
Fixes: 7f31d4ea05ca ("vhost: fix lock on device readiness notification") Cc: stable@dpdk.org Signed-off-by: Wenwu Ma <wenwux.ma@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> Tested-by: Wei Ling <weix.ling@intel.com> Acked-by: David Marchand <david.marchand@redhat.com>
Xuan Ding [Mon, 16 May 2022 11:10:41 +0000 (11:10 +0000)]
examples/vhost: support async dequeue data path
This patch adds the use case for async dequeue API. Vswitch can
leverage DMA device to accelerate vhost async dequeue path.
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com> Signed-off-by: Yuan Wang <yuanx.wang@intel.com> Signed-off-by: Xuan Ding <xuan.ding@intel.com> Tested-by: Yvonne Yang <yvonnex.yang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xuan Ding [Mon, 16 May 2022 11:10:40 +0000 (11:10 +0000)]
vhost: support async dequeue for split ring
This patch implements asynchronous dequeue data path for vhost split
ring, a new API rte_vhost_async_try_dequeue_burst() is introduced.
Signed-off-by: Xuan Ding <xuan.ding@intel.com> Signed-off-by: Yuan Wang <yuanx.wang@intel.com> Tested-by: Yvonne Yang <yvonnex.yang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xuan Ding [Mon, 16 May 2022 11:10:39 +0000 (11:10 +0000)]
vhost: merge sync and async descriptor to mbuf filling
This patch refactors copy_desc_to_mbuf() used by the sync
path to support both sync and async descriptor to mbuf filling.
Signed-off-by: Xuan Ding <xuan.ding@intel.com> Tested-by: Yvonne Yang <yvonnex.yang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xuan Ding [Mon, 16 May 2022 11:10:38 +0000 (11:10 +0000)]
vhost: prepare async for descriptor to mbuf refactoring
This patch refactors vhost async enqueue path and dequeue path to use
the same function async_fill_seg() for preparing batch elements,
which simplifies the code without performance degradation.
Signed-off-by: Xuan Ding <xuan.ding@intel.com> Tested-by: Yvonne Yang <yvonnex.yang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Xuan Ding [Mon, 16 May 2022 11:10:37 +0000 (11:10 +0000)]
vhost: prepare sync for descriptor to mbuf refactoring
This patch extracts the descriptors to buffers filling from
copy_desc_to_mbuf() into a dedicated function. Besides, enqueue
and dequeue path are refactored to use the same function
sync_fill_seg() for preparing batch elements, which simplifies
the code without performance degradation.
Signed-off-by: Xuan Ding <xuan.ding@intel.com> Tested-by: Yvonne Yang <yvonnex.yang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Maxime Coquelin [Tue, 10 May 2022 20:17:18 +0000 (22:17 +0200)]
vhost: add statistics for guest notification
This patch adds a new virtqueue statistic for guest
notifications. It is useful to deduce from hypervisor side
whether the corresponding guest Virtio device is using
Kernel Virtio-net driver or DPDK Virtio PMD.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Maxime Coquelin [Tue, 10 May 2022 20:17:17 +0000 (22:17 +0200)]
net/vhost: move to vhost library statistics API
Now that we have Vhost statistics APIs, this patch replaces
Vhost PMD extended statistics implementation with calls
to the new API. It will enable getting more statistics for
counters that cannot be implemented at the PMD level.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Xuan Ding [Mon, 9 May 2022 04:11:58 +0000 (04:11 +0000)]
doc: fix vhost multi-queue reconnection
Since QEMU 5.2.0 fixes the vhost split ring multi-queue reconnection
issue in commit f66337bdbfda ("vhost-user: save features of multiqueues
if chardev is closed"), this patch updates known issue to indicate
the range of affeacted QEMU versions.
Shuanglin Wang [Mon, 14 Mar 2022 21:23:33 +0000 (14:23 -0700)]
net/bnxt: fix ULP parser to ignore segment offset
Fix ULP parser to ignore segment_offset of IPv4 header.
Currently the IPv4 handler is assuming default setting,
which causes the flow table to be updated incorrectly.
Fixes: 741172be52de ("net/bnxt: refactor flow parser in ULP") Cc: stable@dpdk.org Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com> Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reported by Red Hat QE: with older firmware versions (at least versions
20.6.112.0 and 20.6.143.0), initialisation never succeeds following this
change.
Revert it for now, waiting for a more complete fix.
Thomas Monjalon [Thu, 28 Oct 2021 08:34:57 +0000 (10:34 +0200)]
ethdev: promote port ownership API as stable
The port ownership concept was introduced in ethdev in DPDK 18.02.
Not sure it is used by applications except those using failsafe or netvsc.
It can also be used by libraries or applications to sort out
how ports are controlled.
Hiding sub-ports controlled by failsafe or netvsc look to be enough
justification to promote this API as stable.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Ray Kinsella <mdr@ashroe.eu> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Jiawei Wang [Sat, 2 Apr 2022 07:11:47 +0000 (10:11 +0300)]
ethdev: add IPv4/IPv6 ECN header rewrite action
This patch introduces the IPv4/IPv6 ECN modify field support, and
adds the testpmd CLI commands support.
Usage:
modify_field op set dst_type ipv4_ecn src_type ...
For example:
flow create 0 ingress group 1 pattern eth / ipv4 / end actions
modify_field op set dst_type ipv4_ecn src_type value src_value
0x03 width 2 / queue index 0 / end
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com>
Min Hu (Connor) [Wed, 1 Jun 2022 03:15:13 +0000 (11:15 +0800)]
ethdev: fix port close in secondary process
Secondary process needs to close device to release process private
resources. But secondary process should not be obliged to wait for
device stop before closing ethdev.
Fixes: febc855b358e ("ethdev: forbid closing started device") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Ivan Malov [Thu, 26 May 2022 08:45:50 +0000 (11:45 +0300)]
net/sfc: allow to control the represented entity MAC address
The MAC address is accessed via the representor ethdev's one.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Ivan Malov [Thu, 26 May 2022 08:45:49 +0000 (11:45 +0300)]
common/sfc_efx/base: manage VNIC MAC address by MCDI handle
The board admin may need to assign a MAC address to a guest
VNIC identified by its MCDI handle. Provide an API for that.
In the case when a libefx-based driver is used at the guest,
it will need to check its MAC address using the symmetrical
API if the admin has tweaked it by means of its representor.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@xilinx.com> Acked-by: Ray Kinsella <mdr@ashroe.eu>
David Marchand [Tue, 24 May 2022 20:06:42 +0000 (22:06 +0200)]
app/testpmd: register driver specific commands
Introduce a testpmd API so that drivers can register specific commands.
A driver can list some files to compile with testpmd, by setting them
in the testpmd_sources (driver local) meson variable.
drivers/meson.build then takes care of appending this to a global meson
variable, and adding the driver to testpmd dependency.
Note: testpmd.h is fixed to that it is self sufficient when being
included.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
David Marchand [Tue, 24 May 2022 20:06:41 +0000 (22:06 +0200)]
app/testpmd: mark most cmdline symbols as static
All those symbols don't need to be global, plus it was hiding unused
code such as:
- cmd_set_conntrack_dir_set and cmd_set_conntrack_dir_conntrack in
cmdline.c,
- cmd_create_port_meter_g_action, cmd_create_port_meter_r_action,
cmd_create_port_meter_y_action in cmdline_mtr.c,
Robin Zhang [Thu, 26 May 2022 07:32:15 +0000 (07:32 +0000)]
ethdev: support SFF-8636 module telemetry
Add support for module EEPROM information format defined in
SFF-8636 Rev 2.7.
Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Signed-off-by: Kevin Liu <kevinx.liu@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Robin Zhang [Thu, 26 May 2022 07:32:14 +0000 (07:32 +0000)]
ethdev: support SFF-8472 module telemetry
Add support for module EEPROM information format defined in
SFF-8472 Rev 12.0
Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Signed-off-by: Kevin Liu <kevinx.liu@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Robin Zhang [Thu, 26 May 2022 07:32:13 +0000 (07:32 +0000)]
ethdev: support SFF-8079 module telemetry
Add support for module EEPROM information format defined in
SFF-8079 Rev 1.7.
Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Signed-off-by: Kevin Liu <kevinx.liu@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Robin Zhang [Thu, 26 May 2022 07:32:12 +0000 (07:32 +0000)]
ethdev: add common code for different SFF specs
Add support for SFF-8024 Rev 4.0 of pluggable I/O configuration
and some common utilities for SFF-8436/8636 and SFF-8472/8079.
Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Signed-off-by: Kevin Liu <kevinx.liu@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Robin Zhang [Thu, 26 May 2022 07:32:11 +0000 (07:32 +0000)]
ethdev: add telemetry command for module EEPROM
Add a new telemetry command /ethdev/module_eeprom to dump the module
EEPROM of each port. The format of module EEPROM information follows
the SFF(Small Form Factor) Committee specifications.
Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Signed-off-by: Kevin Liu <kevinx.liu@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Pankaj Gupta [Wed, 25 May 2022 00:40:26 +0000 (17:40 -0700)]
net/vmxnet3: advertise RETA size in device info
Currently the driver assumes that the size of the RETA table is
four times the number of Rx queues at multiple places. However,
it sets it to four times the maximum number of queues (4 * 32 = 128)
when it first initializes the device. Change the other uses to use
the stored value, not the assumed default.
Tested, using testpmd, for different hardware versions on ESXi 7.0
Update 2.
Pankaj Gupta [Wed, 25 May 2022 00:40:25 +0000 (17:40 -0700)]
net/vmxnet3: support version 6
VMXNET3 version 6 supports some new features, including but not limited to:
- Increased maximum MTU up to 9190
- Increased maximum number of Rx and Tx queues
- Removes power-of-two limitations on queue sizes
- Extended interrupt structures (required for additional queues)
Tested, using testpmd, for different hardware versions on ESXi 7.0
Update 2.
Peng Zhang [Thu, 26 May 2022 14:34:44 +0000 (16:34 +0200)]
net/nfp: fix disabling VLAN stripping
"vlan set strip off 0" can't work, due to the incorrect usage
of the mask, it just represent that the status is changed or not,
not represent offloaded or not, so that the driver send the
error control message to the nic.
Now, by first inspect the mask of things that changed, and then
change the requested state if VLAN stripping according the
requested offload status. So this change can fix this bug.
Jiawen Wu [Mon, 30 May 2022 09:30:14 +0000 (17:30 +0800)]
net/ngbe: redesign internal PHY init flow
Add to read efuse values from flash, and disable EEE to improve signal
quality. Remove PHY semaphore to access PHY registers faster. And remove
unnecessary page selection where quick access is required.
When rte_eth_link_get_nowait() is called frequently with LSC disabled by
self-developed applications, eventually the PHY status register will be
accessed frequently. It will cause internal PHY init failure, if they
are done simultaneously. So there is a protection added for internal PHY
init.
Jiawen Wu [Mon, 30 May 2022 09:30:13 +0000 (17:30 +0800)]
net/ngbe: fix PCIe related operations with bus API
When using mailbox to request firmware to enable or disable PCIe bus
master, there is a small probability that mailbox cannot respond.
Change to use rte_pci_read_config() and rte_pci_write_config(), to
avoid this problem.
Fixes: ac6c5e9af56a ("net/ngbe: fix Tx hang on queue disable") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Jiawen Wu [Mon, 30 May 2022 09:30:12 +0000 (17:30 +0800)]
net/ngbe: fix reading M88E1512 PHY mode
For M88E1512 PHY mixed mode, PXE driver overrides PHY mode at load
time. To workaround this problem, change to read PHY mode from flash
instead of register.
Jiawen Wu [Mon, 30 May 2022 09:30:10 +0000 (17:30 +0800)]
net/ngbe: fix reading PHY ID
Change to check low ID register to determine the valid PHY address,
for yt8521s PHY with high ID register value 0. And fix polling
register when expect value is 0, to complete MDIO read.
Joyce Kong [Wed, 25 May 2022 05:56:35 +0000 (05:56 +0000)]
net/memif: fix overwriting of head segment
The 'dst_off' was reset in multi segment case.
This caused memif buffer segment to write to
beginning of mbuf, overwriting previous data.
Fix it with this patch.
Min Hu (Connor) [Wed, 25 May 2022 01:08:28 +0000 (09:08 +0800)]
net/bonding: fix mbuf fast free usage
Usage of 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload has two
constraints: per-queue all mbufs comes from the same mempool and
has refcnt = 1.
Bonding mode Broadcast, Tx mbuf has more than one refcnt.
Bonding mode 8023AD, It contains two mempools separately for LACP
packets and other packets. In Tx or Rx, Fast mbuf free will operate
mbuf from different mempool.
This patch will prevent 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload
when in bonding mode Broadcast and mode 8023AD.
Fixes: 78aecefed955 ("bond: move param parsing in configure step") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Dmitry Kozlyuk [Mon, 7 Mar 2022 12:53:50 +0000 (14:53 +0200)]
app/testpmd: do not poll stopped queues
Calling Rx/Tx functions on a stopped queue is not supported.
Do not run packet forwarding for streams that use stopped queues.
Each stream has a read-only "disabled" field,
so that lcore function can skip such streams.
Forwarding engines can set this field
using a new "stream_init" callback function
by checking relevant queue states,
which are stored along with queue configurations
(not all PMDs implement rte_eth_rx/tx_queue_info_get()
to query the state from there).
Dmitry Kozlyuk [Mon, 7 Mar 2022 16:48:21 +0000 (18:48 +0200)]
app/testpmd: fix use of indirect action after port close
When a port was closed, indirect actions could remain
with their handles no longer valid.
If a newly attached device was assigned the same ID as the closed port,
those indirect actions became accessible again.
Any attempt to use them resulted in an undefined behavior.
Automatically flush indirect actions when a port is closed.
Whether it is allowed to call Rx/Tx functions for a stopped queue
was undocumented. Some PMDs make this behavior a no-op
either by explicitly checking the queue state
or by the way how their routines are implemented or HW works.
No-op behavior may be convenient for application developers.
But it also means that pollers of stopped queues
would go all the way down to PMD Rx/Tx routines, wasting cycles.
Some PMDs would do a check for the queue state on data path,
even though it may never be needed for a particular application.
Also, use cases for stopping queues or starting them deferred
do not logically require polling stopped queues.
Use case 1: a secondary that was polling the queue has crashed,
the primary is doing a recovery to free all mbufs.
By definition the queue to be restarted is not polled.
Use case 2: deferred queue start or queue reconfiguration.
The polling thread must be synchronized anyway,
because queue start and stop are non-atomic.
Prohibit calling Rx/Tx functions on stopped queues.
Chengwen Feng [Fri, 13 May 2022 02:53:54 +0000 (10:53 +0800)]
net/axgbe: fix xstats get return if xstats is null
Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently axgbe PMD
returns zero when xstats is null.
Remove the logic of "return zero when xstats is NULL", and add the logic
of "return the required number of entries when n is lower than the
required number of entries".
Chengwen Feng [Fri, 13 May 2022 02:53:53 +0000 (10:53 +0800)]
net/mvpp2: fix xstats get return if xstats is null
Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently mvpp2 PMD
returns zero when xstats is null.
Remove the logic of "return zero when xstats is NULL", and add the logic
of "return the required number of entries when n is lower than the
required number of entries".
Chengwen Feng [Fri, 13 May 2022 02:53:52 +0000 (10:53 +0800)]
net/ipn3ke: fix xstats get return if xstats is null
Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently ipn3ke PMD
returns zero when xstats is null.
Dedicated check for xstats vs null is not required, since ethdev layer
guarantees that it may be null only if number of entries n is 0 (which
is definitely smaller than total xstats count).
Chengwen Feng [Fri, 13 May 2022 02:53:51 +0000 (10:53 +0800)]
net/hns3: fix xstats get return if xstats is null
Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently hns3 PMD
returns zero when xstats is null.
Dedicated check for xstats vs null is not required, since ethdev layer
guarantees that it may be null only if number of entries n is 0 (which
is definitely smaller than total xstats count).
Fixes: 8839c5e202f3 ("net/hns3: support device stats") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Chengwen Feng [Fri, 13 May 2022 02:53:49 +0000 (10:53 +0800)]
ethdev: clarify null location case in xstats get
When xstats location is null in rte_eth_xstats_get() the return value
is not clearly specified. Some PMDs (eg. hns3/ipn3ke/mvpp2/axgbe) return
zero while others return the required number of elements.
In this patch, special parameter combinations are restricted:
1. highlight that xstats location may be null if and only if n is 0.
2. amend n parameter description to specify that if n is lower than
the required number of elements, the function returns the required
number of elements.
3. specify that if n is zero, the xstats must be NULL, the function
returns the required number of elements (a duplicate which should
help to not very attentive readers).
Add sanity check for null xstats and non-zero n case on API level to
make it unnecessary to care about it in drivers.
Fixes: ce757f5c9a4d ("ethdev: new method to retrieve extended statistics") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Wenwu Ma [Thu, 12 May 2022 01:07:56 +0000 (01:07 +0000)]
app/testpmd: perform SW IP checksum for GRO/GSO packets
The GRO/GSO library doesn't re-calculate checksums for
merged/fragmented packets. If users want the packets to
have correct IP checksums, they should select HW IP
checksum calculation for the port which the packets are
transmitted to. But if the port doesn't support HW IP
checksum, users may perform a SW IP checksum.
Fixes: b7091f1dcfbc ("app/testpmd: enable the heavyweight mode TCP/IPv4 GRO") Fixes: 52f38a2055ed ("app/testpmd: enable TCP/IPv4 VxLAN and GRE GSO") Cc: stable@dpdk.org Signed-off-by: Wenwu Ma <wenwux.ma@intel.com> Reviewed-by: Jiayu Hu <jiayu.hu@intel.com> Tested-by: Wei Ling <weix.ling@intel.com> Acked-by: Yuying Zhang <yuying.zhang@intel.com>
Ivan Malov [Sun, 15 May 2022 15:28:35 +0000 (18:28 +0300)]
net/sfc: improve naming in flow tunnel offload support
Change ambiguous terms "jump rule" and "group rule" to
clearer "tunnel rule" and "switch rule". The new terms
reflect the purpose of these rules in virtual switches.
The module name, "flow tunnel", is replaced by "FT" in
function names to avoid the use of word "tunnel" twice.
Use term "FT context" when referring to tunnel entries.
Also, add "ctx" suffix to "ft" and "ft_id" occurrences.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Huisong Li [Wed, 11 May 2022 02:14:34 +0000 (10:14 +0800)]
app/testpmd: fix port status of bonding slave device
Starting or stopping a bonded port also starts or stops all active slaves
under the bonded port. If this port is a bonded device, we need to modify
the port status of all slaves.
Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding") Cc: stable@dpdk.org Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Acked-by: Aman Singh <aman.deep.singh@intel.com> Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Peng Zhang [Wed, 11 May 2022 01:15:53 +0000 (03:15 +0200)]
net/nfp: make sure MTU is never larger than mbuf size
Setting a MTU larger than mbuf size is not supported by the device but
not prohibited by the driver. This change adds a restriction to the
driver to prevent setting an MTU that is too large.
While at it define the minimum MTU in the device information to describe
the complete supported MTU range.
Fixes: d4a27a3 ("nfp: add basic features") Cc: stable@dpdk.org Signed-off-by: Peng Zhang <peng.zhang@corigine.com> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com> Signed-off-by: Louis Peens <louis.peens@corigine.com> Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com> Reviewed-by: Walter Heymans <walter.heymans@corigine.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Jerin Jacob [Sun, 1 May 2022 14:46:37 +0000 (20:16 +0530)]
ethdev: add protocol based meter input color selection
Currently, meter object supports only DSCP based on input color table,
The patch enhance that to support VLAN based input color table,
color table based on inner field for the tunnel use case, and
support for fallback color per meter if packet based on a different field.
All of the above features are exposed through capability and added
additional capability to specify the implementation supports
more than one input color table per ethdev port.
Suggested-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Ray Kinsella <mdr@ashroe.eu> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Rahul Lakkireddy [Mon, 16 May 2022 19:34:39 +0000 (01:04 +0530)]
net/cxgbe: read firmware configuration file from filesystem
Add support to read firmware configuration file from
/lib/firmware/cxgb4/ path in the filesystem. The firmware
config file is used to enable or disable NIC features before
firmware initialization to help retrieve better debug data to
analyze firmware init failures. The config file can also
be used to redistribute resources, like queues, TCAMs, etc.,
from disabled physical functions (PFs) to main PF, before
firmware init.
net/cxgbe: track packets dropped by TP due to congestion
Transport Processor (TP) on the NIC delivers the incoming packets
from the wire to NIC's DMA engine to place the packets in Rx buffers.
TP sends signal towards the Multi-Port Switch (MPS) near the MAC when
the Rxqs run out of Rx buffers posted by driver. These MPS buffer drop
stats are already accounted for in imissed counters. However, if a
large number of Rxqs run out of Rx buffers simultaneously, then the
TP can start dropping packets by itself when there is heavy congestion
on the channel and hence could not inform to the MPS. So, track these
packets dropped by TP in imissed counters. Also add xstats for these
counters.
Kevin Laatz [Thu, 2 Jun 2022 15:13:39 +0000 (16:13 +0100)]
examples/l3fwd_power: add configuration options
Add CLI options to l3fwd_power to utilize the new power APIs introduced in
this patchset. These CLI options allow the user to configure the
heuritstics made available through the new API via the l3fwd_power
application options.
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Kevin Laatz [Thu, 2 Jun 2022 15:13:38 +0000 (16:13 +0100)]
power: add get/set min/max scaling frequencies API
Add new get/set API to allow the user or application to set the minimum
and maximum frequencies to use when scaling.
Previously, the frequency range was determined by the HW capabilities of
the CPU. With this new API, the user or application can constrain this
if required.
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Acked-by: Ray Kinsella <mdr@ashroe.eu> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: David Hunt <david.hunt@intel.com>
Arek Kusztal [Wed, 1 Jun 2022 09:02:49 +0000 (10:02 +0100)]
cryptodev: add RSA padding salt length and label
- Added salt length and optional label.
Common parameters to PSS and OAEP padding for RSA.
- Changed RSA hash padding fields names.
Now it corresponds to the RSA documents.
Arek Kusztal [Wed, 1 Jun 2022 09:02:48 +0000 (10:02 +0100)]
cryptodev: clarify RSA verify with none padding
- Clarified where should output be stored of signature
decryption with padding none.
PMD is not able to know what padding algorithm was used,
therefore decrypted signature should be returned to the user.
- Removed incorrect big-endian constraints.
Not all data in RSA can be treated as big endian integer,
therefore some of the constraints were lifted.
Arek Kusztal [Wed, 1 Jun 2022 09:02:47 +0000 (10:02 +0100)]
cryptodev: move RSA padding into separate struct
- move RSA padding into separate struct.
More padding members should be added into padding,
therefore having separate struct for padding parameters will
make this more readable.
Arek Kusztal [Wed, 1 Jun 2022 09:02:45 +0000 (10:02 +0100)]
cryptodev: add asym operation flags
- Added flags to rte_crypto_asym_op struct.
It may be shared between different algorithms.
- Added Diffie-Hellman padding flags.
Diffie-Hellman padding is used in certain protocols,
in others, leading zero bytes need to be stripped.
Even same protocol may use a different approach - most
glaring example is TLS1.2 - TLS1.3.
For ease of use, and to avoid additional copy
on certain occasions, driver should be able to return both.