All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Florian Westphal <fw@strlen.de>, mptcp@lists.linux.dev
Subject: Re: [PATCH v2 mptcp-next 1/8] mptcp: enable busypoll from mptcp receive path
Date: Wed, 12 May 2021 12:04:13 +0200	[thread overview]
Message-ID: <20210512100413.GJ4038@breakpoint.cc> (raw)
In-Reply-To: <83bc7a0dc52a0f362489067babfbbb5c4bd083e6.camel@redhat.com>

Paolo Abeni <pabeni@redhat.com> wrote:
> On Tue, 2021-05-11 at 15:36 +0200, Florian Westphal wrote:
> > +	if (sk_can_busy_loop(sk) &&
> > +	    skb_queue_empty_lockless(&msk->receive_queue) &&
> > +	    skb_queue_empty_lockless(&sk->sk_receive_queue) &&
> > +	    inet_sk_state_load(sk) == TCP_ESTABLISHED)
> > +		sk_busy_loop(sk, nonblock);
> 
> If I understand the code correctly, here we need a valid sk-
> >sk_napi_id. That field is set by the TCP input path
> in tcp_finish_connect()/tcp_v{4,6}_do_rcv()/tcp_child_process() for the
> subflow ssk.
> 
> I think sk_napi_id is not currently available for the msk?!? 
> Copying it from the subflow requires some care, as the msk could end-up 
> busy polling on the 'wrong' napi instance ?!?

What about:

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -303,6 +303,7 @@ static bool __mptcp_move_skb(struct mptcp_sock *msk, struct sock *ssk,
 		if (tail && mptcp_try_coalesce(sk, tail, skb))
 			return true;
 
+		sk_mark_napi_id_once(sk, skb);
 		skb_set_owner_r(skb, sk);
 		__skb_queue_tail(&sk->sk_receive_queue, skb);
 		return true;

This sets the napi id to one that provided the last mptcp-in-sequence skb.

  parent reply	other threads:[~2021-05-12 10:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 13:36 [PATCH v2 mptcp-next 0/8] add cmsg support to receive path Florian Westphal
2021-05-11 13:36 ` [PATCH v2 mptcp-next 1/8] mptcp: enable busypoll from mptcp " Florian Westphal
2021-05-12  8:19   ` Paolo Abeni
2021-05-12  9:08     ` Florian Westphal
2021-05-12 10:04     ` Florian Westphal [this message]
2021-05-12 15:06       ` Paolo Abeni
2021-05-14  9:57         ` Florian Westphal
2021-05-14 10:35           ` Paolo Abeni
2021-05-14 10:50             ` Paolo Abeni
2021-05-11 13:36 ` [PATCH v2 mptcp-next 2/8] sock: expose so_timestamp options for mptcp Florian Westphal
2021-05-19  8:58   ` [sock] d1023bc19b: kernel-selftests.net.rxtimestamp.sh.fail kernel test robot
2021-05-19  8:58     ` kernel test robot
2021-05-11 13:36 ` [PATCH v2 mptcp-next 3/8] sock: expose so_timestamping options for mptcp Florian Westphal
2021-05-11 13:36 ` [PATCH v2 mptcp-next 4/8] mptcp: sockopt: propagate timestamp request to subflows Florian Westphal
2021-05-11 13:36 ` [PATCH v2 mptcp-next 5/8] mptcp: setsockopt: handle SOL_SOCKET in one place only Florian Westphal
2021-05-11 13:36 ` [PATCH v2 mptcp-next 6/8] tcp: export timestamp helpers for mptcp Florian Westphal
2021-05-11 13:36 ` [PATCH v2 mptcp-next 7/8] mptcp: receive path cmsg support Florian Westphal
2021-05-11 13:36 ` [PATCH v2 mptcp-next 8/8] selftests: mptcp_connect: add SO_TIMESTAMPNS " Florian Westphal

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=20210512100413.GJ4038@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=mptcp@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 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.