* [net-next:master 741/754] net/ipv6/ip6_output.c:587:17: sparse: incorrect type in assignment (different base types)
@ 2015-05-25 21:35 kbuild test robot
2015-05-25 23:02 ` [PATCH net-next] ipv6: ipv6_select_ident() returns a __be32 Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2015-05-25 21:35 UTC (permalink / raw)
To: Martin KaFai Lau; +Cc: kbuild-all, netdev
tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 376cd36dc7b68ec7f7de1428fa055ce706a33bbf
commit: 286c2349f6665c3e67f464a5faa14a0e28be4842 [741/754] ipv6: Clean up ipv6_select_ident() and ip6_fragment()
reproduce:
# apt-get install sparse
git checkout 286c2349f6665c3e67f464a5faa14a0e28be4842
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> net/ipv6/ip6_output.c:587:17: sparse: incorrect type in assignment (different base types)
net/ipv6/ip6_output.c:587:17: expected restricted __be32 [usertype] frag_id
net/ipv6/ip6_output.c:587:17: got unsigned int
>> net/ipv6/ip6_output.c:1105:38: sparse: incorrect type in assignment (different base types)
net/ipv6/ip6_output.c:1105:38: expected restricted __be32 [usertype] ip6_frag_id
net/ipv6/ip6_output.c:1105:38: got unsigned int
--
>> net/ipv6/output_core.c:72:16: sparse: incorrect type in return expression (different base types)
net/ipv6/output_core.c:72:16: expected unsigned int
net/ipv6/output_core.c:72:16: got restricted __be32 [usertype] <noident>
vim +587 net/ipv6/ip6_output.c
571 sk_nocaps_add(skb->sk, NETIF_F_GSO_MASK);
572
573 skb->dev = skb_dst(skb)->dev;
574 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
575 IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
576 IPSTATS_MIB_FRAGFAILS);
577 kfree_skb(skb);
578 return -EMSGSIZE;
579 }
580
581 if (np && np->frag_size < mtu) {
582 if (np->frag_size)
583 mtu = np->frag_size;
584 }
585 mtu -= hlen + sizeof(struct frag_hdr);
586
> 587 frag_id = ipv6_select_ident(net, rt);
588
589 if (skb_has_frag_list(skb)) {
590 int first_len = skb_pagelen(skb);
591 struct sk_buff *frag2;
592
593 if (first_len - hlen > mtu ||
594 ((first_len - hlen) & 7) ||
595 skb_cloned(skb))
---
0-DAY kernel test infrastructure Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next] ipv6: ipv6_select_ident() returns a __be32
2015-05-25 21:35 [net-next:master 741/754] net/ipv6/ip6_output.c:587:17: sparse: incorrect type in assignment (different base types) kbuild test robot
@ 2015-05-25 23:02 ` Eric Dumazet
2015-05-26 0:22 ` Martin KaFai Lau
2015-05-26 0:28 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2015-05-25 23:02 UTC (permalink / raw)
To: kbuild test robot, David Miller; +Cc: Martin KaFai Lau, netdev
From: Eric Dumazet <edumazet@google.com>
ipv6_select_ident() returns a 32bit value in network order.
Fixes: 286c2349f666 ("ipv6: Clean up ipv6_select_ident() and ip6_fragment()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
---
include/net/ipv6.h | 6 +++---
net/ipv6/output_core.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index b950a2000b7f4608647b77dd029c94277a1afd97..35d485c780802cc28dedb4f889f3478be712b9df 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -671,9 +671,9 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add
return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
}
-u32 ipv6_select_ident(struct net *net,
- const struct in6_addr *daddr,
- const struct in6_addr *saddr);
+__be32 ipv6_select_ident(struct net *net,
+ const struct in6_addr *daddr,
+ const struct in6_addr *saddr);
void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb);
int ip6_dst_hoplimit(struct dst_entry *dst);
diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c
index 055e85cb7b6518f20796859e46fa043b186278e7..21678acd452165fae8a2c0b7c007ed1daa407344 100644
--- a/net/ipv6/output_core.c
+++ b/net/ipv6/output_core.c
@@ -61,9 +61,9 @@ void ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb)
}
EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);
-u32 ipv6_select_ident(struct net *net,
- const struct in6_addr *daddr,
- const struct in6_addr *saddr)
+__be32 ipv6_select_ident(struct net *net,
+ const struct in6_addr *daddr,
+ const struct in6_addr *saddr)
{
static u32 ip6_idents_hashrnd __read_mostly;
u32 id;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] ipv6: ipv6_select_ident() returns a __be32
2015-05-25 23:02 ` [PATCH net-next] ipv6: ipv6_select_ident() returns a __be32 Eric Dumazet
@ 2015-05-26 0:22 ` Martin KaFai Lau
2015-05-26 0:28 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: Martin KaFai Lau @ 2015-05-26 0:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: kbuild test robot, David Miller, netdev
On Mon, May 25, 2015 at 04:02:21PM -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> ipv6_select_ident() returns a 32bit value in network order.
>
> Fixes: 286c2349f666 ("ipv6: Clean up ipv6_select_ident() and ip6_fragment()")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
Thanks for fixing it.
Acked-by: Martin KaFai Lau <kafai@fb.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] ipv6: ipv6_select_ident() returns a __be32
2015-05-25 23:02 ` [PATCH net-next] ipv6: ipv6_select_ident() returns a __be32 Eric Dumazet
2015-05-26 0:22 ` Martin KaFai Lau
@ 2015-05-26 0:28 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2015-05-26 0:28 UTC (permalink / raw)
To: eric.dumazet; +Cc: fengguang.wu, kafai, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 25 May 2015 16:02:21 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> ipv6_select_ident() returns a 32bit value in network order.
>
> Fixes: 286c2349f666 ("ipv6: Clean up ipv6_select_ident() and ip6_fragment()")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-26 0:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25 21:35 [net-next:master 741/754] net/ipv6/ip6_output.c:587:17: sparse: incorrect type in assignment (different base types) kbuild test robot
2015-05-25 23:02 ` [PATCH net-next] ipv6: ipv6_select_ident() returns a __be32 Eric Dumazet
2015-05-26 0:22 ` Martin KaFai Lau
2015-05-26 0:28 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.