netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: James Yonan <james@openvpn.net>
Cc: netdev@vger.kernel.org, therbert@google.com
Subject: Re: [PATCH net-next] rfs: added /proc/sys/net/core/rps_allow_ooo flag to tweak flow alg
Date: Fri, 24 Jun 2022 10:05:36 -0700	[thread overview]
Message-ID: <20220624100536.4bbc1156@hermes.local> (raw)
In-Reply-To: <20220624165447.3814355-1-james@openvpn.net>

On Fri, 24 Jun 2022 10:54:47 -0600
James Yonan <james@openvpn.net> wrote:

> @@ -4494,6 +4496,7 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,
>  		 * If the desired CPU (where last recvmsg was done) is
>  		 * different from current CPU (one in the rx-queue flow
>  		 * table entry), switch if one of the following holds:
> +		 *   - rps_allow_ooo_sysctl is enabled.
>  		 *   - Current CPU is unset (>= nr_cpu_ids).
>  		 *   - Current CPU is offline.
>  		 *   - The current CPU's queue tail has advanced beyond the
> @@ -4502,7 +4505,7 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,
>  		 *     have been dequeued, thus preserving in order delivery.
>  		 */
>  		if (unlikely(tcpu != next_cpu) &&
> -		    (tcpu >= nr_cpu_ids || !cpu_online(tcpu) ||
> +		    (rps_allow_ooo_sysctl || tcpu >= nr_cpu_ids || !cpu_online(tcpu) ||
>  		     ((int)(per_cpu(softnet_data, tcpu).input_queue_head -
>  		      rflow->last_qtail)) >= 0)) {

This conditional is getting complex, maybe an inline helper function would
be clearer for developers that decide to add more in future.

  reply	other threads:[~2022-06-24 17:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 16:54 [PATCH net-next] rfs: added /proc/sys/net/core/rps_allow_ooo flag to tweak flow alg James Yonan
2022-06-24 17:05 ` Stephen Hemminger [this message]
2022-06-28  5:17   ` [PATCH net-next v2] " James Yonan
2022-06-28 17:03     ` Jakub Kicinski
2022-06-28 23:49       ` James Yonan
2022-07-11 20:38         ` James Yonan
2022-07-11 20:44           ` Jakub Kicinski
2022-06-28 17:16     ` Jakub Kicinski

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=20220624100536.4bbc1156@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=james@openvpn.net \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.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;
as well as URLs for NNTP newsgroup(s).