Re: [PATCH 2/4] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

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

 





On 3/5/12 11:50 AM, "Roopa Prabhu" <roprabhu@xxxxxxxxx> wrote:

> 
> 
> 
> On 3/5/12 10:23 AM, "Laine Stump" <laine@xxxxxxxxx> wrote:
> 
>> On 03/04/2012 10:15 PM, Roopa Prabhu wrote:
>>> From: Roopa Prabhu <roprabhu@xxxxxxxxx>
>>> 
>>> This patch adds the following:
>>> - functions to set and get vf configs
>>> - Functions to replace and store vf configs (Only mac address is handled
>>> today.
>>>   But the functions can be easily extended for vlans and other vf configs)
>>> - function to dump link dev info (This is moved from
>>> virnetdevvportprofile.c)
>>> 
>>> Signed-off-by: Roopa Prabhu <roprabhu@xxxxxxxxx>
>>> ---
>>>  src/util/virnetdev.c |  531
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  src/util/virnetdev.h |   19 ++
>>>  2 files changed, 549 insertions(+), 1 deletions(-)
>> 
>> (BTW, I never thought about doing it this way before, but I'm glad you
>> added the function here in a separate patch from the patch that removes
>> it from virnetdevvportprofile.c - that makes it easy to open the two
>> patches side-by-side and verify that it really is moving the same code
>> (well, mostly).)
>> 
>>> 
>>> 
>>> diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
>>> index 9d76d47..25f2155 100644
>>> --- a/src/util/virnetdev.c
>>> +++ b/src/util/virnetdev.c
>>> @@ -1127,8 +1127,497 @@ virNetDevGetPhysicalFunction(const char *ifname,
>>> char
>>> **pfname)
>>>  
>>>      return ret;
>>>  }
>>> -#else /* !__linux__ */
>> 
>> The functions here that use libnl need to be inside of
>> 
>>   #if defined(__linux__) && defined(HAVE_LIBNL)
>> 
>> since there are linux platforms that don't have libnl, or don't have the
>> proper LIBNL (RHEL5, in particular, still has libnl-1.0)
>> 
> 
> I was hoping someone will point out what #defines to use here. So thanks. I
> will add HAVE_LIBNL. We also need it for IFLA_VF_MAC and VLAN. They were
> under HAVE_VIRTPORT before. Can you suggest what I can do here ?
>  
> 
Correction: They were under WITH_VIRUALPORT (which has a configure option
and a check for IFLA_VF_PORT_MAX).

We will need a check for IFLA_VF_MAX here.

I think I will try putting this under defined(IFLA_VF_MAX). This should
cover IFLA_VF_MAC and IFLA_VF_VLAN I think. If you have any other
suggestions let me know.

Thanks,
Roopa


--
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]