From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by dpdk.org (Postfix) with ESMTP id 9EC3C6A95 for ; Thu, 11 Dec 2014 02:40:38 +0100 (CET) Received: by mail-pa0-f51.google.com with SMTP id ey11so4012163pad.10 for ; Wed, 10 Dec 2014 17:40:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=QNQxiBY+T+AgumL5IZ3ggMl9uoRi4nsy1VfIUVs1BiY=; b=M1w9p5/FupMxn55WtLmND3SXRR4HU+/w1Wn2uJvvL3yT2Yen7O2zzsYgh8xepYAPjj kedXJnhXVs5KURJHj2rQIUlmWN4jVt2wliV6wpJctIqNavihOwZ+p2NOFUjIvogWGpxk 8LGyMRVvDzSpxDlP3ZDwiEt8PBL48XW1RTChlKSIEb3lzzhLNDuxQqvU+C4bCuh+jjnz a1FI2XBQjVcHEbb3zQvNl7kH3h4nIay3gTUR7Kb55BeHqpSRjjjEk0byGWl3MYwZPqIt JlKljnE1LPWmU5kAd5HsJiGjlDluzvE2wIqGo6DMXE58fU8EPC8hbKrxnjzZhWccCNBY WXGg== X-Gm-Message-State: ALoCoQmCSY+5P5wb3QzGBCnB1lSel73R37S9KpT98uW+noxe3e7YFffdrk3VnOamLYkXWE70ufM4 X-Received: by 10.68.97.131 with SMTP id ea3mr12273567pbb.144.1418262037764; Wed, 10 Dec 2014 17:40:37 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id pn8sm5354277pdb.34.2014.12.10.17.40.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Dec 2014 17:40:37 -0800 (PST) Message-ID: <5488F612.5010909@igel.co.jp> Date: Thu, 11 Dec 2014 10:40:34 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "Qiu, Michael" , "dev@dpdk.org" References: <1416474399-16851-1-git-send-email-mukawa@igel.co.jp> <1418106629-22227-1-git-send-email-mukawa@igel.co.jp> <1418106629-22227-15-git-send-email-mukawa@igel.co.jp> <533710CFB86FA344BFBF2D6802E60286C9E22F@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <533710CFB86FA344BFBF2D6802E60286C9E22F@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "nakajima.yoshihiro@lab.ntt.co.jp" , "masutani.hitoshi@lab.ntt.co.jp" , "menrigh@brocade.com" Subject: Re: [dpdk-dev] [PATCH v3 14/28] eal/pci: Add rte_eal_devargs_remove 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, 11 Dec 2014 01:40:39 -0000 Hi Michael, (2014/12/10 0:36), Qiu, Michael wrote: > I don't know if other reviewers ask you to split so many patches. But I= > would like merge some of them, because some are doing same affairs(just= > using different args), others should be add/remove affairs. Those could= > be merge to one patch, although it is much more easier for review. > > Actually, it is much harder to review such long thread.... I am sorry for that. I will merge some patches into one. Also appreciate your other comments. I will fix my code like your suggestions, and submit it again. Thanks, Tetsuya > But just one suggestion, merge or not depends you. > > Thanks, > Michael > On 2014/12/9 14:33, Tetsuya Mukawa wrote: >> The function removes a specified devargs from devargs_list. >> >> Signed-off-by: Tetsuya Mukawa >> --- >> lib/librte_eal/common/eal_common_devargs.c | 16 ++++++++++++++++ >> lib/librte_eal/common/include/rte_devargs.h | 18 ++++++++++++++++++ >> 2 files changed, 34 insertions(+) >> >> diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_e= al/common/eal_common_devargs.c >> index f95a12d..5fd2a2c 100644 >> --- a/lib/librte_eal/common/eal_common_devargs.c >> +++ b/lib/librte_eal/common/eal_common_devargs.c >> @@ -140,6 +140,22 @@ rte_eal_devargs_add(enum rte_devtype devtype, con= st char *devargs_str) >> return 0; >> } >> =20 >> +/* remove it from the devargs_list */ >> +void >> +rte_eal_devargs_remove(enum rte_devtype devtype, void *args) >> +{ >> + struct rte_devargs *devargs; >> + >> + if (args =3D=3D NULL) >> + return; >> + >> + devargs =3D rte_eal_devargs_find(devtype, args); >> + if (devargs =3D=3D NULL) >> + return; >> + >> + TAILQ_REMOVE(&devargs_list, devargs, next); >> +} >> + >> /* count the number of devices of a specified type */ >> unsigned int >> rte_eal_devargs_type_count(enum rte_devtype devtype) >> diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_= eal/common/include/rte_devargs.h >> index 9f9c98f..1066efd 100644 >> --- a/lib/librte_eal/common/include/rte_devargs.h >> +++ b/lib/librte_eal/common/include/rte_devargs.h >> @@ -123,6 +123,24 @@ extern struct rte_devargs_list devargs_list; >> int rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs= _str); >> =20 >> /** >> + * Remove a device from the user device list >> + * >> + * For PCI devices, the format of arguments string is "PCI_ADDR". It = shouldn't >> + * involves parameters for the device. Example: "08:00.1". >> + * >> + * For virtual devices, the format of arguments string is "DRIVER_NAM= E*". It >> + * shouldn't involves parameters for the device. Example: "eth_ring".= The >> + * validity of the driver name is not checked by this function, it is= done >> + * when closing the drivers. >> + * >> + * @param devtype >> + * The type of the device. >> + * @param name >> + * The name of the device. >> + */ >> +void rte_eal_devargs_remove(enum rte_devtype devtype, void *args); >> + >> +/** >> * Count the number of user devices of a specified type >> * >> * @param devtype