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 CF21A42830; Fri, 24 Mar 2023 14:55:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6ACB7406B8; Fri, 24 Mar 2023 14:55:52 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id B91094021F for ; Fri, 24 Mar 2023 14:55:50 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 92DF742831; Fri, 24 Mar 2023 14:55:50 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 1199] mlx5: segmentation fault with rte_flow_configure function Date: Fri, 24 Mar 2023 13:55:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: 23.03 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: ccm@ccm.ink 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=16796661500.baCD0bd3.2114488 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 --16796661500.baCD0bd3.2114488 Date: Fri, 24 Mar 2023 14:55:50 +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=3D1199 Bug ID: 1199 Summary: mlx5: segmentation fault with rte_flow_configure function Product: DPDK Version: 23.03 Hardware: All OS: All Status: UNCONFIRMED Severity: major Priority: Normal Component: ethdev Assignee: dev@dpdk.org Reporter: ccm@ccm.ink Target Milestone: --- I encountered a segmentation fault when attempting to configure queues for = the asynchronous version of rte_flow using the DPDK rte_flow_configure function= and assigning varying sizes to each queue. Just like this: const struct rte_flow_queue_attr *queue_attr[2]; struct rte_flow_queue_attr setup_queue_attr =3D {.size =3D 32}; struct rte_flow_queue_attr normal_queue_attr =3D {.size =3D 100}; queue_attr[0] =3D &setup_queue_attr; queue_attr[1] =3D &normal_queue_attr; rte_flow_configure(port_id, &port_attr, 2, queue_attr, &err); Upon reviewing the source code, I discovered that an attempt was made to fr= ee an unallocated memory, which could potentially result in a segmentation fault(line 7470). [mlx5_flow_hw.c] 7226 if (_queue_attr[i]->size !=3D _queue_attr[0]->size) { rte_errno =3D EINVAL; goto err; 7229 } ... 7239 priv->hw_q =3D mlx5_malloc(MLX5_MEM_ZERO, mem_size, 7240 64, SOCKET_ID_ANY); ... 7444 err: ... 7469 for (i =3D 0; i < nb_q_updated; i++) { 7470 rte_ring_free(priv->hw_q[i].indir_iq); rte_ring_free(priv->hw_q[i].indir_cq); } 7473 mlx5_free(priv->hw_q); --=20 You are receiving this mail because: You are the assignee for the bug.= --16796661500.baCD0bd3.2114488 Date: Fri, 24 Mar 2023 14:55:50 +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
Bug ID 1199
Summary mlx5: segmentation fault with rte_flow_configure function
Product DPDK
Version 23.03
Hardware All
OS All
Status UNCONFIRMED
Severity major
Priority Normal
Component ethdev
Assignee dev@dpdk.org
Reporter ccm@ccm.ink
Target Milestone ---

I encountered a segmentation fault=
 when attempting to configure queues for the
asynchronous version of rte_flow using the DPDK rte_flow_configure function=
 and
assigning varying sizes to each queue.

Just like this:
  const struct rte_flow_queue_attr *queue_attr[2];
  struct rte_flow_queue_attr setup_queue_attr =3D {.size =3D 32};
  struct rte_flow_queue_attr normal_queue_attr =3D {.size =3D 100};
  queue_attr[0] =3D &setup_queue_attr;
  queue_attr[1] =3D &normal_queue_attr;
  rte_flow_configure(port_id, &port_attr, 2, queue_attr, &err);


Upon reviewing the source code, I discovered that an attempt was made to fr=
ee
an unallocated memory, which could potentially result in a segmentation
fault(line 7470).

[mlx5_flow_hw.c]
7226 if (_queue_attr[i]->size !=3D _queue_attr[0]->size) {
        rte_errno =3D EINVAL;
        goto err;
7229 }
...
7239    priv->hw_q =3D mlx5_malloc(MLX5_MEM_ZERO, mem_size,
7240                             64, SOCKET_ID_ANY);
...
7444  err:
...
7469    for (i =3D 0; i < nb_q_updated; i++) {
7470            rte_ring_free(priv->hw_q[i].indir_iq);
                rte_ring_free(priv->hw_q[i].indir_cq);
        }
7473    mlx5_free(priv->hw_q);
          


You are receiving this mail because:
  • You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
= --16796661500.baCD0bd3.2114488--