[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1447765800.22599.91.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Tue, 17 Nov 2015 05:10:00 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net] rtnetlink: fix frame size warning in
rtnl_fill_ifinfo
On Tue, 2015-11-17 at 13:48 +0100, Hannes Frederic Sowa wrote:
> Fix the following warning:
>
> CC net/core/rtnetlink.o
> net/core/rtnetlink.c: In function ‘rtnl_fill_ifinfo’:
> net/core/rtnetlink.c:1308:1: warning: the frame size of 2864 bytes is larger than 2048 bytes [-Wframe-larger-than=]
> }
> ^
> by splitting up the huge rtnl_fill_ifinfo into some smaller ones, so we
> don't have the huge frame allocations at the same time.
>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
> ---
> net/core/rtnetlink.c | 274 ++++++++++++++++++++++++++++-----------------------
> 1 file changed, 152 insertions(+), 122 deletions(-)
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 504bd17..6f1c181 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -1045,15 +1045,156 @@ static int rtnl_phys_switch_id_fill(struct sk_buff *skb, struct net_device *dev)
> return 0;
> }
>
> +static noinline_for_stack int rtnl_fill_stats(struct sk_buff *skb,
> + struct net_device *dev)
> +{
> + struct nlattr *attr;
> + struct rtnl_link_stats64 temp;
> + const struct rtnl_link_stats64 *stats;
> +
Please reorder this in opposite way : longest lines first
> +
> +static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
> + struct net_device *dev,
> + int vfs_num,
> + struct nlattr *vfinfo)
> +{
> + struct nlattr *vf, *vfstats;
> + struct ifla_vf_info ivi;
> + struct ifla_vf_mac vf_mac;
> + struct ifla_vf_vlan vf_vlan;
> + struct ifla_vf_rate vf_rate;
> + struct ifla_vf_tx_rate vf_tx_rate;
> + struct ifla_vf_spoofchk vf_spoofchk;
> + struct ifla_vf_link_state vf_linkstate;
> + struct ifla_vf_rss_query_en vf_rss_query_en;
> + struct ifla_vf_stats vf_stats;
> + struct ifla_vf_trust vf_trust;
Same here.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists