DPDK patches and discussions
 help / color / mirror / Atom feed
* [Bug 1259] [dpdk-23.07] vf_smoke: vf cannot forward packets
@ 2023-06-28  9:15 bugzilla
  2023-07-31 13:02 ` bugzilla
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla @ 2023-06-28  9:15 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 6273 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1259

            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: 
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 Connection
[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 
3. send packet
sendp([Ether(dst='{vf_mac}')/IP(src='192.168.0.11',dst='192.168.0.12',len=46)/Raw(load='X'*26)],iface="ens224f0",count=1,inter=0,verbose=False)
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=90:E2:BA:4A:33:5C - dst=00:11:22:33:44:55 - pool=mb_pool_0 - type=0x0800
- length=60 - nb_segs=1 - RSS hash=0xb4ae0b75 - RSS queue=0x0 - hw ptype:
L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4  - l2_len=14 - l3_len=20 -
Receive queue=0x0
  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 
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@huawei.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 – -i --rxq=10 --txq=10

    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 <haijie1@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.

[-- Attachment #2: Type: text/html, Size: 8427 bytes --]

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

* [Bug 1259] [dpdk-23.07] vf_smoke: vf cannot forward packets
  2023-06-28  9:15 [Bug 1259] [dpdk-23.07] vf_smoke: vf cannot forward packets bugzilla
@ 2023-07-31 13:02 ` bugzilla
  0 siblings, 0 replies; 2+ messages in thread
From: bugzilla @ 2023-07-31 13:02 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1259

Thomas Monjalon (thomas@monjalon.net) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #12 from Thomas Monjalon (thomas@monjalon.net) ---
Resolved in http://git.dpdk.org/dpdk/commit/?id=d7d802daf8

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 2616 bytes --]

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

end of thread, other threads:[~2023-07-31 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28  9:15 [Bug 1259] [dpdk-23.07] vf_smoke: vf cannot forward packets bugzilla
2023-07-31 13:02 ` bugzilla

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).