Search Linux Wireless

Re: [PATCH] cfg80211: size various nl80211 messages correctly

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

 



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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux