From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A3C042D7E; Wed, 28 Jun 2023 11:15:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C85440151; Wed, 28 Jun 2023 11:15:58 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id C5172400EF for ; Wed, 28 Jun 2023 11:15:57 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id BD96142D7F; Wed, 28 Jun 2023 11:15:57 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 1259] [dpdk-23.07] vf_smoke: vf cannot forward packets Date: Wed, 28 Jun 2023 09:15:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: testpmd X-Bugzilla-Version: 23.07 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: songx.jiale@intel.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: multipart/alternative; boundary=16879437570.C1dcAaeE.3752752 Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --16879437570.C1dcAaeE.3752752 Date: Wed, 28 Jun 2023 11:15:57 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All https://bugs.dpdk.org/show_bug.cgi?id=3D1259 Bug ID: 1259 Summary: [dpdk-23.07] vf_smoke: vf cannot forward packets Product: DPDK Version: 23.07 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: testpmd Assignee: dev@dpdk.org Reporter: songx.jiale@intel.com Target Milestone: --- [Environment] DPDK version:=20 DPDK dpdk23.07-rc2: 93a4b3beba4ee611685148917981f846427cafb2 Other software versions: N/A. OS: Ubuntu 22.04.2 LTS/5.15.0-70-generic Compiler: gcc version 11.3.0 Hardware platform: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz NIC hardware: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connect= ion [8086:10fb] (rev 01) NIC driver: ixgbe-5.18.13 NIC firmware: 0x000161bf [Test Setup] 1. create vf and blind to vfio-pci echo 1 > /sys/bus/pci/devices/0000\:08\:00.0/sriov_numvfs ./usertools/dpdk-devbind.py -b vfio-pci 0000:08:10.0 2. launch and set testpmd ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:08:10.0 -= - -i set verbose 1 set fwd mac start=20 3. send packet sendp([Ether(dst=3D'{vf_mac}')/IP(src=3D'192.168.0.11',dst=3D'192.168.0.12'= ,len=3D46)/Raw(load=3D'X'*26)],iface=3D"ens224f0",count=3D1,inter=3D0,verbo= se=3DFalse) 4. stop testpmd testpmd> stop [Show the output from the previous commands.] testpmd> stop Telling cores to stop... Waiting for lcores to finish... ---------------------- Forward statistics for port 0 -------------------= --- RX-packets: 1 RX-dropped: 0 RX-total: 1 TX-packets: 0 TX-dropped: 0 TX-total: 0 -------------------------------------------------------------------------= --- +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++= ++ RX-packets: 1 RX-dropped: 0 RX-total: 1 TX-packets: 0 TX-dropped: 0 TX-total: 0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++ Done. [Expected Result] testpmd> port 0/queue 0: received 1 packets src=3D90:E2:BA:4A:33:5C - dst=3D00:11:22:33:44:55 - pool=3Dmb_pool_0 - ty= pe=3D0x0800 - length=3D60 - nb_segs=3D1 - RSS hash=3D0xb4ae0b75 - RSS queue=3D0x0 - hw = ptype: L2_ETHER L3_IPV4 - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - Receive queue=3D0x0 ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN=20 testpmd> stop Telling cores to stop... Waiting for lcores to finish... ---------------------- Forward statistics for port 0 -------------------= --- RX-packets: 1 RX-dropped: 0 RX-total: 1 TX-packets: 1 TX-dropped: 0 TX-total: 1 -------------------------------------------------------------------------= --- +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++= ++ RX-packets: 1 RX-dropped: 0 RX-total: 1 TX-packets: 1 TX-dropped: 0 TX-total: 1 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++ Done. [Regression] Is this issue a regression: (Y/N) Y commit 141a520b35f789f37dc06557bc724bf7f0e0a52d Author: Jie Hai Date: Fri Jun 9 17:03:40 2023 +0800 app/testpmd: fix primary process not polling all queues Here's how the problem arises. step1: Start the app. dpdk-testpmd -a 0000:35:00.0 -l 0-3 =E2=80=93 -i --rxq=3D10 --txq= =3D10 step2: Perform the following steps and send traffic. As expected, queue 7 does not send or receive packets, and other queues do. port 0 rxq 7 stop port 0 txq 7 stop set fwd mac start step3: Perform the following steps and send traffic. All queues are expected to send and receive packets normally, but that's not the case for queue 7. stop port stop all port start all start show port xstats all In fact, only the value of rx_q7_packets for queue 7 is not zero, which means queue 7 is enabled for the driver but is not involved in packet receiving and forwarding by software. If we check queue state by command 'show rxq info 0 7' and 'show txq info 0 7', we see queue 7 is started as other queues are. Rx queue state: started Tx queue state: started The queue 7 is started but cannot forward. That's the problem. We know that each stream has a read-only "disabled" field that control if this stream should be used to forward. This field depends on testpmd local queue state, please see commit 3c4426db54fc ("app/testpmd: do not poll stopped queues"). DPDK framework maintains ethdev queue state that drivers reported, which indicates the real state of queues. There are commands that update these two kind queue state such as 'port X rxq|txq start|stop'. But these operations take effect only in one stop-start round. In the following stop-start round, the preceding operations do not take effect anymore. However, only the ethdev queue state is updated, causing the testpmd and ethdev state information to diverge and causing unexpected side effects as above problem. There was a similar problem for the secondary process, please see commit 5028f207a4fa ("app/testpmd: fix secondary process packet forwarding"). This patch applies its workaround with some difference to the primary process. Not all PMDs implement rte_eth_rx_queue_info_get and rte_eth_tx_queue_info_get, however they may support deferred_start with primary process. To not break their behavior, retain the original testpmd local queue state for those PMDs. Fixes: 3c4426db54fc ("app/testpmd: do not poll stopped queues") Cc: stable@dpdk.org Signed-off-by: Jie Hai Acked-by: Ferruh Yigit app/test-pmd/testpmd.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions, 4 deletions --=20 You are receiving this mail because: You are the assignee for the bug.= --16879437570.C1dcAaeE.3752752 Date: Wed, 28 Jun 2023 11:15:57 +0200 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All
Bug ID 1259
Summary [dpdk-23.07] vf_smoke: vf cannot forward packets
Product DPDK
Version 23.07
Hardware x86
OS Linux
Status UNCONFIRMED
Severity normal
Priority Normal
Component testpmd
Assignee dev@dpdk.org
Reporter songx.jiale@intel.com
Target Milestone ---

