Re: [dpdk-dev] [PATCH v3]/driver/raw/ifpga_rawdev: fix a memory leak bug in ifpga
Hi Andy, I comment here for all your patches (4 are pending). They are your first patches for DPDK, welcome! You may want to read the guides explaining how to contribute: http://doc.dpdk.org/guides/contributing/patches.html The title should be "raw/ifpga: fix memory leak in [area here]" 25/12/2018 15:02, AndyPei: > When ifpga_rawdev_create() allocate memory for a new rawdev, the original code > allocate redundant memory for adapter, which is a member of the rawdev. > What is actually necessary is the adapter to be initialized, not memory > allocated. > > What is different in v3 from v2 is that the adapter is no longer need to be > freed. The changelog is better located after --- below. > fixes:ef1e8ede3da5 > cc: rosen...@intel.com > cc: tianfei.zh...@intel.com The format should be a bit different. Please use git log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae' and check with devtools/check-git-log.sh > Signed-off-by: AndyPei Should there be a space in your name as "Andy Pei"? [...] > /** > - * opae_adapter_data_alloc - alloc opae_adapter_data data structure > + * opae_adapter_init - init opae_adapter data structure > + * @adpdate: pointer of opae_adater data structure > + * @name: adapter name. > + * @data: private data of this adapter. The doxygen format is @param param_name param_description. It is also important to strictly match the name of the parameter. @adpdate is a typo (should be @param adapter). You can build the doc with "make doc-api-html" and check the result in your browser. > + * > + * Return: 0 on success. > + */ > +int opae_adapter_init(struct opae_adapter *adapter, > + const char *name, void *data)
Re: [dpdk-dev] [PATCH v3]/driver/raw/ifpga_rawdev: fix a memory leak bug in ifpga
Hi, > -Original Message- > From: Pei, Andy > Sent: Tuesday, December 25, 2018 22:02 > To: dev@dpdk.org > Cc: Xu, Rosen ; Zhang, Tianfei > ; Pei, Andy > Subject: [PATCH v3]/driver/raw/ifpga_rawdev: fix a memory leak bug in ifpga > > When ifpga_rawdev_create() allocate memory for a new rawdev, the original > code allocate redundant memory for adapter, which is a member of the > rawdev. > What is actually necessary is the adapter to be initialized, not memory > allocated. > > What is different in v3 from v2 is that the adapter is no longer need to be > freed. > > fixes:ef1e8ede3da5 > cc: rosen...@intel.com > cc: tianfei.zh...@intel.com Acked-by: Rosen Xu
Re: [dpdk-dev] [PATCH v3]/driver/raw/ifpga_rawdev: fix a memory leak bug in ifpga
> -Original Message- > From: Pei, Andy > Sent: Tuesday, December 25, 2018 10:02 PM > To: dev@dpdk.org > Cc: Xu, Rosen ; Zhang, Tianfei > ; Pei, Andy > Subject: [PATCH v3]/driver/raw/ifpga_rawdev: fix a memory leak bug in ifpga > > When ifpga_rawdev_create() allocate memory for a new rawdev, the > original code allocate redundant memory for adapter, which is a member of > the rawdev. > What is actually necessary is the adapter to be initialized, not memory > allocated. > > What is different in v3 from v2 is that the adapter is no longer need to be > freed. > > fixes:ef1e8ede3da5 > cc: rosen...@intel.com > cc: tianfei.zh...@intel.com It looks good for me, Acked-by: Tianfei zhang