diff mbox

[RFC,1/5] geneve: remove MODULE_ALIAS_RTNL_LINK from net/ipv4/geneve.c

Message ID 1428002227-11636-2-git-send-email-linville@tuxdriver.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

John W. Linville April 2, 2015, 7:17 p.m. UTC
This file is essentially a library for implementing the geneve
encapsulation protocol.  The file does not register any rtnl_link_ops,
so the MODULE_ALIAS_RTNL_LINK macro is inappropriate here.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 net/ipv4/geneve.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Stephen Hemminger April 2, 2015, 11:39 p.m. UTC | #1
On Thu,  2 Apr 2015 15:17:02 -0400
"John W. Linville" <linville@tuxdriver.com> wrote:

> This file is essentially a library for implementing the geneve
> encapsulation protocol.  The file does not register any rtnl_link_ops,
> so the MODULE_ALIAS_RTNL_LINK macro is inappropriate here.
> 
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
>  net/ipv4/geneve.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
> index 5a4828ba05ad..ba5283adbee8 100644
> --- a/net/ipv4/geneve.c
> +++ b/net/ipv4/geneve.c
> @@ -450,4 +450,3 @@ module_exit(geneve_cleanup_module);
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Jesse Gross <jesse@nicira.com>");
>  MODULE_DESCRIPTION("Driver for GENEVE encapsulated traffic");
> -MODULE_ALIAS_RTNL_LINK("geneve");

ok but then how does it get autoloaded?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Pirko April 3, 2015, 12:17 p.m. UTC | #2
Fri, Apr 03, 2015 at 01:39:19AM CEST, stephen@networkplumber.org wrote:
>On Thu,  2 Apr 2015 15:17:02 -0400
>"John W. Linville" <linville@tuxdriver.com> wrote:
>
>> This file is essentially a library for implementing the geneve
>> encapsulation protocol.  The file does not register any rtnl_link_ops,
>> so the MODULE_ALIAS_RTNL_LINK macro is inappropriate here.
>> 
>> Signed-off-by: John W. Linville <linville@tuxdriver.com>
>> ---
>>  net/ipv4/geneve.c | 1 -
>>  1 file changed, 1 deletion(-)
>> 
>> diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
>> index 5a4828ba05ad..ba5283adbee8 100644
>> --- a/net/ipv4/geneve.c
>> +++ b/net/ipv4/geneve.c
>> @@ -450,4 +450,3 @@ module_exit(geneve_cleanup_module);
>>  MODULE_LICENSE("GPL");
>>  MODULE_AUTHOR("Jesse Gross <jesse@nicira.com>");
>>  MODULE_DESCRIPTION("Driver for GENEVE encapsulated traffic");
>> -MODULE_ALIAS_RTNL_LINK("geneve");
>
>ok but then how does it get autoloaded?

There is no "struct rtnl_link_ops" defined for this. Therefore this does
not have any sense. User might use rtnl to load the module, but why?
That is clearly a bug which John is fixing.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John W. Linville April 3, 2015, 2:27 p.m. UTC | #3
On Fri, Apr 03, 2015 at 02:17:55PM +0200, Jiri Pirko wrote:
> Fri, Apr 03, 2015 at 01:39:19AM CEST, stephen@networkplumber.org wrote:
> >On Thu,  2 Apr 2015 15:17:02 -0400
> >"John W. Linville" <linville@tuxdriver.com> wrote:
> >
> >> This file is essentially a library for implementing the geneve
> >> encapsulation protocol.  The file does not register any rtnl_link_ops,
> >> so the MODULE_ALIAS_RTNL_LINK macro is inappropriate here.
> >> 
> >> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> >> ---
> >>  net/ipv4/geneve.c | 1 -
> >>  1 file changed, 1 deletion(-)
> >> 
> >> diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
> >> index 5a4828ba05ad..ba5283adbee8 100644
> >> --- a/net/ipv4/geneve.c
> >> +++ b/net/ipv4/geneve.c
> >> @@ -450,4 +450,3 @@ module_exit(geneve_cleanup_module);
> >>  MODULE_LICENSE("GPL");
> >>  MODULE_AUTHOR("Jesse Gross <jesse@nicira.com>");
> >>  MODULE_DESCRIPTION("Driver for GENEVE encapsulated traffic");
> >> -MODULE_ALIAS_RTNL_LINK("geneve");
> >
> >ok but then how does it get autoloaded?
> 
> There is no "struct rtnl_link_ops" defined for this. Therefore this does
> not have any sense. User might use rtnl to load the module, but why?
> That is clearly a bug which John is fixing.

Yes, exactly.  This module gets loaded via the depmod/modprobe magic
that handles loading modules to resolve external references during
the loadtime linking.

John
diff mbox

Patch

diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
index 5a4828ba05ad..ba5283adbee8 100644
--- a/net/ipv4/geneve.c
+++ b/net/ipv4/geneve.c
@@ -450,4 +450,3 @@  module_exit(geneve_cleanup_module);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jesse Gross <jesse@nicira.com>");
 MODULE_DESCRIPTION("Driver for GENEVE encapsulated traffic");
-MODULE_ALIAS_RTNL_LINK("geneve");