From: kernel test robot <lkp@intel.com>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, Simon Horman <horms@kernel.org>,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Matthieu Baerts <matttbe@kernel.org>,
Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next] mptcp: change mptcp_established_options() to return opt_size
Date: Tue, 2 Jun 2026 10:19:36 +0800 [thread overview]
Message-ID: <202606021023.2uNktNr0-lkp@intel.com> (raw)
In-Reply-To: <20260601091816.444738-1-edumazet@google.com>
Hi Eric,
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/Eric-Dumazet/mptcp-change-mptcp_established_options-to-return-opt_size/20260601-174435
base: net-next/main
patch link: https://lore.kernel.org/r/20260601091816.444738-1-edumazet%40google.com
patch subject: [PATCH net-next] mptcp: change mptcp_established_options() to return opt_size
config: powerpc-arches_defconfig (https://download.01.org/0day-ci/archive/20260602/202606021023.2uNktNr0-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260602/202606021023.2uNktNr0-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/202606021023.2uNktNr0-lkp@intel.com/
All errors (new ones prefixed by >>):
net/ipv4/tcp_output.c: In function 'tcp_established_options':
net/ipv4/tcp_output.c:1186:63: error: passing argument 3 of 'mptcp_established_options' makes pointer from integer without a cast [-Wint-conversion]
1186 | opt_size = mptcp_established_options(sk, skb, remaining,
| ^~~~~~~~~
| |
| unsigned int
net/ipv4/tcp_output.c:1186:63: note: possible fix: take the address with '&'
1186 | opt_size = mptcp_established_options(sk, skb, remaining,
| ^~~~~~~~~
| &
In file included from include/net/tcp.h:44,
from net/ipv4/tcp_output.c:40:
include/net/mptcp.h:271:59: note: expected 'unsigned int *' but argument is of type 'unsigned int'
271 | unsigned int *size,
| ~~~~~~~~~~~~~~^~~~
net/ipv4/tcp_output.c:1187:54: error: passing argument 4 of 'mptcp_established_options' makes integer from pointer without a cast [-Wint-conversion]
1187 | &opts->mptcp);
| ^~~~~~~~~~~~
| |
| struct mptcp_out_options *
include/net/mptcp.h:272:58: note: expected 'unsigned int' but argument is of type 'struct mptcp_out_options *'
272 | unsigned int remaining,
| ~~~~~~~~~~~~~^~~~~~~~~
>> net/ipv4/tcp_output.c:1186:28: error: too few arguments to function 'mptcp_established_options'; expected 5, have 4
1186 | opt_size = mptcp_established_options(sk, skb, remaining,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/net/mptcp.h:269:19: note: declared here
269 | static inline int mptcp_established_options(struct sock *sk,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/mptcp_established_options +1186 net/ipv4/tcp_output.c
1145
1146 /* Compute TCP options for ESTABLISHED sockets. This is not the
1147 * final wire format yet.
1148 */
1149 static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb,
1150 struct tcp_out_options *opts,
1151 struct tcp_key *key)
1152 {
1153 struct tcp_sock *tp = tcp_sk(sk);
1154 unsigned int size = 0;
1155 unsigned int eff_sacks;
1156
1157 opts->options = 0;
1158
1159 /* Better than switch (key.type) as it has static branches */
1160 if (tcp_key_is_md5(key)) {
1161 opts->options |= OPTION_MD5;
1162 size += TCPOLEN_MD5SIG_ALIGNED;
1163 } else if (tcp_key_is_ao(key)) {
1164 opts->options |= OPTION_AO;
1165 size += tcp_ao_len_aligned(key->ao_key);
1166 }
1167
1168 if (likely(tp->rx_opt.tstamp_ok)) {
1169 opts->options |= OPTION_TS;
1170 opts->tsval = skb ? tcp_skb_timestamp_ts(tp->tcp_usec_ts, skb) +
1171 tp->tsoffset : 0;
1172 opts->tsecr = tp->rx_opt.ts_recent;
1173 size += TCPOLEN_TSTAMP_ALIGNED;
1174 }
1175
1176 /* MPTCP options have precedence over SACK for the limited TCP
1177 * option space because a MPTCP connection would be forced to
1178 * fall back to regular TCP if a required multipath option is
1179 * missing. SACK still gets a chance to use whatever space is
1180 * left.
1181 */
1182 if (sk_is_mptcp(sk)) {
1183 unsigned int remaining = MAX_TCP_OPTION_SPACE - size;
1184 int opt_size;
1185
> 1186 opt_size = mptcp_established_options(sk, skb, remaining,
1187 &opts->mptcp);
1188 if (opt_size >= 0) {
1189 opts->options |= OPTION_MPTCP;
1190 size += opt_size;
1191 }
1192 }
1193
1194 eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack;
1195 if (unlikely(eff_sacks)) {
1196 const unsigned int remaining = MAX_TCP_OPTION_SPACE - size;
1197 if (likely(remaining >= TCPOLEN_SACK_BASE_ALIGNED +
1198 TCPOLEN_SACK_PERBLOCK)) {
1199 opts->num_sack_blocks =
1200 min_t(unsigned int, eff_sacks,
1201 (remaining - TCPOLEN_SACK_BASE_ALIGNED) /
1202 TCPOLEN_SACK_PERBLOCK);
1203
1204 size += TCPOLEN_SACK_BASE_ALIGNED +
1205 opts->num_sack_blocks * TCPOLEN_SACK_PERBLOCK;
1206 } else {
1207 opts->num_sack_blocks = 0;
1208 }
1209 } else {
1210 opts->num_sack_blocks = 0;
1211 }
1212
1213 if (tcp_ecn_mode_accecn(tp)) {
1214 int ecn_opt = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_ecn_option);
1215
1216 if (ecn_opt && tp->saw_accecn_opt &&
1217 (ecn_opt >= TCP_ACCECN_OPTION_PERSIST ||
1218 !tcp_accecn_opt_fail_send(tp)) &&
1219 (ecn_opt >= TCP_ACCECN_OPTION_FULL || tp->accecn_opt_demand ||
1220 tcp_accecn_option_beacon_check(sk))) {
1221 opts->use_synack_ecn_bytes = 0;
1222 size += tcp_options_fit_accecn(opts, tp->accecn_minlen,
1223 MAX_TCP_OPTION_SPACE - size);
1224 }
1225 }
1226
1227 if (unlikely(BPF_SOCK_OPS_TEST_FLAG(tp,
1228 BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG))) {
1229 unsigned int remaining = MAX_TCP_OPTION_SPACE - size;
1230
1231 bpf_skops_hdr_opt_len(sk, skb, NULL, NULL, 0, opts, &remaining);
1232
1233 size = MAX_TCP_OPTION_SPACE - remaining;
1234 }
1235
1236 return size;
1237 }
1238
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-06-02 2:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 9:18 [PATCH net-next] mptcp: change mptcp_established_options() to return opt_size Eric Dumazet
2026-06-01 10:17 ` Matthieu Baerts
2026-06-01 17:52 ` kernel test robot
2026-06-02 2:09 ` kernel test robot
2026-06-02 2:19 ` kernel test robot [this message]
2026-06-02 3:52 ` kernel test robot
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=202606021023.2uNktNr0-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
/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