Commit Graph

33684 Commits

Author SHA1 Message Date
Chaoyong He
b188042195 net/nfp: add initial flower firmware support
Adds the basic probing infrastructure to support the flower firmware
application.

Adds the cpp service, used for some user tools.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-05 18:09:21 +02:00
Chaoyong He
d5f39e07e9 net/nfp: move application firmware init to own function
The NFP card can load different firmware applications.
This commit move the init logic of corenic app of the
secondary process into its own function.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-05 18:09:21 +02:00
Chaoyong He
7feb8909ca net/nfp: simplify initialization
Calling nfp_net_init() is only done for the corenic firmware flavor
and it is guaranteed to always be called from the primary process,
so the explicit check for RTE_PROC_PRIMARY can be dropped.

The calling graph of nfp_net_init() already guaranteed the free of
resources when it fail, so remove the necessary free logics inside it.

While at it remove the unused member is_phyport from struct nfp_net_hw.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-05 18:09:21 +02:00
Chaoyong He
968ec1c3bf net/nfp: move app firmware attributes to own struct
The NFP card can load different application firmwares. Currently
only the CoreNIC application firmware is supported. This commit makes
needed infrastructure changes in order to support other application
firmwares too.

Clearer separation is made between the PF device and any application
firmware specific concepts. The PF struct is now generic regardless
of the application firmware loaded. A new struct is also made for the
CoreNIC application firmware. Future additions to support other
application firmwares should also add an application firmware specific
struct.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-05 18:09:21 +02:00
Jin Liu
8d9613200e net/nfp: refactor ethdev operations assignments
Before, use two variables to represent the ethdev structure for
firmware with NFDk and NFD3, but only a few field values differ
between the two variables. Now use one variable only, and to
distinguish different firmware versions in specific functions.

Signed-off-by: Jin Liu <jin.liu@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
2022-10-05 18:09:13 +02:00
Jin Liu
bb7f8aa50b net/nfp: fix return value of init function
The return value of 'nfp_pf_init' function is variable ret, but
there is one statement, if error occurs, assign error num to
variable err, it is incorrect, fixed it.

Fixes: 5c464d6a27 ("net/nfp: support NFP3800 card")
Cc: stable@dpdk.org

Signed-off-by: Jin Liu <jin.liu@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
2022-10-05 17:59:35 +02:00
Ciara Loftus
932be3b3fb doc: improve AF_XDP guide
Instead of a one-liner describing each vdev argument, add a description
and example for each. Move the information describing preferred busy
polling from the "Limitations" section to the "Options" section where it
is better placed. Also make general grammar improvements.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
2022-10-05 11:53:22 +02:00
Jie Hai
5f5391d45b net/hns3: fix minimum Tx frame length
When packet length in Tx is less than length hardware supported,
the minimum frame length in hns3 is used to do padding to avoid
hardware error. Currently, this length is fixed by macro, which
is very unfavorable for subsequent hardware evolution. So fix it
as firmware report.

Fixes: 395b5e08ef ("net/hns3: add Tx short frame padding compatibility")
Cc: stable@dpdk.org

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:59 +02:00
Chengwen Feng
bc6eeb29c6 net/hns3: fix VF mailbox message handling
VF's command receive queue was mainly used to receive mailbox messages
from PF. There are two type mailbox messages: request response message
and message pushed by PF.

There are two types of threads that can handle these messages:
1) the interrupt thread of the main process: it could handle both types
of messages.
2) other threads: it could only handle request response messages.

The collaboration mechanism between the two type threads is that other
threads set the opcode of processed messages to zero so that the
interrupt thread of the main process does not process these messages
again.

Unfortunately, the other threads mark the message pointed to by the
crq->next-to-use variable which is fixed in the loop, not the message
pointed to by the next-to-use variable.

Fixes: dbbbad23e3 ("net/hns3: fix VF handling LSC event in secondary process")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:58 +02:00
Chengwen Feng
e0ec62d6e9 net/hns3: revert fix mailbox communication with HW
VF's command receive queue was mainly used to receive mailbox messages
from PF. There are two type mailbox messages: request response message
and message pushed by PF.

