<html>
    <head>
      <base href="https://bugs.dpdk.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8" class="bz_new_table">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - [dpdk-25.03] vhost_virtio_fuzzing/tso_forward_pkt: testpmd cannot exit normally when test fuzz"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1682">1682</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[dpdk-25.03] vhost_virtio_fuzzing/tso_forward_pkt: testpmd cannot exit normally when test fuzz
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DPDK
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>25.03
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>vhost/virtio
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dev@dpdk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>songx.jiale@intel.com
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class="bz_comment_block">
          <pre class="bz_comment_text">Created <span class=""><a href="attachment.cgi?id=305" name="attach_305" title="dpdk fuzz test file">attachment 305</a> <a href="attachment.cgi?id=305&action=edit" title="dpdk fuzz test file">[details]</a></span>
dpdk fuzz test file

Environment
===========
DPDK version: 5f37ee9c859f3ce08ca4364f1d8c0e70ec33ac83 version: 25.03.0-rc2
OS: Red Hat Enterprise Linux 9.4/5.14.0-427.13.1.el9_4.x86_64
Compiler: clang version 17.0.6
Hardware platform: Intel(R) Xeon(R) Gold 6139 CPU @ 2.30GHz
NIC hardware: N/A
NIC firmware: N/A

Test Setup
Steps to reproduce
==================
1. create packet file(If the environment already has these packets, can skip
this step)
mkdir -p /tmp/fuzz/vhost_pcap
python3 pkt.py

2. Compile dpdk and fuzz
tar zxf fuzz.tar.gz
cp -r fuzz /root/dpdk/app/ 
sed -i "s/'test-sad',/'test-sad',\n        'fuzz',/g" app/meson.build

rm -rf x86_64-native-linuxapp-clang
CC=clang meson --werror -Denable_kmods=True -Dbuildtype=debug -Db_lundef=false
-Db_sanitize=address x86_64-native-linuxapp-clang
ninja -C x86_64-native-linuxapp-clang

3. create vhost
rm -rf /tmp/sock0
x86_64-native-linuxapp-clang/app/dpdk-fuzz /tmp/fuzz/vhost_pcap/ --
-ignore_remaining_args=1 -l 1 -n 4  --file-prefix=vhost --vdev
'net_vhost0,iface=/tmp/sock0,queues=4' -- --rxq=4 --txq=4 --txd=1024 --rxd=1024 
RTE>>vhost_autotest

4. start testpmd with virtio device 
x86_64-native-linuxapp-clang/app/dpdk-testpmd -l 1,2 -n 4
--file-prefix=virtio_26049_20250311133724 --no-pci
--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/sock0,queues=4 -- -i
--rxq=4 --txq=4 --txd=1024 --rxd=1024

5. set csum fwd and start fwd
set fwd csum
start
show port stats all
note: Loop query the port status. when the bps of the port receiving and
transmitting packets is found to be 0, exit testpmd.

6. exit testpmd
quit

Results: 
========
Unable to exit testpmd, will get stuck.

Expected Result:
================
Testpmd receives and sends packets normally and exits normally.

bad commit:
===========
commit 76730c7b9b5a35d1a74d45a08153a03bdb1b26f8
Author: Jie Hai <<a href="mailto:haijie1@huawei.com">haijie1@huawei.com</a>>
Date:   Fri Feb 14 09:56:38 2025 +0800

    app/testpmd: use packet type parsing API

    1. Use rte_net_get_ptype() to parse packets instead.
    2. Support TSO for packets with IPv6 extension header.

    Signed-off-by: Jie Hai <<a href="mailto:haijie1@huawei.com">haijie1@huawei.com</a>>

 lib/vhost/fd_man.c | 439 +++++++++++++++++------------------------------------
 lib/vhost/fd_man.h |   5 +-
 2 files changed, 144 insertions, 300 deletions
          </pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
      <div itemscope itemtype="http://schema.org/EmailMessage">
        <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
          
          <link itemprop="url" href="https://bugs.dpdk.org/show_bug.cgi?id=1682">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>