netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks.com>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: davem@davemloft.net, tgraf@suug.ch, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v4] af_mpls: fix undefined reference to ip6_route_output
Date: Tue, 28 Jul 2015 08:41:48 -0700	[thread overview]
Message-ID: <55B7A2BC.2090509@cumulusnetworks.com> (raw)
In-Reply-To: <1438088676.25794.19.camel@stressinduktion.org>

On 7/28/15, 6:04 AM, Hannes Frederic Sowa wrote:
> On Mon, 2015-07-27 at 23:40 -0700, Roopa Prabhu wrote:
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> Undefined reference to ip6_route_output and ip_route_output
>> was reported with CONFIG_INET=n and CONFIG_IPV6=n.
>>
>> This patch adds new CONFIG_MPLS_NEXTHOP_DEVLOOKUP
>> to lookup nexthop device if user has not specified it
>> in RTA_OIF attribute. Make CONFIG_MPLS_NEXTHOP_DEVLOOKUP
>> depend on INET and (IPV6 || IPV6=n) because it
>> uses ip6_route_output and ip_route_output.
>>
>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>> Reported-by: Thomas Graf <tgraf@suug.ch>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>> ---
>>
>> v1 - v2: use IS_BUILTIN
>>
>> v2 - v3: Use new Kconfig option that depends on (IPV6 || IPV6=n) as
>> 	 suggested by Dave. Also uses IS_ERR as suggested by Thomas.
>>
>> v3 - v4: Include missed case of (MPLS_ROUTING=y && IPV6=m) reported by
>>           Dave.
>>
>>   net/mpls/Kconfig   |    8 ++++++++
>>   net/mpls/af_mpls.c |   19 ++++++++++++++++++-
>>   2 files changed, 26 insertions(+), 1 deletion(-)
>>
>> diff --git a/net/mpls/Kconfig b/net/mpls/Kconfig
>> index 5c467ef..134764e 100644
>> --- a/net/mpls/Kconfig
>> +++ b/net/mpls/Kconfig
>> @@ -33,4 +33,12 @@ config MPLS_IPTUNNEL
>>   	---help---
>>   	 mpls ip tunnel support.
>>   
>> +config MPLS_NEXTHOP_DEVLOOKUP
>> +	bool "MPLS: nexthop oif dev lookup"
>> +	depends on MPLS_ROUTING && INET && \
>> +		((IPV6 && !(MPLS_ROUTING=y && IPV6=m)) || IPV6=n)
>> +	---help---
>> +	 This enables mpls route nexthop dev lookup when oif is not
>> +	 specified by user
>> +
> Urks.
>
> Can't you simply use ipv6_stub_impl.ipv6_dst_lookup with sk=NULL to do
> that and don't have a run-time dependency on IPv6 at all (for the cost
> of a function pointer).
I did not realize that this could be an option. I now see vxlan using it.
I will try it out.

> Maybe same for IPv4?
I would prefer leaving IPV4 alone with CONFIG_INET. IPV6 was my problem 
case.
Let me see if i can fix that first without introducing a config option.

Thanks,
Roopa


>

  reply	other threads:[~2015-07-28 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28  6:40 [PATCH net-next v4] af_mpls: fix undefined reference to ip6_route_output Roopa Prabhu
2015-07-28 13:04 ` Hannes Frederic Sowa
2015-07-28 15:41   ` roopa [this message]
2015-07-28 19:28   ` roopa
2015-07-28 22:22     ` Hannes Frederic Sowa
2015-07-28 22:37       ` roopa
2015-07-28 14:17 ` Robert Shearman
2015-07-28 16:16   ` roopa
2015-07-29 10:38     ` Robert Shearman
2015-07-29 10:51       ` Thomas Graf
2015-07-29 11:52         ` Robert Shearman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55B7A2BC.2090509@cumulusnetworks.com \
    --to=roopa@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).