From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 4BB344C9C for ; Tue, 5 Mar 2019 18:58:08 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CE854221AF; Tue, 5 Mar 2019 12:58:07 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 05 Mar 2019 12:58:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=IwWdSaRPxZVHArsa3wtd+pZbTS8Q1L1qXG/VHpiQPCg=; b=bk4Am8+vBlYT N7fiIn9Ump8/S1cjhrksrO0lfAFwFBPpA+Rt24fDgKZ96yyKhozC0YFRr1eiZK8p CizlRd0leQBfFKDLQocmE39LaW7TfRruXrwrfysc2b/JDpTycfw8wllSMbn6rHlT xsLIDJo1GGftUy9BVERQBbclGbLEcds= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=IwWdSaRPxZVHArsa3wtd+pZbTS8Q1L1qXG/VHpiQP Cg=; b=kKhF4M8wott+1TG/+TxZ26cHxV1gjb4raOb1w83dj5hLOSEJL64InkNIv iCxy/M8SLY99dKmgy7lYTz6O6yaeMQGDJ3d3bqejLAuJ34AZGrH1V4MRZNDBkgJC ILoSWl1jj+5v4ETqhRB/Z01wgO19QfEE+N1jRi0HVfbLlnDXAwzwPZas98ZSqqUu 7XR1eRzmkjWs5fcZFe/ac6TIVWfzZJ6nET5KPqX42Zvt/T7PaP6D8upmA7Y+YeJ4 IBmLQGzkyK6ihrdoXjsst0KPhwRWIh5Y+MIRYys/AnKlte2kQCTeGxrLTWIZvMqm OHeDRKSuYMO/KV3FyXCgL6b9CPG/A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrfeefgddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 578BE100E5; Tue, 5 Mar 2019 12:58:06 -0500 (EST) From: Thomas Monjalon To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet Cc: Raslan Darawsheh , "dev@dpdk.org" , "stephen@networkplumber.org" Date: Tue, 05 Mar 2019 18:58:04 +0100 Message-ID: <172443910.dRk5910QrU@xps> In-Reply-To: <20190305173825.2ho27gqfx7f72xqb@bidouze.vm.6wind.com> References: <1551779507-10857-1-git-send-email-rasland@mellanox.com> <1551779507-10857-3-git-send-email-rasland@mellanox.com> <20190305173825.2ho27gqfx7f72xqb@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [dpdk-dev] [PATCH v2 3/4] net/failsafe: replace local sub-device with shared data 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: , X-List-Received-Date: Tue, 05 Mar 2019 17:58:08 -0000 Hi, 05/03/2019 18:38, Ga=EBtan Rivet: > > fs_dev_remove(struct sub_device *sdev) [...] > > - rte_eth_dev_close(PORT_ID(sdev)); > > + rte_eth_dev_close(edev->data->port_id); >=20 > Ok I see. I missed that during the first reading, the private_data is > zeroed on dev_close(), so ETH(sdev) becomes invalid here. I don't follow you. What do you mean with this comment? > What happens when a primary process closes a device before a secondary? > Is the secondary unable to stop / close its own then? Isn't there some > missing uninit? Is the secondary process supposed to do any closing? The device management should be done only by the primary process. Note: anyway all this hotplug related code should be dropped from failsafe to be replaced by EAL hotplug management. > This seems dangerous to me. Why not instead allocating a per-process > slab of memory that would hold the relevant references and outlive the > shared data (a per-process rte_eth_dev private data...). Which data do you think should be allocated per process?