netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jason Xing <kerneljasonxing@gmail.com>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, dsahern@kernel.org, kuniyu@amazon.com,
	ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
	yonghong.song@linux.dev, john.fastabend@gmail.com,
	kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
	jolsa@kernel.org, shuah@kernel.org, ykolal@fb.com
Cc: oe-kbuild-all@lists.linux.dev, bpf@vger.kernel.org,
	netdev@vger.kernel.org, Jason Xing <kerneljasonxing@gmail.com>
Subject: Re: [PATCH bpf-next v3 1/2] bpf: support TCP_RTO_MAX_MS for bpf_setsockopt
Date: Thu, 20 Feb 2025 16:51:55 +0800	[thread overview]
Message-ID: <202502201843.xA1qZbKX-lkp@intel.com> (raw)
In-Reply-To: <20250219081333.56378-2-kerneljasonxing@gmail.com>

Hi Jason,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Jason-Xing/bpf-support-TCP_RTO_MAX_MS-for-bpf_setsockopt/20250219-161637
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20250219081333.56378-2-kerneljasonxing%40gmail.com
patch subject: [PATCH bpf-next v3 1/2] bpf: support TCP_RTO_MAX_MS for bpf_setsockopt
config: x86_64-buildonly-randconfig-002-20250220 (https://download.01.org/0day-ci/archive/20250220/202502201843.xA1qZbKX-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250220/202502201843.xA1qZbKX-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/202502201843.xA1qZbKX-lkp@intel.com/

All errors (new ones prefixed by >>):

   net/core/filter.c: In function 'sol_tcp_sockopt':
>> net/core/filter.c:5385:14: error: 'TCP_RTO_MAX_MS' undeclared (first use in this function); did you mean 'TCP_RTO_MAX'?
    5385 |         case TCP_RTO_MAX_MS:
         |              ^~~~~~~~~~~~~~
         |              TCP_RTO_MAX
   net/core/filter.c:5385:14: note: each undeclared identifier is reported only once for each function it appears in


vim +5385 net/core/filter.c

  5365	
  5366	static int sol_tcp_sockopt(struct sock *sk, int optname,
  5367				   char *optval, int *optlen,
  5368				   bool getopt)
  5369	{
  5370		if (sk->sk_protocol != IPPROTO_TCP)
  5371			return -EINVAL;
  5372	
  5373		switch (optname) {
  5374		case TCP_NODELAY:
  5375		case TCP_MAXSEG:
  5376		case TCP_KEEPIDLE:
  5377		case TCP_KEEPINTVL:
  5378		case TCP_KEEPCNT:
  5379		case TCP_SYNCNT:
  5380		case TCP_WINDOW_CLAMP:
  5381		case TCP_THIN_LINEAR_TIMEOUTS:
  5382		case TCP_USER_TIMEOUT:
  5383		case TCP_NOTSENT_LOWAT:
  5384		case TCP_SAVE_SYN:
> 5385		case TCP_RTO_MAX_MS:
  5386			if (*optlen != sizeof(int))
  5387				return -EINVAL;
  5388			break;
  5389		case TCP_CONGESTION:
  5390			return sol_tcp_sockopt_congestion(sk, optval, optlen, getopt);
  5391		case TCP_SAVED_SYN:
  5392			if (*optlen < 1)
  5393				return -EINVAL;
  5394			break;
  5395		case TCP_BPF_SOCK_OPS_CB_FLAGS:
  5396			if (*optlen != sizeof(int))
  5397				return -EINVAL;
  5398			if (getopt) {
  5399				struct tcp_sock *tp = tcp_sk(sk);
  5400				int cb_flags = tp->bpf_sock_ops_cb_flags;
  5401	
  5402				memcpy(optval, &cb_flags, *optlen);
  5403				return 0;
  5404			}
  5405			return bpf_sol_tcp_setsockopt(sk, optname, optval, *optlen);
  5406		default:
  5407			if (getopt)
  5408				return -EINVAL;
  5409			return bpf_sol_tcp_setsockopt(sk, optname, optval, *optlen);
  5410		}
  5411	
  5412		if (getopt) {
  5413			if (optname == TCP_SAVED_SYN) {
  5414				struct tcp_sock *tp = tcp_sk(sk);
  5415	
  5416				if (!tp->saved_syn ||
  5417				    *optlen > tcp_saved_syn_len(tp->saved_syn))
  5418					return -EINVAL;
  5419				memcpy(optval, tp->saved_syn->data, *optlen);
  5420				/* It cannot free tp->saved_syn here because it
  5421				 * does not know if the user space still needs it.
  5422				 */
  5423				return 0;
  5424			}
  5425	
  5426			return do_tcp_getsockopt(sk, SOL_TCP, optname,
  5427						 KERNEL_SOCKPTR(optval),
  5428						 KERNEL_SOCKPTR(optlen));
  5429		}
  5430	
  5431		return do_tcp_setsockopt(sk, SOL_TCP, optname,
  5432					 KERNEL_SOCKPTR(optval), *optlen);
  5433	}
  5434	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-02-20  8:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19  8:13 [PATCH bpf-next v3 0/2] bpf: support setting max RTO for bpf_setsockopt Jason Xing
2025-02-19  8:13 ` [PATCH bpf-next v3 1/2] bpf: support TCP_RTO_MAX_MS " Jason Xing
2025-02-20  8:51   ` kernel test robot [this message]
2025-02-20  8:57     ` Jason Xing
2025-02-22  1:40       ` Philip Li
2025-02-22 22:51   ` kernel test robot
2025-02-19  8:13 ` [PATCH bpf-next v3 2/2] selftests/bpf: add rto max for bpf_setsockopt test Jason Xing
2025-02-19 21:11 ` [PATCH bpf-next v3 0/2] bpf: support setting max RTO for bpf_setsockopt patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202502201843.xA1qZbKX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kerneljasonxing@gmail.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=ykolal@fb.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).