From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id BC5712A9 for ; Tue, 9 Dec 2014 16:44:32 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 09 Dec 2014 07:36:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,545,1413270000"; d="scan'208";a="621036674" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by orsmga001.jf.intel.com with ESMTP; 09 Dec 2014 07:36:33 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 9 Dec 2014 23:36:32 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.182]) with mapi id 14.03.0195.001; Tue, 9 Dec 2014 23:36:31 +0800 From: "Qiu, Michael" To: Tetsuya Mukawa , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 14/28] eal/pci: Add rte_eal_devargs_remove Thread-Index: AQHQE3oZZPikSU0MUUqFqzU8TfuHSQ== Date: Tue, 9 Dec 2014 15:36:31 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286C9E22F@SHSMSX101.ccr.corp.intel.com> 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> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Tue, 09 Dec 2014 15:44:33 -0000 I don't know if other reviewers ask you to split so many patches. But I=0A= would like merge some of them, because some are doing same affairs(just=0A= using different args), others should be add/remove affairs. Those could=0A= be merge to one patch, although it is much more easier for review.=0A= =0A= Actually, it is much harder to review such long thread....=0A= =0A= But just one suggestion, merge or not depends you.=0A= =0A= Thanks,=0A= Michael=0A= On 2014/12/9 14:33, Tetsuya Mukawa wrote:=0A= > The function removes a specified devargs from devargs_list.=0A= >=0A= > Signed-off-by: Tetsuya Mukawa =0A= > ---=0A= > lib/librte_eal/common/eal_common_devargs.c | 16 ++++++++++++++++=0A= > lib/librte_eal/common/include/rte_devargs.h | 18 ++++++++++++++++++=0A= > 2 files changed, 34 insertions(+)=0A= >=0A= > diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/= common/eal_common_devargs.c=0A= > index f95a12d..5fd2a2c 100644=0A= > --- a/lib/librte_eal/common/eal_common_devargs.c=0A= > +++ b/lib/librte_eal/common/eal_common_devargs.c=0A= > @@ -140,6 +140,22 @@ rte_eal_devargs_add(enum rte_devtype devtype, const = char *devargs_str)=0A= > return 0;=0A= > }=0A= > =0A= > +/* remove it from the devargs_list */=0A= > +void=0A= > +rte_eal_devargs_remove(enum rte_devtype devtype, void *args)=0A= > +{=0A= > + struct rte_devargs *devargs;=0A= > +=0A= > + if (args =3D=3D NULL)=0A= > + return;=0A= > +=0A= > + devargs =3D rte_eal_devargs_find(devtype, args);=0A= > + if (devargs =3D=3D NULL)=0A= > + return;=0A= > +=0A= > + TAILQ_REMOVE(&devargs_list, devargs, next);=0A= > +}=0A= > +=0A= > /* count the number of devices of a specified type */=0A= > unsigned int=0A= > rte_eal_devargs_type_count(enum rte_devtype devtype)=0A= > diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal= /common/include/rte_devargs.h=0A= > index 9f9c98f..1066efd 100644=0A= > --- a/lib/librte_eal/common/include/rte_devargs.h=0A= > +++ b/lib/librte_eal/common/include/rte_devargs.h=0A= > @@ -123,6 +123,24 @@ extern struct rte_devargs_list devargs_list;=0A= > int rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_st= r);=0A= > =0A= > /**=0A= > + * Remove a device from the user device list=0A= > + *=0A= > + * For PCI devices, the format of arguments string is "PCI_ADDR". It sho= uldn't=0A= > + * involves parameters for the device. Example: "08:00.1".=0A= > + *=0A= > + * For virtual devices, the format of arguments string is "DRIVER_NAME*"= . It=0A= > + * shouldn't involves parameters for the device. Example: "eth_ring". Th= e=0A= > + * validity of the driver name is not checked by this function, it is do= ne=0A= > + * when closing the drivers.=0A= > + *=0A= > + * @param devtype=0A= > + * The type of the device.=0A= > + * @param name=0A= > + * The name of the device.=0A= > + */=0A= > +void rte_eal_devargs_remove(enum rte_devtype devtype, void *args);=0A= > +=0A= > +/**=0A= > * Count the number of user devices of a specified type=0A= > *=0A= > * @param devtype=0A= =0A=