Thread (17 messages) 17 messages, 4 authors, 2021-10-05

Re: [dpdk-dev] [PATCH 1/3] bus/vmbus: fix leak on device scan

From: Long Li <longli@microsoft.com>
Date: 2021-10-01 16:28:45

Subject: Re: [PATCH 1/3] bus/vmbus: fix leak on device scan

On Thu, Sep 30, 2021 at 9:14 PM Long Li [off-list ref] wrote:
quoted
quoted
rte_device name only points at some location where the name is stored.
In general this storage is in the bus object or (in some buses) the
devarg that resulted in the rte_device object creation.

If we won't store the name in the bus object, then we lose the
ability to release the name later.
This is probably fine as long as we never release rte_vmbus_device
objects which is the case atm.
But I don't understand why vmbus should be an exception when
comparing to other buses.
I don’t understand why you want to put a name there if it's never used outside
vmbus_scan_one().

Since you don't care about releasing rte_vmbus_device objects, I'll rework as
you suggest.
I don't have any objection defining new data fields in the device struct, as long as it's used during the life cycle of the device.

The rest of the patch looks good, thank you.

Long
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help