From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id CB0A3438F2;
	Thu, 18 Jan 2024 12:18:59 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 579C440DF5;
	Thu, 18 Jan 2024 12:18:59 +0100 (CET)
Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178])
 by mails.dpdk.org (Postfix) with ESMTP id 5115F402B5
 for <dev@dpdk.org>; Thu, 18 Jan 2024 12:18:58 +0100 (CET)
Received: by inbox.dpdk.org (Postfix, from userid 33)
 id 3BFA6438F3; Thu, 18 Jan 2024 12:18:58 +0100 (CET)
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 1368] inconsistency in eventdev dev_info and config structs
 makes some valid configs impossible
Date: Thu, 18 Jan 2024 11:18:58 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: DPDK
X-Bugzilla-Component: eventdev
X-Bugzilla-Version: unspecified
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bruce.richardson@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: <bug-1368-3@http.bugs.dpdk.org/>
Content-Type: multipart/alternative; boundary=17055767380.47AdacB8.1948714
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org


--17055767380.47AdacB8.1948714
Date: Thu, 18 Jan 2024 12:18:58 +0100
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=3D1368

            Bug ID: 1368
           Summary: inconsistency in eventdev dev_info and config structs
                    makes some valid configs impossible
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: eventdev
          Assignee: dev@dpdk.org
          Reporter: bruce.richardson@intel.com
  Target Milestone: ---

In the rte_event_dev_info struct[1], we have the max_event_queues[2] and
max_single_link_event_port_queue_pairs[3] members. The doxygen docs on the
latter states: "These ports and queues are not accounted for in
max_event_ports or max_event_queues."

This implies that a device which has 8 regular queues and an extra 8
single-link only queues, would report max_event_queues =3D=3D 8, and
max_single_link_event_port_queue_pairs =3D=3D 8 on return from
rte_event_dev_info_get() function.

Those values returned from info_get are generally to be used to guide the
configuration using rte_event_dev_configure() API, which takes the
rte_event_dev_config[4] struct. This has two similar fields, in
nb_event_queues[5] and nb_single_link_event_port_queues[6]. However, a
problem arises in that the documentation states that nb_event_queues cannot
be greater than the previously reported max_event_queues (which by itself
makes sense), but the documentation also states that
nb_single_link_event_port_queues is a subset of the overall event ports and
queues, and cannot be greater than the nb_event_queues given in the same
config structure.

To illustrate the issue by continuing to use the same example as above,
suppose an app wants to take that device with 8 regular queues and 8 single
link ones, and have an app with 2 shared processing queues, e.g. for
load-balancing packets/events among 8 cores, but also wants to use the 8
single link queues to allow sending packets/events directly to each core
without load balancing.  In this 2 + 8 scenario, there is no valid
dev_config struct settings that will work:
* making the 8 a subset of the nb_event_queues, means that nb_event_queues
  is 10, which is greater than max_event_queues and so invalid.
* keeping them separate, so that nb_event_queues =3D=3D 2 and
  nb_single_link_port_queues =3D=3D 8 violates the constraint that the
  single_link value cannot exceed the former nb_event_queues value.

We therefore need to adjust the constraints to make things work. Now we can
do so, while keeping the single_link value *not included* in the
total-count in dev_info, but have it *included* in the config struct, but
such a setup is very confusing for the user. Therefore, I think instead we
need to correct this by aligning the two structures - either the
single_link queues are included in the queue/port counts in both structs,
or they aren't included.

[1] https://doc.dpdk.org/api/structrte__event__dev__info.html
[2]
https://doc.dpdk.org/api/structrte__event__dev__info.html#a1cebb1d19943d6b8=
e3d6e51ffc72982a
[3]
https://doc.dpdk.org/api/structrte__event__dev__info.html#ae65bf9e4dba80ccb=
205f3c43f5907d5d
[4] https://doc.dpdk.org/api/structrte__event__dev__config.html
[5]
https://doc.dpdk.org/api/structrte__event__dev__config.html#a703c026d74436b=
05fc656652324101e4
[6]
https://doc.dpdk.org/api/structrte__event__dev__config.html#a39f29448dce5ba=
f491f6685299faa0c9

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

--17055767380.47AdacB8.1948714
Date: Thu, 18 Jan 2024 12:18:58 +0100
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

<html>
    <head>
      <base href=3D"https://bugs.dpdk.org/">
    </head>
    <body><table border=3D"1" cellspacing=3D"0" cellpadding=3D"8" class=3D"=
bz_new_table">
        <tr>
          <th>Bug ID</th>
          <td><a class=3D"bz_bug_link=20
          bz_status_UNCONFIRMED "
   title=3D"UNCONFIRMED - inconsistency in eventdev dev_info and config str=
