All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH v2 21/45] mptcp: Implement MPTCP receive path
Date: Thu, 03 Oct 2019 08:53:51 +0800	[thread overview]
Message-ID: <201910030846.kbc3f351%lkp@intel.com> (raw)
In-Reply-To: <20191002233655.24323-22-mathew.j.martineau@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 8396 bytes --]

Hi Mat,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net/master]
[cannot apply to v5.4-rc1 next-20191002]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Mat-Martineau/Multipath-TCP/20191003-074736
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:15:0,
                    from net/mptcp/protocol.c:9:
   net/mptcp/protocol.c: In function 'mptcp_recvmsg':
   include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/printk.h:137:10: note: in definition of macro 'no_printk'
      printk(fmt, ##__VA_ARGS__);  \
             ^~~
   include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH'
    #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
                       ^~~~~~~~
   include/linux/printk.h:342:12: note: in expansion of macro 'KERN_DEBUG'
     no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
               ^~~~~~~~~~
>> net/mptcp/protocol.c:433:4: note: in expansion of macro 'pr_debug'
       pr_debug("Dup data, map len=%d acked=%lld dropped=%ld",
       ^~~~~~~~
   net/mptcp/protocol.c:433:56: note: format string is defined here
       pr_debug("Dup data, map len=%d acked=%lld dropped=%ld",
                                                         ~~^
                                                         %d

vim +/pr_debug +433 net/mptcp/protocol.c

   314	
   315	static int mptcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
   316				 int nonblock, int flags, int *addr_len)
   317	{
   318		struct mptcp_sock *msk = mptcp_sk(sk);
   319		struct mptcp_subflow_context *subflow;
   320		struct mptcp_read_arg arg;
   321		read_descriptor_t desc;
   322		struct socket *ssock;
   323		struct tcp_sock *tp;
   324		struct sock *ssk;
   325		int copied = 0;
   326		long timeo;
   327	
   328		lock_sock(sk);
   329		ssock = __mptcp_fallback_get_ref(msk);
   330		if (ssock) {
   331			release_sock(sk);
   332			pr_debug("fallback-read subflow=%p",
   333				 mptcp_subflow_ctx(ssock->sk));
   334			copied = sock_recvmsg(ssock, msg, flags);
   335			sock_put(ssock->sk);
   336			return copied;
   337		}
   338	
   339		ssk = mptcp_subflow_get_ref(msk);
   340		if (!ssk) {
   341			release_sock(sk);
   342			return -ENOTCONN;
   343		}
   344	
   345		subflow = mptcp_subflow_ctx(ssk);
   346		tp = tcp_sk(ssk);
   347	
   348		lock_sock(ssk);
   349	
   350		desc.arg.data = &arg;
   351		desc.error = 0;
   352	
   353		timeo = sock_rcvtimeo(sk, nonblock);
   354	
   355		len = min_t(size_t, len, INT_MAX);
   356	
   357		while (copied < len) {
   358			enum mapping_status status;
   359			u32 map_remaining;
   360			int bytes_read;
   361			u64 ack_seq;
   362			u64 old_ack;
   363			u32 ssn;
   364	
   365			status = mptcp_get_mapping(ssk);
   366	
   367			if (status == MAPPING_ADDED) {
   368				/* Common case, but nothing to do here */
   369			} else if (status == MAPPING_MISSING) {
   370				struct sk_buff *skb = skb_peek(&ssk->sk_receive_queue);
   371	
   372				if (!skb->len) {
   373					/* the TCP stack deliver 0 len FIN pkt
   374					 * to the receive queue, that is the only
   375					 * 0len pkts ever expected here, and we can
   376					 * admit no mapping only for 0 len pkts
   377					 */
   378					if (!(TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN))
   379						WARN_ONCE(1, "0len seq %d:%d flags %x",
   380							  TCP_SKB_CB(skb)->seq,
   381							  TCP_SKB_CB(skb)->end_seq,
   382							  TCP_SKB_CB(skb)->tcp_flags);
   383					sk_eat_skb(sk, skb);
   384					continue;
   385				}
   386				if (!subflow->map_valid) {
   387					WARN_ONCE(1, "corrupted stream: missing mapping");
   388					copied = -EBADFD;
   389					break;
   390				}
   391			} else if (status == MAPPING_EMPTY) {
   392				goto wait_for_data;
   393			} else if (status == MAPPING_DATA_FIN) {
   394				/* TODO: Handle according to RFC 6824 */
   395				if (!copied) {
   396					pr_err("Can't read after DATA_FIN");
   397					copied = -ENOTCONN;
   398				}
   399	
   400				break;
   401			}
   402	
   403			ssn = tcp_sk(ssk)->copied_seq - subflow->ssn_offset;
   404			old_ack = msk->ack_seq;
   405	
   406			if (unlikely(before(ssn, subflow->map_subflow_seq))) {
   407				/* Mapping covers data later in the subflow stream,
   408				 * currently unsupported.
   409				 */
   410				warn_bad_map(subflow, ssn);
   411				copied = -EBADFD;
   412				break;
   413			} else if (unlikely(!before(ssn, (subflow->map_subflow_seq +
   414							  subflow->map_data_len)))) {
   415				/* Mapping ends earlier in the subflow stream.
   416				 * Invalid
   417				 */
   418				warn_bad_map(subflow, ssn);
   419				copied = -EBADFD;
   420				break;
   421			}
   422	
   423			ack_seq = get_mapped_dsn(subflow);
   424			map_remaining = subflow->map_data_len - get_map_offset(subflow);
   425	
   426			if (before64(ack_seq, old_ack)) {
   427				/* Mapping covers data already received, discard data
   428				 * in the current mapping
   429				 */
   430				arg.msg = NULL;
   431				desc.count = min_t(size_t, old_ack - ack_seq,
   432						   map_remaining);
 > 433				pr_debug("Dup data, map len=%d acked=%lld dropped=%ld",
   434					 map_remaining, old_ack - ack_seq, desc.count);
   435			} else {
   436				arg.msg = msg;
   437				desc.count = min_t(size_t, len - copied, map_remaining);
   438			}
   439	
   440			/* Read mapped data */
   441			bytes_read = tcp_read_sock(ssk, &desc, mptcp_read_actor);
   442			if (bytes_read < 0)
   443				break;
   444	
   445			/* Refresh current MPTCP sequence number based on subflow seq */
   446			ack_seq = get_mapped_dsn(subflow);
   447	
   448			if (before64(old_ack, ack_seq))
   449				msk->ack_seq = ack_seq;
   450	
   451			if (!before(tcp_sk(ssk)->copied_seq - subflow->ssn_offset,
   452				    subflow->map_subflow_seq + subflow->map_data_len)) {
   453				subflow->map_valid = 0;
   454				pr_debug("Done with mapping: seq=%u data_len=%u",
   455					 subflow->map_subflow_seq,
   456					 subflow->map_data_len);
   457			}
   458	
   459			if (arg.msg)
   460				copied += bytes_read;
   461	
   462			/* The 'wait_for_data' code path can terminate the receive loop
   463			 * in a number of scenarios: check if more data is pending
   464			 * before giving up.
   465			 */
   466			if (!skb_queue_empty(&ssk->sk_receive_queue))
   467				continue;
   468	
   469	wait_for_data:
   470			if (copied)
   471				break;
   472	
   473			if (tp->urg_data && tp->urg_seq == tp->copied_seq) {
   474				pr_err("Urgent data present, cannot proceed");
   475				break;
   476			}
   477	
   478			if (ssk->sk_err || ssk->sk_state == TCP_CLOSE ||
   479			    (ssk->sk_shutdown & RCV_SHUTDOWN) || !timeo ||
   480			    signal_pending(current)) {
   481				pr_debug("nonblock or error");
   482				break;
   483			}
   484	
   485			/* Handle blocking and retry read if needed.
   486			 *
   487			 * Wait on MPTCP sock, the subflow will notify via data ready.
   488			 */
   489	
   490			pr_debug("block");
   491			release_sock(ssk);
   492			sk_wait_data(sk, &timeo, NULL);
   493			lock_sock(ssk);
   494		}
   495	
   496		release_sock(ssk);
   497		release_sock(sk);
   498	
   499		sock_put(ssk);
   500	
   501		return copied;
   502	}
   503	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 69526 bytes --]

  reply	other threads:[~2019-10-03  0:53 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 23:36 [RFC PATCH v2 00/45] Multipath TCP Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 01/45] tcp: Add MPTCP option number Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 02/45] net: Make sock protocol value checks more specific Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 03/45] sock: Make sk_protocol a 16-bit value Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 04/45] tcp: Define IPPROTO_MPTCP Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 05/45] mptcp: Add MPTCP socket stubs Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 06/45] mptcp: Handle MPTCP TCP options Mat Martineau