[Environment]
DPDK version:=20
DPDK dpdk23.07-rc2: 93a4b3beba4ee611685148917981f846427cafb2
Other software versions: N/A.
OS: Ubuntu 22.04.2 LTS/5.15.0-70-generic
Compiler: gcc version 11.3.0
Hardware platform: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
NIC hardware: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connect=
ion
[8086:10fb] (rev 01)
NIC driver: ixgbe-5.18.13
NIC firmware: 0x000161bf

[Test Setup]
1. create vf and blind to vfio-pci
echo 1 > /sys/bus/pci/devices/0000\:08\:00.0/sriov_numvfs
./usertools/dpdk-devbind.py -b vfio-pci 0000:08:10.0
2. launch and set testpmd
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:08:10.0 -=
- -i
set verbose 1
set fwd mac
start=20
3. send packet
sendp([Ether(dst=3D'{vf_mac}')/IP(src=3D'192.168.0.11',dst=3D'192.168.0.12'=
,len=3D46)/Raw(load=3D'X'*26)],iface=3D"ens224f0",count=3D1,inter=
=3D0,verbose=3DFalse)
4. stop testpmd
testpmd> stop
[Show the output from the previous commands.]
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
  ---------------------- Forward statistics for port 0  -------------------=
---
  RX-packets: 1              RX-dropped: 0             RX-total: 1
  TX-packets: 0              TX-dropped: 0             TX-total: 0
  -------------------------------------------------------------------------=
---
  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++=
