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 02C39A04DB; Mon, 28 Sep 2020 20:51:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C48CA1D551; Mon, 28 Sep 2020 20:51:52 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 4D3841D52D for ; Mon, 28 Sep 2020 20:51:50 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id 5so1657506pgf.5 for ; Mon, 28 Sep 2020 11:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dxYWJl57/Wf+ozt59QFe7A3WBca8dS8K5QSWR6UdBG8=; b=0EYcRyOKW9qYaC7bzvMEd/nKuyaKAMgKECcrrYw+zZxwREuGIki8aVZPcKDUg3alwQ hGqPuiWDBd5cD5QYKhGXNfAUfvIdKBJOyEkHUeBeFC3MQWpF1NhE2w6/NdfOsLErtdpW qdo6Pq9bZ1VlbhcRHCtKw99niJhYHsqacuPL/FjrAD2kIdgOhyp6h+kRTAx6MoCQvs7c Hz9VmxOtcoc+3VWqIqMsFQ2FMHhLFXOmd7XsJFiQEAQpLt82/i0klLC9FHD5j3FfBKYI oxIv4lXgD5DcdS3owr64R5nDckIkHtJuprwMZXrkF4g1bTb1QazAPqXYVSDhW27mp7N2 PM7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dxYWJl57/Wf+ozt59QFe7A3WBca8dS8K5QSWR6UdBG8=; b=CRPsQjh3AOXJhN6ijj0mb9w04SH6xnN5FDvrl9zPjPD1jfwr3pSzusZ7eUJtKLhP0w PfnFnr65DNPBO3huWr3UOZFjQB7aG+blATtqg3zf/b/9v5os5WrlJkMdCQFT0mgcZ3fI JWcLSBnd1XKzWOjUl2i97gNGAQqviAUK7qulOdUsZynbDKcPtVRKxFLHs9eTOvh01G/7 DfzU1oxq5hIkOIkjn0/2z4uQ2fRyR66mSlCH+KMujDDseMOhIYk0zzDwlrQftyNFsK7Z FsrIKdXjSQQGdvw26k1dRdEAcSATB9fV0gBRBmGsNpleaoM2vqeDt+IbdFGNvxcVIT1s 2R3w== X-Gm-Message-State: AOAM5333+n7o1A45w2nY0+aMJJMRwn0w7F6NXw7hIUFW3tKVwteTY1f/ JHC1mnOLkNWZXzDh8q4xkClycw== X-Google-Smtp-Source: ABdhPJwS+bONi3kDcZ0kzrOdWlvHp5yhKKsT6NJhcLT4lktwMdzXi0wSNa1E/8h6liZ9O/+LLZfVFw== X-Received: by 2002:a17:902:b48f:b029:d2:8ce6:f503 with SMTP id y15-20020a170902b48fb02900d28ce6f503mr840669plr.48.1601319109482; Mon, 28 Sep 2020 11:51:49 -0700 (PDT) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 201sm2492920pfb.173.2020.09.28.11.51.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 11:51:49 -0700 (PDT) Date: Mon, 28 Sep 2020 11:51:39 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, ferruh.yigit@intel.com, arybchenko@solarflare.com, Ciara Loftus , Qi Zhang , Shepard Siegel , Ed Czeck , John Miller , Steven Webster , Matt Peters , Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , Jeff Guo , Haiyue Wang , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin , Gagandeep Singh , John Daley , Hyong Youb Kim , Xiao Wang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Beilei Xing , Jingjing Wu , Qiming Yang , Alfredo Cardigliano , Rosen Xu , Shijith Thotton , Srisivasubramanian Srinivasan , Matan Azrad , Shahaf Shuler , Zyta Szpak , Liron Himi , Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , Long Li , Martin Spinler , Heinrich Kuhn , Harman Kalra , Akhil Goyal , Jerin Jacob , Maciej Czekaj , Maxime Coquelin , Chenbo Xia , Zhihong Wang , Yong Wang , Anatoly Burakov Message-ID: <20200928115139.5515d668@hermes.local> In-Reply-To: <20200927234249.3198780-20-thomas@monjalon.net> References: <20200913220711.3768597-1-thomas@monjalon.net> <20200927234249.3198780-1-thomas@monjalon.net> <20200927234249.3198780-20-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 19/25] drivers/net: check process type in close operation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 28 Sep 2020 01:42:43 +0200 Thomas Monjalon wrote: > The secondary processes are not allowed to release shared resources. > Only process-private ressources should be freed in a secondary process. > Most of the time, there is no process-private ressource, > so the close operation is just forbidden in a secondary process. > > After adding proper check in the port close functions, > some redundant checks in the device remove functions are dropped. > > Signed-off-by: Thomas Monjalon Since this is a common issue across many drivers, my preference would be that the check should be in common code of eth_dev_close. It looks like only a few drivers would allow close from secondary, and that would not be that helpful to a user.