Re: [PATCH net-next v3 11/24] ovpn: implement packet processing

Antonio Quartulli
2024-05-22T14:07:21Z

On 12/05/2024 10:46, Sabrina Dubroca wrote:
> 2024-05-06, 03:16:24 +0200, Antonio Quartulli wrote:
>> diff --git a/drivers/net/ovpn/bind.c b/drivers/net/ovpn/bind.c
>> index c1f842c06e32..7240d1036fb7 100644
>> --- a/drivers/net/ovpn/bind.c
>> +++ b/drivers/net/ovpn/bind.c
>> @@ -13,6 +13,7 @@
>> #include "ovpnstruct.h"
>> #include "io.h"
>> #include "bind.h"
>> +#include "packet.h"
>> #include "peer.h"
>
> You have a few hunks like that in this patch, adding an include to a
> file that is otherwise not being modified. That's odd.

I just went through this and there is a reason for these extra includes.

Basically this patch is modifying peer.h so that it now requires
packet.h as dependency.

To reduce the includes complexity I am adding as many includes as
possible to .c files only, therefore the dependency needs to appear in
every .c file including peer.h, rather than adding the include to peer.h
itself.

This was my interpretation of Andrew Lunn's suggestion, but I may have
got it too extreme.

Opinions?

Regards,

--
Antonio Quartulli
OpenVPN Inc.