RE: [RFC PATCH] rtnetlink: Fix problem with buffer allocation
From: Rose, Gregory V <hidden>
Date: 2012-02-10 19:07:22
-----Original Message----- From: David Miller [mailto:davem@davemloft.net] Sent: Friday, February 10, 2012 10:52 AM To: Rose, Gregory V Cc: netdev@vger.kernel.org Subject: Re: [RFC PATCH] rtnetlink: Fix problem with buffer allocation From: Greg Rose <redacted> Date: Fri, 10 Feb 2012 07:05:18 -0800quoted
+/* + * Applications that set NLM_F_EXT have allocated + * a 16K or larger buffer. + * (Or they should have before using this flag) + */ +#define NLM_F_EXT 0x800 /* Get extended interface info such as VFs*/ This is not what I meant. I meant to add a "netlink attribute" that gets passed in with GETLINK requests. Which is a u32 set of flag bits, one bit for each extended feature. So VF would get one bit. Like "IFLA_EXT_MASK" or similar. Then rtnl_getlink() would inspect the mask (using nla_get_32()), if present, and make this control what extended parts of the per-link dump are provided.
OK, sounds good. How about I also add a field to indicate the application buffer size? - Greg