LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH v4] ipvs: allow tunneling with gue encapsulation

To: Julian Anastasov <ja@xxxxxx>
Subject: Re: [PATCH v4] ipvs: allow tunneling with gue encapsulation
Cc: kbuild test robot <lkp@xxxxxxxxx>, kbuild-all@xxxxxx, jacky.hu@xxxxxxxxxxx, jason.niesz@xxxxxxxxxxx, Wensong Zhang <wensong@xxxxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>, Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxxxxxx>, Florian Westphal <fw@xxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx
From: Jacky Hu <hengqing.hu@xxxxxxxxx>
Date: Mon, 18 Mar 2019 20:50:18 +0800
Hello,

On Mon, Mar 18, 2019 at 10:14:20AM +0200, Julian Anastasov wrote:
> 
>       Hello,
> 
> On Mon, 18 Mar 2019, Jacky Hu wrote:
> 
> > On Mon, Mar 18, 2019 at 10:10:20AM +0800, kbuild test robot wrote:
> > > Hi Jacky,
> > > 
> > > Thank you for the patch! Perhaps something to improve:
> > > 
> > > [auto build test WARNING on ipvs-next/master]
> > > [also build test WARNING on v5.1-rc1 next-20190306]
> > > [if your patch is applied to the wrong git tree, please drop us a note to 
> > > help improve the system]
> > > 
> > > url:    
> > > https://github.com/0day-ci/linux/commits/Jacky-Hu/ipvs-allow-tunneling-with-gue-encapsulation/20190318-070156
> > > base:   
> > > https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git master
> > > reproduce:
> > >         # apt-get install sparse
> > >         make ARCH=x86_64 allmodconfig
> > >         make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
> > > 
> > > 
> > > sparse warnings: (new ones prefixed by >>)
> > > 
> > >    net/netfilter/ipvs/ip_vs_ctl.c:835:42: sparse: incorrect type in 
> > > argument 2 (different base types) @@    expected int [signed] i @@    got 
> > > restricted __be1int [signed] i @@
> > >    net/netfilter/ipvs/ip_vs_ctl.c:835:42:    expected int [signed] i
> > >    net/netfilter/ipvs/ip_vs_ctl.c:835:42:    got restricted __be16 
> > > [usertype] tun_port
> > >    net/netfilter/ipvs/ip_vs_ctl.c:1197:44: sparse: expression using 
> > > sizeof(void)
> > > >> net/netfilter/ipvs/ip_vs_ctl.c:3207:37: sparse: incorrect type in 
> > > >> argument 3 (different base types) @@    expected restricted __be16 
> > > >> [usertype] value @@    got e] value @@
> > >    net/netfilter/ipvs/ip_vs_ctl.c:3207:37:    expected restricted __be16 
> > > [usertype] value
> > >    net/netfilter/ipvs/ip_vs_ctl.c:3207:37:    got int
> > >    net/netfilter/ipvs/ip_vs_ctl.c:1313:27: sparse: dereference of noderef 
> > > expression
> > > 
> > > vim +3207 net/netfilter/ipvs/ip_vs_ctl.c
> > > 
> 
> > > > 3207                             atomic_read(&dest->tun_port)) ||
> > 
> >     Should I change the type of tun_port from __be16 to u16?
> >     Looks like kbuild bugs a lot on this.
> 
>       In struct ip_vs_dest you should use __be16 for tun_port and
> __u16 for tun_type and avoid any atomic_t usage. To test it with sparse:
> 
> make C=2 CF="-D__CHECK_ENDIAN__" net/netfilter/ipvs/
> 
>       And this is the only problem in v4 of the patch. Then may be
> you should wait when net-next opens again before submitting v5.
> 
> Regards
> 
> --
> Julian Anastasov <ja@xxxxxx>
I have made the required changes locally, also updated ipvsadm accordingly,
once it opens, I'll submit them.

Thanks.
Best Regards,
Jacky

<Prev in Thread] Current Thread [Next in Thread>