There are two types of threads that can handle these messages:
1) the interrupt thread of the main process: it could handle both types
of messages.
2) other threads: it could only handle request response messages.

The collaboration mechanism between the two type threads is that other
threads set the opcode of processed messages to zero so that the
interrupt thread of the main process does not process these messages
again. Because other threads can only process part of the messages,
after the processing is complete, the next-to-use pointer of the
command receive queue should not be updated. Otherwise, some messages
(e.g. messages pushed by PF) maybe discarded.

Unfortunately, the patch to be reverted updates next-to-use pointer of
the command receive queue in other threads context, and this will lead
to discard some mailbox message.

So this commit reverts
commit 599ef84add ("net/hns3: fix mailbox communication with HW")

Fixes: 599ef84add ("net/hns3: fix mailbox communication with HW")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:56 +02:00
Huisong Li
13c3993240 net/hns3: add L3 and L4 RSS types
When user set 'L3_SRC/DST_ONLY' or 'L4_SRC/DST_ONLY' to 'rss_hf' and
do not specify the packet type, these types will be set to hardware.

Fixes: 806f1d5ab0 ("net/hns3: set RSS hash type input configuration")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
2022-10-04 18:09:55 +02:00
Huisong Li
2bd90635bd net/hns3: fix IPv4 RSS
When user only use 'ipv4' to set 'rss_hf', hns3 will enable
all tuple fields for 'ipv4' flow. But if user use 'ipv4-tcp'
, 'ipv4' and 'l4-src-only' to set 'rss_hf', driver does not
enable all tuple fields for 'ipv4' flow.

Fixes: 806f1d5ab0 ("net/hns3: set RSS hash type input configuration")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:53 +02:00
Huisong Li
2ecfc36ce1 net/hns3: fix typos in IPv6 SCTP fields
Fix spelling errors about IPV6-SCTP macro.

Fixes: 1bc633c340 ("net/hns3: enable RSS for IPv6-SCTP dst/src port fields")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:52 +02:00
Huisong Li
c56a1956b9 net/hns3: fix IPv4 and IPv6 RSS
Currently, hns3 driver use 'ipv4-other' and 'ipv6-other' as the flag
of IP packets to judge if enable RSS tuple field. But user may use
'RTE_ETH_RSS_IPV4' or 'RTE_ETH_RSS_IPV6' as the flag. So this patch
adds the processing of these macros.

Fixes: 806f1d5ab0 ("net/hns3: set RSS hash type input configuration")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:50 +02:00
Chengwen Feng
2ad146efb1 net/hns3: rename header guards
Currently, the hns3 driver uses _HNS3_XXX conditional compilation
macros to prevent duplicate header files. But in the C11 standard, all
identifiers starting with an underscore plus an uppercase letter are
always reserved. So this patch fixes it.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:48 +02:00
Chengwen Feng
f5a46128fb net/hns3: remove unused structures
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:46 +02:00
Chengwen Feng
1c757dd5f6 net/hns3: fix header files includes
Header files should be self contained and should not be cyclically
dependent.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:36 +02:00
Jie Hai
4a366c9ee0 net/hns3: remove magic numbers for MAC address
Removing magic numbers with macros.

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:34 +02:00
Huisong Li
904ee370e8 net/hns3: fix packet type for GENEVE
Currently, hns3 reports VXLAN tunnel packet type for GENEVE,
which is misleading to user. In fact, hns3 hardware cannot
distinguish between VXLAN and GENEVE packet. So this patch
uses RTE_PTYPE_TUNNEL_GRENAT packet type to report.

Fixes: 7d6df32cf7 ("net/hns3: fix missing outer L4 UDP flag for VXLAN")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:32 +02:00
Dongdong Liu
38dc579e0f net/hns3: fix build with gcov
meson build -Db_coverage=true
ninja -C build

../drivers/net/hns3/hns3_ethdev.c:2856:22: warning: ‘cfg.umv_space’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
 2856 |  pf->wanted_umv_size = cfg.umv_space;

Fix compiling warnings using gcc 10.3.1.

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:29 +02:00
Huisong Li
1042ed401f net/hns3: fix restore filter function input
This 'hns3_restore_filter' is an internal interface of driver.
Currently, it uses 'struct rte_eth_dev *dev' as input parameter,
This is inconvenient for the function to call in driver because
caller has to obtain its device address by global variable
'rte_eth_devices[]'. Fix the input of this function.

