[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <555CA5A1.9040603@mellanox.com>
Date: Wed, 20 May 2015 18:17:53 +0300
From: Haggai Eran <haggaie@...lanox.com>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
CC: Doug Ledford <dledford@...hat.com>, <linux-rdma@...r.kernel.org>,
<netdev@...r.kernel.org>, Liran Liss <liranl@...lanox.com>,
Guy Shapiro <guysh@...lanox.com>,
Shachar Raindel <raindel@...lanox.com>,
Yotam Kenneth <yotamke@...lanox.com>
Subject: Re: [PATCH v4 for-next 04/12] IB/ipoib: Return IPoIB devices matching
connection parameters
On 19/05/2015 21:28, Jason Gunthorpe wrote:
> On Sun, May 17, 2015 at 08:51:00AM +0300, Haggai Eran wrote:
>
>> +#if IS_ENABLED(CONFIG_IPV6)
>> + struct sockaddr_in6 *addr_in6 = (struct sockaddr_in6 *)addr;
>> +#endif
>> + __be32 ret_addr;
>> +
>> + switch (addr->sa_family) {
>> + case AF_INET:
>> + in_dev = in_dev_get(dev);
>> + if (!in_dev)
>> + return false;
>> +
>> + ret_addr = inet_confirm_addr(net, in_dev, 0,
>> + addr_in->sin_addr.s_addr,
>> + RT_SCOPE_HOST);
>> + in_dev_put(in_dev);
>> + if (ret_addr)
>> + return true;
>> +
>> + break;
>> +#if IS_ENABLED(CONFIG_IPV6)
>> + case AF_INET6:
>> + if (ipv6_chk_addr(net, &addr_in6->sin6_addr, dev, 1))
>> + return true;
>> +
>> + break;
>> +#endif
>
> Can you use
>
> if (IS_ENABLED(CONFIG_IPV6))
>
> At the call site instead of the #if guards?
Sure, I'll do that in the next revision of the patch-set.
Haggai
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists