DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 0/2] ethdev: fix skip valid port in probing callback
@ 2025-01-13  2:55 Huisong Li
  2025-01-13  2:55 ` [PATCH v1 1/2] app/testpmd: check the validity of the port Huisong Li
  2025-01-13  2:55 ` [PATCH v1 2/2] ethdev: fix skip valid port in probing callback Huisong Li
  0 siblings, 2 replies; 15+ messages in thread
From: Huisong Li @ 2025-01-13  2:55 UTC (permalink / raw)
  To: dev, stephen, thomas, ferruh.yigit; +Cc: fengchengwen, liuyonglong, lihuisong

After we check the validity of the port in eth_event_callback() of testpmd
like patch 1/2, testpmd attach one port and doesn't update total port
number maintained in testmd. See the following log:
---
testpmd>
testpmd> port attach 0000:7d:00.1
Attaching a new port...
testpmd>
testpmd> port start all
Port 0 is now not stopped
ETHDEV: Device with port_id=1 is not configured.
Fail to start port 1: Invalid argument
Done
---

For details about the root cause of this issue, please see the patch 2/2.
After merging the patch 2/2. this issue can be fixed and the log is as
follows:
---
testpmd>
testpmd> port attach 0000:7d:00.1
Attaching a new port...
Port 1 is attached. Now total ports is 2
Done
---

BTW, the modification method for this issue is from the following thread.
https://mails.dpdk.org/archives/dev/2024-January/286026.html

Huisong Li (2):
  app/testpmd: check the validity of the port
  ethdev: fix skip valid port in probing callback

 app/test-pmd/testpmd.c           |  5 +++--
 drivers/net/bnxt/bnxt_ethdev.c   |  2 +-
 drivers/net/cpfl/cpfl_ethdev.h   |  2 +-
 drivers/net/ionic/ionic_ethdev.c |  2 +-
 drivers/net/mlx5/mlx5.c          |  2 +-
 drivers/net/nfp/nfp_ethdev.c     |  4 ++--
 lib/ethdev/ethdev_driver.c       | 13 ++++++++++---
 lib/ethdev/ethdev_driver.h       | 12 ++++++++++++
 lib/ethdev/ethdev_pci.h          |  2 +-
 lib/ethdev/rte_class_eth.c       |  2 +-
 lib/ethdev/rte_ethdev.c          |  4 ++--
 lib/ethdev/rte_ethdev.h          |  4 +++-
 lib/ethdev/version.map           |  1 +
 13 files changed, 39 insertions(+), 16 deletions(-)

-- 
2.22.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-01-14 12:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-13  2:55 [PATCH v1 0/2] ethdev: fix skip valid port in probing callback Huisong Li
2025-01-13  2:55 ` [PATCH v1 1/2] app/testpmd: check the validity of the port Huisong Li
2025-01-13  2:55 ` [PATCH v1 2/2] ethdev: fix skip valid port in probing callback Huisong Li
2025-01-13  8:16   ` Thomas Monjalon
2025-01-13  9:35     ` lihuisong (C)
2025-01-13 10:57       ` Thomas Monjalon
2025-01-13 11:23         ` lihuisong (C)
2025-01-13 12:05           ` lihuisong (C)
2025-01-13 12:30             ` Thomas Monjalon
2025-01-13 12:47               ` lihuisong (C)
2025-01-13 13:14                 ` Thomas Monjalon
2025-01-14  1:50                   ` lihuisong (C)
2025-01-14 11:13                     ` Thomas Monjalon
2025-01-14 12:13                       ` lihuisong (C)
2025-01-14 12:39                         ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).