On 01/09/2017 05:28 PM, IgorMitsyanko wrote:
On 01/09/2017 03:39 PM, Johannes Berg wrote:
-    msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+    msg = nlmsg_new(100 + ie_len, GFP_KERNEL);

Don't you want the '100' to be a define?

I didn't want to glorify it too much - some places may need more or
less over time. There's no significance to this number.

johannes


Looking at what NLMSG_DEFAULT_SIZE is, wouldn't it be more descriptive
to replace 100 with something like:

#define NLMSG_OVERHEAD (SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) +
NLMSG_HDRLEN)


Now I see, it's not for msg overhead, but for other fixed-width netlink attributes like WIPHY, IFINDEX etc

Reply via email to