Netdev Archive on
help / color / mirror / Atom feed
From: Mark Gray <>
To: Pravin Shelar <>
Cc: Linux Kernel Network Developers <>,
	ovs dev <>,, Flavio Leitner <>
Subject: Re: [PATCH net-next v2] openvswitch: Introduce per-cpu upcall dispatch
Date: Fri, 16 Jul 2021 08:19:39 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 15/07/2021 23:57, Pravin Shelar wrote:
> On Thu, Jul 15, 2021 at 5:28 AM Mark Gray <> wrote:
>> The Open vSwitch kernel module uses the upcall mechanism to send
>> packets from kernel space to user space when it misses in the kernel
>> space flow table. The upcall sends packets via a Netlink socket.
>> Currently, a Netlink socket is created for every vport. In this way,
>> there is a 1:1 mapping between a vport and a Netlink socket.
>> When a packet is received by a vport, if it needs to be sent to
>> user space, it is sent via the corresponding Netlink socket.
>> This mechanism, with various iterations of the corresponding user
>> space code, has seen some limitations and issues:
>> * On systems with a large number of vports, there is a correspondingly
>> large number of Netlink sockets which can limit scaling.
>> (
>> * Packet reordering on upcalls.
>> (
>> * A thundering herd issue.
>> (
>> This patch introduces an alternative, feature-negotiated, upcall
>> mode using a per-cpu dispatch rather than a per-vport dispatch.
>> In this mode, the Netlink socket to be used for the upcall is
>> selected based on the CPU of the thread that is executing the upcall.
>> In this way, it resolves the issues above as:
>> a) The number of Netlink sockets scales with the number of CPUs
>> rather than the number of vports.
>> b) Ordering per-flow is maintained as packets are distributed to
>> CPUs based on mechanisms such as RSS and flows are distributed
>> to a single user space thread.
>> c) Packets from a flow can only wake up one user space thread.
>> The corresponding user space code can be found at:
>> Bugzilla:
>> Signed-off-by: Mark Gray <>
>> Acked-by: Flavio Leitner <>
> Acked-by: Pravin B Shelar <>
> Thanks,

Thanks for the review Pravin.

  reply	other threads:[~2021-07-16  7:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 12:27 Mark Gray
2021-07-15 22:57 ` Pravin Shelar
2021-07-16  7:19   ` Mark Gray [this message]
2021-07-16 18:10 ` patchwork-bot+netdevbpf

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH net-next v2] openvswitch: Introduce per-cpu upcall dispatch' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).