Re: [PATCH] cxgb4/chcr: fix building without IPv6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 08, 2020 at 08:53:06PM +0200, Arnd Bergmann wrote:
> When IPv6 support is completely disabled, the chelsio driver fails
> to build with
> 
> drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_ktls_act_open_req6':
> include/net/sock.h:380:37: error: 'struct sock_common' has no member named 'skc_v6_rcv_saddr'; did you mean 'skc_rcv_saddr'?
>   380 | #define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
>       |                                     ^~~~~~~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:258:37: note: in expansion of macro 'sk_v6_rcv_saddr'
>   258 |  cpl->local_ip_hi = *(__be64 *)&sk->sk_v6_rcv_saddr.in6_u.u6_addr8[0];
>       |                                     ^~~~~~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:260:36: note: in expansion of macro 'sk_v6_daddr'
>   260 |  cpl->peer_ip_hi = *(__be64 *)&sk->sk_v6_daddr.in6_u.u6_addr8[0];
>       |                                    ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:261:36: note: in expansion of macro 'sk_v6_daddr'
>   261 |  cpl->peer_ip_lo = *(__be64 *)&sk->sk_v6_daddr.in6_u.u6_addr8[8];
>       |                                    ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:296:27: note: in expansion of macro 'sk_v6_daddr'
>   296 |       ipv6_addr_type(&sk->sk_v6_daddr) == IPV6_ADDR_MAPPED)) {
>       |                           ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:303:29: note: in expansion of macro 'sk_v6_rcv_saddr'
>   303 |           (const u32 *)&sk->sk_v6_rcv_saddr.in6_u.u6_addr8,
>       |                             ^~~~~~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_ktls_dev_del':
> drivers/crypto/chelsio/chcr_ktls.c:401:26: note: in expansion of macro 'sk_v6_daddr'
>   401 |        (const u32 *)&sk->sk_v6_daddr.in6_u.u6_addr8,
>       |                          ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_ktls_dev_add':
> drivers/crypto/chelsio/chcr_ktls.c:495:27: note: in expansion of macro 'sk_v6_daddr'
>   495 |       ipv6_addr_type(&sk->sk_v6_daddr) == IPV6_ADDR_MAPPED)) {
>       |                           ^~~~~~~~~~~
> drivers/crypto/chelsio/chcr_ktls.c:498:22: note: in expansion of macro 'sk_v6_daddr'
>   498 |   memcpy(daaddr, sk->sk_v6_daddr.in6_u.u6_addr8, 16);
>       |                      ^~~~~~~~~~~
> 
> There is probably a good way to fix it, but this patch just adds a
> bunch of #if checks to get it to build again, which gets a bit
> ugly.
> 
> Fixes: 62370a4f346d ("cxgb4/chcr: Add ipv6 support and statistics")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> If you have a better idea to fix it, please send a different patch
> instead and treat this as a bug report. ;-)
> ---
>  drivers/crypto/chelsio/chcr_ktls.c | 26 ++++++++++++++++++++------
>  1 file changed, 20 insertions(+), 6 deletions(-)

Please send all chelsio patches via netdev.  Thanks!
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux