From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 4F94458CB for ; Tue, 24 Jan 2017 11:49:16 +0100 (CET) Received: by mail-wm0-f47.google.com with SMTP id r126so175359219wmr.0 for ; Tue, 24 Jan 2017 02:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=AorYN+rgkALcefVKNYS6ien2ppdI2k2SPG26L+tb9FU=; b=Q9XSoX+ZygBtkshBSVve14E5LnlFCn2TcgIYEDn8TOIgGxS8ZKrPpqoA1GG3nKSyzG Qi3P5kVGpBNdcD2vxtPXlfitTFEHvZbk/G0eE9ipjPK+2QvS5QDmWNVRqGs0gLoKkke/ REEn3HmQ+5Ttcf0FCfDYh4o3V0n++RcgHzvyvo5o8PpzCX1aNfyjGKLS0AW7nLTSV6RI CpRj2Cf3qnapXtjTka5miRvSL4r5z7WApaJvkZVyhxIt5K/RK8EDdCgyRkdWRfVy6rlb 9AIt7Nox/QOa40jOgjBcssIF9n7BAD5HskpVvRQf0NIU+vMotsT2bJndS+zmqV+MLf2T ipPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=AorYN+rgkALcefVKNYS6ien2ppdI2k2SPG26L+tb9FU=; b=sB5hOjIPhZ2L4sFqGXgU4Ab5JZrhHro84vp1INbEwcKJLoS7S9s6Cka2nJq8FvMJDv wVVW+04BjJ5ztBLYCiJAaoeb4IjK+Lnwsex0tiRqvp2lUJyjnRHgHcFnT++7AwAsddtX KoCpZ6KaoK6msGCD+gbOxVUxH7rtw7FdyQtGHP7nnJ5O8rIp6Qqecl42tKVQlaYqzaOy 0YtcVjWkP2k/v4djjWpck/vwH+63FsfGLA8np0oDOWWRkp6XTFOr0XMe4KqjNxqxKYM5 liIVKjgx2vuq6U1HVQgbn8e4IU9rNfaMAvWXnPr0c+ew0N1gzoRFNf1qS0BMTkAChyFL wk0w== X-Gm-Message-State: AIkVDXKpd1UnT1WyA8LuBmY3pVvmXpfJKq6twW0x1uR3t/qoJ3jqf2X+ijdP07/3Wa2FJdls X-Received: by 10.28.147.72 with SMTP id v69mr18094099wmd.51.1485254956080; Tue, 24 Jan 2017 02:49:16 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id x135sm25700080wme.23.2017.01.24.02.49.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 02:49:15 -0800 (PST) From: Thomas Monjalon To: Remy Horton Cc: dev@dpdk.org Date: Tue, 24 Jan 2017 11:49:14 +0100 Message-ID: <15501893.0xUg90OPpe@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <9128e0fe-23b5-4a9f-31c5-29ee22358909@intel.com> References: <1484073764-15001-1-git-send-email-remy.horton@intel.com> <1923485.xZPm2OXYXH@xps13> <9128e0fe-23b5-4a9f-31c5-29ee22358909@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v1] ethdev: fix multi-process NULL dereference crashes 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, 24 Jan 2017 10:49:16 -0000 2017-01-24 08:16, Remy Horton: > > On 20/01/2017 18:37, Thomas Monjalon wrote: > [..] > > 3 comments here: > > - it is in the wrong section (EAL instead of Drivers) > > - secondary processes can setup a vdev PMD > > - before Yuanhan's patch, even PCI PMD were blanking primary process data > > Since the code being changed is in rte_ether rather than drivers/net it > seemed the logical place to me.. :) The change is in ethdev, and you put the release note in EAL. So no, it is not logical, because ethdev is not EAL. > > I propose this rebase: > > > > - memset(&rte_eth_dev_data[port_id], 0, sizeof(struct rte_eth_dev_data)); > > eth_dev = eth_dev_get(port_id); > > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) > > + memset(eth_dev->data, 0, sizeof(*eth_dev->data)); > > snprintf(eth_dev->data->name, sizeof(eth_dev->data->name), "%s", name); > > eth_dev->data->port_id = port_id; > > eth_dev->data->mtu = ETHER_MTU; > > Seems OK to me, assuming Yuanhan's patch is going in as-is. Yuanhan's patch is already part of RC1.