DPDK patches and discussions
 help / color / mirror / Atom feed
From: Huisong Li <lihuisong@huawei.com>
To: <dev@dpdk.org>, <stephen@networkplumber.org>,
	<thomas@monjalon.net>, <ferruh.yigit@amd.com>
Cc: <fengchengwen@huawei.com>, <liuyonglong@huawei.com>,
	<lihuisong@huawei.com>
Subject: [PATCH v1 0/2] ethdev: fix skip valid port in probing callback
Date: Mon, 13 Jan 2025 10:55:19 +0800	[thread overview]
Message-ID: <20250113025521.32703-1-lihuisong@huawei.com> (raw)

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


             reply	other threads:[~2025-01-13  3:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13  2:55 Huisong Li [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250113025521.32703-1-lihuisong@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=liuyonglong@huawei.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).