Fixes: 920be799db ("net/hns3: fix RSS indirection table configuration")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:17 +02:00
Huisong Li
860ed8516a net/hns3: move flow direction rule recovery
The 'hns3_restore_filter' is used to restore flow rules from
rte_flow API during the reset process. This patch moves the
recovery of flow direction rule to this function to improve
code maintainability.

Fixes: fcba820d9b ("net/hns3: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:09:13 +02:00
Huisong Li
43d8adf389 net/hns3: fix RSS flow rule restore
After reset process, types of RSS flow rule cannot be restored when
load driver without RTE_ETH_MQ_RX_RSS_FLAG flag. This is because the
restoration for RSS flow rule is done in the 'hns3_config_rss()'. But
this function is also used to configure and restore RSS configuration
from ethdev ops, and doesn't configure RSS types if 'rxmode.mq_mode'
has not the flag. As a result, RSS types configured by rte flow API
can't be restored in this case when encounter reset. Actually, all
RSS rules are saved to a global link list.

Use the linked list to restore RSS flow rule.

Fixes: 920be799db ("net/hns3: fix RSS indirection table configuration")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:08:58 +02:00
Huisong Li
a35799625e net/hns3: fix lock protection of RSS flow rule
RSS flow rules are saved in RSS filter linked list. The linked
list is modified by rte_flow API and is used to restore RSS rules
during reset process. So this patch uses 'hw->flows_lock' to protect
the configuration and recovery of RSS rule.

Fixes: c37ca66f2b ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:08:55 +02:00
Huisong Li
705a508003 net/hns3: fix RSS filter restore
Currently, driver sets RSS function to 'RTE_ETH_HASH_FUNCTION_MAX'
when user flush all rules in order to judge whether driver needs
to restore RSS rules. In fact, all rules are saved in flow RSS list.
So there is no need to modify RSS function to this macro. And this
list can be used to restore. The modification of RSS function may
introduce new problem.

Fixes: eb158fc756 ("net/hns3: fix config when creating RSS rule after flush")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:08:50 +02:00
Huisong Li
0d81da2559 net/hns3: fix RSS rule restore
The 'hns3_restore_rss_filter' function is used to restore RSS rule.
But this function calls the 'hns3_config_rss_filter' which sets the
last to invalid in flow RSS list. This causes the flow RSS list has
no valid rule.

Fixes: ec674cb742 ("net/hns3: fix flushing RSS rule")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 18:08:46 +02:00
Chengwen Feng
6056009687 net/hns3: revert Tx performance optimization
The Tx performance deteriorates in the case of larger packets size and
larger burst. It may take a long time to optimize in these scenarios,
so this commit reverts
commit 0b77e8f3d3 ("net/hns3: optimize Tx performance")

Fixes: 0b77e8f3d3 ("net/hns3: optimize Tx performance")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:59:33 +02:00
Huisong Li
b38bd88beb net/hns3: fix clearing hardware MAC statistics
In the situation that the driver hns3 exits abnormally during packets
sending and receiving, the hardware statistics are not cleared when the
driver hns3 is reloaded. It need to be cleared during driver hns3
initialization that hardware MAC statistics.

Fixes: 8839c5e202 ("net/hns3: support device stats")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:59:33 +02:00
Huisong Li
c05a540902 net/hns3: delete unused markup
The '__rte_unused' tag in the input parameter  of 'hns3_mac_stats_reset'
is redundant. This patch remove this tag. In addition, this function is
aimed to clear MAC statics. So using 'struct hns3_hw' as input parameter
is better than 'struct rte_eth_dev', and it also facilitates the call of
this function.

Fixes: 8839c5e202 ("net/hns3: support device stats")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:59:26 +02:00
Chengwen Feng
a8f1f7cf1b net/hns3: fix crash when secondary process access FW
Currently, to prevent missing reporting of reset interrupts and quickly
identify reset interrupts, the following logic is designed in the
FW (firmware) command interface hns3_cmd_send: if an unprocessed
interrupt exist (by checking reset registers), related reset task is
scheduled.

The secondary process may invoke the hns3_cmd_send interface (e.g. using
proc-info query some stats). Unfortunately, the secondary process
does not support reset processing, and a segment fault may occur if it
schedules reset task.

Fix it by limit the checking and scheduling of reset under only primary
process.

Fixes: 2790c64647 ("net/hns3: support device reset")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:59:18 +02:00
Chengwen Feng
12590fc503 net/hns3: optimize SVE Tx performance
Optimize SVE xmit algorithm performance, will get about 1%+
performance gain under 64B macfwd.

Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
2022-10-04 17:47:47 +02:00
Chengwen Feng
76a9c980cf net/hns3: fix next-to-use overflow in simple Tx
If txq's next-to-use plus nb_pkts equal txq's nb_tx_desc when using
simple xmit algorithm, the txq's next-to-use will equal nb_tx_desc
fter the xmit, this does not cause Tx exceptions, but may affect other
ops that depend on this field, such as tx_descriptor_status.

Fixes: 7ef933908f ("net/hns3: add simple Tx path")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:47:47 +02:00
Chengwen Feng
3efbc3c402 net/hns3: fix next-to-use overflow in SVE Tx
If txq's next-to-use plus nb_pkts equal txq's nb_tx_desc when using
SVE xmit algorithm, the txq's next-to-use will equal nb_tx_desc after
the xmit, this does not cause Tx exceptions, but may affect other ops
that depend on this field, such as tx_descriptor_status.

Fixes: f0c243a6cb ("net/hns3: support SVE Tx")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:47:47 +02:00
Chengwen Feng
905487d35f net/hns3: fix crash in SVE Tx
Currently, the number of Tx send bytes is obtained by accumulating the
length of the batch 'mbuf' packets of the current loop cycle.
Unfortunately, it uses svcntd (which means all lane, regardless of
whether the corresponding lane is valid) which may lead to overflow,
and thus refers to an invalid mbuf.

Because the SVE xmit algorithm applies only to a single mbuf, the
mbuf's data_len is equal pkt_len, so this patch fixes it by using
svaddv_u64(svbool_t pg, svuint64_t data_len) which only adds valid
lanes.

Fixes: fdcd6a3e02 ("net/hns3: add bytes stats")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:47:47 +02:00
Huisong Li
4ac14c1d96 net/hns3: fix Rx with PTP
The Rx and Tx vector algorithm of hns3 PMD don't support PTP
function. Currently, hns3 driver uses 'pf->ptp_enable' to check
whether PTP is enabled so as to not select Rx and Tx vector
algorithm. And the variable is set when call rte_eth_timesync_enable().
Namely, it may not be set before selecting Rx/Tx function, let's say
the case: set PTP offload in dev_configure(), do dev_start() and then
call rte_eth_timesync_enable(). In this case, all PTP packets can not
be received to application. So this patch fixes the check based on the
RTE_ETH_RX_OFFLOAD_TIMESTAMP flag.

Fixes: 3ca3dcd651 ("net/hns3: fix vector Rx/Tx when PTP enabled")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:47:47 +02:00
Jie Hai
58e3daad9d net/hns3: add dump of VF VLAN filter modify capability
Show whether support modifying VF VLAN filter or not.
Sample output changes:
+          -- support VF VLAN FILTER MOD: Yes

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:47:47 +02:00
Dongdong Liu
b5576b00c4 net/hns3: adjust style in dump file
Rename the function name with prefix hns3_ to keep the same code
style with other files and adjust some code to make it more readable.

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2022-10-04 17:47:47 +02:00
Min Hu (Connor)
82c2ca6ddd net/hns3: fix code check warnings
Fix code check warnings according to:
 - function should have same name with previous declaration;
 - local variable should no be referenced in macro referenced;
 - macro argument 'adapter' should be enclosed in parentheses.

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:47:22 +02:00
Min Hu (Connor)
635acdaf9f net/hns3: rename dump file
Rename hns3 dump files and abstract a head file for dump.

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-04 17:37:30 +02:00
Abhimanyu Saini
f2c0e63428 vdpa/sfc: support multi-queue
Increase the number of default Rx/Tx queue pairs to 8,
and add MQ feature flag to vDPA protocol features.

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 17:23:58 +02:00
Abhimanyu Saini
05308e34bf common/sfc_efx/base: use avail and used terms for indexes
Change cidx and pidx definition to mean used queue and avail
queue index respectively.

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 17:22:56 +02:00
Abhimanyu Saini
86a18c4aa6 common/sfc_efx/base: update MCDI headers
Pickup new FW interface definitions for avail and used indexes.

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 17:17:16 +02:00
Abhimanyu Saini
93211a52a6 common/sfc_efx/base: remove VQ index check during VQ start
The used/avail queue indexes are not bound by queue size,
because HW calculates descriptor entry index by performing
a simple modulo between queue index and queue_size.

So, do not check initial used and avail queue indexes
against queue size because it is possible for these
indexes to be greater than queue size in the
following cases:
1) The queue is created to be migrated into, or
2) The client issues a qstop/qstart after running datapath

