[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408310023.xSozGTYj-lkp@intel.com>
Date: Sat, 31 Aug 2024 00:18:10 +0800
From: kernel test robot <lkp@...el.com>
To: Vadim Fedorenko <vadfed@...a.com>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Willem de Bruijn <willemb@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
David Ahern <dsahern@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net_tstamp: add SCM_TS_OPT_ID to provide
OPT_ID in control message
Hi Vadim,
kernel test robot noticed the following build errors:
[auto build test ERROR on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Vadim-Fedorenko/selftests-txtimestamp-add-SCM_TS_OPT_ID-test/20240830-045630
base: net-next/main
patch link: https://lore.kernel.org/r/20240829204922.1674865-1-vadfed%40meta.com
patch subject: [PATCH net-next 1/2] net_tstamp: add SCM_TS_OPT_ID to provide OPT_ID in control message
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240831/202408310023.xSozGTYj-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240831/202408310023.xSozGTYj-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408310023.xSozGTYj-lkp@intel.com/
All errors (new ones prefixed by >>):
net/core/sock.c: In function '__sock_cmsg_send':
>> net/core/sock.c:2862:14: error: 'SCM_TS_OPT_ID' undeclared (first use in this function); did you mean 'IPCORK_TS_OPT_ID'?
2862 | case SCM_TS_OPT_ID:
| ^~~~~~~~~~~~~
| IPCORK_TS_OPT_ID
net/core/sock.c:2862:14: note: each undeclared identifier is reported only once for each function it appears in
vim +2862 net/core/sock.c
2828
2829 int __sock_cmsg_send(struct sock *sk, struct cmsghdr *cmsg,
2830 struct sockcm_cookie *sockc)
2831 {
2832 u32 tsflags;
2833
2834 switch (cmsg->cmsg_type) {
2835 case SO_MARK:
2836 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_RAW) &&
2837 !ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))
2838 return -EPERM;
2839 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32)))
2840 return -EINVAL;
2841 sockc->mark = *(u32 *)CMSG_DATA(cmsg);
2842 break;
2843 case SO_TIMESTAMPING_OLD:
2844 case SO_TIMESTAMPING_NEW:
2845 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32)))
2846 return -EINVAL;
2847
2848 tsflags = *(u32 *)CMSG_DATA(cmsg);
2849 if (tsflags & ~SOF_TIMESTAMPING_TX_RECORD_MASK)
2850 return -EINVAL;
2851
2852 sockc->tsflags &= ~SOF_TIMESTAMPING_TX_RECORD_MASK;
2853 sockc->tsflags |= tsflags;
2854 break;
2855 case SCM_TXTIME:
2856 if (!sock_flag(sk, SOCK_TXTIME))
2857 return -EINVAL;
2858 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u64)))
2859 return -EINVAL;
2860 sockc->transmit_time = get_unaligned((u64 *)CMSG_DATA(cmsg));
2861 break;
> 2862 case SCM_TS_OPT_ID:
2863 /* allow this option for UDP sockets only */
2864 if (!sk_is_udp(sk))
2865 return -EINVAL;
2866 tsflags = READ_ONCE(sk->sk_tsflags);
2867 if (!(tsflags & SOF_TIMESTAMPING_OPT_ID))
2868 return -EINVAL;
2869 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32)))
2870 return -EINVAL;
2871 sockc->ts_opt_id = *(u32 *)CMSG_DATA(cmsg);
2872 sockc->tsflags |= SOF_TIMESTAMPING_OPT_ID_CMSG;
2873 break;
2874 /* SCM_RIGHTS and SCM_CREDENTIALS are semantically in SOL_UNIX. */
2875 case SCM_RIGHTS:
2876 case SCM_CREDENTIALS:
2877 break;
2878 default:
2879 return -EINVAL;
2880 }
2881 return 0;
2882 }
2883 EXPORT_SYMBOL(__sock_cmsg_send);
2884
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists