From: kbuild test robot <lkp@intel.com>
To: Boris Pismenny <borisp@mellanox.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
Ilya Lesokhin <ilyal@mellanox.com>
Subject: [net-next:master 716/721] drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c:329:66: sparse: incorrect type in argument 6 (different base types)
Date: Tue, 17 Jul 2018 01:43:28 +0800 [thread overview]
Message-ID: <201807170125.UimDJTrz%fengguang.wu@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: aea06eb276d99590f400c877ca2bd74b4db91330
commit: 00aebab27c8752c7420dce286270ccedc70ac39a [716/721] net/mlx5e: TLS, add Innova TLS rx data path
reproduce:
# apt-get install sparse
git checkout 00aebab27c8752c7420dce286270ccedc70ac39a
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c:329:66: sparse: incorrect type in argument 6 (different base types) @@ expected unsigned short const [unsigned] [usertype] hnum @@ got const [unsigned] [usertype] hnum @@
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c:329:66: expected unsigned short const [unsigned] [usertype] hnum
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c:329:66: got restricted __be16 [usertype] dest
>> include/net/tls.h:435:47: sparse: cast from restricted __be32
vim +329 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c
302
303 static int tls_update_resync_sn(struct net_device *netdev,
304 struct sk_buff *skb,
305 struct mlx5e_tls_metadata *mdata)
306 {
307 struct sock *sk = NULL;
308 struct iphdr *iph;
309 struct tcphdr *th;
310 __be32 seq;
311
312 if (mdata->ethertype != htons(ETH_P_IP))
313 return -EINVAL;
314
315 iph = (struct iphdr *)(mdata + 1);
316
317 th = ((void *)iph) + iph->ihl * 4;
318
319 if (iph->version == 4) {
320 sk = inet_lookup_established(dev_net(netdev), &tcp_hashinfo,
321 iph->saddr, th->source, iph->daddr,
322 th->dest, netdev->ifindex);
323 #if IS_ENABLED(CONFIG_IPV6)
324 } else {
325 struct ipv6hdr *ipv6h = (struct ipv6hdr *)iph;
326
327 sk = __inet6_lookup_established(dev_net(netdev), &tcp_hashinfo,
328 &ipv6h->saddr, th->source,
> 329 &ipv6h->daddr, th->dest,
330 netdev->ifindex, 0);
331 #endif
332 }
333 if (!sk || sk->sk_state == TCP_TIME_WAIT)
334 goto out;
335
336 skb->sk = sk;
337 skb->destructor = sock_edemux;
338
339 memcpy(&seq, &mdata->content.recv.sync_seq, sizeof(seq));
340 tls_offload_rx_resync_request(sk, seq);
341 out:
342 return 0;
343 }
344
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
reply other threads:[~2018-07-16 18:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201807170125.UimDJTrz%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=borisp@mellanox.com \
--cc=ilyal@mellanox.com \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
/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