Fixes: 4dda72dbde ("common/sfc_efx/base: add base virtio support for vDPA")
Cc: stable@dpdk.org

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 17:16:01 +02:00
Herakliusz Lipiec
e480903311 net/ring: support power monitor
Currently ring pmd does not support ``rte_power_monitor`` api.
This patch adds support by adding monitor callback that is called
whenever we enter sleep state and need to check if it is time to wake
up.

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-10-04 17:11:02 +02:00
Thomas Monjalon
04cf171cb3 doc: relate bifurcated driver and flow isolated mode
The relation between the isolated mode in ethdev flow API
and bifurcated driver behaviour was not clearly explained.

It is made clear in the how-to guide that isolated mode is required
for flow bifurcation to the kernel.
On the other side, the impact of the isolated mode on a bifurcated
driver is made more explicit.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-04 17:01:03 +02:00
Bhagyada Modali
93bffd8fa0 net/axgbe: support segmented Tx
Enable segmented Tx support and add jumbo packet transmit capability.

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-10-04 16:57:50 +02:00
Huzaifa Rahman
231435a5e6 net/memif: fix crash with different number of Rx/Tx queues
There's a bug in memif_stats_get() function due to confusion
between C2S (client->server) and S2C (server->client) rings,
causing a crash if there's a different number of Rx and Tx queues.

