From: Herbert Xu <herbert@gondor.apana.org.au>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Ayush Sawal <ayush.sawal@chelsio.com>,
Vinay Kumar Yadav <vinay.yadav@chelsio.com>,
Rohit Maheshwari <rohitm@chelsio.com>,
"David S. Miller" <davem@davemloft.net>,
YueHaibing <yuehaibing@huawei.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cxgb4/chcr: fix building without IPv6
Date: Thu, 9 Apr 2020 12:30:35 +1000 [thread overview]
Message-ID: <20200409023035.GA27525@gondor.apana.org.au> (raw)
In-Reply-To: <20200408185330.190658-1-arnd@arndb.de>
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@arndb.de>
> ---
> 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@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2020-04-09 2:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 18:53 [PATCH] cxgb4/chcr: fix building without IPv6 Arnd Bergmann
2020-04-09 2:30 ` Herbert Xu [this message]
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=20200409023035.GA27525@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=arnd@arndb.de \
--cc=ayush.sawal@chelsio.com \
--cc=davem@davemloft.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rohitm@chelsio.com \
--cc=vinay.yadav@chelsio.com \
--cc=yuehaibing@huawei.com \
/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).