[PATCH] Support RTEXT_FILTER_VF

Oliver, Jef jef.oliver at intel.com
Sun May 29 21:16:04 PDT 2016


> -----Original Message-----
> From: Thomas Haller [mailto:thaller at redhat.com]
> Sent: Sunday, May 29, 2016 7:34 AM
> To: Oliver, Jef <jef.oliver at intel.com>; libnl at lists.infradead.org
> Subject: Re: [PATCH] Support RTEXT_FILTER_VF
> 
> On Mon, 2016-05-16 at 16:23 -0700, Jef Oliver wrote:
> > This patch adds RTEXT_FILTER_VF mask support for SRIOV VFs. Since
> > SRIOV VFs don't have a defined address family (ie bridge), there are
> > no new address family specific operations defined.
> >
> > Exposing this mask makes rtnl_link_get_num_vfs() properly return the
> > number of loaded SRIOV VFs.
> >
> > Signed-off-by: Jef Oliver <jef.oliver at intel.com>
> > ---
> 
> 
> Hi Jef,
> 
> 
> your patch looks right to me (except a minor fixup, see link below).
> 
> currently libnl doesn't seem to handle information about SRIOV except
> get_num_vf(). Is the *only* purpose of this patch to fix
> rtnl_link_get_num_vf(), or do you have a more complex use-case?
> 
> For bridge types, link_request_update() would set
> both IFLA_EXT_MASK=RTEXT_FILTER_VF and later it is overwriten with
> IFLA_EXT_MASK=RTEXT_FILTER_BRVLAN.
> That seems wrong. How about the follow-up patch:
> https://github.com/thom311/libnl/commits/ext_filter_mask
> 
> 
> 
> Thomas

Thomas,

The fixup looks good. I neglected thinking of link_updates only needing the requested update. This patches purpose is to fix the get_num_vf for AF_UNSPEC requests. Bridge links, tunnel links, etc..., will not have this information present. So it is ok if bridge types overwrite IFLA_EXT_MASK. With this patch being present, I am planning on expanding out SRIOV support in libnl. I hope to add functions to expose the LLADDR, VLAN, QoS, etc.. of a VF. (Baring objection.)

Jef



More information about the libnl mailing list