Fixit by selectiing the correct rings for Rx and Tx i.e for Rx, S2C
rings are selected and for Tx, C2S rings are selected.

Bugzilla ID: 734
Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")
Cc: stable@dpdk.org

Signed-off-by: Huzaifa Rahman <huzaifa.rahman@emumba.com>
Reviewed-by: Joyce Kong <joyce.kong@arm.com>
2022-10-04 16:50:40 +02:00
Stephen Hemminger
9b4b4d95bc net/tap: add persist option
The TAP device only lasts as long as the DPDK application that opened
it is running. This behavior is bad if the DPDK application needs
to be updated transparently without disturbing other services
using the tap device.

Add a persist feature to the TAP device. If this flag is set, the
kernel network device remains even if after the application has exited.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 16:40:24 +02:00
Alex Kiselev
8772bbfa71 net/tap: fix overflow of network interface index
On Linux and most other systems, network interface index is a 32-bit
integer.  Indexes overflowing the 16-bit integer are frequently seen
when used inside a Docker container.

Fixes: 7c25284e30 ("net/tap: add netlink back-end for flow API")
Fixes: 2bc06869cd ("net/tap: add remote netdevice traffic capture")
Cc: stable@dpdk.org

Signed-off-by: Alex Kiselev <alex@bisonrouter.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2022-10-04 16:33:17 +02:00
Harry van Haaren
6caffbb319 test/service: fix spurious failures by extending timeout
This commit extends the timeout for service_may_be_active()
from 100ms to 1000ms. Local testing on a idle and loaded system
(compiling DPDK with all cores) always completes after 1 ms.

The wait time for a service-lcore to finish is also extended
from 100ms to 1000ms.

The same timeout waiting code was duplicated in two tests, and
is now refactored to a standalone function avoiding duplication.

Reported-by: David Marchand <david.marchand@redhat.com>
Suggested-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2022-10-06 21:41:14 +02:00