On 10/12/2020 13:33, Geva, Erez (ext) (DI PA CI R&D 3) wrote: > > On 10/12/2020 04:11, kernel test robot wrote: >> Hi Erez, >> >> Thank you for the patch! Yet something to improve: >> > Thanks for the robot, > as we rarely use clang for kernel. It is very helpful. > >> [auto build test ERROR on b65054597872ce3aefbc6a666385eabdf9e288da] >> >> url: https://github.com/0day-ci/linux/commits/Erez-Geva/Add-sending-TX-hardware-timestamp-for-TC-ETF-Qdisc/20201210-000521 > I can not find this commit > >> base: b65054597872ce3aefbc6a666385eabdf9e288da >> config: mips-randconfig-r026-20201209 (attached as .config) >> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344) > However the clang in > https://download.01.org/0day-ci/cross-package/clang-latest/clang.tar.xz is version 11 > >> reproduce (this is a W=1 build): >> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > Your make cross script tries to download the clang every time. > Please separate the download (which is ~400 MB and 2 GB after open) from the compilation. > > Please use "wget" follow your own instructions in this email. > >> chmod +x ~/bin/make.cross >> # install mips cross compiling tool for clang build >> # apt-get install binutils-mips-linux-gnu >> # https://github.com/0day-ci/linux/commit/8a8f634bc74db16dc551cfcf3b63c1183f98eaac >> git remote add linux-review https://github.com/0day-ci/linux >> git fetch --no-tags linux-review Erez-Geva/Add-sending-TX-hardware-timestamp-for-TC-ETF-Qdisc/20201210-000521 > This branch is absent > >> git checkout 8a8f634bc74db16dc551cfcf3b63c1183f98eaac > This commit as well > >> # save the attached .config to linux build tree >> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips >> > I use Debian 10.7. > I usually compile with GCC. I have not see any errors. > > When I use clang 11 from download.01.org I get a crash right away. > Please add a proper instructions how to use clang on Debian or provide > a Docker container with updated clang for testing. > >> If you fix the issue, kindly add following tag as appropriate >> Reported-by: kernel test robot <lkp@xxxxxxxxx> >> >> All errors (new ones prefixed by >>): >> >>>> net/core/sock.c:2383:7: error: use of undeclared identifier 'SCM_HW_TXTIME'; did you mean 'SOCK_HW_TXTIME'? >> case SCM_HW_TXTIME: >> ^~~~~~~~~~~~~ >> SOCK_HW_TXTIME >> include/net/sock.h:862:2: note: 'SOCK_HW_TXTIME' declared here >> SOCK_HW_TXTIME, >> ^ >> 1 error generated. >> >> vim +2383 net/core/sock.c >> >> 2351 >> 2352 int __sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct cmsghdr *cmsg, >> 2353 struct sockcm_cookie *sockc) >> 2354 { >> 2355 u32 tsflags; >> 2356 >> 2357 switch (cmsg->cmsg_type) { >> 2358 case SO_MARK: >> 2359 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) >> 2360 return -EPERM; >> 2361 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32))) >> 2362 return -EINVAL; >> 2363 sockc->mark = *(u32 *)CMSG_DATA(cmsg); >> 2364 break; >> 2365 case SO_TIMESTAMPING_OLD: >> 2366 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32))) >> 2367 return -EINVAL; >> 2368 >> 2369 tsflags = *(u32 *)CMSG_DATA(cmsg); >> 2370 if (tsflags & ~SOF_TIMESTAMPING_TX_RECORD_MASK) >> 2371 return -EINVAL; >> 2372 >> 2373 sockc->tsflags &= ~SOF_TIMESTAMPING_TX_RECORD_MASK; >> 2374 sockc->tsflags |= tsflags; >> 2375 break; >> 2376 case SCM_TXTIME: >> 2377 if (!sock_flag(sk, SOCK_TXTIME)) >> 2378 return -EINVAL; >> 2379 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u64))) >> 2380 return -EINVAL; >> 2381 sockc->transmit_time = get_unaligned((u64 *)CMSG_DATA(cmsg)); >> 2382 break; >>> 2383 case SCM_HW_TXTIME: >> 2384 if (!sock_flag(sk, SOCK_HW_TXTIME)) >> 2385 return -EINVAL; >> 2386 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u64))) >> 2387 return -EINVAL; >> 2388 sockc->transmit_hw_time = get_unaligned((u64 *)CMSG_DATA(cmsg)); >> 2389 break; >> 2390 /* SCM_RIGHTS and SCM_CREDENTIALS are semantically in SOL_UNIX. */ >> 2391 case SCM_RIGHTS: >> 2392 case SCM_CREDENTIALS: >> 2393 break; >> 2394 default: >> 2395 return -EINVAL; >> 2396 } >> 2397 return 0; >> 2398 } >> 2399 EXPORT_SYMBOL(__sock_cmsg_send); >> 2400 >> >> --- >> 0-DAY CI Kernel Test Service, Intel Corporation >> https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx >> > > Please improve the robot, so we can comply and properly support clang compilation. > > Thanks > Erez > Update, I use the same .config from the Intel robot test. I was trying to compile v5.10-rc6 with GCC cross compiler for mips. # apt-get install -t sid gcc-mips-linux-gnu kernel-test ((v5.10-rc6))$ /usr/bin/mips-linux-gnu-gcc --version mips-linux-gnu-gcc (Debian 10.2.0-17) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. kernel-test ((v5.10-rc6))$ cp ../intel_robot.config .config kernel-test ((v5.10-rc6))$ make ARCH=mips CROSS_COMPILE=/usr/bin/mips-linux-gnu- olddefconfig ... kernel-test ((v5.10-rc6))$ make ARCH=mips CROSS_COMPILE=/usr/bin/mips-linux-gnu- all ... CC init/main.o {standard input}: Assembler messages: {standard input}:9103: Error: found '(', expected: ')' {standard input}:9103: Error: found '(', expected: ')' {standard input}:9103: Error: non-constant expression in ".if" statement {standard input}:9103: Error: junk at end of line, first unrecognized character is `(' make[1]: *** [scripts/Makefile.build:283: init/main.o] Error 1 make: *** [Makefile:1797: init] Error 2 Erez