From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39D51A09E5 for ; Tue, 8 Dec 2020 11:50:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2DA43A3; Tue, 8 Dec 2020 11:50:28 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 99E41A3 for ; Tue, 8 Dec 2020 11:50:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607424626; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IQVxR9HoL/5G9cse+C1kbNEtuV0LqrPRn3NWxRtdJt0=; b=ObjsXuM2EeQ/+qwU4lGDgms5t7cU+20KNhDOBpVzw3ivp+j0tUg7Boau649HHK4dSdkDM9 /i8k5F3+SBnck+jgGuyvGf5krMmVFZkeIehRcdDJEFDXJXuhEVjdiUOko+32oFsWhPDwp7 gAYL5lBLkoiCyOmNXOYzGtq/DiLApJ0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-14-CskiL9RsN0OqIvLbl6ksLA-1; Tue, 08 Dec 2020 05:50:24 -0500 X-MC-Unique: CskiL9RsN0OqIvLbl6ksLA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 136F6190A7A2; Tue, 8 Dec 2020 10:50:23 +0000 (UTC) Received: from [10.36.114.230] (ovpn-114-230.ams2.redhat.com [10.36.114.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3C8D1001B2C; Tue, 8 Dec 2020 10:50:21 +0000 (UTC) To: Suanming Mou , viacheslavo@nvidia.com, matan@nvidia.com Cc: stable@dpdk.org, Suanming Mou References: <1607315398-354529-1-git-send-email-suanmingm@nvidia.com> From: Kevin Traynor Message-ID: Date: Tue, 8 Dec 2020 10:50:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <1607315398-354529-1-git-send-email-suanmingm@nvidia.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH 18.11] net/mlx5: fix secondary process resources release X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 07/12/2020 04:29, Suanming Mou wrote: > From: Suanming Mou > > [ upstream commit 2786b7bf9084b32dde9a346d92ab1c27f0ffc476 ] > > When secondary process starts, it will allocate its own process private > data, and also does remap to UAR register of the Tx queue. Once the > secondary process exits, these resources should be released accordingly. > And the shared resources owned by primary should not be touched. > > Currently, once one port in the secondary process spawn failed, all the > other spawned ports will also be released during process exits. However, > the mlx5_dev_close() function does not add the cases for secondary > process, it means call the mlx5_dev_close() function directly in > secondary process releases the resources it should not touch. > > Add the case for secondary process release to its own resources in > mlx5_dev_close() function to help it quits gracefully. > > Fixes: 3a8207423a0f ("net/mlx5: close all ports on remove") > > Signed-off-by: Suanming Mou > Acked-by: Matan Azrad > --- > drivers/net/mlx5/mlx5.c | 34 ++++++++++++++++++++++++++++------ > drivers/net/mlx5/mlx5_rxtx.h | 1 + > drivers/net/mlx5/mlx5_txq.c | 24 ++++++++++++++++++++++++ > 3 files changed, 53 insertions(+), 6 deletions(-) Applied, thanks.