Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* net/ipv4/tcp.c:1606:2: error: call to undeclared function 'tcp_bpf_rcvlowat'; ISO C99 and later do not support implicit function declarations
@ 2026-05-10 11:30 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-10 11:30 UTC (permalink / raw)
  To: Kuniyuki Iwashima; +Cc: llvm, oe-kbuild-all, 0day robot

tree:   https://github.com/intel-lab-lkp/linux/commits/Kuniyuki-Iwashima/selftest-bpf-Use-BPF_SOCK_OPS_ALL_CB_FLAGS-1-for-bad_cb_test_rv/20260510-125645
head:   8387600c3c2126ca1ff6d5718eb17e7840afd157
commit: ffaa25dad7353701805e9dae4e5d985b7ecebcc3 bpf: tcp: Add SOCK_OPS rcvlowat hook.
date:   6 hours ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260510/202605101359.dgJxhzI7-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260510/202605101359.dgJxhzI7-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/202605101359.dgJxhzI7-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> net/ipv4/tcp.c:1606:2: error: call to undeclared function 'tcp_bpf_rcvlowat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1606 |         tcp_bpf_rcvlowat(sk, NULL);
         |         ^
   net/ipv4/tcp.c:1606:2: note: did you mean 'tcp_set_rcvlowat'?
   include/net/tcp.h:519:5: note: 'tcp_set_rcvlowat' declared here
     519 | int tcp_set_rcvlowat(struct sock *sk, int val);
         |     ^
   1 error generated.
--
>> net/ipv4/tcp_input.c:208:6: warning: no previous prototype for function 'bpf_skops_rcvlowat' [-Wmissing-prototypes]
     208 | void bpf_skops_rcvlowat(struct sock *sk, struct sk_buff *skb)
         |      ^
   net/ipv4/tcp_input.c:208:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     208 | void bpf_skops_rcvlowat(struct sock *sk, struct sk_buff *skb)
         | ^
         | static 
>> net/ipv4/tcp_input.c:5309:3: error: call to undeclared function 'tcp_bpf_rcvlowat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    5309 |                 tcp_bpf_rcvlowat(sk, skb);
         |                 ^
   net/ipv4/tcp_input.c:5309:3: note: did you mean 'tcp_set_rcvlowat'?
   include/net/tcp.h:519:5: note: 'tcp_set_rcvlowat' declared here
     519 | int tcp_set_rcvlowat(struct sock *sk, int val);
         |     ^
   net/ipv4/tcp_input.c:5514:2: error: call to undeclared function 'tcp_bpf_rcvlowat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    5514 |         tcp_bpf_rcvlowat(sk, skb);
         |         ^
   1 warning and 2 errors generated.
--
>> net/ipv4/tcp_fastopen.c:284:2: error: call to undeclared function 'tcp_bpf_rcvlowat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     284 |         tcp_bpf_rcvlowat(sk, skb);
         |         ^
   net/ipv4/tcp_fastopen.c:284:2: note: did you mean 'tcp_set_rcvlowat'?
   include/net/tcp.h:519:5: note: 'tcp_set_rcvlowat' declared here
     519 | int tcp_set_rcvlowat(struct sock *sk, int val);
         |     ^
   1 error generated.


vim +/tcp_bpf_rcvlowat +1606 net/ipv4/tcp.c

  1548	
  1549	/* Clean up the receive buffer for full frames taken by the user,
  1550	 * then send an ACK if necessary.  COPIED is the number of bytes
  1551	 * tcp_recvmsg has given to the user so far, it speeds up the
  1552	 * calculation of whether or not we must ACK for the sake of
  1553	 * a window update.
  1554	 */
  1555	void __tcp_cleanup_rbuf(struct sock *sk, int copied)
  1556	{
  1557		struct tcp_sock *tp = tcp_sk(sk);
  1558		bool time_to_ack = false;
  1559	
  1560		if (inet_csk_ack_scheduled(sk)) {
  1561			const struct inet_connection_sock *icsk = inet_csk(sk);
  1562	
  1563			if (/* Once-per-two-segments ACK was not sent by tcp_input.c */
  1564			    tp->rcv_nxt - tp->rcv_wup > icsk->icsk_ack.rcv_mss ||
  1565			    /*
  1566			     * If this read emptied read buffer, we send ACK, if
  1567			     * connection is not bidirectional, user drained
  1568			     * receive buffer and there was a small segment
  1569			     * in queue.
  1570			     */
  1571			    (copied > 0 &&
  1572			     ((icsk->icsk_ack.pending & ICSK_ACK_PUSHED2) ||
  1573			      ((icsk->icsk_ack.pending & ICSK_ACK_PUSHED) &&
  1574			       !inet_csk_in_pingpong_mode(sk))) &&
  1575			      !atomic_read(&sk->sk_rmem_alloc)))
  1576				time_to_ack = true;
  1577		}
  1578	
  1579		/* We send an ACK if we can now advertise a non-zero window
  1580		 * which has been raised "significantly".
  1581		 *
  1582		 * Even if window raised up to infinity, do not send window open ACK
  1583		 * in states, where we will not receive more. It is useless.
  1584		 */
  1585		if (copied > 0 && !time_to_ack && !(sk->sk_shutdown & RCV_SHUTDOWN)) {
  1586			__u32 rcv_window_now = tcp_receive_window(tp);
  1587	
  1588			/* Optimize, __tcp_select_window() is not cheap. */
  1589			if (2*rcv_window_now <= tp->window_clamp) {
  1590				__u32 new_window = __tcp_select_window(sk);
  1591	
  1592				/* Send ACK now, if this read freed lots of space
  1593				 * in our buffer. Certainly, new_window is new window.
  1594				 * We can advertise it now, if it is not less than current one.
  1595				 * "Lots" means "at least twice" here.
  1596				 */
  1597				if (new_window && new_window >= 2 * rcv_window_now)
  1598					time_to_ack = true;
  1599			}
  1600		}
  1601		if (time_to_ack) {
  1602			tcp_mstamp_refresh(tp);
  1603			tcp_send_ack(sk);
  1604		}
  1605	
> 1606		tcp_bpf_rcvlowat(sk, NULL);
  1607	}
  1608	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-10 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 11:30 net/ipv4/tcp.c:1606:2: error: call to undeclared function 'tcp_bpf_rcvlowat'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox