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 11675A00C2; Thu, 17 Nov 2022 09:06:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E77BE40DDC; Thu, 17 Nov 2022 09:06:56 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9EECE40DDA for ; Thu, 17 Nov 2022 09:06:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668672415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EBvp2W8qCse85Khr0gmj4Bk8wYlvWjMd9ps1IM3GBhg=; b=i16eYBXSsM9VmgfJeCOvCMr5d0uclaER6CXkdSos7bM2B8tD12MAdILAxnyzY8FjM3KziR V5cBb1y4iSmXTorBF2RSm8y3u6HyXCtRz3fid67s17xX0pzL75t3YQoqxxbyuoIzBEakt1 uF+drFIwWx3TS4JdA6KYhoQQOB+DlLg= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-146-cHMIBDNeNcS52tRwbNx8mQ-1; Thu, 17 Nov 2022 03:06:53 -0500 X-MC-Unique: cHMIBDNeNcS52tRwbNx8mQ-1 Received: by mail-pl1-f199.google.com with SMTP id b2-20020a170902d50200b001871a3c51afso896301plg.8 for ; Thu, 17 Nov 2022 00:06:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EBvp2W8qCse85Khr0gmj4Bk8wYlvWjMd9ps1IM3GBhg=; b=hQezaxXCiw67+Y4Fx8RJ5EeTZBc0maUlj0MJMmTtmFUCntSvo7yvQmx2bQrZNngInH ldxn26Ns9krO1ZPWeZThNLsRscxN2uDtWyCe5IycpxP0XHuo28A34tQtWoIlrZlvOJSK QSaaMdOSJBMbH64JDkUiF1/2/qfnjDK9DGw/dX/qp8JGKLymgHZVVKMcM1D0M3NKtk7s ZngEgMvaMP3jIPI4xhVBQZ4TIgpphQVkzcATtE3Ha6oWYn/1CvsxrHcTXOZUIVdS27Du eVk6Cj29X5+XogfwlHFr0CicpPARhVfEavLKbadDaqTZYxaNB+7bsoOUldyrlnI9Wi2W qylg== X-Gm-Message-State: ANoB5plr5QeWNM/BWjr8/dtbwCca1Bi0g/e/AnRe1PzEpUyT03GOCViB Nz12rrttULl1mimEBvAXPFkK2bGPfxno5P3WsVTlVntX8AMwJFqSrsCQonT2oefj3dJiKkF/R4U b6bzA09aRi5f9riImSv0= X-Received: by 2002:a17:90a:f48d:b0:212:c877:e948 with SMTP id bx13-20020a17090af48d00b00212c877e948mr7776289pjb.39.1668672412527; Thu, 17 Nov 2022 00:06:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf51COkpsWcqGJL8YgWYNsOw9SZXiQssbgX2az8yDLuWfDyjjZZn43+gr1WP63SAvM3yIj+m2PL6LADXhUOsbqI= X-Received: by 2002:a17:90a:f48d:b0:212:c877:e948 with SMTP id bx13-20020a17090af48d00b00212c877e948mr7776273pjb.39.1668672412233; Thu, 17 Nov 2022 00:06:52 -0800 (PST) MIME-Version: 1.0 References: <20220809132824.25890-1-suanmingm@nvidia.com> <20220920071141.21769-1-suanmingm@nvidia.com> In-Reply-To: <20220920071141.21769-1-suanmingm@nvidia.com> From: David Marchand Date: Thu, 17 Nov 2022 09:06:40 +0100 Message-ID: Subject: Re: [PATCH v1] ethdev: add indirect action async query To: Suanming Mou Cc: Ori Kam , Aman Singh , Yuying Zhang , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ray Kinsella , dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Hello, On Tue, Sep 20, 2022 at 9:12 AM Suanming Mou wrote: > @@ -2873,17 +2907,23 @@ port_queue_action_handle_destroy(portid_t port_id, > * of error. > */ > memset(&error, 0x99, sizeof(error)); > + job = calloc(1, sizeof(*job)); > + if (!job) { > + printf("Queue action destroy job allocate failed\n"); > + return -ENOMEM; > + } > + job->type = QUEUE_JOB_TYPE_ACTION_DESTROY; > + job->pia = pia; > > if (pia->handle && > rte_flow_async_action_handle_destroy(port_id, > - queue_id, &attr, pia->handle, NULL, &error)) { > + queue_id, &attr, pia->handle, job, &error)) { > ret = port_flow_complain(&error); > continue; > } > *tmp = pia->next; > printf("Indirect action #%u destruction queued\n", > pia->id); > - free(pia); > break; > } > if (i == n) Our covscan tool reports a potential leak of "job" in this block. I am unclear whether it is a normal occurence, but it seems that if pia->handle == NULL, then job is leaked. Can you have a look and submit a fix if confirmed? Thanks. -- David Marchand