Re: [PATCH v2] macvtap: convert nl msg construction to use libnl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/04/2010 06:57 AM, Stefan Berger wrote:
V2:
   - forgot to convert two more function that were hidden in #defines
   - small nits

In a first step I am converting the netlink message construction in macvtap code to use libnl. It's pretty much a 1:1 conversion except that now the message needs to be allocated and deallocated.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>

---
src/util/macvtap.c | 321 ++++++++++++++++++++++-------------------------------
 1 file changed, 137 insertions(+), 184 deletions(-)

ACK. This looks fine to me. I applied a non-corrupted version of the patch to my local tree and it built with no problems on F13.

I was a bit concerned that some error exits from functions were freeing recvbuf and others weren't, but backtracked and verified that in the cases it wasn't freed on exit, it either had never been allocated, or had previously been freed.

(My preference would be to just always call VIR_FREE() in all paths to avoid uncertainty - that's safe since it's always initialized to NULL (and is always freed with VIR_FREE(), so set back to null if it's freed) but don't let that stop you from committing ;-)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]