2019-10-03  1:58   ` kbuild test robot
2019-10-03  2:04   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 07/45] mptcp: Associate MPTCP context with TCP socket Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 08/45] tcp: Expose tcp struct and routine for MPTCP Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 09/45] mptcp: Handle MP_CAPABLE options for outgoing connections Mat Martineau
2019-10-03  3:16   ` kbuild test robot
2019-10-03  3:34   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 10/45] mptcp: add mptcp_poll Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 11/45] tcp, ulp: Add clone operation to tcp_ulp_ops Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 12/45] mptcp: Create SUBFLOW socket for incoming connections Mat Martineau
2019-10-03  4:35   ` kbuild test robot
2019-10-03  4:42   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 13/45] mptcp: Add key generation and token tree Mat Martineau
2019-10-03  2:01   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 14/45] mptcp: Add shutdown() socket operation Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 15/45] mptcp: Add setsockopt()/getsockopt() socket operations Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 16/45] tcp: clean ext on tx recycle Mat Martineau
2019-10-03  0:18   ` kbuild test robot
2019-10-03  1:09   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 17/45] mptcp: Add MPTCP to skb extensions Mat Martineau
2019-10-03  5:48   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 18/45] tcp: Prevent coalesce/collapse when skb has MPTCP extensions Mat Martineau
2019-10-03  5:52   ` kbuild test robot
2019-10-03  7:08   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 19/45] tcp: Export low-level TCP functions Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 20/45] mptcp: Write MPTCP DSS headers to outgoing data packets Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 21/45] mptcp: Implement MPTCP receive path Mat Martineau
2019-10-03  0:53   ` kbuild test robot [this message]
2019-10-03  1:17   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 22/45] mptcp: use sk_page_frag() in sendmsg Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 23/45] mptcp: sendmsg() do spool all the provided data Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 24/45] mptcp: allow collapsing consecutive sendpages on the same substream Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 25/45] tcp: Check for filled TCP option space before SACK Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 26/45] mptcp: Add path manager interface Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 27/45] mptcp: Add ADD_ADDR handling Mat Martineau
2019-10-03  6:54   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 28/45] mptcp: Add handling of incoming MP_JOIN requests Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 29/45] mptcp: harmonize locking on all socket operations Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 30/45] mptcp: new sysctl to control the activation per NS Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 31/45] mptcp: add basic kselftest for mptcp Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 32/45] mptcp: Add handling of outgoing MP_JOIN requests Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 33/45] mptcp: Implement path manager interface commands Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 34/45] mptcp: Make MPTCP socket block/wakeup ignore sk_receive_queue Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 35/45] mptcp: update per unacked sequence on pkt reception Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 36/45] mptcp: queue data for mptcp level retransmission Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 37/45] mptcp: introduce MPTCP retransmission timer Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 38/45] mptcp: implement memory accounting for mptcp rtx queue Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 39/45] mptcp: rework mptcp_sendmsg_frag to accept optional dfrag Mat Martineau
2019-10-03  1:17   ` kbuild test robot
2019-10-02 23:36 ` [RFC PATCH v2 40/45] mptcp: implement and use MPTCP-level retransmission Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 41/45] selftests: mptcp: make tc delays random Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 42/45] selftests: mptcp: extend mptcp_connect tool for ipv6 family Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 43/45] selftests: mptcp: add accept/getpeer checks Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 44/45] selftests: mptcp: add ipv6 connectivity Mat Martineau
2019-10-02 23:36 ` [RFC PATCH v2 45/45] selftests: mptcp: random ethtool tweaking Mat Martineau
2019-10-02 23:53 ` [RFC PATCH v2 00/45] Multipath TCP Mat Martineau
2019-10-03  0:12 ` David Miller
2019-10-03  0:27   ` Mat Martineau

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=201910030846.kbc3f351%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.