From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 03C1C8E6A for ; Thu, 12 Nov 2015 12:32:29 +0100 (CET) Received: by wmec201 with SMTP id c201so86971655wme.1 for ; Thu, 12 Nov 2015 03:32:28 -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:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=kC7PHlpkG+Qj3NwoaL/fNXeBFnH87s7ImKfrjd/IVG4=; b=kIQVgN1AGO00R9VPtTsl8WqpcOXQPH7NE2UqsZnXaWBqoXv/wLwYkXqwkjfQd6F48X AQBwXB06ZdAPunGyAN6nEyU4c/YsROAc/BPni684dBBLhMQx3UT29uUExbQvP3riQswH 4opIrR0qKyDQ1xhMrTd2zoWkkdlEtDUfakxvAU5Pd7jrKJ47Q5dS5Ax89w5XwoaCbv/I APPvREpBglWWeqNYYgyc8rnPCQAeA1utm6wvu9GtwGUvflFpg6y5zKcJ5/g8utdjOhKM MzNEnS0bNUtEPRms+sOZmDlwIsPWXI2FjRyKH/bEFZw2ZDiOSH6fh0tKlOwpX/N5/yLu 2O+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=kC7PHlpkG+Qj3NwoaL/fNXeBFnH87s7ImKfrjd/IVG4=; b=LhcPf7g30ax5pOXpxAYvNs8qu6uipRcW4xhXkD7Q0j7mMhcEqH128C3aQqH5lKilpd UpWtGnIBadMG/DUScdUDlVnmT1LbXWIZq3B/Ey3Eegcto+e6zHzdpEbyzLJ6RlxlXAYi BiC6RVINo+UGfZVxZUGZoTMvf4lnMDV3/ejlqRFeAUDtd3Dg3sdZNE8xrIbJ2nr7wYNp 2/WC2ASVc1O9D9qd2Deo0xVnMEO2yyllT/Pbs+/PP3ACklaXRcJRIkqKTAl/hG5TRC1Z FFagtljkqTSAosCSUrpyHK3ZPDhykbpCcIuBu1aw5EQgOIrVe/SDvxdCtR34PZp4w/0E yZVw== X-Gm-Message-State: ALoCoQklFwa7EpcSeHt34PJSFB/ttNe9DArp2be0Fn1Qn29pXmqrjBgWAZHRjR1RQQeFA7r4sbho X-Received: by 10.28.18.11 with SMTP id 11mr43280989wms.68.1447327948830; Thu, 12 Nov 2015 03:32:28 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id m64sm11085575wmf.14.2015.11.12.03.32.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Nov 2015 03:32:28 -0800 (PST) From: Thomas Monjalon To: Yuanhan Liu Date: Thu, 12 Nov 2015 12:31:16 +0100 Message-ID: <1619932.CiF7gkQMAT@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1447301441-10590-1-git-send-email-yuanhan.liu@linux.intel.com> <1447301441-10590-2-git-send-email-yuanhan.liu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] vhost: reset device properly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 11:32:29 -0000 > > Currently, we reset all fields of a device to zero when reset > > happens, which is wrong, since for some fields like device_fh, > > ifname, and virt_qp_nb, they should be same and be kept after > > reset until the device is removed. And this is what's the new > > helper function reset_device() for. > > > > And use rte_zmalloc() instead of rte_malloc, so that we could > > avoid init_device(), which basically dose zero reset only so far. > > Hence, init_device() is dropped in this patch. > > > > This patch also removes a hack of using the offset a specific > > field (which is virtqueue now) inside of `virtio_net' structure > > to do reset, which could be broken easily if someone changed the > > field order without caution. > > > > Cc: Tetsuya Mukawa > > Cc: Xie Huawei > > Signed-off-by: Yuanhan Liu > > > > I had a patch that just saved the ifname but this is much better. > > Acked-by: Rich Lane Applied, thanks