[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpXkvN2YXhRCA_S=4upb4dx7xc5U6H0XezgkCarq7FFibw@mail.gmail.com>
Date: Tue, 4 Dec 2018 21:40:34 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Tariq Toukan <tariqt@...lanox.com>
Cc: David Miller <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
eranbe@...lanox.com, Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [PATCH net 2/2] net/mlx4_en: Fix build break when CONFIG_INET is off
On Sun, Dec 2, 2018 at 4:37 AM Tariq Toukan <tariqt@...lanox.com> wrote:
>
> From: Saeed Mahameed <saeedm@...lanox.com>
>
> MLX4_EN depends on NETDEVICES, ETHERNET and INET Kconfigs.
> Make sure they are listed in MLX4_EN Kconfig dependencies.
>
> This fixes the following build break:
>
> drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18: warning: ‘struct iphdr’ declared inside parameter list [enabled by default]
> struct iphdr *iph)
> ^
> drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> drivers/net/ethernet/mellanox/mlx4/en_rx.c: In function ‘get_fixed_ipv4_csum’:
> drivers/net/ethernet/mellanox/mlx4/en_rx.c:586:20: error: dereferencing pointer to incomplete type
> _u8 ipproto = iph->protocol;
I am confused with this build error. It complains about the
compiler doesn't know struct iphdr, but struct iphdr is defined
merely in include/uapi/linux/ip.h, without any dependency with
CONFIG_INET.
How could changing Kconfig fix this?
BTW, the patch itself is probably correct as mlx4 does rely on
INET to function, only the build failure confuses me.
Thanks.
Powered by blists - more mailing lists