[PATCH] link: Support RTEXT_FILTER_VF

Oliver, Jef jef.oliver at intel.com
Thu May 12 11:29:57 PDT 2016


> > Extend rtnl_link_build_get_request() and link_request_update() to 
> > provide IFLA_EXT_MASK with RTEXT_FILTER_VF.
> > 
> > Define RTEXT_FILTER_VF
> > 
> > This enables rtnl_link_get_num_vf to properly return the number of VFs 
> > defined for a link.
> > 
> > Signed-off-by: Jef Oliver <jef.oliver at intel.com>
>
> Hi,
>
>
> this patch applies on libnl3_2_27, but not on current master.
>
>
> It conflicts with
> https://github.com/thom311/libnl/commit/1b2c247571c748a422864f9122bd16cb20e37f83
> which adds ao_get_af().
>
> See also
> https://github.com/thom311/libnl/commit/05631628a57ce88fe1c884680eac6e00fcca810d
>
>
> Any chance, to rebase your patch onto master?
>
>
> Thanks,
> Thomas
>

SRIOV VFs are an extension to the link they are on. They do not register as a separate device unless a VF driver is loaded. Even in that case, the VF exposed by the VF driver appears to be a standard link. Looking at ao_get_af(), it is looking for a rtnl_link_af_ops struct registered for a family. Would I be correct in thinking I need to create this struct for the default link and register it at link_init() ? (This would attach to AF_UNSPEC since SRIOV does not have its own address family?)

This could be expanded to a module (similar to bridge) later when VF info parsing is completed. As of now, the proper count of VFs needs to be returned.

Thanks,
Jef


More information about the libnl mailing list