++
  RX-packets: 1              RX-dropped: 0             RX-total: 1
  TX-packets: 0              TX-dropped: 0             TX-total: 0
  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=
+++
Done.

[Expected Result]
testpmd> port 0/queue 0: received 1 packets
  src=3D90:E2:BA:4A:33:5C - dst=3D00:11:22:33:44:55 - pool=3Dmb_pool_0 - ty=
pe=3D0x0800
- length=3D60 - nb_segs=3D1 - RSS hash=3D0xb4ae0b75 - RSS queue=3D0x0 - hw =
ptype:
L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4  - l2_len=3D14 - l3_len=3D20=
 -
Receive queue=3D0x0
  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN=20
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
  ---------------------- Forward statistics for port 0  -------------------=
---
  RX-packets: 1              RX-dropped: 0             RX-total: 1
  TX-packets: 1              TX-dropped: 0             TX-total: 1
  -------------------------------------------------------------------------=
---
  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++=
++
  RX-packets: 1              RX-dropped: 0             RX-total: 1
  TX-packets: 1              TX-dropped: 0             TX-total: 1
  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=
+++
Done.

[Regression]
Is this issue a regression: (Y/N) Y

commit 141a520b35f789f37dc06557bc724bf7f0e0a52d
Author: Jie Hai <haijie1@h=
uawei.com>
Date:   Fri Jun 9 17:03:40 2023 +0800

    app/testpmd: fix primary process not polling all queues

    Here's how the problem arises.
    step1: Start the app.
        dpdk-testpmd -a 0000:35:00.0 -l 0-3 =E2=80=93 -i --rxq=3D10 --txq=
=3D10

    step2: Perform the following steps and send traffic. As expected,
    queue 7 does not send or receive packets, and other queues do.
        port 0 rxq 7 stop
        port 0 txq 7 stop
        set fwd mac
        start

    step3: Perform the following steps and send traffic. All queues
    are expected to send and receive packets normally, but that's not
    the case for queue 7.
        stop
        port stop all
        port start all
        start
        show port xstats all

    In fact, only the value of rx_q7_packets for queue 7 is not zero,
    which means queue 7 is enabled for the driver but is not involved
    in packet receiving and forwarding by software. If we check queue
    state by command 'show rxq info 0 7' and 'show txq info 0 7',
    we see queue 7 is started as other queues are.
        Rx queue state: started
        Tx queue state: started
    The queue 7 is started but cannot forward. That's the problem.

    We know that each stream has a read-only "disabled" field that
    control if this stream should be used to forward. This field
    depends on testpmd local queue state, please see
    commit 3c4426db54fc ("app/testpmd: do not poll stopped queues"=
;).
    DPDK framework maintains ethdev queue state that drivers reported,
    which indicates the real state of queues.

    There are commands that update these two kind queue state such as
    'port X rxq|txq start|stop'. But these operations take effect only
    in one stop-start round. In the following stop-start round, the
    preceding operations do not take effect anymore. However, only
    the ethdev queue state is updated, causing the testpmd and ethdev
    state information to diverge and causing unexpected side effects
    as above problem.

    There was a similar problem for the secondary process, please see
    commit 5028f207a4fa ("app/testpmd: fix secondary process packet
    forwarding").

    This patch applies its workaround with some difference to the
    primary process. Not all PMDs implement rte_eth_rx_queue_info_get and
    rte_eth_tx_queue_info_get, however they may support deferred_start
    with primary process. To not break their behavior, retain the original
    testpmd local queue state for those PMDs.

    Fixes: 3c4426db54fc ("app/testpmd: do not poll stopped queues"=
;)
    Cc: stable@dpdk.org

    Signed-off-by: Jie Hai <ha=
ijie1@huawei.com>
    Acked-by: Ferruh Yigit <=
ferruh.yigit@amd.com>

 app/test-pmd/testpmd.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions, 4 deletions
          


You are receiving this mail because:
  • You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
= --16879437570.C1dcAaeE.3752752--