From: Haishuang Yan <hidden> Date: 2016-05-24 02:40:13
For ipv6 case, enclose the code block in macro IS_ENABLED(CONFIG_IPV6).
---
Changes in v2:
- Place the "#if IS_ENABLED" block before the "} else if
(..) {" piece and the "#endif" before the closing brace and this
becomes much easier to look at.
Signed-off-by: Haishuang Yan <redacted>
---
net/ipv4/ip_tunnel.c | 2 ++
1 file changed, 2 insertions(+)
From: Eric Dumazet <hidden> Date: 2016-05-24 03:14:22
On Tue, 2016-05-24 at 10:39 +0800, Haishuang Yan wrote:
For ipv6 case, enclose the code block in macro IS_ENABLED(CONFIG_IPV6).
---
Changes in v2:
- Place the "#if IS_ENABLED" block before the "} else if
(..) {" piece and the "#endif" before the closing brace and this
becomes much easier to look at.
_Why_ is this patch needed ?
Please describe in the changelog what _actual_ problem you are trying to
address.
We have many points in the kernel using ipv6_get_dsfield() even if
CONFIG_IPV6=n, and it seems fine to me at least.
Thanks.
On May 24, 2016, at 11:14 AM, Eric Dumazet [off-list ref] wrote:
On Tue, 2016-05-24 at 10:39 +0800, Haishuang Yan wrote:
quoted
For ipv6 case, enclose the code block in macro IS_ENABLED(CONFIG_IPV6).
---
Changes in v2:
- Place the "#if IS_ENABLED" block before the "} else if
(..) {" piece and the "#endif" before the closing brace and this
becomes much easier to look at.
_Why_ is this patch needed ?
Please describe in the changelog what _actual_ problem you are trying to
address.
We have many points in the kernel using ipv6_get_dsfield() even if
CONFIG_IPV6=n, and it seems fine to me at least.
Thanks.
Yes, you’re right, but I think add this patch seems more reasonable in coding.
Thanks for your reviewing.
From: David Miller <davem@davemloft.net> Date: 2016-05-24 04:09:17
From: 严海双 <redacted>
Date: Tue, 24 May 2016 11:55:31 +0800
quoted
On May 24, 2016, at 11:14 AM, Eric Dumazet [off-list ref] wrote:
On Tue, 2016-05-24 at 10:39 +0800, Haishuang Yan wrote:
quoted
For ipv6 case, enclose the code block in macro IS_ENABLED(CONFIG_IPV6).
---
Changes in v2:
- Place the "#if IS_ENABLED" block before the "} else if
(..) {" piece and the "#endif" before the closing brace and this
becomes much easier to look at.
_Why_ is this patch needed ?
Please describe in the changelog what _actual_ problem you are trying to
address.
We have many points in the kernel using ipv6_get_dsfield() even if
CONFIG_IPV6=n, and it seems fine to me at least.
Thanks.
Yes, you’re right, but I think add this patch seems more reasonable in coding.
No, it isn't more reasonable at all.
We have the backup implementations when CONFIG_IPV6 is disabled
_EXACTLY_ to avoid ifdef crap like this in C files.