netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ipv6: inet6_connection_sock.h needs flowi
@ 2011-10-15  9:34 Christoph Paasch
  2011-10-15 22:41 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Paasch @ 2011-10-15  9:34 UTC (permalink / raw)
  To: davem; +Cc: netdev, Christoph Paasch

Otherwise we have a compiler-warning in c-files not including net/flow.h
before inet6_connection_sock.h .

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
---
 include/net/inet6_connection_sock.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/net/inet6_connection_sock.h b/include/net/inet6_connection_sock.h
index 3207e58..2a86a84 100644
--- a/include/net/inet6_connection_sock.h
+++ b/include/net/inet6_connection_sock.h
@@ -21,6 +21,7 @@ struct request_sock;
 struct sk_buff;
 struct sock;
 struct sockaddr;
+struct flowi;
 
 extern int inet6_csk_bind_conflict(const struct sock *sk,
 				   const struct inet_bind_bucket *tb);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: ipv6: inet6_connection_sock.h needs flowi
  2011-10-15  9:34 [PATCH net-next] net: ipv6: inet6_connection_sock.h needs flowi Christoph Paasch
@ 2011-10-15 22:41 ` David Miller
  2011-10-16  9:13   ` Christoph Paasch
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2011-10-15 22:41 UTC (permalink / raw)
  To: christoph.paasch; +Cc: netdev

From: Christoph Paasch <christoph.paasch@uclouvain.be>
Date: Sat, 15 Oct 2011 12:34:24 +0300

> Otherwise we have a compiler-warning in c-files not including net/flow.h
> before inet6_connection_sock.h .
> 
> Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>

Example?  I've never seen this warning.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: ipv6: inet6_connection_sock.h needs flowi
  2011-10-15 22:41 ` David Miller
@ 2011-10-16  9:13   ` Christoph Paasch
  2011-10-17  0:13     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Paasch @ 2011-10-16  9:13 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On 10/16/2011 01:41 AM, David Miller wrote:
> From: Christoph Paasch<christoph.paasch@uclouvain.be>
> Date: Sat, 15 Oct 2011 12:34:24 +0300
>
>> Otherwise we have a compiler-warning in c-files not including net/flow.h
>> before inet6_connection_sock.h .
>>
>> Signed-off-by: Christoph Paasch<christoph.paasch@uclouvain.be>
>
> Example?  I've never seen this warning.

Currently, all the c-files that include inet6_connection_sock.h 
indirectly include flow.h before inet6_connection_sock.h. Thus currently 
there is no compiler-warning.

However, if a c-file would include inet6_connection_sock.h without 
preceding an inclusion of flow.h, a compiler-warning will trigger (at 
least with gcc 4.6.1 from the latest ubuntu). Thus, the c-file has to 
include flow.h even if it doesn't need any struct/function from flow.h. 
Actually I had this case in our mptcp-code. Thus I had two choices, 
either include flow.h in the c-file (even if it's not needed there), or 
change inet6_connection_sock.h

I would say, that inet6_connection_sock.h should not rely on the c-files 
to include flow.h, and rather declare struct flowi (as it is done for 
the other structs used in inet6_connection_sock.h like in6_addr, 
sk_buff,...).

Or am I missing something?

Cheers,
Christoph

-- 
Christoph Paasch
PhD Student

IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: ipv6: inet6_connection_sock.h needs flowi
  2011-10-16  9:13   ` Christoph Paasch
@ 2011-10-17  0:13     ` David Miller
  2011-10-17 16:59       ` Christoph Paasch
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2011-10-17  0:13 UTC (permalink / raw)
  To: christoph.paasch; +Cc: netdev

From: Christoph Paasch <christoph.paasch@uclouvain.be>
Date: Sun, 16 Oct 2011 12:13:39 +0300

> On 10/16/2011 01:41 AM, David Miller wrote:
>> From: Christoph Paasch<christoph.paasch@uclouvain.be>
>> Date: Sat, 15 Oct 2011 12:34:24 +0300
>>
>>> Otherwise we have a compiler-warning in c-files not including
>>> net/flow.h
>>> before inet6_connection_sock.h .
>>>
>>> Signed-off-by: Christoph Paasch<christoph.paasch@uclouvain.be>
>>
>> Example?  I've never seen this warning.
> 
> Currently, all the c-files that include inet6_connection_sock.h
> indirectly include flow.h before inet6_connection_sock.h. Thus
> currently there is no compiler-warning.

Then there is no bug you are fixing.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: ipv6: inet6_connection_sock.h needs flowi
  2011-10-17  0:13     ` David Miller
@ 2011-10-17 16:59       ` Christoph Paasch
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Paasch @ 2011-10-17 16:59 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On 10/17/2011 03:13 AM, David Miller wrote:
> From: Christoph Paasch<christoph.paasch@uclouvain.be>
> Date: Sun, 16 Oct 2011 12:13:39 +0300
>
>> On 10/16/2011 01:41 AM, David Miller wrote:
>>> From: Christoph Paasch<christoph.paasch@uclouvain.be>
>>> Date: Sat, 15 Oct 2011 12:34:24 +0300
>>>
>>>> Otherwise we have a compiler-warning in c-files not including
>>>> net/flow.h
>>>> before inet6_connection_sock.h .
>>>>
>>>> Signed-off-by: Christoph Paasch<christoph.paasch@uclouvain.be>
>>>
>>> Example?  I've never seen this warning.
>>
>> Currently, all the c-files that include inet6_connection_sock.h
>> indirectly include flow.h before inet6_connection_sock.h. Thus
>> currently there is no compiler-warning.
>
> Then there is no bug you are fixing.

You're right. The patch did not intend to fix a bug (maybe the 
commit-message should have been more clear about that).
It was intended to make inet6_connection_sock.h not rely on the c-files 
to include flow.h, even if they would not need to. And to do the same 
for struct flowi as it is done for the other structs in this 
header-file. Thus it was rather a coding-style patch... :)

But ok, maybe I should not try to change something which is not really 
broken... ;-)

Christoph


-- 
Christoph Paasch
PhD Student

IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-17 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15  9:34 [PATCH net-next] net: ipv6: inet6_connection_sock.h needs flowi Christoph Paasch
2011-10-15 22:41 ` David Miller
2011-10-16  9:13   ` Christoph Paasch
2011-10-17  0:13     ` David Miller
2011-10-17 16:59       ` Christoph Paasch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).