ucts makes some valid configs impossible"
   href=3D"https://bugs.dpdk.org/show_bug.cgi?id=3D1368">1368</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>inconsistency in eventdev dev_info and config structs makes s=
ome valid configs impossible
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>eventdev
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dev&#64;dpdk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bruce.richardson&#64;intel.com
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class=3D"bz_comment_block">
          <pre class=3D"bz_comment_text">In the rte_event_dev_info struct[1=
], we have the max_event_queues[2] and
max_single_link_event_port_queue_pairs[3] members. The doxygen docs on the
latter states: &quot;These ports and queues are not accounted for in
max_event_ports or max_event_queues.&quot;

This implies that a device which has 8 regular queues and an extra 8
single-link only queues, would report max_event_queues =3D=3D 8, and
max_single_link_event_port_queue_pairs =3D=3D 8 on return from
rte_event_dev_info_get() function.

Those values returned from info_get are generally to be used to guide the
configuration using rte_event_dev_configure() API, which takes the
rte_event_dev_config[4] struct. This has two similar fields, in
nb_event_queues[5] and nb_single_link_event_port_queues[6]. However, a
problem arises in that the documentation states that nb_event_queues cannot
be greater than the previously reported max_event_queues (which by itself
makes sense), but the documentation also states that
nb_single_link_event_port_queues is a subset of the overall event ports and
queues, and cannot be greater than the nb_event_queues given in the same
config structure.

To illustrate the issue by continuing to use the same example as above,
suppose an app wants to take that device with 8 regular queues and 8 single
link ones, and have an app with 2 shared processing queues, e.g. for
load-balancing packets/events among 8 cores, but also wants to use the 8
single link queues to allow sending packets/events directly to each core
without load balancing.  In this 2 + 8 scenario, there is no valid
dev_config struct settings that will work:
* making the 8 a subset of the nb_event_queues, means that nb_event_queues
  is 10, which is greater than max_event_queues and so invalid.
* keeping them separate, so that nb_event_queues =3D=3D 2 and
  nb_single_link_port_queues =3D=3D 8 violates the constraint that the
  single_link value cannot exceed the former nb_event_queues value.

We therefore need to adjust the constraints to make things work. Now we can
do so, while keeping the single_link value *not included* in the
total-count in dev_info, but have it *included* in the config struct, but
such a setup is very confusing for the user. Therefore, I think instead we
need to correct this by aligning the two structures - either the
single_link queues are included in the queue/port counts in both structs,
or they aren't included.

[1] <a href=3D"https://doc.dpdk.org/api/structrte__event__dev__info.html">h=
ttps://doc.dpdk.org/api/structrte__event__dev__info.html</a>
[2]
<a href=3D"https://doc.dpdk.org/api/structrte__event__dev__info.html#a1cebb=
1d19943d6b8e3d6e51ffc72982a">https://doc.dpdk.org/api/structrte__event__dev=
__info.html#a1cebb1d19943d6b8e3d6e51ffc72982a</a>
[3]
<a href=3D"https://doc.dpdk.org/api/structrte__event__dev__info.html#ae65bf=
9e4dba80ccb205f3c43f5907d5d">https://doc.dpdk.org/api/structrte__event__dev=
__info.html#ae65bf9e4dba80ccb205f3c43f5907d5d</a>
[4] <a href=3D"https://doc.dpdk.org/api/structrte__event__dev__config.html"=
>https://doc.dpdk.org/api/structrte__event__dev__config.html</a>
[5]
<a href=3D"https://doc.dpdk.org/api/structrte__event__dev__config.html#a703=
c026d74436b05fc656652324101e4">https://doc.dpdk.org/api/structrte__event__d=
ev__config.html#a703c026d74436b05fc656652324101e4</a>
[6]
<a href=3D"https://doc.dpdk.org/api/structrte__event__dev__config.html#a39f=
29448dce5baf491f6685299faa0c9">https://doc.dpdk.org/api/structrte__event__d=
ev__config.html#a39f29448dce5baf491f6685299faa0c9</a>
          </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=3D"http://schema.org/EmailMessage">
        <div itemprop=3D"action" itemscope itemtype=3D"http://schema.org/Vi=
ewAction">
=20=20=20=20=20=20=20=20=20=20
          <link itemprop=3D"url" href=3D"https://bugs.dpdk.org/show_bug.cgi=
?id=3D1368">
          <meta itemprop=3D"name" content=3D"View bug">
        </div>
        <meta itemprop=3D"description" content=3D"Bugzilla bug update notif=
ication">
      </div>
    </body>
</html>=

--17055767380.47AdacB8.1948714--