[PATCH] dma/dpaa2: set the vfa bit for rbp with vf
Set the VFA (Virtual Function Active) bit in struct qdma_sdd -> rbpcmd_simple in order to use the route-by-port functionality with PCIe virtual functions. At the moment, a user wanting to enable route-by-port will call rte_dpaa2_qdma_vchan_rbp_enable with a rte_dpaa2_qdma_rbp struct. The struct includes the PCIe Physical and Virtual functions among other things, which are then copied to qdma_sdd -> rbpcmd_simple, but the vfa bit is never touched (the bit does exists in rbpcmd_simple), so route-by-port with virtual functions won't work.. In order to fix this, a vfa bit is added to struct rte_dpaa2_qdma_rbp, then is copied to qdma_sdd -> rbpcmd_simple. Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton") Signed-off-by: Alvaro Karsz --- drivers/dma/dpaa2/dpaa2_qdma.c | 2 ++ drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c index d5a5f08ecc..8968bb853b 100644 --- a/drivers/dma/dpaa2/dpaa2_qdma.c +++ b/drivers/dma/dpaa2/dpaa2_qdma.c @@ -117,6 +117,7 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle, /* source */ sdd->read_cmd.portid = rbp->sportid; sdd->rbpcmd_simple.pfid = rbp->spfid; + sdd->rbpcmd_simple.vfa = rbp->vfa; sdd->rbpcmd_simple.vfid = rbp->svfid; if (rbp->srbp) { @@ -129,6 +130,7 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle, /* destination */ sdd->write_cmd.portid = rbp->dportid; sdd->rbpcmd_simple.pfid = rbp->dpfid; + sdd->rbpcmd_simple.vfa = rbp->vfa; sdd->rbpcmd_simple.vfid = rbp->dvfid; if (rbp->drbp) { diff --git a/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h b/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h index dc8acb4aec..5a8da46d12 100644 --- a/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h +++ b/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h @@ -44,7 +44,9 @@ struct rte_dpaa2_qdma_rbp { uint32_t svfid:6; /* using route by port for source */ uint32_t srbp:1; - uint32_t rsv:4; + /* Virtual Function Active */ + uint32_t vfa:1; + uint32_t rsv:3; }; /** Determines a QDMA job */ -- 2.34.1
RE: release candidate 23.03-rc3
Hi, > -Original Message- > From: Thomas Monjalon > Sent: Monday, March 20, 2023 6:30 PM > To: annou...@dpdk.org > Subject: release candidate 23.03-rc3 > > A new DPDK release candidate is ready for testing: > https://git.dpdk.org/dpdk/tag/?id=v23.03-rc3 > > There are 110 new patches in this snapshot. > > Release notes: > https://doc.dpdk.org/guides/rel_notes/release_23_03.html > > Few major additions arrived in this -rc3: > - test application for machine learning inference > - DTS hello world > The test framework DTS is being improved and migrated into the mainline. > Please join the DTS effort for contributing, reviewing or testing. > > As usual, you can report any issue on https://bugs.dpdk.org > > DPDK 23.03-rc4 could be out at the end of this week. > > Thank you everyone > The following is the testing report for 23.03-rc3 Note: all tests are passed, and no critical issues were found. The following is a list of tests that we ran on NVIDIA hardware this release: - Basic functionality: Send and receive multiple types of traffic. - passed - testpmd xstats counter test. - passed - testpmd timestamp test. - passed - Changing/checking link status through testpmd. - passed - RTE flow tests: Matching on: - ecpri: - sync is passed - esp: sync and async are passed - eth: sync and async are passed - flex: sync is passed - geneve: sync is passed - geneve_opt: sync is passed - gre : sync and async are passed - gre_key: sync and async are passed - gre_option: sync is passed - gtp: sync and async are passed - gtp_psc: sync and async are passed - icmp: sync is passed - icmp6: sync is passed - integrity: sync and async are passed - ipv4: sync and async are passed - ipv6: sync and async are passed - ipv6_frag_ext: sync is passed - mark: sync and async are passed - meta: sync and async are passed - meter color: async is passed - mpls: sync and async are passed - nvgre: sync and async are passed - port_id: sync is passed - represented port: async is passed - tag: sync and async are passed - tcp: sync and async are passed - udp: sync and async are passed - vlan: sync and async are passed - vxlan: sync and async are passed - vxlan_gpe: sync and async are passed - phy_port: sync is passed Actions: - age: sync is passed - count: sync and async are passed - dec_tcp_ack: sync is passed - dec_tcp_seq: sync is passed - dec_ttl: sync is passed - drop: sync and async is passed - flag: sync is passed - inc_tcp_ack: sync is passed - inc_tcp_seq: sync is passed - jump: sync and async are passed - mark: sync and async are passed - meter: sync is passed - meter_mark: async is passed - modify_field: sync and async are passed - nvgre_decap: sync is passed - nvgre_encap: sync is passed - of_pop_vlan: sync and async are passed - of_push_vlan: sync and async are passed - of_set_vlan_pcp: sync and async are passed - of_set_vlan_vid: sync and async are passed - port_id: sync and async are passed - queue: sync and async are passed - raw_decap: sync and async are passed - raw_encap: sync and async are passed - represented_port: async are passed - rss: sync and async are passed - sample: sync is passed - set_ipv4_dscp: sync is passed - set_ipv4_dst: sync is passed - set_ipv4_src: sync is passed - set_ipv6_dscp: sync is passed - set_ipv6_dst: sync is passed - set_ipv6_src: sync is passed - set_mac_dst: sync is passed - set_mac_src: sync is passed - set_meta: sync is passed - set_tag: sync is passed - set_tp_dst: sync is passed - set_tp_src: sync is passed - set_ttl: sync is passed - vxlan_decap: sync and async are passed - vxlan_encap: sync and async are passed - RSS testing. -passed - VLAN filtering, stripping and insertion tests. -passed - Checksum and TSO tests. -passed - ptype reporting -passed - link status interrupt using the example application link_status_interrupt tests. - passed - Interrupt mode using l3fwd-power example application tests. - passed - Multi process testing using multi process example applications. - passed - Hardware LRO tests. - passed - Regex tests. - passed - Buffer Split. - passed - Tx scheduling. - passed Kindest Regards, Wael Abualrub
Re: [PATCH] vhost: fix deadlock with no multiqueue
On Thu, Mar 23, 2023 at 3:48 PM Maxime Coquelin wrote: > On 3/23/23 15:44, David Marchand wrote: > > This deadlock happens when a guest, that had virtio ports with multi > > queues configured, does not announce the multi q feature in > > SET_FEATURES. > > In such a situation, all vq locks are already taken before calling > > free_vq(), which itself takes the lock. > > > > As mentioned in the code, in this situation, the virtio device is not > > running yet and no datapath thread is using the vq. So we can > > release the lock before calling free_vq(). > > > > Bugzilla ID: 1196 > > Fixes: 4b02c2673757 ("vhost: annotate async accesses") > > > > Signed-off-by: David Marchand > Reviewed-by: Maxime Coquelin Applied, thanks. -- David Marchand
RE: release candidate 23.03-rc3
> -Original Message- > From: Xu, HailinX > Sent: Thursday, March 23, 2023 4:23 PM > To: Thomas Monjalon ; dev@dpdk.org > Cc: Kovacevic, Marko ; Mcnamara, John > ; Richardson, Bruce ; > Ferruh Yigit > Subject: RE: release candidate 23.03-rc3 > > > -Original Message- > > From: Thomas Monjalon > > Sent: Tuesday, March 21, 2023 12:30 AM > > To: annou...@dpdk.org > > Subject: release candidate 23.03-rc3 > > > > A new DPDK release candidate is ready for testing: > > https://git.dpdk.org/dpdk/tag/?id=v23.03-rc3 > > > > There are 110 new patches in this snapshot. > > > > Release notes: > > https://doc.dpdk.org/guides/rel_notes/release_23_03.html > > > > Few major additions arrived in this -rc3: > > - test application for machine learning inference > > - DTS hello world > > The test framework DTS is being improved and migrated into the mainline. > > Please join the DTS effort for contributing, reviewing or testing. > > > > As usual, you can report any issue on https://bugs.dpdk.org > > > > DPDK 23.03-rc4 could be out at the end of this week. > > > > Thank you everyone > > > Update the test status for Intel part. Till now dpdk23.03-rc3 test execution > rate is > 85%, no new issue is found. > # Basic Intel(R) NIC testing > * Build or compile: > *Build: cover the build test combination with latest GCC/Clang version and > the > popular OS revision such as Ubuntu20.04.5, Ubuntu22.04.1, Fedora37, > RHEL8.6/9.1 etc. > - All test passed. > *Compile: cover the CFLAGES(O0/O1/O2/O3) with popular OS such as > Ubuntu22.04.1 and RHEL8.6. > - All test passed. > * Meson test & Asan test: > known issues: > - https://bugs.dpdk.org/show_bug.cgi?id=956 [dpdk-22.03][asan] > dpdk-pdump: detected memory leaks when quit dpdk-pdump > - Not fix yet. > - https://bugs.dpdk.org/show_bug.cgi?id=1024 [dpdk-22.07][meson > test] driver-tests/link_bonding_mode4_autotest bond handshake failed > - Not fix yet. > - https://bugs.dpdk.org/show_bug.cgi?id=1107 [22.11-rc1][meson test] > seqlock_autotest test failed. > - Special issue with gcc 4.8.5. > * PF/VF(i40e, ixgbe): test scenarios including > PF/VF-RTE_FLOW/TSO/Jumboframe/checksum offload/VLAN/VXLAN, etc. > - All test done. No new issue is found. > * PF/VF(ice): test scenarios including Switch features/Package > Management/Flow Director/Advanced Tx/Advanced RSS/ACL/DCF/Flexible > Descriptor, etc. > - All test done. No new issue is found. > * Intel NIC single core/NIC performance: test scenarios including PF/VF single > core performance test, RFC2544 Zero packet loss performance test, etc. > - All test done. No new issue is found. > * Power and IPsec: > * Power: test scenarios including bi-direction/Telemetry/Empty Poll > Lib/Priority > Base Frequency, etc. > - Execution rate is 60%. No new issue is found. > * IPsec: test scenarios including ipsec/ipsec-gw/ipsec library basic test - > QAT&SW/FIB library, etc. > - On going. > # Basic cryptodev and virtio testing > * Virtio: both function and performance test are covered. Such as > PVP/Virtio_loopback/virtio-user loopback/virtio-net VM2VM perf > testing/VMAWARE ESXI 8.0, etc. > - All test done. No new issue is found. > * Cryptodev: > *Function test: test scenarios including Cryptodev API testing/CompressDev > ISA-L/QAT/ZLIB PMD Testing/FIPS, etc. > - On going. > *Performance test: test scenarios including Throughput Performance > /Cryptodev Latency, etc. > - On going. > > Regards, > Xu, Hailin Update the test status for Intel part. Till now dpdk23.03-rc3 all test done, no new issue is found. # Basic Intel(R) NIC testing * Build or compile: *Build: cover the build test combination with latest GCC/Clang version and the popular OS revision such as Ubuntu20.04.5, Ubuntu22.04.1, Fedora37, RHEL8.6/9.1 etc. - All test passed. *Compile: cover the CFLAGES(O0/O1/O2/O3) with popular OS such as Ubuntu22.04.1 and RHEL8.6. - All test passed. * Meson test & Asan test: known issues: - https://bugs.dpdk.org/show_bug.cgi?id=956 [dpdk-22.03][asan] dpdk-pdump: detected memory leaks when quit dpdk-pdump - Not fix yet. - https://bugs.dpdk.org/show_bug.cgi?id=1024 [dpdk-22.07][meson test] driver-tests/link_bonding_mode4_autotest bond handshake failed - Not fix yet. - https://bugs.dpdk.org/show_bug.cgi?id=1107 [22.11-rc1][meson test] seqlock_autotest test failed. - Special issue with gcc 4.8.5. * PF/VF(i40e, ixgbe): test scenarios including PF/VF-RTE_FLOW/TSO/Jumboframe/checksum offload/VLAN/VXLAN, etc. - All test done. No new issue is found. * PF/VF(ice): test scenarios including Switch features/Package Management/Flow Director/Advanced Tx/Advanced RSS/ACL/DCF/Flexible Descriptor, etc. - All test done. No new issue is found. * Intel NIC single core/NIC performance: test scenarios includi
[PATCH v1] raw/ifpga: check afu device before unplug
AFU device may be already unplugged in IFPGA bus cleanup process, unplug AFU device only when it exists. Signed-off-by: Wei Huang --- drivers/raw/ifpga/ifpga_rawdev.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index 1020adc..0d43c87 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "base/opae_hw_api.h" #include "base/opae_ifpga_hw_api.h" @@ -1832,12 +1833,19 @@ static int ifpga_rawdev_get_string_arg(const char *key __rte_unused, return ret; } +static int cmp_dev_name(const struct rte_device *dev, const void *_name) +{ + const char *name = _name; + return strcmp(dev->name, name); +} + static int ifpga_cfg_remove(struct rte_vdev_device *vdev) { struct rte_rawdev *rawdev = NULL; struct ifpga_rawdev *ifpga_dev; struct ifpga_vdev_args args; + struct rte_bus *bus; char dev_name[RTE_RAWDEV_NAME_MAX_LEN]; const char *vdev_name = NULL; char *tmp_vdev = NULL; @@ -1864,7 +1872,13 @@ static int ifpga_rawdev_get_string_arg(const char *key __rte_unused, snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "%d|%s", args.port, args.bdf); - ret = rte_eal_hotplug_remove(RTE_STR(IFPGA_BUS_NAME), dev_name); + bus = rte_bus_find_by_name(RTE_STR(IFPGA_BUS_NAME)); + if (bus) { + if (bus->find_device(NULL, cmp_dev_name, dev_name)) { + ret = rte_eal_hotplug_remove(RTE_STR(IFPGA_BUS_NAME), + dev_name); + } + } for (i = 0; i < IFPGA_MAX_VDEV; i++) { tmp_vdev = ifpga_dev->vdev_name[i]; -- 1.8.3.1
RE: [PATCH v3] net/iavf: fix iavf query stats in intr thread
> -Original Message- > From: Ferruh Yigit > Sent: Thursday, March 23, 2023 11:39 PM > To: Deng, KaiwenX ; dev@dpdk.org > Cc: sta...@dpdk.org; Yang, Qiming ; Zhou, YidingX > ; Chas Williams ; Min Hu (Connor) > ; Wu, Jingjing ; Xing, Beilei > ; Mike Pattrick ; Zhang, Qi Z > ; Doherty, Declan ; > Mrzyglod, Daniel T ; Dapeng Yu > > Subject: Re: [PATCH v3] net/iavf: fix iavf query stats in intr thread > > On 3/22/2023 7:26 AM, Kaiwen Deng wrote: > > When iavf send query-stats command in eal-intr-thread through virtual > > channel, there will be no response received from > > iavf_dev_virtchnl_handler for this command during block and wait. > > Because iavf_dev_virtchnl_handler is also registered in eal-intr-thread. > > > > When vf device is bonded as BONDING_MODE_TLB mode, the slave device > > update callback will registered in alarm and called by > > eal-intr-thread, it would also raise the above issue. > > > > This commit add to poll the response for VIRTCHNL_OP_GET_STATS when > it > > is called by eal-intr-thread to fix this issue. > > > > Fixes: 91bf37d250aa ("net/iavf: add lock for VF commands") > > Fixes: 22b123a36d07 ("net/avf: initialize PMD") > > Fixes: 7c76a747e68c ("bond: add mode 5") > > Fixes: 435d523112cc ("net/iavf: fix multi-process shared data") > > Fixes: cb5c1b91f76f ("net/iavf: add thread for event callbacks") > > > Hi Kaiwen, > > Above commit already seems trying to address same issue, it creates "iavf- > event-thread" control thread to asyncroniously handle the interrupts, in non- > interrupt context, why it is not working? > > Instead of adding 'rte_thread_is_intr()' checks, can't you make sure all > interrupts handled in control tread? > > And can you please provide a stack trace in commit log, to describe the issue > better? Hi Ferru, Sorry for my late reply, And thanks for your review. The above commit does not fix this issue when we need to get the returned data. If we call iavf_query_stats and wait for response statistics in the intr-thread. iavf_handle_virtchnl_msg is also registered in the intr_thread and will not be executed while waiting. This commit I changed it to polling for replies to commands executed in the interrupt thread. main thread interrupt thread | | | | iavf_query_stats | iavf_execute_vf_cmd | iavf_aq_send_msg_to_pf and wait handle complete | | | |>| | | | iavf_handle_virtchnl_msg | | |<| | | iavf_execute_vf_cmd get response | | | The above is the stack trace for the normal execution of iavf_query_stats in the main thread. interrupt thread | | iavf_query_stats iavf_execute_vf_cmd iavf_aq_send_msg_to_pf wait handle complete(1 sec) iavf_execute_vf_cmd timeout | | iavf_handle_virtchnl_msg | The above is the stack trace for the abnormal execution of iavf_query_stats in the interrupt thread. > > > Cc: sta...@dpdk.org > > > > Signed-off-by: Kaiwen Deng > > --- > > Changes since v2: > > - Add to poll the response for VIRTCHNL_OP_GET_STATS. > > > > Changes since v1: > > - Add lock to avoid race condition. > > --- > > --- > > drivers/net/bonding/rte_eth_bond_pmd.c | 7 ++- > > drivers/net/iavf/iavf_ethdev.c | 5 +- > > drivers/net/iavf/iavf_vchnl.c | 71 ++ > > 3 files changed, 58 insertions(+), 25 deletions(-) > > > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > > b/drivers