* net/ipv4/ip_gre.c:141:22: warning: variable 'data_len' set but not used
@ 2025-01-12 2:15 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-01-12 2:15 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: oe-kbuild-all, linux-kernel, mptcp, matthieu.baerts,
Jakub Kicinski, Matthieu Baerts
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b62cef9a5c673f1b8083159f5dc03c1c5daced2f
commit: 010b430d5df556d5d232e3751ac691ba9e88c041 mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
date: 4 years, 3 months ago
config: csky-randconfig-p001-20220406 (https://download.01.org/0day-ci/archive/20250112/202501121007.2GofXmh5-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250112/202501121007.2GofXmh5-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501121007.2GofXmh5-lkp@intel.com/
All warnings (new ones prefixed by >>):
net/ipv4/ip_gre.c: In function 'ipgre_err':
>> net/ipv4/ip_gre.c:141:22: warning: variable 'data_len' set but not used [-Wunused-but-set-variable]
141 | unsigned int data_len = 0;
| ^~~~~~~~
vim +/data_len +141 net/ipv4/ip_gre.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 122
071f92d05967a0c Rami Rosen 2008-05-21 123 /* All the routers (except for Linux) return only
^1da177e4c3f415 Linus Torvalds 2005-04-16 124 8 bytes of packet payload. It means, that precise relaying of
^1da177e4c3f415 Linus Torvalds 2005-04-16 125 ICMP in the real Internet is absolutely infeasible.
^1da177e4c3f415 Linus Torvalds 2005-04-16 126
^1da177e4c3f415 Linus Torvalds 2005-04-16 127 Moreover, Cisco "wise men" put GRE key to the third word
c54419321455631 Pravin B Shelar 2013-03-25 128 in GRE header. It makes impossible maintaining even soft
c54419321455631 Pravin B Shelar 2013-03-25 129 state for keyed GRE tunnels with enabled checksum. Tell
c54419321455631 Pravin B Shelar 2013-03-25 130 them "thank you".
^1da177e4c3f415 Linus Torvalds 2005-04-16 131
^1da177e4c3f415 Linus Torvalds 2005-04-16 132 Well, I wonder, rfc1812 was written by Cisco employee,
bff528578fc3c4a stephen hemminger 2012-02-24 133 what the hell these idiots break standards established
bff528578fc3c4a stephen hemminger 2012-02-24 134 by themselves???
^1da177e4c3f415 Linus Torvalds 2005-04-16 135 */
c54419321455631 Pravin B Shelar 2013-03-25 136 struct net *net = dev_net(skb->dev);
c54419321455631 Pravin B Shelar 2013-03-25 137 struct ip_tunnel_net *itn;
96f5a846bdd6098 Eric Dumazet 2013-05-18 138 const struct iphdr *iph;
88c7664f13bd1a3 Arnaldo Carvalho de Melo 2007-03-13 139 const int type = icmp_hdr(skb)->type;
88c7664f13bd1a3 Arnaldo Carvalho de Melo 2007-03-13 140 const int code = icmp_hdr(skb)->code;
20e1954fe238dbe Eric Dumazet 2016-06-18 @141 unsigned int data_len = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 142 struct ip_tunnel *t;
^1da177e4c3f415 Linus Torvalds 2005-04-16 143
32bbd8793f24b0d Stefano Brivio 2018-11-08 144 if (tpi->proto == htons(ETH_P_TEB))
32bbd8793f24b0d Stefano Brivio 2018-11-08 145 itn = net_generic(net, gre_tap_net_id);
32bbd8793f24b0d Stefano Brivio 2018-11-08 146 else if (tpi->proto == htons(ETH_P_ERSPAN) ||
32bbd8793f24b0d Stefano Brivio 2018-11-08 147 tpi->proto == htons(ETH_P_ERSPAN2))
32bbd8793f24b0d Stefano Brivio 2018-11-08 148 itn = net_generic(net, erspan_net_id);
32bbd8793f24b0d Stefano Brivio 2018-11-08 149 else
32bbd8793f24b0d Stefano Brivio 2018-11-08 150 itn = net_generic(net, ipgre_net_id);
32bbd8793f24b0d Stefano Brivio 2018-11-08 151
32bbd8793f24b0d Stefano Brivio 2018-11-08 152 iph = (const struct iphdr *)(icmp_hdr(skb) + 1);
32bbd8793f24b0d Stefano Brivio 2018-11-08 153 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags,
32bbd8793f24b0d Stefano Brivio 2018-11-08 154 iph->daddr, iph->saddr, tpi->key);
32bbd8793f24b0d Stefano Brivio 2018-11-08 155
32bbd8793f24b0d Stefano Brivio 2018-11-08 156 if (!t)
32bbd8793f24b0d Stefano Brivio 2018-11-08 157 return -ENOENT;
32bbd8793f24b0d Stefano Brivio 2018-11-08 158
^1da177e4c3f415 Linus Torvalds 2005-04-16 159 switch (type) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 160 default:
^1da177e4c3f415 Linus Torvalds 2005-04-16 161 case ICMP_PARAMETERPROB:
32bbd8793f24b0d Stefano Brivio 2018-11-08 162 return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 163
^1da177e4c3f415 Linus Torvalds 2005-04-16 164 case ICMP_DEST_UNREACH:
^1da177e4c3f415 Linus Torvalds 2005-04-16 165 switch (code) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 166 case ICMP_SR_FAILED:
^1da177e4c3f415 Linus Torvalds 2005-04-16 167 case ICMP_PORT_UNREACH:
^1da177e4c3f415 Linus Torvalds 2005-04-16 168 /* Impossible event. */
32bbd8793f24b0d Stefano Brivio 2018-11-08 169 return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 170 default:
^1da177e4c3f415 Linus Torvalds 2005-04-16 171 /* All others are translated to HOST_UNREACH.
^1da177e4c3f415 Linus Torvalds 2005-04-16 172 rfc2003 contains "deep thoughts" about NET_UNREACH,
^1da177e4c3f415 Linus Torvalds 2005-04-16 173 I believe they are just ether pollution. --ANK
^1da177e4c3f415 Linus Torvalds 2005-04-16 174 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 175 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 176 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 177 break;
9f57c67c379d88a Pravin B Shelar 2015-08-07 178
^1da177e4c3f415 Linus Torvalds 2005-04-16 179 case ICMP_TIME_EXCEEDED:
^1da177e4c3f415 Linus Torvalds 2005-04-16 180 if (code != ICMP_EXC_TTL)
32bbd8793f24b0d Stefano Brivio 2018-11-08 181 return 0;
20e1954fe238dbe Eric Dumazet 2016-06-18 182 data_len = icmp_hdr(skb)->un.reserved[1] * 4; /* RFC 4884 4.1 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 183 break;
55be7a9c6074f74 David S. Miller 2012-07-11 184
55be7a9c6074f74 David S. Miller 2012-07-11 185 case ICMP_REDIRECT:
55be7a9c6074f74 David S. Miller 2012-07-11 186 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 187 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 188
:::::: The code at line 141 was first introduced by commit
:::::: 20e1954fe238dbe5f8d3a979e593fe352bd703cf ipv6: RFC 4884 partial support for SIT/GRE tunnels
:::::: TO: Eric Dumazet <edumazet@google.com>
:::::: CC: David S. Miller <davem@davemloft.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* net/ipv4/ip_gre.c:141:22: warning: variable 'data_len' set but not used
@ 2025-01-30 17:55 kernel test robot
2025-01-31 8:18 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2025-01-30 17:55 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: oe-kbuild-all, linux-kernel, mptcp, matthieu.baerts,
Jakub Kicinski, Matthieu Baerts
Hi Geert,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 72deda0abee6e705ae71a93f69f55e33be5bca5c
commit: 010b430d5df556d5d232e3751ac691ba9e88c041 mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
date: 4 years, 3 months ago
config: csky-randconfig-p001-20220406 (https://download.01.org/0day-ci/archive/20250131/202501310132.oGDmspPN-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250131/202501310132.oGDmspPN-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501310132.oGDmspPN-lkp@intel.com/
All warnings (new ones prefixed by >>):
net/ipv4/ip_gre.c: In function 'ipgre_err':
>> net/ipv4/ip_gre.c:141:22: warning: variable 'data_len' set but not used [-Wunused-but-set-variable]
141 | unsigned int data_len = 0;
| ^~~~~~~~
vim +/data_len +141 net/ipv4/ip_gre.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 122
071f92d05967a0 Rami Rosen 2008-05-21 123 /* All the routers (except for Linux) return only
^1da177e4c3f41 Linus Torvalds 2005-04-16 124 8 bytes of packet payload. It means, that precise relaying of
^1da177e4c3f41 Linus Torvalds 2005-04-16 125 ICMP in the real Internet is absolutely infeasible.
^1da177e4c3f41 Linus Torvalds 2005-04-16 126
^1da177e4c3f41 Linus Torvalds 2005-04-16 127 Moreover, Cisco "wise men" put GRE key to the third word
c5441932145563 Pravin B Shelar 2013-03-25 128 in GRE header. It makes impossible maintaining even soft
c5441932145563 Pravin B Shelar 2013-03-25 129 state for keyed GRE tunnels with enabled checksum. Tell
c5441932145563 Pravin B Shelar 2013-03-25 130 them "thank you".
^1da177e4c3f41 Linus Torvalds 2005-04-16 131
^1da177e4c3f41 Linus Torvalds 2005-04-16 132 Well, I wonder, rfc1812 was written by Cisco employee,
bff528578fc3c4 stephen hemminger 2012-02-24 133 what the hell these idiots break standards established
bff528578fc3c4 stephen hemminger 2012-02-24 134 by themselves???
^1da177e4c3f41 Linus Torvalds 2005-04-16 135 */
c5441932145563 Pravin B Shelar 2013-03-25 136 struct net *net = dev_net(skb->dev);
c5441932145563 Pravin B Shelar 2013-03-25 137 struct ip_tunnel_net *itn;
96f5a846bdd609 Eric Dumazet 2013-05-18 138 const struct iphdr *iph;
88c7664f13bd1a Arnaldo Carvalho de Melo 2007-03-13 139 const int type = icmp_hdr(skb)->type;
88c7664f13bd1a Arnaldo Carvalho de Melo 2007-03-13 140 const int code = icmp_hdr(skb)->code;
20e1954fe238db Eric Dumazet 2016-06-18 @141 unsigned int data_len = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 142 struct ip_tunnel *t;
^1da177e4c3f41 Linus Torvalds 2005-04-16 143
32bbd8793f24b0 Stefano Brivio 2018-11-08 144 if (tpi->proto == htons(ETH_P_TEB))
32bbd8793f24b0 Stefano Brivio 2018-11-08 145 itn = net_generic(net, gre_tap_net_id);
32bbd8793f24b0 Stefano Brivio 2018-11-08 146 else if (tpi->proto == htons(ETH_P_ERSPAN) ||
32bbd8793f24b0 Stefano Brivio 2018-11-08 147 tpi->proto == htons(ETH_P_ERSPAN2))
32bbd8793f24b0 Stefano Brivio 2018-11-08 148 itn = net_generic(net, erspan_net_id);
32bbd8793f24b0 Stefano Brivio 2018-11-08 149 else
32bbd8793f24b0 Stefano Brivio 2018-11-08 150 itn = net_generic(net, ipgre_net_id);
32bbd8793f24b0 Stefano Brivio 2018-11-08 151
32bbd8793f24b0 Stefano Brivio 2018-11-08 152 iph = (const struct iphdr *)(icmp_hdr(skb) + 1);
32bbd8793f24b0 Stefano Brivio 2018-11-08 153 t = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags,
32bbd8793f24b0 Stefano Brivio 2018-11-08 154 iph->daddr, iph->saddr, tpi->key);
32bbd8793f24b0 Stefano Brivio 2018-11-08 155
32bbd8793f24b0 Stefano Brivio 2018-11-08 156 if (!t)
32bbd8793f24b0 Stefano Brivio 2018-11-08 157 return -ENOENT;
32bbd8793f24b0 Stefano Brivio 2018-11-08 158
^1da177e4c3f41 Linus Torvalds 2005-04-16 159 switch (type) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 160 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 161 case ICMP_PARAMETERPROB:
32bbd8793f24b0 Stefano Brivio 2018-11-08 162 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 163
^1da177e4c3f41 Linus Torvalds 2005-04-16 164 case ICMP_DEST_UNREACH:
^1da177e4c3f41 Linus Torvalds 2005-04-16 165 switch (code) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 166 case ICMP_SR_FAILED:
^1da177e4c3f41 Linus Torvalds 2005-04-16 167 case ICMP_PORT_UNREACH:
^1da177e4c3f41 Linus Torvalds 2005-04-16 168 /* Impossible event. */
32bbd8793f24b0 Stefano Brivio 2018-11-08 169 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 170 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 171 /* All others are translated to HOST_UNREACH.
^1da177e4c3f41 Linus Torvalds 2005-04-16 172 rfc2003 contains "deep thoughts" about NET_UNREACH,
^1da177e4c3f41 Linus Torvalds 2005-04-16 173 I believe they are just ether pollution. --ANK
^1da177e4c3f41 Linus Torvalds 2005-04-16 174 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 175 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 176 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 177 break;
9f57c67c379d88 Pravin B Shelar 2015-08-07 178
^1da177e4c3f41 Linus Torvalds 2005-04-16 179 case ICMP_TIME_EXCEEDED:
^1da177e4c3f41 Linus Torvalds 2005-04-16 180 if (code != ICMP_EXC_TTL)
32bbd8793f24b0 Stefano Brivio 2018-11-08 181 return 0;
20e1954fe238db Eric Dumazet 2016-06-18 182 data_len = icmp_hdr(skb)->un.reserved[1] * 4; /* RFC 4884 4.1 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 183 break;
55be7a9c6074f7 David S. Miller 2012-07-11 184
55be7a9c6074f7 David S. Miller 2012-07-11 185 case ICMP_REDIRECT:
55be7a9c6074f7 David S. Miller 2012-07-11 186 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 187 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 188
:::::: The code at line 141 was first introduced by commit
:::::: 20e1954fe238dbe5f8d3a979e593fe352bd703cf ipv6: RFC 4884 partial support for SIT/GRE tunnels
:::::: TO: Eric Dumazet <edumazet@google.com>
:::::: CC: David S. Miller <davem@davemloft.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: net/ipv4/ip_gre.c:141:22: warning: variable 'data_len' set but not used
2025-01-30 17:55 kernel test robot
@ 2025-01-31 8:18 ` Geert Uytterhoeven
0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2025-01-31 8:18 UTC (permalink / raw)
To: kernel test robot
Cc: oe-kbuild-all, linux-kernel, mptcp, matthieu.baerts,
Jakub Kicinski, Matthieu Baerts
Hi Kernel Test Roboty,
On Thu, 30 Jan 2025 at 18:55, kernel test robot <lkp@intel.com> wrote:
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 72deda0abee6e705ae71a93f69f55e33be5bca5c
> commit: 010b430d5df556d5d232e3751ac691ba9e88c041 mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
> date: 4 years, 3 months ago
> config: csky-randconfig-p001-20220406 (https://download.01.org/0day-ci/archive/20250131/202501310132.oGDmspPN-lkp@intel.com/config)
> compiler: csky-linux-gcc (GCC) 12.4.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250131/202501310132.oGDmspPN-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202501310132.oGDmspPN-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> net/ipv4/ip_gre.c: In function 'ipgre_err':
> >> net/ipv4/ip_gre.c:141:22: warning: variable 'data_len' set but not used [-Wunused-but-set-variable]
> 141 | unsigned int data_len = 0;
> | ^~~~~~~~
https://lore.kernel.org/all/67956320a8ee663f2582cc75f0e8047d69da5f6a.1737371364.git.geert@linux-m68k.org/#t
Waiting for the merge window to close to repost...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-31 8:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-12 2:15 net/ipv4/ip_gre.c:141:22: warning: variable 'data_len' set but not used kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2025-01-30 17:55 kernel test robot
2025-01-31 8:18 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox