<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 - PCAP PMD reconfiguration failure"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1384">1384</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PCAP PMD reconfiguration failure
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>22.11
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>ethdev
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>matias.elo@nokia.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=275" name="attach_275" title="l2fwd patch to demonstrate issue">attachment 275</a> <a href="attachment.cgi?id=275&action=edit" title="l2fwd patch to demonstrate issue">[details]</a></span>
l2fwd patch to demonstrate issue

When a PCAP PMD Ethernet device is first configured, the selected number of RX
and TX queues overrides the max values initially returned by
rte_eth_dev_info_get() (max_rx_queues, max_tx_queues). Now, if one tries to
reconfigure the device with a larger queue count(s), rte_eth_dev_configure()
will fail to an internal capability check. Reconfiguring devices this way is
useful for example in CI usage.

The issue can be reproduced with the attached simple patch to l2fwd example.

Example output from patched l2fwd (v22.11.4):

$ sudo ./examples/dpdk-l2fwd --no-pci --vdev net_pcap0,iface=lo -- -p 0x1
EAL: Detected CPU lcores: 48
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
TELEMETRY: No legacy callbacks, legacy socket not created
MAC updating enabled
Notice: odd number of ports in portmask.
Lcore 0: RX port 0 TX port 0
Initializing port 0... 
  orig. max_rx_queues: 1
  orig. max_tx_queues: 1
  after conf max_rx_queues: 0
  after conf max_tx_queues: 1
Ethdev port_id=0 nb_rx_queues=1 > 0
EAL: Error - exiting with code: 1
  Cause: Cannot configure device: err=-22, port=0
          </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=1384">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>